|
@@ -176,7 +176,7 @@
|
|
|
if (res.detail.value.length === 0) {
|
|
|
selectPrinter.value = 0;
|
|
|
} else {
|
|
|
- selectPrinter.value = printers[0].value;
|
|
|
+ selectPrinter.value = printers.value[0].value;
|
|
|
}
|
|
|
}
|
|
|
const printConfirm = () => {
|
|
@@ -191,11 +191,11 @@
|
|
|
order_no: valiFormData.value.order_code,
|
|
|
printer_code: selectPrinter.value
|
|
|
},
|
|
|
- success: (res) => {
|
|
|
+ success: (res:any) => {
|
|
|
subLoading.value = false;
|
|
|
console.log('打印成功', res);
|
|
|
messageType.value = 'success';
|
|
|
- messageText.value = '打印成功';
|
|
|
+ messageText.value = res.data.msg;
|
|
|
messageRef.value.open();
|
|
|
|
|
|
const historyItem = {
|
|
@@ -254,9 +254,18 @@
|
|
|
}
|
|
|
|
|
|
const onsubmit = () => {
|
|
|
- st && clearTimeout(st);
|
|
|
- selectPrinter.value = sendToPeinter.value.length > 0 ? printers.value[0].value : 0;
|
|
|
- printerDialog.value.open();
|
|
|
+ if (valiFormData.value.order_code) {
|
|
|
+ loading.value = true
|
|
|
+ st && clearTimeout(st);
|
|
|
+ selectPrinter.value = sendToPeinter.value.length > 0 ? printers.value[0].value : 0;
|
|
|
+ printerDialog.value.open();
|
|
|
+ loading.value = false
|
|
|
+ }else{
|
|
|
+ messageType.value = 'error';
|
|
|
+ messageText.value = '请填写运单号';
|
|
|
+ messageRef.value.open();
|
|
|
+ }
|
|
|
+
|
|
|
};
|
|
|
|
|
|
const getHistory = () => {
|