优化问题

This commit is contained in:
gyq
2024-06-27 09:16:29 +08:00
parent f3dfd4a121
commit b5356d8370
7 changed files with 241 additions and 21 deletions

View File

@@ -154,7 +154,7 @@ const form = ref({
const canvasRef = ref(null)
const printData = ref({
deviceName: form.value.config.deviceName,
deviceName: '',
outNumber: '123',
name: '甜橙马黛茶',
skuName: '加奶、加珍珠',
@@ -173,7 +173,7 @@ function getPrintList() {
// 测试打印
const printHandle = _.throttle(function () {
if (!form.value.config.deviceName) {
ElMessage.warning("请选择打印设备");
ElMessage.error("请选择打印设备");
return;
}
ipcRenderer.send(
@@ -204,6 +204,7 @@ async function tbPrintMachineDetailAjax() {
try {
const res = await tbPrintMachineDetail(route.query.id);
form.value = res;
printData.value.deviceName = res.config.deviceName
} catch (error) {
console.log(error);
}
@@ -217,7 +218,7 @@ onMounted(() => {
QRCode.toCanvas(canvasRef.value, printData.value.outNumber, function (error) {
if (error) console.error(error)
console.log('success!');
// console.log('success!');
})
});
</script>