|
@@ -8,6 +8,7 @@ const stdGljModel = mongoose.model('std_glj_lib_gljList');
|
|
|
const compleRationSectionTreeModel = mongoose.model('complementary_ration_section_tree');
|
|
const compleRationSectionTreeModel = mongoose.model('complementary_ration_section_tree');
|
|
|
let stdSectionTreeModel = require ('../../ration_repository/models/ration_section_tree').Model;
|
|
let stdSectionTreeModel = require ('../../ration_repository/models/ration_section_tree').Model;
|
|
|
let stdRationModel = require ('../../ration_repository/models/ration_item').Model;
|
|
let stdRationModel = require ('../../ration_repository/models/ration_item').Model;
|
|
|
|
|
+let gljUtil = require('../../../public/gljUtil');
|
|
|
|
|
|
|
|
const compleRationLib = 'compleRationLib';
|
|
const compleRationLib = 'compleRationLib';
|
|
|
|
|
|
|
@@ -147,10 +148,13 @@ class SearchDao{
|
|
|
//对人材机进行排序
|
|
//对人材机进行排序
|
|
|
ration.rationGljList.sort(function (a, b) {
|
|
ration.rationGljList.sort(function (a, b) {
|
|
|
let gljA = gljIDMapping[a.gljId],
|
|
let gljA = gljIDMapping[a.gljId],
|
|
|
- gljB = gljIDMapping[b.gljId];
|
|
|
|
|
|
|
+ gljB = gljIDMapping[b.gljId],
|
|
|
|
|
+ seqs = gljUtil.getGljTypeSeq() ;
|
|
|
if(gljA && gljB){
|
|
if(gljA && gljB){
|
|
|
- let aV = gljA.gljType + gljA.code,
|
|
|
|
|
- bV = gljB.gljType + gljB.code;
|
|
|
|
|
|
|
+ let indA = seqs.indexOf(gljA.gljType)+"",
|
|
|
|
|
+ indB = seqs.indexOf(gljB.gljType)+"";
|
|
|
|
|
+ let aV = indA+gljA.gljType + gljA.code,
|
|
|
|
|
+ bV = indB+gljB.gljType + gljB.code;
|
|
|
if(aV > bV) {
|
|
if(aV > bV) {
|
|
|
return 1;
|
|
return 1;
|
|
|
} else if(aV < bV) {
|
|
} else if(aV < bV) {
|
|
@@ -159,17 +163,22 @@ class SearchDao{
|
|
|
}
|
|
}
|
|
|
return 0;
|
|
return 0;
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ if(ration.jobContent && ration.jobContent.toString().trim() !== ''){
|
|
|
|
|
+ hintsArr.push(`<label class="nomargin font_blue">工作内容:`);
|
|
|
|
|
+ hintsArr = hintsArr.concat(ration.jobContent.split('\n'));
|
|
|
|
|
+ hintsArr.push("</label>");
|
|
|
|
|
+ hintsArr.push("");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
for(let rationGlj of ration.rationGljList){
|
|
for(let rationGlj of ration.rationGljList){
|
|
|
let glj = gljIDMapping[rationGlj.gljId];
|
|
let glj = gljIDMapping[rationGlj.gljId];
|
|
|
if(glj){
|
|
if(glj){
|
|
|
- hintsArr.push(` ${glj.code} ${glj.name}${glj.specs ? ' ' + glj.specs : ''} ${glj.unit} ${rationGlj.consumeAmt}`);
|
|
|
|
|
|
|
+ hintsArr.push(`<label class="nomargin ${glj.gljType==4?"font_blue":""}"> ${glj.code} ${glj.name}${glj.specs ? ' ' + glj.specs : ''}   ${glj.unit} ${rationGlj.consumeAmt}</label>`)
|
|
|
|
|
+ //hintsArr.push(` ${glj.code} ${glj.name}${glj.specs ? ' ' + glj.specs : ''} ${glj.unit} ${rationGlj.consumeAmt}`);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
hintsArr.push(`基价 元 ${ration.basePrice}`);
|
|
hintsArr.push(`基价 元 ${ration.basePrice}`);
|
|
|
- if(ration.jobContent && ration.jobContent.toString().trim() !== ''){
|
|
|
|
|
- hintsArr.push(`工作内容:`);
|
|
|
|
|
- hintsArr = hintsArr.concat(ration.jobContent.split('\n'));
|
|
|
|
|
- }
|
|
|
|
|
if(ration.annotation && ration.annotation.toString().trim() !== ''){
|
|
if(ration.annotation && ration.annotation.toString().trim() !== ''){
|
|
|
hintsArr.push(`附注:`);
|
|
hintsArr.push(`附注:`);
|
|
|
hintsArr = hintsArr.concat(ration.annotation.split('\n'));
|
|
hintsArr = hintsArr.concat(ration.annotation.split('\n'));
|