|
|
|
|
@ -177,9 +177,9 @@ |
|
|
|
|
<view class="footer-action"> |
|
|
|
|
<button |
|
|
|
|
@click="handleSubmit" |
|
|
|
|
:disabled="!startData || !endCenter" |
|
|
|
|
:disabled="canSubmit" |
|
|
|
|
class="submit-btn" |
|
|
|
|
:class="{ 'btn-disabled': !startData || !endCenter }" |
|
|
|
|
:class="{ 'btn-disabled': canSubmit }" |
|
|
|
|
> |
|
|
|
|
配送 |
|
|
|
|
</button> |
|
|
|
|
@ -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) => { |
|
|
|
|
|