|
|
@@ -321,7 +321,13 @@ const projTreeObj = {
|
|
|
return projTreeObj.getAddBtnDisabled(projectType.project);
|
|
|
},
|
|
|
callback: function (key, opt) {
|
|
|
- $("#add-project-dialog").modal("show");
|
|
|
+ const names = ['重庆养护(2018)', '内蒙古养护(2019)', '甘肃养护(2021)', '内蒙古高速公路养护(2022)', '内蒙古高速公路养护(2022)'];
|
|
|
+ const stopCreate = compilationData && names.includes(compilationData.name);
|
|
|
+ if (stopCreate) {
|
|
|
+ $('#stop-create-dialog').modal('show');
|
|
|
+ } else {
|
|
|
+ $('#add-project-dialog').modal('show');
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
addTender: {
|
|
|
@@ -1188,8 +1194,8 @@ const projTreeObj = {
|
|
|
data.engineeringCost = data.engineeringCost ? data.engineeringCost : 0;
|
|
|
data.unitPriceFile =
|
|
|
data.property &&
|
|
|
- data.property.unitPriceFile &&
|
|
|
- data.property.unitPriceFile.name
|
|
|
+ data.property.unitPriceFile &&
|
|
|
+ data.property.unitPriceFile.name
|
|
|
? data.property.unitPriceFile.name
|
|
|
: "";
|
|
|
data.feeRateFile =
|
|
|
@@ -1223,7 +1229,7 @@ const projTreeObj = {
|
|
|
shareImgWidth = 13,
|
|
|
shareImgHeight = 13;
|
|
|
let defaultHeight = 18; // 单元格默认高度
|
|
|
- let TreeNodeCellType = function () {};
|
|
|
+ let TreeNodeCellType = function () { };
|
|
|
TreeNodeCellType.prototype = new GC.Spread.Sheets.CellTypes.Text();
|
|
|
// 自动行高处理 此函数在每次调用autoFitRow后调用,返回的值作为新的单元格高度
|
|
|
// 在单元格设置为自动行高后,单元格的内容有空格时,spreadjs会将空格认为是换行,会导致高度计算不正确,因此在setCellValue中处理空格
|
|
|
@@ -1240,9 +1246,9 @@ const projTreeObj = {
|
|
|
const node = me.tree.items[context.row];
|
|
|
const nodeIndent = node
|
|
|
? (node.depth() + 1) * indent +
|
|
|
- node.depth() * levelIndent +
|
|
|
- imgWidth +
|
|
|
- 5
|
|
|
+ node.depth() * levelIndent +
|
|
|
+ imgWidth +
|
|
|
+ 5
|
|
|
: 0;
|
|
|
const cellWidth = context.sheet.getCell(-1, context.col).width();
|
|
|
const textLength = this.getAutoFitWidth(...arguments);
|
|
|
@@ -1494,7 +1500,7 @@ const projTreeObj = {
|
|
|
return (
|
|
|
hitinfo.x > centerX + halfBoxLength &&
|
|
|
hitinfo.x <
|
|
|
- centerX + halfBoxLength + imgWidth + indent / 2 + 3 + textLength
|
|
|
+ centerX + halfBoxLength + imgWidth + indent / 2 + 3 + textLength
|
|
|
);
|
|
|
}
|
|
|
if (hitinfo.sheet.name() === "projectSheet") {
|
|
|
@@ -1571,9 +1577,9 @@ const projTreeObj = {
|
|
|
let node = me.tree.items[hitinfo.row];
|
|
|
let nodeIndent = node
|
|
|
? (node.depth() + 1) * indent +
|
|
|
- node.depth() * levelIndent +
|
|
|
- imgWidth +
|
|
|
- 3
|
|
|
+ node.depth() * levelIndent +
|
|
|
+ imgWidth +
|
|
|
+ 3
|
|
|
: 0;
|
|
|
let textLength = this.getAutoFitWidth(value, text, acStyle, zoom, {
|
|
|
sheet: hitinfo.sheet,
|
|
|
@@ -1628,8 +1634,8 @@ const projTreeObj = {
|
|
|
if (node.data.projType === projectType.tender) {
|
|
|
value =
|
|
|
node.data.property &&
|
|
|
- node.data.property.unitPriceFile &&
|
|
|
- node.data.property.unitPriceFile.name
|
|
|
+ node.data.property.unitPriceFile &&
|
|
|
+ node.data.property.unitPriceFile.name
|
|
|
? node.data.property.unitPriceFile.name
|
|
|
: "";
|
|
|
}
|
|
|
@@ -1637,8 +1643,8 @@ const projTreeObj = {
|
|
|
if (node.data.projType === projectType.tender) {
|
|
|
value =
|
|
|
node.data.property &&
|
|
|
- node.data.property.feeFile &&
|
|
|
- node.data.property.feeFile.name
|
|
|
+ node.data.property.feeFile &&
|
|
|
+ node.data.property.feeFile.name
|
|
|
? node.data.property.feeFile.name
|
|
|
: "";
|
|
|
}
|
|
|
@@ -2013,8 +2019,7 @@ const projTreeObj = {
|
|
|
);
|
|
|
} else {
|
|
|
alert(
|
|
|
- `当前的建设项目中已经有相同名字的${
|
|
|
- from == "feeRateFile" ? "费率" : "单价"
|
|
|
+ `当前的建设项目中已经有相同名字的${from == "feeRateFile" ? "费率" : "单价"
|
|
|
}文件!`
|
|
|
);
|
|
|
}
|
|
|
@@ -2354,9 +2359,8 @@ function changeValuationType(type) {
|
|
|
if (valuation === null) {
|
|
|
continue;
|
|
|
}
|
|
|
- html += `<option ${i === targetData.length - 1 ? "selected" : ""} value="${
|
|
|
- valuation.id
|
|
|
- }">${valuation.name}</option>`;
|
|
|
+ html += `<option ${i === targetData.length - 1 ? "selected" : ""} value="${valuation.id
|
|
|
+ }">${valuation.name}</option>`;
|
|
|
}
|
|
|
$("#valuation").html(html);
|
|
|
let engineeringList = getEngineeringList();
|
|
|
@@ -3339,9 +3343,8 @@ 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">
|
|
|
+ <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>
|
|
|
`;
|
|
|
@@ -3352,108 +3355,103 @@ 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("公路造价")
|
|
|
- ? `
|
|
|
+ ${COMPILATION_NAME.includes("公路造价")
|
|
|
+ ? `
|
|
|
${_getOptionDivDomStr(
|
|
|
- SUGGESTION,
|
|
|
- "valuation-type",
|
|
|
- "建议估算",
|
|
|
- "type-suggestion",
|
|
|
- true
|
|
|
- )}
|
|
|
+ SUGGESTION,
|
|
|
+ "valuation-type",
|
|
|
+ "建议估算",
|
|
|
+ "type-suggestion",
|
|
|
+ true
|
|
|
+ )}
|
|
|
${_getOptionDivDomStr(
|
|
|
- FEASIBILITY,
|
|
|
- "valuation-type",
|
|
|
- "可行性估算",
|
|
|
- "type-feasibility",
|
|
|
- false
|
|
|
- )}
|
|
|
+ FEASIBILITY,
|
|
|
+ "valuation-type",
|
|
|
+ "可行性估算",
|
|
|
+ "type-feasibility",
|
|
|
+ false
|
|
|
+ )}
|
|
|
${_getOptionDivDomStr(
|
|
|
- ROUGH,
|
|
|
- "valuation-type",
|
|
|
- "概算",
|
|
|
- "type-rough",
|
|
|
- false
|
|
|
- )}
|
|
|
+ ROUGH,
|
|
|
+ "valuation-type",
|
|
|
+ "概算",
|
|
|
+ "type-rough",
|
|
|
+ false
|
|
|
+ )}
|
|
|
`
|
|
|
- : ""
|
|
|
- }
|
|
|
- ${
|
|
|
- COMPILATION_NAME.includes(
|
|
|
- "内蒙古高速公路日常养护估算(2021)"
|
|
|
- )
|
|
|
- ? `
|
|
|
+ : ""
|
|
|
+ }
|
|
|
+ ${COMPILATION_NAME.includes(
|
|
|
+ "内蒙古高速公路日常养护估算(2021)"
|
|
|
+ )
|
|
|
+ ? `
|
|
|
${_getOptionDivDomStr(
|
|
|
- ESTIMATION,
|
|
|
- "valuation-type",
|
|
|
- "估算",
|
|
|
- "type-suggestion",
|
|
|
- true
|
|
|
- )}
|
|
|
+ ESTIMATION,
|
|
|
+ "valuation-type",
|
|
|
+ "估算",
|
|
|
+ "type-suggestion",
|
|
|
+ true
|
|
|
+ )}
|
|
|
`
|
|
|
- : ``
|
|
|
- }
|
|
|
- ${
|
|
|
- COMPILATION_NAME.includes("四川养护(2013)") ||
|
|
|
- COMPILATION_NAME.includes("部颁2018计价标准")
|
|
|
- ? `
|
|
|
+ : ``
|
|
|
+ }
|
|
|
+ ${COMPILATION_NAME.includes("四川养护(2013)") ||
|
|
|
+ COMPILATION_NAME.includes("部颁2018计价标准")
|
|
|
+ ? `
|
|
|
${_getOptionDivDomStr(
|
|
|
- BILL_BUDGET,
|
|
|
- "valuation-type",
|
|
|
- "清单预算",
|
|
|
- "type-bill_budget",
|
|
|
- true
|
|
|
- )}
|
|
|
+ BILL_BUDGET,
|
|
|
+ "valuation-type",
|
|
|
+ "清单预算",
|
|
|
+ "type-bill_budget",
|
|
|
+ true
|
|
|
+ )}
|
|
|
`
|
|
|
- : ``
|
|
|
- }
|
|
|
- ${
|
|
|
- COMPILATION_NAME !==
|
|
|
- "内蒙古高速公路日常养护估算(2021)" &&
|
|
|
- COMPILATION_NAME !== "四川养护(2013)" &&
|
|
|
- COMPILATION_NAME !== "部颁2018计价标准"
|
|
|
- ? `
|
|
|
- ${
|
|
|
- !COMPILATION_NAME.includes("部颁2018计价标准")
|
|
|
- ? _getOptionDivDomStr(
|
|
|
- BUDGET,
|
|
|
- "valuation-type",
|
|
|
- "预算",
|
|
|
- "type-budget",
|
|
|
- !COMPILATION_NAME.includes("公路造价")
|
|
|
- )
|
|
|
- : ""
|
|
|
- }
|
|
|
+ : ``
|
|
|
+ }
|
|
|
+ ${COMPILATION_NAME !==
|
|
|
+ "内蒙古高速公路日常养护估算(2021)" &&
|
|
|
+ COMPILATION_NAME !== "四川养护(2013)" &&
|
|
|
+ COMPILATION_NAME !== "部颁2018计价标准"
|
|
|
+ ? `
|
|
|
+ ${!COMPILATION_NAME.includes("部颁2018计价标准")
|
|
|
+ ? _getOptionDivDomStr(
|
|
|
+ BUDGET,
|
|
|
+ "valuation-type",
|
|
|
+ "预算",
|
|
|
+ "type-budget",
|
|
|
+ !COMPILATION_NAME.includes("公路造价")
|
|
|
+ )
|
|
|
+ : ""
|
|
|
+ }
|
|
|
${_getOptionDivDomStr(
|
|
|
- BOQ,
|
|
|
- "valuation-type",
|
|
|
- "工程量清单",
|
|
|
- "type-boq",
|
|
|
- COMPILATION_NAME.includes("部颁2018计价标准")
|
|
|
- )}
|
|
|
+ BOQ,
|
|
|
+ "valuation-type",
|
|
|
+ "工程量清单",
|
|
|
+ "type-boq",
|
|
|
+ COMPILATION_NAME.includes("部颁2018计价标准")
|
|
|
+ )}
|
|
|
`
|
|
|
- : ``
|
|
|
- }
|
|
|
+ : ``
|
|
|
+ }
|
|
|
</div>
|
|
|
</div>
|
|
|
<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">
|
|
|
${_getOptionDivDomStr(
|
|
|
- BID_INVITATION,
|
|
|
- "boq-type-input",
|
|
|
- "招标",
|
|
|
- "boq-type-tender",
|
|
|
- false
|
|
|
- )}
|
|
|
+ BID_INVITATION,
|
|
|
+ "boq-type-input",
|
|
|
+ "招标",
|
|
|
+ "boq-type-tender",
|
|
|
+ false
|
|
|
+ )}
|
|
|
${_getOptionDivDomStr(
|
|
|
- BID_SUBMISSION,
|
|
|
- "boq-type-input",
|
|
|
- "投标",
|
|
|
- "boq-type-bidder",
|
|
|
- true
|
|
|
- )}
|
|
|
+ BID_SUBMISSION,
|
|
|
+ "boq-type-input",
|
|
|
+ "投标",
|
|
|
+ "boq-type-bidder",
|
|
|
+ true
|
|
|
+ )}
|
|
|
</div>
|
|
|
</div>`;
|
|
|
//const $children = $(html);
|
|
|
@@ -4242,6 +4240,15 @@ function AddTender() {
|
|
|
.children("option:selected")
|
|
|
.text();
|
|
|
//let newTab = window.open('about:blank');
|
|
|
+ let tempProj = getNodeByName(projName, tempProjs);
|
|
|
+ if (!tempProj) {
|
|
|
+ const names = ['重庆养护(2018)', '内蒙古养护(2019)', '甘肃养护(2021)', '内蒙古高速公路养护(2022)', '内蒙古高速公路养护(2022)'];
|
|
|
+ const stopCreate = compilationData && names.includes(compilationData.name);
|
|
|
+ if (stopCreate) {
|
|
|
+ $('#stop-create-dialog').modal('show');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
$.bootstrapLoading.start();
|
|
|
let callback = function (tenderNode) {
|
|
|
$("#add-tender-dialog").modal("hide");
|
|
|
@@ -4722,9 +4729,8 @@ function getEngineeringHtml(engineeringList) {
|
|
|
if (engLibNames.includes(tmp.lib.name)) {
|
|
|
continue;
|
|
|
}
|
|
|
- result += `<option ${i === 0 ? "selected" : ""} value="${tmp.lib.name}">${
|
|
|
- tmp.lib.name
|
|
|
- }</option>`;
|
|
|
+ result += `<option ${i === 0 ? "selected" : ""} value="${tmp.lib.name}">${tmp.lib.name
|
|
|
+ }</option>`;
|
|
|
engLibNames.push(tmp.lib.name);
|
|
|
}
|
|
|
return result;
|
|
|
@@ -4760,8 +4766,8 @@ function getProperty(projectInfo) {
|
|
|
.removeAttr("checked", "checked");
|
|
|
$(
|
|
|
"input[name='tender_valuation_type'][value='" +
|
|
|
- projectProperty.valuationType +
|
|
|
- "']"
|
|
|
+ projectProperty.valuationType +
|
|
|
+ "']"
|
|
|
)
|
|
|
.attr("checked", "checked")
|
|
|
.removeAttr("disabled", "disabled");
|
|
|
@@ -4787,7 +4793,7 @@ function getUnitFile(parentID, callback) {
|
|
|
error: function () {
|
|
|
alert("数据传输错误!");
|
|
|
},
|
|
|
- beforeSend: function () {},
|
|
|
+ beforeSend: function () { },
|
|
|
success: function (response) {
|
|
|
if (response.error === 1) {
|
|
|
alert("获取失败!");
|
|
|
@@ -4820,7 +4826,7 @@ function getFeeRateFile(parentID, callback) {
|
|
|
error: function () {
|
|
|
alert("数据传输错误!");
|
|
|
},
|
|
|
- beforeSend: function () {},
|
|
|
+ beforeSend: function () { },
|
|
|
success: function (response) {
|
|
|
if (response.error === 1) {
|
|
|
alert("获取失败!");
|
|
|
@@ -5060,8 +5066,8 @@ function set_file_table(target, poj_tenders, fileList, type) {
|
|
|
let usedHtml =
|
|
|
usedObj.usedCount > 0
|
|
|
? '<td class="text-center"><a href="javascript:void(0);">' +
|
|
|
- usedObj.usedCount +
|
|
|
- "</a></td>"
|
|
|
+ usedObj.usedCount +
|
|
|
+ "</a></td>"
|
|
|
: '<td class="text-center">' + usedObj.usedCount + "</td>";
|
|
|
let unitPriceEditHtml =
|
|
|
type === fileType.unitPriceFile
|
|
|
@@ -5376,8 +5382,8 @@ function doAfterImport(projectDatas) {
|
|
|
data.feeStandardName =
|
|
|
(data.property && data.property.feeStandardName) || ""; //工程专业列显示用
|
|
|
let parent = projTreeObj.tree.items.find(
|
|
|
- (node) => node.data.ID === data.ParentID
|
|
|
- ),
|
|
|
+ (node) => node.data.ID === data.ParentID
|
|
|
+ ),
|
|
|
next = projTreeObj.tree.items.find(
|
|
|
(node) => node.data.ID === data.NextSiblingID
|
|
|
);
|