|
@@ -1411,6 +1411,7 @@ export const useHooks = (t?: any) => {
|
|
|
// 床网与主副规格互联
|
|
// 床网与主副规格互联
|
|
|
updateSubspecsTable();
|
|
updateSubspecsTable();
|
|
|
}
|
|
}
|
|
|
|
|
+ autoLoadMtrlExtra(item, state.specialProcessesMxRef);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -5660,7 +5661,6 @@ export const useHooks = (t?: any) => {
|
|
|
const $tableTarget = targetRef.element;
|
|
const $tableTarget = targetRef.element;
|
|
|
const { visibleData: tgVisibleData } = $tableTarget.getTableData();
|
|
const { visibleData: tgVisibleData } = $tableTarget.getTableData();
|
|
|
|
|
|
|
|
- console.log();
|
|
|
|
|
let arr = [];
|
|
let arr = [];
|
|
|
// 收集拼侧,并去重
|
|
// 收集拼侧,并去重
|
|
|
visibleData.map(t => arr.push(t[matchAttr]));
|
|
visibleData.map(t => arr.push(t[matchAttr]));
|
|
@@ -5706,6 +5706,59 @@ export const useHooks = (t?: any) => {
|
|
|
$tableTarget.insertAt(_arr, -1);
|
|
$tableTarget.insertAt(_arr, -1);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @description 获取特殊工艺数据
|
|
|
|
|
+ * @params mtrlItem 物料
|
|
|
|
|
+ * @params targetRef 目标表格实例
|
|
|
|
|
+ * @params arg_extraid 数据库建立的特殊费用id,5: 物料的特殊工艺费用
|
|
|
|
|
+ */
|
|
|
|
|
+ const autoLoadMtrlExtra = (mtrlItem?: any, targetRef?: any, arg_extraid = 5) => {
|
|
|
|
|
+ //计算拼侧数量
|
|
|
|
|
+ if (mtrlItem?.extra_cost == 0) return;
|
|
|
|
|
+
|
|
|
|
|
+ // const $table = tableRef.element;
|
|
|
|
|
+ // const { visibleData } = $table.getTableData();
|
|
|
|
|
+ const $tableTarget = targetRef.element;
|
|
|
|
|
+ const { visibleData: tgVisibleData } = $tableTarget.getTableData();
|
|
|
|
|
+
|
|
|
|
|
+ let _remove = [];
|
|
|
|
|
+ tgVisibleData.map(t => {
|
|
|
|
|
+ if (t.extraid == arg_extraid && mtrlItem.mtrlid == t?.mtrlid) {
|
|
|
|
|
+ _remove.push(t);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ $tableTarget.remove(_remove);
|
|
|
|
|
+ let result = [];
|
|
|
|
|
+
|
|
|
|
|
+ let extraArr = state.specialProcessesMxData.filter(item => item.typeid == 1 && item.extraid == arg_extraid);
|
|
|
|
|
+ if (extraArr.length) {
|
|
|
|
|
+ // 取额外费用数据模版,插入
|
|
|
|
|
+ result.push(extraArr[0]);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (result.length) {
|
|
|
|
|
+ let _arr = [];
|
|
|
|
|
+ let _mattressId = state.LjDetailRef._mainData.mattressid;
|
|
|
|
|
+ result.map(o => {
|
|
|
|
|
+ let _itm = {
|
|
|
|
|
+ mattressid: _mattressId,
|
|
|
|
|
+ mattressmxid: 0,
|
|
|
|
|
+ extraid: o.extraid,
|
|
|
|
|
+ extramxid: o.extramxid,
|
|
|
|
|
+ extraname: mtrlItem.mtrlname,
|
|
|
|
|
+ price: mtrlItem.extra_cost,
|
|
|
|
|
+ qty: o.qty,
|
|
|
|
|
+ dscrp: o.dscrp,
|
|
|
|
|
+ inputtype: o.inputtype,
|
|
|
|
|
+ typeid: o.typeid,
|
|
|
|
|
+ mtrlid: mtrlItem.mtrlid
|
|
|
|
|
+ };
|
|
|
|
|
+ _arr.push(_itm);
|
|
|
|
|
+ });
|
|
|
|
|
+ $tableTarget.insertAt(_arr, -1);
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
/**
|
|
/**
|
|
|
* @description 自动导入修改特殊工艺费用
|
|
* @description 自动导入修改特殊工艺费用
|
|
|
*/
|
|
*/
|