|
@@ -12,7 +12,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { getSoundMsg } from "./api/setting.js";
|
|
|
-import { getPrintOrderInfos } from "./api/order.js";
|
|
|
+import { getPrintOrderInfos } from "./api/order.js";
|
|
|
import bus from "./common/bus.js";
|
|
|
import UsbAutoPrint from "./common/UsbAutoPrint";
|
|
|
|
|
@@ -94,20 +94,24 @@ export default {
|
|
|
// usb自动打印新订单、预约单
|
|
|
getPrintOrderInfos({ orderId, waimaiOrderId }).then((res) => {
|
|
|
console.log("返回内容:", res);
|
|
|
- if (res.code === 200 && res.data.length) {
|
|
|
- let len = this.printList.length;
|
|
|
- res.data = res.data.map((v) => {
|
|
|
- if (v.exceptTime) {
|
|
|
- v.timeTxt = "期望" + v.exceptTime;
|
|
|
- } else {
|
|
|
- v.exceptTime = "立即送达";
|
|
|
- }
|
|
|
- return v;
|
|
|
- });
|
|
|
- this.printList = this.printList.concat(res.data);
|
|
|
- if (!len) {
|
|
|
- this.printOver(false);
|
|
|
- }
|
|
|
+ if (res.code === 200) {
|
|
|
+ let data = res.data;
|
|
|
+ data.exceptTime = data.exceptTime ? "期望" + data.exceptTime : "立即送达";
|
|
|
+ this.printData = res.data;
|
|
|
+ this.printNum += 1;
|
|
|
+ // let len = this.printList.length;
|
|
|
+ // res.data = res.data.map((v) => {
|
|
|
+ // if (v.exceptTime) {
|
|
|
+ // v.exceptTime = "期望" + v.exceptTime;
|
|
|
+ // } else {
|
|
|
+ // v.exceptTime = "立即送达";
|
|
|
+ // }
|
|
|
+ // return v;
|
|
|
+ // });
|
|
|
+ // this.printList = this.printList.concat(res.data);
|
|
|
+ // if (!len) {
|
|
|
+ // this.printOver(false);
|
|
|
+ // }
|
|
|
}
|
|
|
});
|
|
|
},
|