物料问题修改

master
zhangdi 2 weeks ago
parent 8faa5a2038
commit 5952a4737e
  1. 45
      pages/logistics/delivery.vue

@ -177,9 +177,9 @@
<view class="footer-action"> <view class="footer-action">
<button <button
@click="handleSubmit" @click="handleSubmit"
:disabled="!startData || !endCenter" :disabled="canSubmit"
class="submit-btn" class="submit-btn"
:class="{ 'btn-disabled': !startData || !endCenter }" :class="{ 'btn-disabled': canSubmit }"
> >
配送 配送
</button> </button>
@ -200,7 +200,6 @@ export default {
startCode: "", startCode: "",
boxData: null, boxData: null,
startData: null, startData: null,
endCenter: "",
showDetails: false, showDetails: false,
boxInputFocus: true, boxInputFocus: true,
startInputFocus: false, startInputFocus: false,
@ -223,7 +222,33 @@ export default {
startStationIndex: 0, // 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() { mounted() {
this.getWorkCenterList(); this.getWorkCenterList();
}, },
@ -445,11 +470,21 @@ export default {
uni.showLoading({ uni.showLoading({
title: "提交中...", 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_ = { let query_ = {
boxBarcode: this.boxBarcode || "", // boxBarcode: this.boxBarcode || "", //
startStationCode: this.startData.stationCode, // startStationCode: startStationCode, //
endWcId: this.endCenterIndex, // endWcId: this.endCenterIndex, //
}; };
console.log(89898989898, query_);
this.$u.api this.$u.api
.boxBindingTesk(query_) .boxBindingTesk(query_)
.then((res) => { .then((res) => {

Loading…
Cancel
Save