代码更新

This commit is contained in:
GaoHao
2025-02-26 19:46:20 +08:00
parent 7519ffced3
commit b4a0393d2d
413 changed files with 7483 additions and 60762 deletions

View File

@@ -60,20 +60,13 @@
</template>
<script setup>
import {
devices,
models,
subTypes
} from '@/pagePrinter/devices.js'
import { ref,reactive } from 'vue';
import { devices, models, subTypes } from '@/pagePrinter/devices.js'
import go from '@/commons/utils/go.js'
import {
shopConfigprinter,
delTableHandle
} from '@/http/yskApi/devices.js'
import {
getCurrentInstance
} from 'vue';
import myModel from '@/components/my-components/my-model.vue'
import { updatePrinter, delPrinter } from '@/api/printer.js'
const props = defineProps({
data: {
type: Object,
@@ -81,6 +74,11 @@
}
})
const emit = defineEmits(['init'])
const delModel=ref(null)
/**
* 编辑
*/
let toUrl = () => {
go.to('PAGES_PRINTER_ADD', {
id: props.data.id
@@ -103,25 +101,33 @@
return dayjs(s).format('YYYY-MM-DD HH:mm:ss')
}
/**
* 状态修改
* @param {Object} d
*/
async function openDiscountChange(d) {
delete props.data.createdAt
delete props.data.updatedAt
const res = await shopConfigprinter({
...props.data,
shopId: uni.getStorageSync('shopId'),
const res = await updatePrinter({
...props.data
})
emit('init', '')
}
const refs = getCurrentInstance()
// 删除
/**
* 删除
*/
function delTableHandleEvent() {
refs.ctx.$refs.delModel.open()
delModel.value.open()
}
//删除分类确认
/**
* 删除分类确认
*/
async function delModelConfirm() {
const res = await delTableHandle(props.data.id)
const res = await delPrinter(props.data.id)
emit('init', '')
refs.ctx.$refs.delModel.close()
delModel.value.close()
}
</script>