|
|
@@ -145,13 +145,13 @@ function generateRationName(ration,gljList) {
|
|
|
adjustMatch!=""?replaceList.push(adjustMatch):replaceList.push(notAdjust);
|
|
|
}
|
|
|
for(let r of replaceList){
|
|
|
- caption = caption.replace('%s',r);
|
|
|
+ caption = caption.replace(/%s/i,r);
|
|
|
}
|
|
|
}
|
|
|
// 更新定额名称中显示的稳定土配合比
|
|
|
const proportionStr = gljList.filter(glj => glj.rationProportion).map(glj => glj.adjustProportion || 0).join(':');
|
|
|
if (proportionStr) {
|
|
|
- caption = caption.replace('%p', proportionStr);
|
|
|
+ caption = caption.replace(/%p/i, proportionStr);
|
|
|
}
|
|
|
let reNameList = [];
|
|
|
for(let g of gljList){
|
|
|
@@ -401,23 +401,23 @@ function getContent(coes) {
|
|
|
}
|
|
|
|
|
|
function prepareAss(assList) {//处理辅助定额,支持多个辅助定额的情况
|
|
|
- for(let a of assList){
|
|
|
- if(a.groupList && a.groupList.length > 1){//组里有多个定额的情况
|
|
|
- let newList = _.sortByAll(a.groupList,[function(item){
|
|
|
- return parseFloat(item.param)
|
|
|
- }]);//先按参数排序
|
|
|
- let pre = 0;
|
|
|
- for(let n of newList){
|
|
|
- if(a.actualValue > pre && a.actualValue <= parseFloat(n.param)){//落在中间,则用组里的这条定额
|
|
|
- a._doc.param = n.param;
|
|
|
- a._doc.paramName = n.paramName;
|
|
|
- a._doc.assistCode = n.assistCode;
|
|
|
- break;
|
|
|
- }
|
|
|
- pre = parseFloat(n.param);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ for(let a of assList){
|
|
|
+ if(a.groupList && a.groupList.length > 1){//组里有多个定额的情况
|
|
|
+ let newList = _.sortByAll(a.groupList,[function(item){
|
|
|
+ return parseFloat(item.param)
|
|
|
+ }]);//先按参数排序
|
|
|
+ let pre = 0;
|
|
|
+ for(let n of newList){
|
|
|
+ if(a.actualValue > pre && a.actualValue <= parseFloat(n.param)){//落在中间,则用组里的这条定额
|
|
|
+ a._doc.param = n.param;
|
|
|
+ a._doc.paramName = n.paramName;
|
|
|
+ a._doc.assistCode = n.assistCode;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ pre = parseFloat(n.param);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function calculateTimes(ass){
|