|
@@ -399,16 +399,16 @@ $(document).ready(() => {
|
|
|
if (hadcid !== 0) gclGatherData[ggd].cid = 1;
|
|
|
}
|
|
|
// 数组去重
|
|
|
- const dealBillList = result.dealBills;
|
|
|
- for (const db of gclGatherData) {
|
|
|
- const exist_index = dealBillList.findIndex(function (item) {
|
|
|
- return item.code === db.code && item.name === db.name && item.unit === db.unit && item.unit_price === db.unit_price;
|
|
|
- });
|
|
|
- if (exist_index !== -1) {
|
|
|
- dealBillList.splice(exist_index, 1);
|
|
|
- }
|
|
|
- }
|
|
|
- changeListData = gclGatherData.concat(dealBillList).sort(sortByCode);
|
|
|
+ // const dealBillList = result.dealBills;
|
|
|
+ // for (const db of gclGatherData) {
|
|
|
+ // const exist_index = dealBillList.findIndex(function (item) {
|
|
|
+ // return item.code === db.code && item.name === db.name && item.unit === db.unit && item.unit_price === db.unit_price;
|
|
|
+ // });
|
|
|
+ // if (exist_index !== -1) {
|
|
|
+ // dealBillList.splice(exist_index, 1);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ changeListData = gclGatherData.sort(sortByCode);
|
|
|
for (const gcl of changeListData) {
|
|
|
gcl.unit = gcl.unit !== undefined && gcl.unit !== null ? gcl.unit : '';
|
|
|
gcl.quantity = gcl.quantity !== 0 && gcl.quantity !== null && gcl.quantity !== undefined ? (gcl.unit !== '' ? ZhCalc.round(gcl.quantity, findDecimal(gcl.unit)) : gcl.quantity).toString() : '0';
|