|
|
|
@ -43,17 +43,6 @@
|
|
|
|
|
<u-input placeholder=" " v-model="every.outAmount" :type="type" :border="border" class="input" style="padding: '0'" disabled />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 库位 -->
|
|
|
|
|
<view class="library">
|
|
|
|
|
<view class="library-left">
|
|
|
|
|
<view>{{ $t('message.CommissionedLocation') }}</view>
|
|
|
|
|
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode.value" class="search" :options="Loc" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="library-right">
|
|
|
|
|
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}</view>
|
|
|
|
|
<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">
|
|
|
|
@ -64,6 +53,17 @@
|
|
|
|
|
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 库位 -->
|
|
|
|
|
<view class="library">
|
|
|
|
|
<view class="library-left">
|
|
|
|
|
<view>{{ $t('message.CommissionedLocation') }}</view>
|
|
|
|
|
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode.value" class="search" :options="Loc" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="library-right">
|
|
|
|
|
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}</view>
|
|
|
|
|
<u-input :placeholder="$t('message.po_PleaseInput')" v-model="nowAmount" type="number" :disabled="disabled" :border="border" class="input" />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 添加 -->
|
|
|
|
|
<!-- <view class="add">
|
|
|
|
|
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
|
|
|
|
@ -102,6 +102,7 @@ import model from './model';
|
|
|
|
|
export default class SemiFinishedSO extends BasePage {
|
|
|
|
|
model = model;
|
|
|
|
|
detailHeader = detailHeader;
|
|
|
|
|
disabled = false;
|
|
|
|
|
form: any = {
|
|
|
|
|
documentNo: '',
|
|
|
|
|
};
|
|
|
|
@ -193,6 +194,10 @@ export default class SemiFinishedSO extends BasePage {
|
|
|
|
|
this.customToast(this.$t('message.barcode') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.Loc = [];
|
|
|
|
|
this.Container = '';
|
|
|
|
|
this.nowAmount = '';
|
|
|
|
|
this.disabled = false;
|
|
|
|
|
let params = {
|
|
|
|
|
productCode: this.every.materialCode,
|
|
|
|
|
barcode: this.Barcode,
|
|
|
|
@ -204,7 +209,14 @@ export default class SemiFinishedSO extends BasePage {
|
|
|
|
|
label: this.Container.locCode + '(' + this.Container.locCodesendSpot + ')',
|
|
|
|
|
});
|
|
|
|
|
this.wlCode = this.Loc[0];
|
|
|
|
|
this.nowAmount = 1;
|
|
|
|
|
// this.nowAmount = 1;
|
|
|
|
|
if (this.Container.cpRef4 == null) {
|
|
|
|
|
this.nowAmount = parseFloat(this.Container.qty);
|
|
|
|
|
this.disabled = true;
|
|
|
|
|
} else {
|
|
|
|
|
this.nowAmount = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4);
|
|
|
|
|
this.disabled = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//点击添加
|
|
|
|
|
Add() {
|
|
|
|
@ -225,26 +237,38 @@ export default class SemiFinishedSO extends BasePage {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let codenum = 0;
|
|
|
|
|
// let codenum = 0;
|
|
|
|
|
// if (this.list.length != 0) {
|
|
|
|
|
// this.list.forEach((item: any) => {
|
|
|
|
|
// if (item.barCode == this.Container.barcode) {
|
|
|
|
|
// num += parseFloat(item.receiptAmount);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// if (this.Container.cpRef4 == null) {
|
|
|
|
|
// if (parseFloat(this.nowAmount) + codenum > this.Container.qty) {
|
|
|
|
|
// this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
// console.log('3');
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// if (parseFloat(this.nowAmount) + codenum > this.Container.qty - parseFloat(this.Container.cpRef4)) {
|
|
|
|
|
// this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
// console.log('4');
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
let isTrue = true;
|
|
|
|
|
if (this.list.length != 0) {
|
|
|
|
|
this.list.forEach((item: any) => {
|
|
|
|
|
if (item.barCode == this.Container.barcode) {
|
|
|
|
|
num += item.receiptAmount;
|
|
|
|
|
return (isTrue = false);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (this.Container.cpRef4 == null) {
|
|
|
|
|
if (parseFloat(this.nowAmount) + codenum > this.Container.qty) {
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
console.log('3');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (parseFloat(this.nowAmount) + codenum > this.Container.qty - parseFloat(this.Container.cpRef4)) {
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
console.log('4');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (isTrue != true) {
|
|
|
|
|
this.customToast(this.$t('message.repeatedly') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!this.every) {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips6') as any);
|
|
|
|
@ -305,6 +329,7 @@ export default class SemiFinishedSO extends BasePage {
|
|
|
|
|
this.nowAmount = '';
|
|
|
|
|
this.Barcode = '';
|
|
|
|
|
this.Container = '';
|
|
|
|
|
this.disabled = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
deleteItem(e: any) {
|
|
|
|
|