|
|
|
@ -55,12 +55,12 @@
|
|
|
|
|
<!-- 容器编码 -->
|
|
|
|
|
<view class="single">
|
|
|
|
|
<view class="single-left">
|
|
|
|
|
<view>{{ $t('message.Container') }}:</view>
|
|
|
|
|
<view>{{ $t('message.ContainerCode') }}:</view>
|
|
|
|
|
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="add">
|
|
|
|
|
<u-button type="primary" @click="searchBarcode">{{ $t('message.Query') }}</u-button>
|
|
|
|
|
<u-button type="primary" @click="searchBarcode">{{ $t('message.scan') }}</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 库位 -->
|
|
|
|
|
<view class="library">
|
|
|
|
@ -317,22 +317,26 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
};
|
|
|
|
|
await this.model.searchBarcode(params);
|
|
|
|
|
this.Container = this.model.ContainerCode;
|
|
|
|
|
let num = 0;
|
|
|
|
|
if (this.LocationList.length != 0) {
|
|
|
|
|
this.LocationList.forEach((item: any) => {
|
|
|
|
|
if (item.palletCode == this.Container.barcode) {
|
|
|
|
|
num += parseFloat(item.receiptAmount);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// let num = 0;
|
|
|
|
|
// if (this.LocationList.length != 0) {
|
|
|
|
|
// this.LocationList.forEach((item: any) => {
|
|
|
|
|
// if (item.palletCode == this.Container.barcode) {
|
|
|
|
|
// num += parseFloat(item.receiptAmount);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
if (this.Container.cpRef4 == null) {
|
|
|
|
|
this.receiptAmount = parseFloat(this.Container.qty) - num;
|
|
|
|
|
this.receiptAmount = parseFloat(this.Container.qty);
|
|
|
|
|
} else {
|
|
|
|
|
this.receiptAmount = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4) - num;
|
|
|
|
|
this.receiptAmount = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//点击添加
|
|
|
|
|
Add() {
|
|
|
|
|
if (this.Barcode == '') {
|
|
|
|
|
this.customToast(this.$t('message.scanningContainer') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const count = parseFloat(this.every.requestAmount);
|
|
|
|
|
if (this.receiptAmount == '' || !this.wl.value) {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips2') as any);
|
|
|
|
@ -346,38 +350,39 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips4') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let num = 0;
|
|
|
|
|
// if (this.Container.cpRef4 == null) {
|
|
|
|
|
// if (num + parseFloat(this.receiptAmount) > parseFloat(this.Container.qty)) {
|
|
|
|
|
// this.customToast(this.$t('message.dn_Tip') as any);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// if (num + parseFloat(this.receiptAmount) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
|
|
|
|
|
// this.customToast(this.$t('message.dn_Tip') as any);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
let isTrue = true;
|
|
|
|
|
// this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => {
|
|
|
|
|
// if (item.materialCode == this.every.materialCode && item.wlCode == this.wl.label) {
|
|
|
|
|
// this.customToast(this.$t('message.repeatedly') as any);
|
|
|
|
|
// return (isTrue = false);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
if (this.LocationList.length != 0) {
|
|
|
|
|
this.LocationList.forEach((item: any) => {
|
|
|
|
|
if (item.palletCode == this.Container.barcode) {
|
|
|
|
|
num += parseFloat(item.receiptAmount);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (this.Container.cpRef4 == null) {
|
|
|
|
|
if (num + parseFloat(this.receiptAmount) > parseFloat(this.Container.qty)) {
|
|
|
|
|
this.customToast(this.$t('message.dn_Tip') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (num + parseFloat(this.receiptAmount) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
|
|
|
|
|
this.customToast(this.$t('message.dn_Tip') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let isTrue = true;
|
|
|
|
|
this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => {
|
|
|
|
|
if (item.materialCode == this.every.materialCode && item.wlCode == this.wl.label) {
|
|
|
|
|
this.customToast(this.$t('message.repeatedly') as any);
|
|
|
|
|
return (isTrue = false);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (isTrue == true) {
|
|
|
|
|
this.LocationList.push({
|
|
|
|
|
...this.every,
|
|
|
|
|
receiptAmount: this.receiptAmount,
|
|
|
|
|
wlCode: this.wl.label,
|
|
|
|
|
palletCode: this.Container.barcode,
|
|
|
|
|
// palletCode: this.Container.barcode,
|
|
|
|
|
palletCode: this.Barcode,
|
|
|
|
|
});
|
|
|
|
|
this.DNReceivingList[this.everyIndex].wllist.push(this.LocationList[this.LocationList.length - 1]);
|
|
|
|
|
console.log('3 this.DNReceivingList[externalIndex].wllist', this.DNReceivingList[this.everyIndex].wllist);
|
|
|
|
@ -447,9 +452,11 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
// 清空 当前累计数量
|
|
|
|
|
this.receiptAmount = null;
|
|
|
|
|
this.DNReceivingList = [];
|
|
|
|
|
this.Barcode = '';
|
|
|
|
|
await this.query();
|
|
|
|
|
}
|
|
|
|
|
empty() {
|
|
|
|
|
this.Barcode = '';
|
|
|
|
|
this.LocationList = [];
|
|
|
|
|
this.Location = [];
|
|
|
|
|
this.poNo = '';
|
|
|
|
@ -513,7 +520,7 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
dnNo: this.form.documentNo,
|
|
|
|
|
};
|
|
|
|
|
await this.model.querydetaildlist(content);
|
|
|
|
|
this.toPage(this.page.raw.ingoods.dnReceipt.Local);
|
|
|
|
|
this.toPage(this.page.raw.ingoods.dnReceipt.RUSLocal);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
@ -568,7 +575,7 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
.single-left {
|
|
|
|
|
width: 80%;
|
|
|
|
|
width: 79%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|