|
|
@@ -36,7 +36,8 @@ let taxTypeMap = {
|
|
|
let regions = [];
|
|
|
|
|
|
const {
|
|
|
- ValuationType: { BUDGET, BOQ },
|
|
|
+ ValuationType: { SUGGESTION, FEASIBILITY, ROUGH, BUDGET, BOQ },
|
|
|
+ ValuationText,
|
|
|
BOQType: { BID_INVITATION, BID_SUBMISSION },
|
|
|
} = window.commonConstants;
|
|
|
const {
|
|
|
@@ -2400,7 +2401,7 @@ function initProjects(callback, expandCallback) {
|
|
|
//设置项目类别
|
|
|
for (let data of datas) {
|
|
|
if (data.projType === projectType.tender && data.property.valuationType) {
|
|
|
- data.valuationType = data.property.valuationType === 'bill' ? '预算' : '工程量清单';
|
|
|
+ data.valuationType = ValuationText[data.property.valuationType] || '';
|
|
|
}
|
|
|
}
|
|
|
CommonAjax.post('/options/getOptions', [], function (rstData) {
|
|
|
@@ -2554,8 +2555,22 @@ 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="${BUDGET}" name="valuation-type" checked id="type-budget" class="custom-control-input">
|
|
|
+ <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>
|
|
|
+ ` : ''}
|
|
|
+ <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">
|
|
|
@@ -2717,7 +2732,7 @@ function AddTenderItems(selected, projName, tenderName, projectProperty, propert
|
|
|
} else if(data.updateData.projType === projectType.tender){
|
|
|
tenderData = data.updateData;
|
|
|
tenderData.feeStandardName = tenderData.property.feeStandardName || '';
|
|
|
- tenderData.valuationType = tenderData.property.valuationType === 'bill' ? '预算' : '工程量清单';
|
|
|
+ tenderData.valuationType = ValuationText[tenderData.property.valuationType] || '';
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -2746,7 +2761,7 @@ function AddTenderItems(selected, projName, tenderName, projectProperty, propert
|
|
|
data.updateData.shareInfo = [];
|
|
|
setInitSummaryData(data.updateData);
|
|
|
data.updateData.feeStandardName = data.updateData.property.feeStandardName || '';
|
|
|
- data.updateData.valuationType = data.updateData.property.valuationType === 'bill' ? '预算' : '工程量清单';
|
|
|
+ data.updateData.valuationType = ValuationText[data.updateData.property.valuationType] || '';
|
|
|
const tenderNode = projTreeObj.insert(data.updateData, tempProj, null);
|
|
|
const rows = [tenderNode.serialNo()];
|
|
|
sheetCommonObj.setRowsAutoFit(projTreeObj.workBook.getSheet(0), rows, 0, true);
|
|
|
@@ -2852,10 +2867,26 @@ function getEngineeringLib(cascadeName, engineeringList) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+function getValuationData(type) {
|
|
|
+ let valuationData = [];
|
|
|
+ if (type === SUGGESTION) {
|
|
|
+ valuationData = JSON.parse(suggestionValuation);
|
|
|
+ } else if (type === FEASIBILITY) {
|
|
|
+ valuationData = JSON.parse(feasibilityValuation);
|
|
|
+ } else if (type === ROUGH) {
|
|
|
+ valuationData = JSON.parse(roughValuation);
|
|
|
+ } else if (type === BUDGET) {
|
|
|
+ valuationData = JSON.parse(billValuation);
|
|
|
+ } else {
|
|
|
+ valuationData = JSON.parse(rationValuation);
|
|
|
+ }
|
|
|
+ return valuationData;
|
|
|
+}
|
|
|
+
|
|
|
function getEngineeringList(){
|
|
|
let valuation = $("#valuation").val();
|
|
|
let valuationType = $("input[name='valuation_type']:checked").val();
|
|
|
- let valuationData = valuationType === 'bill' ? JSON.parse(billValuation) : JSON.parse(rationValuation);
|
|
|
+ let valuationData = getValuationData(valuationType);
|
|
|
let engineeringList = [];
|
|
|
for(let tmp of valuationData) {
|
|
|
if (tmp.id === valuation) {
|
|
|
@@ -3149,7 +3180,7 @@ function AddTender() {
|
|
|
}
|
|
|
|
|
|
let engineering = undefined;
|
|
|
- let valuationData = valuationType === BUDGET ? JSON.parse(billValuation) : JSON.parse(rationValuation);
|
|
|
+ let valuationData = getValuationData(valuationType);
|
|
|
let engineeringList = [];
|
|
|
for(let tmp of valuationData) {
|
|
|
if (tmp.id === valuation) {
|