|
|
|
@ -5,7 +5,7 @@
|
|
|
|
|
<view class="left">
|
|
|
|
|
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="title">{{ $t('message.CommissionGoOut') }}</view>
|
|
|
|
|
<view class="title">{{ $t('message.CommissionReturn') }}</view>
|
|
|
|
|
<view class="right"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="content">
|
|
|
|
@ -46,14 +46,20 @@
|
|
|
|
|
<!-- 需求数量 -->
|
|
|
|
|
<view class="number">
|
|
|
|
|
<view class="number-left">
|
|
|
|
|
<view class="number-left-title">{{ $t('message.CommissionedDemandData') }}</view>
|
|
|
|
|
<view class="number-left-title">{{ $t('message.planQty') }}</view>
|
|
|
|
|
<u-input v-model="every.orderAmount" placeholder=" " :type="type" :border="border" class="input" disabled style="padding: '0'; flex: 0.9" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="number-right">
|
|
|
|
|
<view class="number-right-title">{{ $t('message.Cumulative') }}</view>
|
|
|
|
|
<view class="number-right-title">{{ $t('message.outQty') }}</view>
|
|
|
|
|
<u-input placeholder=" " v-model="every.outAmount" :type="type" :border="border" class="input" style="padding: '0'" disabled />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="number">
|
|
|
|
|
<view class="number-right">
|
|
|
|
|
<view class="number-right-title">{{ $t('message.returnQty') }}</view>
|
|
|
|
|
<u-input placeholder=" " v-model="every.returnAmount" :type="type" :border="border" class="input" style="padding: '0'" disabled />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 库位 -->
|
|
|
|
|
<view class="library">
|
|
|
|
|
<view class="library-left">
|
|
|
|
@ -226,26 +232,26 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips3') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let num: number = parseFloat(this.nowAmount) + parseFloat(this.every.outAmount);
|
|
|
|
|
if (num > parseFloat(this.every.orderAmount)) {
|
|
|
|
|
let num: number = parseFloat(this.nowAmount) + parseFloat(this.every.returnAmount);
|
|
|
|
|
if (num > parseFloat(this.every.outAmount)) {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: this.$t('message.Pi_tip') as any,
|
|
|
|
|
content: this.$t('message.demandQuantity') as any,
|
|
|
|
|
content: this.$t('message.returnQtyGreaterOutQty') as any,
|
|
|
|
|
cancelText: this.$t('message.Cancel') as any,
|
|
|
|
|
confirmText: this.$t('message.workArea_Confirm') as any,
|
|
|
|
|
success: (res) => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
let arr = {
|
|
|
|
|
poNo: this.form.documentNo,
|
|
|
|
|
materialCode: this.every.materialCode,
|
|
|
|
|
loginName: this.session.loginName,
|
|
|
|
|
factoryCode: this.session.factoryCode,
|
|
|
|
|
wlCode: this.wlCode.label,
|
|
|
|
|
nowAmount: this.nowAmount,
|
|
|
|
|
};
|
|
|
|
|
this.list.push(arr);
|
|
|
|
|
this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount);
|
|
|
|
|
this.nowAmount = '';
|
|
|
|
|
// let arr = {
|
|
|
|
|
// poNo: this.form.documentNo,
|
|
|
|
|
// materialCode: this.every.materialCode,
|
|
|
|
|
// loginName: this.session.loginName,
|
|
|
|
|
// factoryCode: this.session.factoryCode,
|
|
|
|
|
// wlCode: this.wlCode.label,
|
|
|
|
|
// nowAmount: this.nowAmount,
|
|
|
|
|
// };
|
|
|
|
|
// this.list.push(arr);
|
|
|
|
|
// this.material[this.materialIndex].returnAmount += parseFloat(this.list[this.list.length - 1].nowAmount);
|
|
|
|
|
// this.nowAmount = '';
|
|
|
|
|
} else if (res.cancel) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -261,7 +267,7 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
nowAmount: this.nowAmount,
|
|
|
|
|
};
|
|
|
|
|
this.list.push(arr);
|
|
|
|
|
this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount);
|
|
|
|
|
this.material[this.materialIndex].returnAmount += parseFloat(this.list[this.list.length - 1].nowAmount);
|
|
|
|
|
this.nowAmount = '';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -279,7 +285,7 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
i = index;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.material[i].outAmount -= parseFloat(e.lineData.nowAmount);
|
|
|
|
|
this.material[i].returnAmount -= parseFloat(e.lineData.nowAmount);
|
|
|
|
|
} else if (res.cancel) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|