|
|
|
@ -54,6 +54,13 @@
|
|
|
|
|
<u-input :placeholder="$t('message.po_PleaseInput')" v-model="nowAmount" type="number" :border="border" class="input" />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 容器编码 -->
|
|
|
|
|
<view class="single">
|
|
|
|
|
<view class="single-left">
|
|
|
|
|
<view>{{ $t('message.Container') }}:</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="Add">{{ $t('message.product_add') }}</u-button>
|
|
|
|
@ -111,6 +118,8 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
//所选择的库位
|
|
|
|
|
wlCode: any = '';
|
|
|
|
|
materialIndex: any = null;
|
|
|
|
|
Barcode: any = '';
|
|
|
|
|
Container: any = '';
|
|
|
|
|
async QueryLoc() {
|
|
|
|
|
await this.model.queryItemLoc({
|
|
|
|
|
workArea: session.workareaCode,
|
|
|
|
@ -139,6 +148,8 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
this.every = '';
|
|
|
|
|
this.materialList = [];
|
|
|
|
|
this.Loc = [];
|
|
|
|
|
this.Barcode = '';
|
|
|
|
|
this.Container = '';
|
|
|
|
|
}
|
|
|
|
|
async close() {
|
|
|
|
|
if (this.form.documentNo == '') {
|
|
|
|
@ -202,8 +213,55 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
LocationChoice(e: any) {
|
|
|
|
|
this.wlCode = e.pickerName;
|
|
|
|
|
}
|
|
|
|
|
async searchBarcode() {
|
|
|
|
|
if (this.Barcode == '') {
|
|
|
|
|
this.customToast(this.$t('message.barcode') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let params = {
|
|
|
|
|
productCode: this.every.materialCode,
|
|
|
|
|
barcode: this.Barcode,
|
|
|
|
|
};
|
|
|
|
|
await this.model.searchBarcode(params);
|
|
|
|
|
this.Container = this.model.ContainerCode;
|
|
|
|
|
this.nowAmount = this.Container.qty;
|
|
|
|
|
}
|
|
|
|
|
//点击添加
|
|
|
|
|
Add() {
|
|
|
|
|
// if (this.Container == '') {
|
|
|
|
|
// this.customToast(this.$t('message.scanningContainer') as any);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// if (this.Container.cpRef4 == null) {
|
|
|
|
|
// if (parseFloat(this.nowAmount) > this.Container.qty) {
|
|
|
|
|
// this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// if (parseFloat(this.nowAmount) > this.Container.qty - parseFloat(this.Container.cpRef4)) {
|
|
|
|
|
// this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// let codenum: number = 0;
|
|
|
|
|
// if (this.list.length != 0) {
|
|
|
|
|
// this.list.forEach((item: any) => {
|
|
|
|
|
// if (item.barCode == this.Container.barcode) {
|
|
|
|
|
// num += item.receiptAmount;
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// if (this.Container.cpRef4 == null) {
|
|
|
|
|
// if (parseFloat(this.nowAmount) + codenum > this.Container.qty) {
|
|
|
|
|
// this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// if (parseFloat(this.nowAmount) + codenum > this.Container.qty - parseFloat(this.Container.cpRef4)) {
|
|
|
|
|
// this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
if (!this.every) {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips6') as any);
|
|
|
|
|
return;
|
|
|
|
@ -232,6 +290,8 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
factoryCode: this.session.factoryCode,
|
|
|
|
|
wlCode: this.wlCode.label,
|
|
|
|
|
nowAmount: this.nowAmount,
|
|
|
|
|
// barCode: this.Container.barcode,
|
|
|
|
|
barCode: this.Barcode,
|
|
|
|
|
};
|
|
|
|
|
this.list.push(arr);
|
|
|
|
|
this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount);
|
|
|
|
@ -249,6 +309,8 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
factoryCode: this.session.factoryCode,
|
|
|
|
|
wlCode: this.wlCode.label,
|
|
|
|
|
nowAmount: this.nowAmount,
|
|
|
|
|
// barCode: this.Container.barcode,
|
|
|
|
|
barCode: this.Barcode,
|
|
|
|
|
};
|
|
|
|
|
this.list.push(arr);
|
|
|
|
|
this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount);
|
|
|
|
@ -478,11 +540,14 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
.add {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100rpx;
|
|
|
|
|
position: relative;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 349px;
|
|
|
|
|
left: 0;
|
|
|
|
|
button {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 10rpx;
|
|
|
|
|
right: 20rpx;
|
|
|
|
|
top: 3rpx;
|
|
|
|
|
right: 35rpx;
|
|
|
|
|
z-index: 10000;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|