|
|
@@ -1911,7 +1911,8 @@ export const useHooks = (t?: any) => {
|
|
|
configcodetype: number = 0,
|
|
|
mattressid_fu: number = 0
|
|
|
) => {
|
|
|
- let res = await RefreshMattressInterface({ mattressid, isPz: isPz, configcodetype, mattressid_fu });
|
|
|
+ const freshtype = isPz === 3 ? 1 : isPz;
|
|
|
+ let res = await RefreshMattressInterface({ mattressid, isPz: freshtype, configcodetype, mattressid_fu });
|
|
|
|
|
|
const $table = state.YwTableRef?.element;
|
|
|
let { visibleData } = $table.getTableData();
|
|
|
@@ -1923,7 +1924,7 @@ export const useHooks = (t?: any) => {
|
|
|
const COMMON_PRESERVED_PROPS = ["bj_inputtype", "erp_pzname", "erp_pzcode", "bj_pzname", "bj_namemx", "itemname"];
|
|
|
const SPECIAL_PRESERVED_PROPS = ["actual_size", "sb_craft", "actual_size_sb", "ss_rate", "ls_rate"];
|
|
|
const FULL_PRESERVED_PROPS = [...COMMON_PRESERVED_PROPS, ...SPECIAL_PRESERVED_PROPS];
|
|
|
- // inputtype 0 - 选择 1 - 录入 2 - 带出
|
|
|
+ // inputtype 0 - 选择 1 - 录入 2 - 带出 3 - 获取主规格配置
|
|
|
if (isPz === 0) {
|
|
|
// 刷新配置 FEAT: 只刷新【带出】类型的配置,只刷新明细名称列,并检查核价是否有新增的【带出】类型资料,添加到配置
|
|
|
visibleData.forEach(mx => {
|
|
|
@@ -1995,7 +1996,7 @@ export const useHooks = (t?: any) => {
|
|
|
}
|
|
|
return mx;
|
|
|
});
|
|
|
- } else {
|
|
|
+ } else if (isPz === 2) {
|
|
|
// 重新生成: FEAT: 删除所有已经填写的【录入】和【选择)项目,根据核价资料,重新生成所有的【带出】资料
|
|
|
visibleData.forEach(mx => copyMap.set(`${mx.erp_pzid}`, mx));
|
|
|
state.mattressYWList = res.mxList.map(mx => {
|
|
|
@@ -2011,6 +2012,32 @@ export const useHooks = (t?: any) => {
|
|
|
}
|
|
|
return mx;
|
|
|
});
|
|
|
+ } else if (isPz === 3) {
|
|
|
+ // 获取主配置 FEAT:只复制录入和选择类型的配置,生产信息不覆盖
|
|
|
+ res.mxList.forEach(mx => copyMap.set(`${mx.erp_pzid}`, mx));
|
|
|
+
|
|
|
+ state.mattressYWList = visibleData.map(mx => {
|
|
|
+ const key = `${mx.erp_pzid}`;
|
|
|
+
|
|
|
+ if (copyMap.has(key)) {
|
|
|
+ matchQty++;
|
|
|
+ const mx2 = copyMap.get(key);
|
|
|
+
|
|
|
+ if (mx.bj_inputtype === 1 || mx.bj_inputtype === 0 || mx.bj_pzname.includes("床网")) {
|
|
|
+ if (mx.bj_inputtype === 2) {
|
|
|
+ mx.bj_namemx = mx2.bj_namemx;
|
|
|
+ } else {
|
|
|
+ mx.bj_inputtype = mx2.bj_inputtype;
|
|
|
+ mx.bj_namemx = mx2.bj_namemx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ mx.haschange = 1;
|
|
|
+ } else {
|
|
|
+ mx.haschange = 0;
|
|
|
+ }
|
|
|
+ return mx;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
if (res.mxList.length > 0) {
|