|
@@ -1292,14 +1292,58 @@ INTERFACE_EXPORT = (() => {
|
|
|
//暂列金额 数量为0的时候,单价输出0
|
|
//暂列金额 数量为0的时候,单价输出0
|
|
|
if( CostKind==2 && !gljUtil.isNotEmpty(data.quantity)) attrs[4].value = 0
|
|
if( CostKind==2 && !gljUtil.isNotEmpty(data.quantity)) attrs[4].value = 0
|
|
|
}
|
|
}
|
|
|
|
|
+ // 计日工合计下的劳务、材料、机械Item节点单价及合价(Price, Sum)也要输出
|
|
|
|
|
+ if (bNode.children && bNode.children.length === 0 && bNode.data.quantity) { //先检测是否有费用
|
|
|
|
|
+ // 再检测是否计日工合计清单下
|
|
|
|
|
+ if (_chkIfJRGHJ(bNode, ['计日工合计'])) {
|
|
|
|
|
+ attrs[4].value = data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderUnitFee : "";
|
|
|
|
|
+ attrs[5].value = data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderTotalFee : "";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 清单的专项暂定有选择了专业工程的清单Item节点单价及合价(Price, Sum)也要输出
|
|
|
|
|
+ if (ProvisionalType === 2) {
|
|
|
|
|
+ attrs[4].value = data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderUnitFee : "";
|
|
|
|
|
+ attrs[5].value = data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderTotalFee : "";
|
|
|
|
|
+ }
|
|
|
|
|
+ //特殊清单
|
|
|
|
|
+ const specialBills = ['计日工合计', '已包含在清单合计中的材料、工程设备、专业工程暂估价合计'];
|
|
|
|
|
+ if (bNode.children && bNode.children.length > 0 && _chkIfJRGHJ(bNode, specialBills)) {
|
|
|
|
|
+ attrs[5].value = data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderTotalFee : "";
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
Element.call(this, "Item", attrs);
|
|
Element.call(this, "Item", attrs);
|
|
|
let cc = CostComposition(bNode);
|
|
let cc = CostComposition(bNode);
|
|
|
if (cc) this.children.push(cc);
|
|
if (cc) this.children.push(cc);
|
|
|
this.children.push(CostStructure(data))
|
|
this.children.push(CostStructure(data))
|
|
|
|
|
|
|
|
|
|
+ // function _chkIfHas
|
|
|
|
|
+ function _chkIfJRGHJ(bNode, exArr = []) {
|
|
|
|
|
+ //检测是否在指定清单的子目录下(如:计日工合计等)
|
|
|
|
|
+ let rst = false;
|
|
|
|
|
+ let pNode = bNode;
|
|
|
|
|
+ while (pNode !== null && pNode !== undefined) {
|
|
|
|
|
+ if ((typeof pNode.name === 'string') && exArr.includes(pNode.name)) {
|
|
|
|
|
+ rst = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ pNode = pNode.parent;
|
|
|
|
|
+ }
|
|
|
|
|
+ return rst;
|
|
|
|
|
+ }
|
|
|
|
|
+ function _chkIfNeedCostComposition(bNode) {
|
|
|
|
|
+ let rst = isBidInvitation && !(ProvisionalType === 0 || ProvisionalType === 1);
|
|
|
|
|
+ if (!rst) {
|
|
|
|
|
+ //计日工合计下的劳务、材料、机械 有费用也要输出
|
|
|
|
|
+ if (bNode.children && bNode.children.length === 0 && bNode.data.quantity) { //先检测是否有费用
|
|
|
|
|
+ // 再检测是否计日工合计清单下
|
|
|
|
|
+ rst = _chkIfJRGHJ(bNode, ['计日工合计']);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return rst;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
function CostComposition(bNode) {
|
|
function CostComposition(bNode) {
|
|
|
- if (isBidInvitation && !(ProvisionalType === 0 || ProvisionalType === 1)) return null;
|
|
|
|
|
|
|
+ if (_chkIfNeedCostComposition(bNode)) return null;
|
|
|
let CostComposition = new emptyElement('CostComposition');
|
|
let CostComposition = new emptyElement('CostComposition');
|
|
|
CostComposition.attrs =[{
|
|
CostComposition.attrs =[{
|
|
|
name: "KeyId",
|
|
name: "KeyId",
|
|
@@ -1427,6 +1471,10 @@ INTERFACE_EXPORT = (() => {
|
|
|
{
|
|
{
|
|
|
name: 'MechRatio',
|
|
name: 'MechRatio',
|
|
|
value: item.subType == gljType.GENERAL_MACHINE ? 100 : 0
|
|
value: item.subType == gljType.GENERAL_MACHINE ? 100 : 0
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "KeyId",
|
|
|
|
|
+ value: uuid.v1()
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
Element.call(this, "Cost", attrs);
|
|
Element.call(this, "Cost", attrs);
|