diff --git a/src/views/collect/IoCreateOrder.vue b/src/views/collect/IoCreateOrder.vue index df64c692..bed6d7c0 100644 --- a/src/views/collect/IoCreateOrder.vue +++ b/src/views/collect/IoCreateOrder.vue @@ -330,7 +330,7 @@ import { submitOrderWeb, saveOrderWeb, enterCodeWeb, submitAllocateBiz, rollbackWaitcheck, submitCodeResult, submitCheckResult, delmitBiz, - batchVailCode, batchAddCode,batchAddCodeByOrderFinish + batchVailCode, batchAddCode, batchAddCodeByOrderFinish } from "@/api/inout/order"; import {filterSubAll, findByFrom, findInvByUser} from "@/api/system/invSubWarehouse"; import {parseTime} from "@/utils/coTools"; @@ -356,7 +356,7 @@ import {printSplitLabel} from "@/api/collect/splitCreateOrder"; import chooseDraftOrderDialog from "./chooseDraftOrderDialog" import {getUserBindWork} from '@/api/basic/collectPoint/userWorkplace' import {getWorkBindBusTypes} from '@/api/basic/workPlace/sysWorkplaceDocuments' -import { filterWorkOptimize } from '@/api/basic/workPlace/sysWorkplaceManage' +import {filterWorkOptimize} from '@/api/basic/workPlace/sysWorkplaceManage' export default { name: "ioCreateOrder", @@ -599,7 +599,12 @@ export default { codeDetailPanel, editCodeDialog, DialogCreateOrderSelect, - DialogSelectUnit, DialogSelectSpace, selectRlDialog, dialogInvProduct, chooseDraftOrderDialog,SelectCollectOrderEndDialog + DialogSelectUnit, + DialogSelectSpace, + selectRlDialog, + dialogInvProduct, + chooseDraftOrderDialog, + SelectCollectOrderEndDialog }, methods: { changePlace(val) { @@ -1931,11 +1936,20 @@ export default { } }); this.printMutiCodeResult(list) + this.$refs.inputRef.focus(); + this.$refs.inputRef.select(); if (this.valiCodes != null && this.valiCodes.length > 0) { + + if (this.$isBlank(this.orderFormData.corpOrderId)) { + let date = new Date(); + this.orderFormData.corpOrderId = + parseTime(date, "{y}{m}{d}{h}{i}{s}") + + Math.ceil(Math.random() * 89 + 10); + } + this.orderFormData.codeList = this.valiCodes batchAddCode(this.orderFormData).then((res) => { if (res.code === 20000) { - this.$refs.inputRef.focus(); this.orderFormData.billNo = res.data.orderId; this.refreshCodesPanel(this); this.printMutiCodeResult(res.data.vailCodeResultResponses) @@ -1948,7 +1962,7 @@ export default { // this.scanCode = this.valiCodes.join(";"); }); }, - batchAddCodeByOrderFinish(orderFinishBillNo){ + batchAddCodeByOrderFinish(orderFinishBillNo) { this.orderFormData.orderFinishBillNo = orderFinishBillNo batchAddCodeByOrderFinish(this.orderFormData).then((res) => { if (res.code === 20000) { @@ -2035,8 +2049,8 @@ export default { this.workplaceId = this.$route.query.workplaceId this.orderFormData.workPlaceCode = Number(this.$route.query.workplaceId); this.orderFormData.splitBusType = "YPCF002" - }else { - if (this.orderQuery != null){ + } else { + if (this.orderQuery != null) { this.orderFormData.workPlaceCode = String(this.orderQuery.workPlaceCode); // if (this.orderQuery.splitBusType != null){ // this.orderFormData.busType = this.orderQuery.splitBusType;