|
|
@ -70,6 +70,7 @@ import { pick } from 'lodash/fp';
|
|
|
|
import http from '@/utils/request';
|
|
|
|
import http from '@/utils/request';
|
|
|
|
import { url } from '@/utils/url';
|
|
|
|
import { url } from '@/utils/url';
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
|
|
|
|
import { subtraction } from '@/utils/subtraction';
|
|
|
|
|
|
|
|
|
|
|
|
@Component
|
|
|
|
@Component
|
|
|
|
export default class AggregatingSummary extends BasePage {
|
|
|
|
export default class AggregatingSummary extends BasePage {
|
|
|
@ -153,10 +154,10 @@ export default class AggregatingSummary extends BasePage {
|
|
|
|
e.data.forEach((item, index) => {
|
|
|
|
e.data.forEach((item, index) => {
|
|
|
|
//debugger;
|
|
|
|
//debugger;
|
|
|
|
console.log('xuanzedeindex', e.data);
|
|
|
|
console.log('xuanzedeindex', e.data);
|
|
|
|
console.log('hvmount', item.lineData.totalMoAmount - item.lineData.totalHvAmount);
|
|
|
|
//console.log('hvmount', item.lineData.totalMoAmount - item.lineData.totalHvAmount);
|
|
|
|
this.model.setAggregateListItemHvAmount({
|
|
|
|
this.model.setAggregateListItemHvAmount({
|
|
|
|
index: e.data[index].index,
|
|
|
|
index: e.data[index].index,
|
|
|
|
hvAmount: item.lineData.totalMoAmount - item.lineData.totalHvAmount,
|
|
|
|
hvAmount: subtraction(parseFloat(item.lineData.totalMoAmount), parseFloat(item.lineData.totalHvAmount)),
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.model.aggregateList.forEach((item) => {
|
|
|
|
this.model.aggregateList.forEach((item) => {
|
|
|
@ -278,7 +279,7 @@ export default class AggregatingSummary extends BasePage {
|
|
|
|
//此处校验了请确保交接数量等于需求数量
|
|
|
|
//此处校验了请确保交接数量等于需求数量
|
|
|
|
//totalMoAmount:累计拣配数量 totalHvAmount:交接数量 hvAmount:本次交接数量
|
|
|
|
//totalMoAmount:累计拣配数量 totalHvAmount:交接数量 hvAmount:本次交接数量
|
|
|
|
List.forEach((item: any) => {
|
|
|
|
List.forEach((item: any) => {
|
|
|
|
if (parseFloat(item.totalMoAmount) - parseFloat(item.totalHvAmount) != parseFloat(item.hvAmount)) {
|
|
|
|
if (subtraction(parseFloat(item.totalMoAmount), parseFloat(item.totalHvAmount)) != parseFloat(item.hvAmount)) {
|
|
|
|
isTrue = false;
|
|
|
|
isTrue = false;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|