|
@@ -60,7 +60,7 @@ $(document).ready(function() {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- let removeHtml = '<a class="pull-right text-danger remove-lib" data-model="bill" ' +
|
|
|
+ let removeHtml = '<a class="pull-right text-danger remove-lib" data-model="'+model+'" ' +
|
|
|
'title="移除"><span class="glyphicon glyphicon-remove"></span></a>';
|
|
|
let tmpHtml = '<p class="form-control-static">' + removeHtml + addLib.name +
|
|
|
'<input type="hidden" data-id="'+ addLib.id +'" name=\'' + model + '_lib\' value=\'' + JSON.stringify(addLib) + '\'>' + '</p>';
|
|
@@ -194,6 +194,10 @@ $(document).ready(function() {
|
|
|
$("#program-area").show();
|
|
|
$("#add-compilation-title").text('添加计算程序');
|
|
|
break;
|
|
|
+ case 'feature':
|
|
|
+ $("#feature-area").show();
|
|
|
+ $("#add-compilation-title").text('添加工程特征');
|
|
|
+ break;
|
|
|
}
|
|
|
$("#addcompilation").modal('show');
|
|
|
});
|
|
@@ -210,7 +214,7 @@ $(document).ready(function() {
|
|
|
});
|
|
|
|
|
|
// 移除操作
|
|
|
- $(".bill-list, .ration-list, .glj-list, .fee-list, .artificial-list, .program-list, .billsGuidance-list").on("click", ".remove-lib", function() {
|
|
|
+ $(".bill-list, .ration-list, .glj-list, .fee-list, .artificial-list, .program-list, .billsGuidance-list,.feature-list").on("click", ".remove-lib", function() {
|
|
|
$(this).parent().remove();
|
|
|
});
|
|
|
|
|
@@ -356,6 +360,7 @@ function initCompilation() {
|
|
|
let billsGuidanceData = billsGuidanceList === undefined ? [] : JSON.parse(billsGuidanceList);
|
|
|
let billTemplateData = billTemplateList == undefined ? [] : JSON.parse(billTemplateList);
|
|
|
let mainTreeColData= mainTreeColList == undefined ? [] : JSON.parse(mainTreeColList);
|
|
|
+ let featureData = featureList == undefined?[]: JSON.parse(featureList);
|
|
|
/*mainTreeCol = mainTreeCol !== '' ? mainTreeCol.replace(/\n/g, '\\n') : mainTreeCol;
|
|
|
billsTemplateData = billsTemplateData.replace(/\n/g, '\\n');
|
|
|
|
|
@@ -446,6 +451,14 @@ function initCompilation() {
|
|
|
html += tmpHtml;
|
|
|
}
|
|
|
$("select[name='fee_lib']").children("option").first().after(html);
|
|
|
+
|
|
|
+ //工程特征库
|
|
|
+ html = '';
|
|
|
+ for(let tmp of featureData){
|
|
|
+ let tmpHtml = '<option value="' + tmp.ID + '">' + tmp.name + '</option>';
|
|
|
+ html += tmpHtml;
|
|
|
+ }
|
|
|
+ $("select[name='feature_lib']").children("option").first().after(html);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -459,10 +472,12 @@ function getAndValidData(model) {
|
|
|
let standardBill = $("select[name='standard_bill']").children("option:selected").val();
|
|
|
let rationLib = $("select[name='ration_lib']").children("option:selected").val();
|
|
|
let gljLib = $("select[name='glj_lib']").children("option:selected").val();
|
|
|
- let feeLib = $("select[name='fee_lib']").children("option:selected").val();
|
|
|
+ // let feeLib = $("select[name='fee_lib']").children("option:selected").val();
|
|
|
let artificialLib = $("select[name='artificial_lib']").children("option:selected").val();
|
|
|
let programLib = $("select[name='program_lib']").children("option:selected").val();
|
|
|
let billsGuidanceLib = $("select[name='billsGuidance_lib']").children("option:selected").val();
|
|
|
+ let featureLib = $("select[name='feature_lib']").children("option:selected").val();
|
|
|
+
|
|
|
|
|
|
if (name === '' && model === 'all') {
|
|
|
throw '编办名字不能为空';
|
|
@@ -480,12 +495,8 @@ function getAndValidData(model) {
|
|
|
throw '请选择人材机库';
|
|
|
}
|
|
|
|
|
|
- if (model === 'fee' && (feeLib === '' || feeLib === undefined)) {
|
|
|
- throw '请选择费率标准';
|
|
|
- }
|
|
|
-
|
|
|
if (model === 'artificial' && (artificialLib === '' || artificialLib === undefined)) {
|
|
|
- throw '请选择费率库';
|
|
|
+ throw '请选择人工系数库';
|
|
|
}
|
|
|
|
|
|
if (model === 'program' && (programLib === '' || programLib === undefined)) {
|
|
@@ -499,10 +510,12 @@ function getAndValidData(model) {
|
|
|
let standardBillString = $("select[name='standard_bill']").children("option:selected").text();
|
|
|
let rationLibString = $("select[name='ration_lib']").children("option:selected").text();
|
|
|
let gljLibString = $("select[name='glj_lib']").children("option:selected").text();
|
|
|
- let feeLibString = $("select[name='fee_lib']").children("option:selected").text();
|
|
|
+ // let feeLibString = $("select[name='fee_lib']").children("option:selected").text();
|
|
|
let artificialString = $("select[name='artificial_lib']").children("option:selected").text();
|
|
|
let programString = $("select[name='program_lib']").children("option:selected").text();
|
|
|
let billsGuidanceString = $("select[name='billsGuidance_lib']").children("option:selected").text();
|
|
|
+ let featrueString = $("select[name='feature_lib']").children("option:selected").text();
|
|
|
+
|
|
|
|
|
|
let result = {
|
|
|
name: name,
|
|
@@ -518,10 +531,10 @@ function getAndValidData(model) {
|
|
|
id: gljLib,
|
|
|
name: gljLibString
|
|
|
},
|
|
|
- fee: {
|
|
|
+ /* fee: {
|
|
|
id: feeLib,
|
|
|
name: feeLibString
|
|
|
- },
|
|
|
+ },*/
|
|
|
artificial: {
|
|
|
id: artificialLib,
|
|
|
name: artificialString
|
|
@@ -533,6 +546,10 @@ function getAndValidData(model) {
|
|
|
billsGuidance: {
|
|
|
id: billsGuidanceLib,
|
|
|
name: billsGuidanceString
|
|
|
+ },
|
|
|
+ feature:{
|
|
|
+ id:featureLib,
|
|
|
+ name:featrueString
|
|
|
}
|
|
|
};
|
|
|
return result;
|