|
@@ -1870,7 +1870,43 @@ export const useHooks = (t?: any) => {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- state.mattressQDList = res.mxList;
|
|
|
+ // 获取先有清单信息
|
|
|
+ const $table = state.QdTableRef?.element;
|
|
|
+ if ($table) {
|
|
|
+ let { visibleData } = $table.getTableData();
|
|
|
+ const copyMap = new Map();
|
|
|
+
|
|
|
+ visibleData.forEach(mx => {
|
|
|
+ const key = `${mx.itemname}|${mx.bj_pzname}|${mx.bj_pzname_mx}`;
|
|
|
+
|
|
|
+ if (!copyMap.has(key)) copyMap.set(key, mx);
|
|
|
+ });
|
|
|
+
|
|
|
+ res.mxList.forEach(mx => {
|
|
|
+ // 创建复合键(使用模板字符串生成唯一标识)
|
|
|
+ const key = `${mx.itemname}|${mx.bj_pzname}|${mx.bj_pzname_mx}`;
|
|
|
+
|
|
|
+ // 从Map中查找对应值(替代TryGetValue)
|
|
|
+ if (copyMap.has(key)) {
|
|
|
+ const mx2 = copyMap.get(key);
|
|
|
+
|
|
|
+ Object.assign(mx, {
|
|
|
+ erp_mtrlid: mx2.erp_mtrlid,
|
|
|
+ erp_mtrlcode: mx2.erp_mtrlcode,
|
|
|
+ erp_mtrlname: mx2.erp_mtrlname,
|
|
|
+ erp_mtrlmode: mx2.erp_mtrlmode,
|
|
|
+ erp_unit: mx2.erp_unit,
|
|
|
+ useqty: mx2.useqty,
|
|
|
+ actual_useqty: mx2.actual_useqty,
|
|
|
+ wrkgrpid: mx2.wrkgrpid,
|
|
|
+ qd_actual_size: mx2.qd_actual_size,
|
|
|
+ qd_pfgroupqty: mx2.qd_pfgroupqty,
|
|
|
+ dscrp: mx2.dscrp
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // state.mattressQDList = res.mxList;
|
|
|
|
|
|
resetMergeCellsQd();
|
|
|
|