Browse Source

修改器具绑定功能

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

26
pages/container/record/containerBindRecord.vue

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

2
static/config.json

@ -18,7 +18,7 @@
"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",
"chefang": "http://192.168.0.176:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save