fix:DN修复提交时携带的参数

master
zhoulei 4 years ago
parent 3ca4594c0d
commit 27c00ecf13

@ -139,6 +139,7 @@ export default {
}
},
selChange(e) {
console.log('触发机制。。');
this.nSel = e.detail.value[0];
},
filterOp(e) {

@ -45,14 +45,14 @@
</view>
<view class="number-right">
<view class="number-right-title">{{ $t('message.Cumulative') }}</view>
<u-input v-model="Cumulative" :type="type" :border="border" class="input" disabled />
<u-input v-model="every.receiptAmount" :type="type" :border="border" class="input" 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" class="search" :options="Location" />
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="Location" />
</view>
<view class="library-right">
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}</view>
@ -111,31 +111,29 @@ export default class dnReceiptDom extends BasePage {
form: any = {
documentNo: '',
};
material: any = {};
//
material: any = [];
poList: any = [];
materialList: any = [];
every: any = '';
//
every: any = {};
value = '';
type = 'text';
border = true;
//
Cumulative: any = 0;
//
sendSpotList: any = [];
//
receiptAmount: any = '';
//
Location: any = [];
//
//
LocationList: any = [];
//
wlCode: any = '';
//
wl: any = {
value: null,
};
//
poNo: any = '';
poNo: any = null;
//
requestAmount = null;
//
upload: any = [];
requestAmount: number = null;
//
async onReady() {
//
@ -165,9 +163,6 @@ export default class dnReceiptDom extends BasePage {
});
return;
}
// 1.
// 2.poNo
// 3.poNo
await this.model.queryOrderInInfo(this.form.documentNo);
let list: any = localStorage.getItem('list');
localStorage.removeItem('list');
@ -214,16 +209,16 @@ export default class dnReceiptDom extends BasePage {
// receiptAmount requestAmount
materialChoice(e: any) {
//
this.every = e.pickerName;
this.every = { ...e.pickerName };
}
//
LocationChoice(e: any) {
this.wlCode = e.pickerName.value;
this.wl = e.pickerName;
}
//
Add() {
const count = this.totalLocation(this.LocationList);
if (this.receiptAmount == '' || this.wlCode == '') {
if (this.receiptAmount == '' || this.wl.value == '') {
uni.showToast({
icon: 'none',
title: this.$t('message.Commission_tips2') as any,
@ -245,7 +240,7 @@ export default class dnReceiptDom extends BasePage {
return;
}
// return
let isTrue = this.LocationList.some((item) => item.wlCode !== this.wlCode);
let isTrue = this.LocationList.some((item) => item.wlCode !== this.wl.label);
if (isTrue) {
uni.showToast({
@ -254,39 +249,48 @@ export default class dnReceiptDom extends BasePage {
});
return;
}
const loc = this.Location.find((item) => item.value === this.wlCode);
this.LocationList.push({
...loc,
...this.every,
wlCode: this.wl.label,
receiptAmount: this.receiptAmount,
wlCode: this.wlCode,
});
this.every.wllist = this.LocationList;
this.receiptAmount = '';
isTrue = true;
this.business();
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
this.every.wllist.splice(index, 1);
console.log('表格数据', this.LocationList);
console.log('要上传的数据', this.every);
this.business();
}
//
resetForm() {
// add table
this.LocationList = [];
this.poNo = '';
//
this.wl = {
value: null,
};
//
this.every = {};
//
this.materialList = [];
//
this.receiptAmount = null;
}
async onSubmit() {
if (this.every.wllist == null || this.every.wllist.length == 0) {
this.resetForm();
return;
if (this.LocationList.length === 0) {
uni.showToast({
icon: 'none',
title: this.$t('message.Commission_tips5') as any,
});
}
this.upload.push(this.every);
await this.model.submitOrderInEnter(this.upload);
this.LocationList = [];
this.wlCode = '';
this.receiptAmount = '';
this.Cumulative = 0;
this.every = '';
this.materialList = [];
this.every.wllist = this.LocationList;
console.log('new this.every :::: ', this.every);
// await this.model.submitOrderInEnter([this.every]);
}
async bill() {
if (this.form.documentNo == '') {
@ -306,12 +310,7 @@ export default class dnReceiptDom extends BasePage {
}
//
business() {
let num = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.receiptAmount);
});
this.Cumulative = num;
this.every.receiptAmount = num;
this.every.receiptAmount = this.totalLocation(this.LocationList);
}
}
</script>

Loading…
Cancel
Save