From 5952a4737ed95bf7bffd8ce379a52cfb7ecf2ec0 Mon Sep 17 00:00:00 2001 From: zhangdi <1104545947@qq.com> Date: Mon, 30 Mar 2026 21:03:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/logistics/delivery.vue | 45 ++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/pages/logistics/delivery.vue b/pages/logistics/delivery.vue index d97d63f..b86b5ee 100644 --- a/pages/logistics/delivery.vue +++ b/pages/logistics/delivery.vue @@ -177,9 +177,9 @@ @@ -200,7 +200,6 @@ export default { startCode: "", boxData: null, startData: null, - endCenter: "", showDetails: false, boxInputFocus: true, startInputFocus: false, @@ -223,7 +222,33 @@ export default { startStationIndex: 0, // 起点站点选中索引 }; }, - computed: {}, + computed: { + canSubmit() { + if (this.scanMode == "bind") { + return !this.startData || !this.endCenter; + } + if (this.scanMode == "unbind") { + return !this.endCenter || !this.startStation; + } + // // 必须填写物料箱条码和终点作业中心 + // if (!this.endCenterIndex) { + // return false; + // } + + // // 根据模式校验起点 + // if (this.scanMode == "bind") { + // console.log(4444444, !this.startData); + // // 送料模式:需要 startData + // return !this.startData; + // } else if (this.scanMode == "unbind") { + // console.log(3333333333, !this.startStationIndex); + // // 叫料模式:需要 startStation + // return !this.startStationIndex; + // } + + // return false; + }, + }, mounted() { this.getWorkCenterList(); }, @@ -445,11 +470,21 @@ export default { uni.showLoading({ title: "提交中...", }); + let startStationCode = ""; + if (this.scanMode === "bind") { + // 送料模式:从 startData 获取 + startStationCode = this.startData.stationCode; + } else if (this.scanMode === "unbind") { + // 叫料模式:从选中的站点获取 + // startStations 中存储的是 {id: code, name: code} + startStationCode = this.startStation; + } let query_ = { boxBarcode: this.boxBarcode || "", //箱条码 - startStationCode: this.startData.stationCode, //开始站点 + startStationCode: startStationCode, //开始站点 endWcId: this.endCenterIndex, //终点作业中心 }; + console.log(89898989898, query_); this.$u.api .boxBindingTesk(query_) .then((res) => {