|
|
@ -30,8 +30,8 @@
|
|
|
|
<view class="container">
|
|
|
|
<view class="container">
|
|
|
|
<u-row>
|
|
|
|
<u-row>
|
|
|
|
<u-col :span="6">
|
|
|
|
<u-col :span="6">
|
|
|
|
<u-button type="primary" @click="onOk">
|
|
|
|
<u-button type="primary" @click="uni.navigateBack({})">
|
|
|
|
{{ $t('message.dn_Confirm') }}
|
|
|
|
{{ $t('message.po_Return') }}
|
|
|
|
</u-button>
|
|
|
|
</u-button>
|
|
|
|
</u-col>
|
|
|
|
</u-col>
|
|
|
|
<u-col :span="6">
|
|
|
|
<u-col :span="6">
|
|
|
@ -173,6 +173,13 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (parseFloat(this.nextNum) > this.model.proOrderResultList[this.itemIndex].virtualAmount) {
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
title: this.$t('message.Cannotvirtual') as any,
|
|
|
|
|
|
|
|
image: '/static/icons/icon-52.png',
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
this.model.proOrderResultList[this.itemIndex].hvAmount = this.nextNum;
|
|
|
|
this.model.proOrderResultList[this.itemIndex].hvAmount = this.nextNum;
|
|
|
|
this.show = !this.show;
|
|
|
|
this.show = !this.show;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -188,11 +195,19 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
if (e.data.length != this.model.proOrderResultList.length) {
|
|
|
|
if (e.data.length != this.model.proOrderResultList.length) {
|
|
|
|
let index = e.data[e.data.length - 1].index;
|
|
|
|
let index = e.data[e.data.length - 1].index;
|
|
|
|
let num: any = parseFloat(this.model.proOrderResultList[index].amount) - parseFloat(this.model.proOrderResultList[index].totalMoAmount);
|
|
|
|
let num: any = parseFloat(this.model.proOrderResultList[index].amount) - parseFloat(this.model.proOrderResultList[index].totalMoAmount);
|
|
|
|
|
|
|
|
if (num > parseFloat(this.model.proOrderResultList[index].virtualAmount)) {
|
|
|
|
|
|
|
|
this.model.proOrderResultList[index].hvAmount = parseFloat(this.model.proOrderResultList[index].virtualAmount);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
this.model.proOrderResultList[index].hvAmount = num;
|
|
|
|
this.model.proOrderResultList[index].hvAmount = num;
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.model.proOrderResultList.forEach((item: any) => {
|
|
|
|
this.model.proOrderResultList.forEach((item: any) => {
|
|
|
|
let num: any = parseFloat(item.amount) - parseFloat(item.totalMoAmount);
|
|
|
|
let num: any = parseFloat(item.amount) - parseFloat(item.totalMoAmount);
|
|
|
|
|
|
|
|
if (num > item.virtualAmount) {
|
|
|
|
|
|
|
|
item.hvAmount = item.virtualAmount;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
item.hvAmount = num;
|
|
|
|
item.hvAmount = num;
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|