From 4dc436eaf188d3726bd5fbb4be69c1f0841263ff Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Mon, 19 Aug 2024 17:08:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/collect/DealOrderBlank.vue | 59 +++++++--- src/views/collect/IoCreateOrder.vue | 68 ++++++------ src/views/collect/IoCreateOrderBlank.vue | 130 ++++++++++++++++++++--- 3 files changed, 189 insertions(+), 68 deletions(-) diff --git a/src/views/collect/DealOrderBlank.vue b/src/views/collect/DealOrderBlank.vue index ff3f1593..772ab946 100644 --- a/src/views/collect/DealOrderBlank.vue +++ b/src/views/collect/DealOrderBlank.vue @@ -142,14 +142,24 @@ > - - 添加 - + + + 添加 + + 清空 + + { + this.loading = false + }).catch(() => { + this.loading = false + }) + + }, + //选择单据 selectPrescribe() { console.log(this.formData.workPlaceCode) @@ -546,7 +565,10 @@ export default { //获取下一单据 nextCollectOrder() { - getNextOrder(this.formData).then(res => { + let nextQuery = { + workPlaceCode: this.formData.workPlaceCode + } + getNextOrder(nextQuery).then(res => { this.loading = false if (res.code == 20000) { this.formData = res.data; @@ -568,6 +590,9 @@ export default { this.formData = row; this.curRow = row; this.dealSplitOrder() + this.formData.tagStatus = 2; + this.updateOrder(); + this.refreshCodesPanel(this); this.refreshCodesPanel(this); }, @@ -576,10 +601,8 @@ export default { startSplit(this.formData).then(res => { this.loading = false if (res.code == 20000) { - console.log(res.data) this.refreshCodesPanel(this); } else { - console.log(res.message) } }).catch(() => { @@ -617,7 +640,12 @@ export default { }, handleCommand(command) { // this.$message('click on item ' + command); - } + }, + clearCode() { + this.originCode = ""; + this.formData.code = ""; + this.scanCode = ""; + }, }, created() { getHead("prescribeTagCodeDeal", "1").then((re) => { @@ -633,10 +661,7 @@ export default { this.corpOrderIdDisabled = true this.formData.workPlaceCode = Number(this.$route.query.workplaceId); } - this.findCurWorkPlaces(); - - } } diff --git a/src/views/collect/IoCreateOrder.vue b/src/views/collect/IoCreateOrder.vue index 20bac445..5a857929 100644 --- a/src/views/collect/IoCreateOrder.vue +++ b/src/views/collect/IoCreateOrder.vue @@ -29,17 +29,13 @@ + + - - - -
-
{{ msgTip }}
-
-.scroll-alert { - width: 100%; /* 或者你需要的宽度 */ - overflow: hidden; - white-space: nowrap; - box-sizing: border-box; - /*border: 1px solid #f56c6c; !* 类似于 Element UI 警告框的边框 *!*/ - background-color: rgba(255, 235, 59, 0.1); /* 类似于 Element UI 警告框的背景色 */ - padding: 10px; - position: relative; -} - -.scroll-text { - display: inline-block; - padding-left: 100%; /* 初始位置在容器右侧 */ - animation: scroll 10s linear infinite; /* 滚动动画 */ -} - -@keyframes scroll { - from { - transform: translateX(0); - } - to { - transform: translateX(-100%); - } -} +/*.scroll-alert {*/ +/* width: 100%; !* 或者你需要的宽度 *!*/ +/* overflow: hidden;*/ +/* white-space: nowrap;*/ +/* box-sizing: border-box;*/ +/* !*border: 1px solid #f56c6c; !* 类似于 Element UI 警告框的边框 *!*!*/ +/* background-color: rgba(255, 235, 59, 0.1); !* 类似于 Element UI 警告框的背景色 *!*/ +/* padding: 10px;*/ +/* position: relative;*/ +/*}*/ + +/*.scroll-text {*/ +/* display: inline-block;*/ +/* padding-left: 100%; !* 初始位置在容器右侧 *!*/ +/* animation: scroll 10s linear infinite; !* 滚动动画 *!*/ +/*}*/ + +/*@keyframes scroll {*/ +/* from {*/ +/* transform: translateX(0);*/ +/* }*/ +/* to {*/ +/* transform: translateX(-100%);*/ +/* }*/ +/*}*/ .query-form-item { margin-right: 5px; diff --git a/src/views/collect/IoCreateOrderBlank.vue b/src/views/collect/IoCreateOrderBlank.vue index 1ff9c06f..761ccaca 100644 --- a/src/views/collect/IoCreateOrderBlank.vue +++ b/src/views/collect/IoCreateOrderBlank.vue @@ -29,14 +29,14 @@ - + {{ item.workplaceName }} {{ @@ -283,6 +285,7 @@ import {filterNoPage, remoteFilter} from "@/api/basic/sicker/skPersonApi"; import dialogInvProduct from "@/views/inout/DialogSelectInvProduct"; import {listPage} from "@/api/basic/sysWorkplaceManage"; import {printSplitLabel} from "@/api/collect/splitCreateOrder"; +import { findInvRemind } from "@/api/inout/splitCode"; export default { name: "ioCreateOrder", @@ -484,7 +487,7 @@ export default { isSuccess: false, result: "", scanResultType: "success", - msgTip: "工位存量提醒:", + msgTip: "当前工位存量提醒:", }; }, components: { @@ -495,7 +498,50 @@ export default { DialogSelectUnit, DialogSelectSpace, selectRlDialog, dialogInvProduct }, methods: { + changeInvRemind(val){ + let post = { + workPlaceCode: val + } + findInvRemind(post).then((response) => { + if (response.code === 20000) { + this.msgTip = response.data + }else { + + } + }) + .catch(() => { + }); + }, + successCloseData(){ + let workPlaceCode = this.orderFormData.workPlaceCode + this.orderFormData ={ + billNo: null, + corpOrderId: null, + action: null, + invCode: null, + fromCorp: null, + fromCorpName: null, + fromName: null, + fromInvCode: null, + remark: null, + fromType: 2, + errMsg: null, + checkPreInOrders: null, + checkPreInInvCode: null, + checkPreInSpaceCode: null, + curSpaceCode: null, + preSpaceCode: null, + preCurSpaceCode: null, //单据 + sickerAdNum: null, + workPlaceCode: null, + fifoSplit: 1, + } + this.orderFormData.workPlaceCode = workPlaceCode + this.scanCode= ""; + this.corpOrderIdDisabled = false; + this.refreshCodesPanel() + }, //获取用户仓库列表 findInvListByUser() { this.curInvOptions = []; @@ -616,7 +662,9 @@ export default { if (response.code === 20000) { // this.$message.success("成功"); const codeDetailComponent = this.$refs.IoCreateOrderCodeDetail.getOrderDetails(); - this.closeDialog(); + if(this.closeDialog != undefined){ + this.closeDialog(); + } this.clearOrder(); } else { // this.$message.error(response.message); @@ -858,7 +906,7 @@ export default { let query = { key: val, status: 1, - invCode: this.orderFormData.invCode, + // invCode: this.orderFormData.invCode, page: 1, limit: 100, } @@ -890,6 +938,10 @@ export default { //添加条码 addCode() { + if (this.$isBlank(this.orderFormData.workPlaceCode)) { + this.$message.warning("请选择工位!"); + return; + } this.originCode = ""; this.sictomText = ""; this.orderFormData.corpOrderId = this.orderFormData.corpOrderId.trim(); @@ -1156,7 +1208,9 @@ export default { this.retractLoading = false if (response.code == 20000) { this.$message.success("撤回成功!"); - this.closeDialog(); + if(this.closeDialog != undefined){ + this.closeDialog(); + } } else { this.$message.error(response.message); } @@ -1182,7 +1236,9 @@ export default { this.codeLoading = false if (response.code === 20000) { this.$message.success("提交成功"); - this.closeDialog(); + if(this.closeDialog != undefined){ + this.closeDialog(); + } } else { this.$message.error(response.message); } @@ -1195,7 +1251,9 @@ export default { this.checkLoading = false if (response.code === 20000) { this.$message.success("提交成功"); - this.closeDialog(); + if(this.closeDialog != undefined){ + this.closeDialog(); + } } else { this.$message.error(response.message); } @@ -1254,7 +1312,11 @@ export default { } if (response.code === 20000) { this.$message.success("提交成功,等待处理,请刷新后查看!"); - this.closeDialog(); + this.successCloseData() + console.log(this.closeDialog()) + if(this.closeDialog != undefined){ + this.closeDialog(); + } } else { this.$message.error(response.message); } @@ -1276,7 +1338,10 @@ export default { } if (response.code === 20000) { this.$message.success("提交成功"); - this.closeDialog(); + this.successCloseData() + if(this.closeDialog != undefined){ + this.closeDialog(); + } } else { this.$message.error(response.message); } @@ -1295,7 +1360,10 @@ export default { if (response.code === 20000) { this.$message.success("提交成功"); - this.closeDialog(); + this.successCloseData() + if(this.closeDialog != undefined){ + this.closeDialog(); + } } else { this.$message.error(response.message); } @@ -1335,7 +1403,11 @@ export default { this.submitLoading = false if (response.code === 20000) { this.$message.success("提交成功"); - this.closeDialog(); + this.successCloseData() + if(this.closeDialog != undefined){ + this.closeDialog(); + } + } else { this.$message.error(response.message); } @@ -1357,7 +1429,9 @@ export default { saveOrderWeb(tQuery).then((response) => { this.saveLoading = false if (response.code === 20000) { - this.closeDialog(); + if(this.closeDialog != undefined){ + this.closeDialog(); + } } else { this.$message.error(response.message); } @@ -1528,7 +1602,7 @@ export default { const resultParts = ["扫码解析结果:" + data.code]; if (data.udi) { - resultParts.push("DI标识: " + data.udi); + resultParts.push("层级标识: " + data.udi); } if (data.batchNo) { resultParts.push("批次号: " + data.batchNo); @@ -1546,7 +1620,7 @@ export default { }, printLabel() { let query = { - labelId: 5, + labelId: 7, } printSplitLabel(query).then((response) => { const binaryData = []; @@ -1688,6 +1762,32 @@ export default {