|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
<view class="right"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="table-wrapper">
|
|
|
|
|
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border @onCheck="ClickHandover" enable-check="multiple" :headers="headers" :contents="model.proOrderResultList" :show-vert-border="false"></wyb-table>
|
|
|
|
|
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border @onCheck="ClickHandover" enable-check="single" :headers="headers" :contents="model.proOrderResultList" :show-vert-border="false"></wyb-table>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="bottom-bar">
|
|
|
|
|
<view class="extra">
|
|
|
|
@ -140,21 +140,6 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
this.$submitForm.setRules(this.submitFormRules);
|
|
|
|
|
this.isBusinessFinished = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
beforeDestroy() {
|
|
|
|
|
if (model.proOrderResultList.length > 0 && !this.isBusinessFinished) {
|
|
|
|
|
this.unlock();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 行点击
|
|
|
|
|
*/
|
|
|
|
|
// onRowClick(e: any) {
|
|
|
|
|
// const lineData: SummaryItem = e.lineData;
|
|
|
|
|
// this.amountForm.amount = String(lineData.amount - lineData.hvAmount);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 接收人回车
|
|
|
|
|
*/
|
|
|
|
@ -176,9 +161,6 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
this.amountForm.amount = num;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 确认
|
|
|
|
|
*/
|
|
|
|
|
onOk() {
|
|
|
|
|
this.$amountForm.validate(async (valid) => {
|
|
|
|
|
if (!valid) return;
|
|
|
|
@ -220,26 +202,9 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
console.log(1);
|
|
|
|
|
// if (inputAmount + totalHvAmount - totalMoAmount > 0.000001) {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.Pi_tip8') as string,
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
if (
|
|
|
|
|
inputAmount <= 0
|
|
|
|
|
// inputAmount.toString().split(".")[1].length > 3
|
|
|
|
|
) {
|
|
|
|
|
if (inputAmount <= 0) {
|
|
|
|
|
this.customToast(this.$t('message.Pi_tip2') as string);
|
|
|
|
|
} else {
|
|
|
|
|
// model.updateSummaryItem({
|
|
|
|
|
// index: this.model.summaryList.findIndex((_: any) => _.checked),
|
|
|
|
|
// newItem: {
|
|
|
|
|
// ...firstSelection,
|
|
|
|
|
// // oriSendSpot: this.amountForm.oriSendSpot,
|
|
|
|
|
// hvAmount: inputAmount,
|
|
|
|
|
// },
|
|
|
|
|
// });
|
|
|
|
|
this.model.proOrderResultList.forEach((item: any) => {
|
|
|
|
|
if (item.checked) {
|
|
|
|
|
item.hvAmount = this.amountForm.amount;
|
|
|
|
@ -256,10 +221,6 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 上传
|
|
|
|
|
*/
|
|
|
|
|
onSubmit() {
|
|
|
|
|
this.$submitForm.validate(async (valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
@ -287,6 +248,7 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
if (qtyStase) {
|
|
|
|
|
this.customToast(this.$t('message.Summary_PleaseInputNumber') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let res = await auth.checkPassword({
|
|
|
|
|
rfPwd: this.submitForm.password,
|
|
|
|
@ -309,44 +271,25 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
factoryCode: session.factoryCode as string,
|
|
|
|
|
loginName: session.loginName as string,
|
|
|
|
|
sapFactoryCode: model.sapFactoryCode,
|
|
|
|
|
// dataList: list.map((item) => ({
|
|
|
|
|
// ...pick(
|
|
|
|
|
// [
|
|
|
|
|
// 'materialCode',
|
|
|
|
|
// 'materialDesc',
|
|
|
|
|
// 'unit',
|
|
|
|
|
// 'wkposCode',
|
|
|
|
|
// 'prdMaterialDesc',
|
|
|
|
|
// 'sendSpot',
|
|
|
|
|
// // 'oriSendSpot',
|
|
|
|
|
// 'mrpCode',
|
|
|
|
|
// ],
|
|
|
|
|
// item,
|
|
|
|
|
// ),
|
|
|
|
|
// amount: String(item.amount),
|
|
|
|
|
// hvAmount: String(item.hvAmount),
|
|
|
|
|
// totalMoAmount: String(item.totalMoAmount),
|
|
|
|
|
// totalHvAmount: String(item.totalHvAmount),
|
|
|
|
|
// factoryCode: model.sapFactoryCode,
|
|
|
|
|
// })),
|
|
|
|
|
dataList: list,
|
|
|
|
|
includeOrderOutIdList: model.proOrderResultList.map((item: any) => item.orderOutId),
|
|
|
|
|
});
|
|
|
|
|
this.submitForm.receiverName = '';
|
|
|
|
|
this.submitForm.receiver = '';
|
|
|
|
|
this.submitForm.password = '';
|
|
|
|
|
this.isBusinessFinished = true;
|
|
|
|
|
model.clearProOrderResultList();
|
|
|
|
|
await this.model.queryProOrderResult(this.model.nextQueryParams);
|
|
|
|
|
if (this.model.proOrderResultList.length == 0) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: this.$t('message.Pi_NoDataFound') as string,
|
|
|
|
|
});
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
uni.navigateBack({ delta: 2 });
|
|
|
|
|
}, 2000);
|
|
|
|
|
}
|
|
|
|
|
this.submitForm.receiverName = '';
|
|
|
|
|
this.submitForm.receiver = '';
|
|
|
|
|
this.submitForm.password = '';
|
|
|
|
|
this.isBusinessFinished = true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 解锁
|
|
|
|
|
*/
|
|
|
|
|
async unlock() {
|
|
|
|
|
try {
|
|
|
|
|
await http.post(url.virtual.unlock.list, {
|
|
|
|
@ -356,10 +299,6 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
});
|
|
|
|
|
} catch (e) {
|
|
|
|
|
this.customToast((this.$t('message.Summary_Tip') as string) + e.message);
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: (this.$t('message.Summary_Tip') as string) + e.message,
|
|
|
|
|
// });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|