|
|
@@ -1805,6 +1805,23 @@ function initFeeStandardSel() {
|
|
|
getStdCalcProgramFiles();
|
|
|
}
|
|
|
|
|
|
+function _iniAdminLevel() {
|
|
|
+ //初始化行政等级(广东农村公路用)
|
|
|
+ $('#tender-adminLevel').empty();
|
|
|
+ let adminLevels = [];
|
|
|
+ adminLevels.push(adminLevelType.CITY_LEVEL);
|
|
|
+ adminLevels.push(adminLevelType.COUNTRY_SIDE_LEVEL);
|
|
|
+ adminLevels.push(adminLevelType.VLLAGE_LEVEL);
|
|
|
+ for (let feeName of adminLevels) {
|
|
|
+ let $opt = $(`<option value="${feeName}">${feeName}</option>`);
|
|
|
+ $('#tender-adminLevel').append($opt);
|
|
|
+ }
|
|
|
+ $('#tender-adminLevel')[0].selectedIndex = 0;
|
|
|
+ // changeFeeRate(currentEngLib);
|
|
|
+ // setTaxGroupHtml();
|
|
|
+ // getStdCalcProgramFiles();
|
|
|
+}
|
|
|
+
|
|
|
function changeFeeStandard() {
|
|
|
let currentEngLib = getEngineeringLib($('#tender-engineering').val() + $('#tender-feeStandard').val(), getEngineeringList());
|
|
|
changeFeeRate(currentEngLib);
|
|
|
@@ -2551,39 +2568,35 @@ function AddProject() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function _getOptionDivDomStr(value, rdName, labelName, id, isChecked) {
|
|
|
+ return `
|
|
|
+ <div class="custom-control custom-radio custom-control-inline">
|
|
|
+ <input type="radio" value="${value}" name="${rdName}" ${isChecked ? "checked" : ""} id="${id}" class="custom-control-input">
|
|
|
+ <label class="custom-control-label" for="${id}">${labelName}</label>
|
|
|
+ </div>
|
|
|
+ `;
|
|
|
+}
|
|
|
+
|
|
|
// 创建建设项目可选项
|
|
|
function initProjectOptSet($target) {
|
|
|
const html = `<div class="form-group row">
|
|
|
<label for="staticEmail" class="col-auto col-form-label col-form-label-sm">项目类型</label>
|
|
|
<div class="col">
|
|
|
- ${COMPILATION_NAME.includes('公路造价') ? `
|
|
|
- <div class="custom-control custom-radio custom-control-inline">
|
|
|
- <input type="radio" value="${SUGGESTION}" name="valuation-type" checked id="type-suggestion" class="custom-control-input">
|
|
|
- <label class="custom-control-label" for="type-suggestion">建议估算</label>
|
|
|
- </div>
|
|
|
- <div class="custom-control custom-radio custom-control-inline">
|
|
|
- <input type="radio" value="${FEASIBILITY}" name="valuation-type" id="type-feasibility" class="custom-control-input">
|
|
|
- <label class="custom-control-label" for="type-feasibility">可行性估算</label>
|
|
|
- </div>
|
|
|
- <div class="custom-control custom-radio custom-control-inline">
|
|
|
- <input type="radio" value="${ROUGH}" name="valuation-type" id="type-rough" class="custom-control-input">
|
|
|
- <label class="custom-control-label" for="type-rough">概算</label>
|
|
|
- </div>
|
|
|
+ ${COMPILATION_NAME.includes('公路造价') ? `
|
|
|
+ ${_getOptionDivDomStr(SUGGESTION, "valuation-type", "建议估算", "type-suggestion", true)}
|
|
|
+ ${_getOptionDivDomStr(FEASIBILITY, "valuation-type", "可行性估算", "type-feasibility", false)}
|
|
|
+ ${_getOptionDivDomStr(ROUGH, "valuation-type", "概算", "type-rough", false)}
|
|
|
` : ''}
|
|
|
${COMPILATION_NAME.includes('内蒙古高速公路日常养护估算(2021)') ? `
|
|
|
- <div class="custom-control custom-radio custom-control-inline">
|
|
|
- <input type="radio" value="${ESTIMATION}" name="valuation-type" checked id="type-estimation" class="custom-control-input">
|
|
|
- <label class="custom-control-label" for="type-estimation">估算</label>
|
|
|
- </div>
|
|
|
+ ${_getOptionDivDomStr(ESTIMATION, "valuation-type", "估算", "type-suggestion", true)}
|
|
|
+ ` : `
|
|
|
+ `
|
|
|
+ }
|
|
|
+ ${COMPILATION_NAME.includes('广东农村养护(2021)') ? `
|
|
|
+ ${_getOptionDivDomStr(BUDGET, "valuation-type", "预算", "type-budget", true)}
|
|
|
` : `
|
|
|
- <div class="custom-control custom-radio custom-control-inline">
|
|
|
- <input type="radio" value="${BUDGET}" name="valuation-type" ${COMPILATION_NAME.includes('公路造价') ? '' : 'checked'} id="type-budget" class="custom-control-input">
|
|
|
- <label class="custom-control-label" for="type-budget">预算</label>
|
|
|
- </div>
|
|
|
- <div class="custom-control custom-radio custom-control-inline">
|
|
|
- <input type="radio" value="${BOQ}" name="valuation-type" id="type-boq" class="custom-control-input">
|
|
|
- <label class="custom-control-label" for="type-boq">工程量清单</label>
|
|
|
- </div>
|
|
|
+ ${_getOptionDivDomStr(BUDGET, "valuation-type", "预算", "type-budget", !COMPILATION_NAME.includes('公路造价'))}
|
|
|
+ ${_getOptionDivDomStr(BOQ, "valuation-type", "工程量清单", "type-boq", false)}
|
|
|
`
|
|
|
}
|
|
|
</div>
|
|
|
@@ -2591,14 +2604,8 @@ function initProjectOptSet($target) {
|
|
|
<div class="form-group row hide-area" id="boq-type">
|
|
|
<label for="staticEmail" class="col-auto col-form-label col-form-label-sm">清单类型</label>
|
|
|
<div class="col">
|
|
|
- <div class="custom-control custom-radio custom-control-inline">
|
|
|
- <input type="radio" value="${BID_INVITATION}" name="boq-type-input" id="boq-type-tender" class="custom-control-input">
|
|
|
- <label class="custom-control-label" for="boq-type-tender">招标</label>
|
|
|
- </div>
|
|
|
- <div class="custom-control custom-radio custom-control-inline">
|
|
|
- <input type="radio" value="${BID_SUBMISSION}" name="boq-type-input" id="boq-type-bidder" class="custom-control-input" checked>
|
|
|
- <label class="custom-control-label" for="boq-type-bidder">投标</label>
|
|
|
- </div>
|
|
|
+ ${_getOptionDivDomStr(BID_INVITATION, "boq-type-input", "招标", "boq-type-tender", false)}
|
|
|
+ ${_getOptionDivDomStr(BID_SUBMISSION, "boq-type-input", "投标", "boq-type-bidder", true)}
|
|
|
</div>
|
|
|
</div>`;
|
|
|
//const $children = $(html);
|
|
|
@@ -3154,7 +3161,8 @@ function AddTender() {
|
|
|
}*/
|
|
|
|
|
|
let IDGroup = $("#tender-calcProgram").val();
|
|
|
- if (!IDGroup || IDGroup === '') {
|
|
|
+ // 如果compilationData有估算(estimation_valuation)的话,可以不要计算程序吧
|
|
|
+ if ((!IDGroup || IDGroup === '') && (compilationData.estimation_valuation.length === 0)) {
|
|
|
setDangerInfo($('#calcProgram-info'), '请选择计算程序');
|
|
|
return false;
|
|
|
}
|