Browse Source

修改器具绑定功能

wms3.0_pda
niexiting 9 months ago
parent
commit
d796b4e0fd
  1. 24
      pages/container/record/containerBindRecord.vue
  2. 2
      static/config.json

24
pages/container/record/containerBindRecord.vue

@ -38,7 +38,8 @@
</view> </view>
<win-scan-container ref="scanContainer" title="器具" @getContainer='getContainer'></win-scan-container> <win-scan-container ref="scanContainer" title="器具" @getContainer='getContainer'></win-scan-container>
<win-scan-location ref="scanLocationPopup" title="来源库位" @getLocation="getFromLocation"></win-scan-location> <win-scan-location ref="scanLocationPopup" title="来源库位" @getLocation="getFromLocation"></win-scan-location>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false"></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false">
</win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -142,8 +143,8 @@
getContainerDetailByNumber(this.containerCode).then(res => { getContainerDetailByNumber(this.containerCode).then(res => {
if (res.data != null && res.data.subList.length > 0) { if (res.data != null && res.data.subList.length > 0) {
this.detailSource = this.getDataSource(res.data.subList) this.detailSource = this.getDataSource(res.data.subList)
this.showScanLocation();
} }
this.showScanLocation();
}).catch(error => { }).catch(error => {
this.showErrorMessage(error.message) this.showErrorMessage(error.message)
}) })
@ -167,15 +168,24 @@
var qty = result.label.qty; var qty = result.label.qty;
var itemCode = result.label.itemCode; var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode); var item = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) { if (item == undefined) {
if (this.detailSource.length == 0) {
item = this.createItemInfo(result.label);
let itemDetail = result.balance;
itemDetail.scaned = true;
item.subList.push(itemDetail);
this.detailSource.push(item);
} else {
this.showMessage("绑定物料【" + itemCode + "】与现有物料不一致,不可以绑定"); this.showMessage("绑定物料【" + itemCode + "】与现有物料不一致,不可以绑定");
}
} else { } else {
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch); var itemDetail = item.subList.find(r => r.packingNumber == packingNumber && r.batch == batch);
if (itemDetail == undefined) { if (itemDetail == undefined) {
itemDetail = result.balance; itemDetail = result.balance;
itemDetail.scaned = true; itemDetail.scaned = true;
detail.subList.push(itemDetail); item.subList.push(itemDetail);
} else { } else {
if (itemDetail.scaned) { if (itemDetail.scaned) {
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】已经扫描") this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】已经扫描")
@ -266,7 +276,7 @@
}, },
openScanPopup() { openScanPopup() {
if (this.fromLocationInfo != null) { if (this.fromLocationInfo.code != undefined) {
this.$refs.scanPopup.openScanPopupForType(this.fromLocationInfo.code, this.businessType); this.$refs.scanPopup.openScanPopupForType(this.fromLocationInfo.code, this.businessType);
} else { } else {
this.showScanLocation(); this.showScanLocation();

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://192.168.0.230:12080/admin-api", "value": "http://dev.ccwin-in.com:25100/api/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.176:12080/admin-api", "chefang": "http://192.168.0.176:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save