|
@@ -253,6 +253,15 @@ const stageIm = (function () {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function loadCustomDetail(im, detail) {
|
|
|
|
+ im.custom_define = detail.custom_define ? detail.custom_define.split(',') : imFields;
|
|
|
|
+ _.assignInWith(im, detail, function (oV, sV, key) {
|
|
|
|
+ return (im.custom_define.indexOf(key) > -1 && sV !== undefined && sV !== null) ? sV : oV;
|
|
|
|
+ });
|
|
|
|
+ im.calc_img_org = detail.calc_img_org;
|
|
|
|
+ im.calc_img_remark = detail.calc_img_remark;
|
|
|
|
+ }
|
|
|
|
+
|
|
function checkCustomDetail(im) {
|
|
function checkCustomDetail(im) {
|
|
const cd = _.find(details, function (d) {
|
|
const cd = _.find(details, function (d) {
|
|
return im.lid === d.lid &&
|
|
return im.lid === d.lid &&
|
|
@@ -263,12 +272,7 @@ const stageIm = (function () {
|
|
(!im.pid || im.pid === d.pid) &&
|
|
(!im.pid || im.pid === d.pid) &&
|
|
(!im.pos_name || im.pos_name === d.pos_name);
|
|
(!im.pos_name || im.pos_name === d.pos_name);
|
|
});
|
|
});
|
|
- if (cd) {
|
|
|
|
- im.custom_define = cd.custom_define ? cd.custom_define.split(',') : imFields;
|
|
|
|
- _.assignInWith(im, cd, function (oV, sV, key) {
|
|
|
|
- return (im.custom_define.indexOf(key) > -1 && sV !== undefined && sV !== null) ? sV : oV;
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ if (cd) loadCustomDetail(im, cd);
|
|
}
|
|
}
|
|
|
|
|
|
function getCalcMemo(im) {
|
|
function getCalcMemo(im) {
|
|
@@ -881,15 +885,7 @@ const stageIm = (function () {
|
|
(!im.pid || im.pid === d.pid);
|
|
(!im.pid || im.pid === d.pid);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- if (imData) {
|
|
|
|
- _.assignInWith(imData, d, function (oV, sV, key) {
|
|
|
|
- return imFields.indexOf(key) > -1 && !_.isUndefined(sV) && !_.isNull(sV) ? sV : oV;
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
- imData.calc_img = d.calc_img;
|
|
|
|
- imData.calc_img_org = d.calc_img_org;
|
|
|
|
- imData.calc_img_remark = d.calc_img_remark;
|
|
|
|
- }
|
|
|
|
|
|
+ if (imData) loadCustomDetail(imData, d);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|