|  | @@ -550,7 +550,7 @@ var projectObj = {
 | 
												
													
														
															|  |                  project.calcProgram.calcAndSave(node);
 |  |                  project.calcProgram.calcAndSave(node);
 | 
												
													
														
															|  |              } else {
 |  |              } else {
 | 
												
													
														
															|  |                  if (node.sourceType === project.Bills.getSourceType()) {
 |  |                  if (node.sourceType === project.Bills.getSourceType()) {
 | 
												
													
														
															|  | -                    if(fieldName == "maxPrice"){
 |  | 
 | 
												
													
														
															|  | 
 |  | +                    if(fieldName === "maxPrice" || fieldName === 'minPrice'){
 | 
												
													
														
															|  |                          if(value == null){
 |  |                          if(value == null){
 | 
												
													
														
															|  |                              value = "";
 |  |                              value = "";
 | 
												
													
														
															|  |                          }else {
 |  |                          }else {
 | 
												
											
												
													
														
															|  | @@ -646,7 +646,7 @@ var projectObj = {
 | 
												
													
														
															|  |              if(node.data.type != rationType.ration) return ;//只有定额类型才需要自动展开,其它都不用 
 |  |              if(node.data.type != rationType.ration) return ;//只有定额类型才需要自动展开,其它都不用 
 | 
												
													
														
															|  |              let libID = node.data.libID;
 |  |              let libID = node.data.libID;
 | 
												
													
														
															|  |              if (node.data.from === 'cpt') {
 |  |              if (node.data.from === 'cpt') {
 | 
												
													
														
															|  | -                libID = rationLibObj.compleRationLibId;
 |  | 
 | 
												
													
														
															|  | 
 |  | +                libID = node.data.fromUser ? `${rationLibObj.compleRationLibId}*${node.data.fromUser}` : rationLibObj.compleRationLibId;
 | 
												
													
														
															|  |              }
 |  |              }
 | 
												
													
														
															|  |              if(!rationLibObj.tree){
 |  |              if(!rationLibObj.tree){
 | 
												
													
														
															|  |                  if(isDef(libID)) sessionStorage.setItem('stdRationLib', libID);
 |  |                  if(isDef(libID)) sessionStorage.setItem('stdRationLib', libID);
 | 
												
											
												
													
														
															|  | @@ -1032,7 +1032,7 @@ var projectObj = {
 | 
												
													
														
															|  |                  let mainTabFocus = sessionStorage.getItem('mainTab') ? sessionStorage.getItem('mainTab') : '#tab_zaojiashu';
 |  |                  let mainTabFocus = sessionStorage.getItem('mainTab') ? sessionStorage.getItem('mainTab') : '#tab_zaojiashu';
 | 
												
													
														
															|  |                  $(`${mainTabFocus}`).click();
 |  |                  $(`${mainTabFocus}`).click();
 | 
												
													
														
															|  |                  if(projectReadOnly){
 |  |                  if(projectReadOnly){
 | 
												
													
														
															|  | -                    disableSpread(that.mainSpread);
 |  | 
 | 
												
													
														
															|  | 
 |  | +                    sheetCommonObj.disableSpread(that.mainSpread);
 | 
												
													
														
															|  |                  }
 |  |                  }
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |                  // 检查旧项目是否有调价数据,没有则自动生成 ----- 有种情况不行,如下:
 |  |                  // 检查旧项目是否有调价数据,没有则自动生成 ----- 有种情况不行,如下:
 | 
												
											
												
													
														
															|  | @@ -1273,7 +1273,7 @@ var projectObj = {
 | 
												
													
														
															|  |                      newData.push({ itemQuery: null, rationType: rationType.ration });
 |  |                      newData.push({ itemQuery: null, rationType: rationType.ration });
 | 
												
													
														
															|  |                  }
 |  |                  }
 | 
												
													
														
															|  |                  await project.Ration.addMultiRation(newData);
 |  |                  await project.Ration.addMultiRation(newData);
 | 
												
													
														
															|  | -                projectObj.setActiveCell('quantity', true);
 |  | 
 | 
												
													
														
															|  | 
 |  | +                projectObj.setActiveCell('code', true);
 | 
												
													
														
															|  |              } catch (err) {
 |  |              } catch (err) {
 | 
												
													
														
															|  |                  console.log(err);
 |  |                  console.log(err);
 | 
												
													
														
															|  |                  if (!$('hintBox_form').is(':visible')) {
 |  |                  if (!$('hintBox_form').is(':visible')) {
 | 
												
											
												
													
														
															|  | @@ -1322,6 +1322,14 @@ var projectObj = {
 | 
												
													
														
															|  |                              if(selected.data.type==billType.FB){
 |  |                              if(selected.data.type==billType.FB){
 | 
												
													
														
															|  |                                  return false;
 |  |                                  return false;
 | 
												
													
														
															|  |                              }
 |  |                              }
 | 
												
													
														
															|  | 
 |  | +                            if(selected.data.type==billType.FX ||  selected.data.type==billType.BX){// 当前定位在分项(包括补项),
 | 
												
													
														
															|  | 
 |  | +                                if(selected.preSibling){//判断分项有无前兄弟?
 | 
												
													
														
															|  | 
 |  | +                                    //有,则判断父项的类型是什么,是分部,右键有效显示,点击则按②执行。
 | 
												
													
														
															|  | 
 |  | +                                   return selected.parent.data.type!==billType.FB
 | 
												
													
														
															|  | 
 |  | +                                }
 | 
												
													
														
															|  | 
 |  | +                                return false;// 无,右键有效显示,
 | 
												
													
														
															|  | 
 |  | +                            }
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  |                              if(isFlag(selected.data)&&selected.data.flagsIndex.fixed.flag==fixedFlag.SUB_ENGINERRING){//焦点行是分部分项工程
 |  |                              if(isFlag(selected.data)&&selected.data.flagsIndex.fixed.flag==fixedFlag.SUB_ENGINERRING){//焦点行是分部分项工程
 | 
												
													
														
															|  |                                  if(selected.children.length>0){
 |  |                                  if(selected.children.length>0){
 | 
												
													
														
															|  |                                      return selected.children[0].data.type==billType.FX ||selected.children[0].data.type==billType.BX;//焦点行是分部分项工程,且子项是分项或补项
 |  |                                      return selected.children[0].data.type==billType.FX ||selected.children[0].data.type==billType.BX;//焦点行是分部分项工程,且子项是分项或补项
 | 
												
											
												
													
														
															|  | @@ -1333,8 +1341,15 @@ var projectObj = {
 | 
												
													
														
															|  |                          return true;//除了清单,其它类型都只读
 |  |                          return true;//除了清单,其它类型都只读
 | 
												
													
														
															|  |                      },
 |  |                      },
 | 
												
													
														
															|  |                      callback: function (key, opt) {
 |  |                      callback: function (key, opt) {
 | 
												
													
														
															|  | -                        ProjectController.addFB(project, controller);
 |  | 
 | 
												
													
														
															|  | -                        projectObj.selectColAndFocus(project.mainTree.selected);
 |  | 
 | 
												
													
														
															|  | 
 |  | +                        let selected = project.mainTree.selected;
 | 
												
													
														
															|  | 
 |  | +                        if(selected.data.type==billType.FX || selected.data.type==billType.BX){
 | 
												
													
														
															|  | 
 |  | +                             //添加成分项的父亲
 | 
												
													
														
															|  | 
 |  | +                             ProjectController.addFXParent(selected);   
 | 
												
													
														
															|  | 
 |  | +                        }else{//正常添加分部
 | 
												
													
														
															|  | 
 |  | +                            ProjectController.addFB(project, controller);
 | 
												
													
														
															|  | 
 |  | +                            projectObj.selectColAndFocus(project.mainTree.selected);
 | 
												
													
														
															|  | 
 |  | +                        }
 | 
												
													
														
															|  | 
 |  | +                       
 | 
												
													
														
															|  |                      },
 |  |                      },
 | 
												
													
														
															|  |                      visible: function(key, opt){
 |  |                      visible: function(key, opt){
 | 
												
													
														
															|  |                          if(project.mainTree.selected){
 |  |                          if(project.mainTree.selected){
 | 
												
											
												
													
														
															|  | @@ -1500,6 +1515,24 @@ var projectObj = {
 | 
												
													
														
															|  |                          return true;
 |  |                          return true;
 | 
												
													
														
															|  |                      }
 |  |                      }
 | 
												
													
														
															|  |                  },
 |  |                  },
 | 
												
													
														
															|  | 
 |  | +                "insertMainMaterial": {
 | 
												
													
														
															|  | 
 |  | +                    name: "按清单名称插入主材",//插入量价不需要自动定位到编号列
 | 
												
													
														
															|  | 
 |  | +                    icon: 'fa-sign-in',
 | 
												
													
														
															|  | 
 |  | +                    disabled: function () {
 | 
												
													
														
															|  | 
 |  | +                        if (projectReadOnly) {
 | 
												
													
														
															|  | 
 |  | +                            return true;
 | 
												
													
														
															|  | 
 |  | +                        }
 | 
												
													
														
															|  | 
 |  | +                        return !project.Ration.canAdd(project.mainTree.selected);
 | 
												
													
														
															|  | 
 |  | +                    },
 | 
												
													
														
															|  | 
 |  | +                    callback: function (key, opt) {
 | 
												
													
														
															|  | 
 |  | +                        //名称取清单名称,单位取清单单位
 | 
												
													
														
															|  | 
 |  | +                        let selected = project.mainTree.selected;
 | 
												
													
														
															|  | 
 |  | +                        let billNode = selected;
 | 
												
													
														
															|  | 
 |  | +                        if(selected.sourceType==project.Ration.getSourceType()) billNode = selected.parent;
 | 
												
													
														
															|  | 
 |  | +                        let ext = {name:billNode.data.name,unit:billNode.data.unit};
 | 
												
													
														
															|  | 
 |  | +                        project.Ration.insertVolumePrice(gljType.MAIN_MATERIAL,ext);
 | 
												
													
														
															|  | 
 |  | +                    },
 | 
												
													
														
															|  | 
 |  | +                },
 | 
												
													
														
															|  |                  "spr2": '--------',
 |  |                  "spr2": '--------',
 | 
												
													
														
															|  |                  "calc_installation_fee": {
 |  |                  "calc_installation_fee": {
 | 
												
													
														
															|  |                      name: "计取安装费用",
 |  |                      name: "计取安装费用",
 | 
												
											
												
													
														
															|  | @@ -2022,7 +2055,7 @@ var projectObj = {
 | 
												
													
														
															|  |              projectObj.onIsEstimateClick(node,info);
 |  |              projectObj.onIsEstimateClick(node,info);
 | 
												
													
														
															|  |          }else if(fieldName == "evaluationProject"){
 |  |          }else if(fieldName == "evaluationProject"){
 | 
												
													
														
															|  |              projectObj.onEvaluationProjectClic(node,info);
 |  |              projectObj.onEvaluationProjectClic(node,info);
 | 
												
													
														
															|  | -        }else if(fieldName == "mainBills"||fieldName == "outPutMaxPrice"||fieldName=="areaIncreaseFee"||fieldName == "lockUnitPrice"){
 |  | 
 | 
												
													
														
															|  | 
 |  | +        }else if(fieldName == "mainBills"||fieldName == "outPutMaxPrice"||fieldName=="outPutLimitPrice"||fieldName=="areaIncreaseFee"||fieldName == "lockUnitPrice"){
 | 
												
													
														
															|  |              projectObj.onCasCadeButtonClick(node,info,fieldName);
 |  |              projectObj.onCasCadeButtonClick(node,info,fieldName);
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  |      },
 |  |      },
 | 
												
											
												
													
														
															|  | @@ -2389,6 +2422,7 @@ $("a[name='lockBills']").click(function () {//点击锁定/解锁清单
 | 
												
													
														
															|  |          controller.refreshTreeNode(nodes);
 |  |          controller.refreshTreeNode(nodes);
 | 
												
													
														
															|  |          projectObj.mainController.setTreeSelected(selected);//触发树节点选中事件
 |  |          projectObj.mainController.setTreeSelected(selected);//触发树节点选中事件
 | 
												
													
														
															|  |          projectObj.loadLockBillsButton();
 |  |          projectObj.loadLockBillsButton();
 | 
												
													
														
															|  | 
 |  | +        $('#tzCharacterText').prop('readonly', lockBills);
 | 
												
													
														
															|  |          if(!projectReadOnly){
 |  |          if(!projectReadOnly){
 | 
												
													
														
															|  |              pageCCOprObj.refreshRuleTools(lockBills);
 |  |              pageCCOprObj.refreshRuleTools(lockBills);
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
											
												
													
														
															|  | @@ -2724,6 +2758,15 @@ $('#property_ok').click(function () {
 | 
												
													
														
															|  |          projectObj.project.property.projectFeature = saveData;
 |  |          projectObj.project.property.projectFeature = saveData;
 | 
												
													
														
															|  |          properties['property.projectFeature'] = saveData;
 |  |          properties['property.projectFeature'] = saveData;
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  | 
 |  | +    // 清单限价
 | 
												
													
														
															|  | 
 |  | +    const maxPriceRate = $('#max-price-rate') && +$('#max-price-rate').val();
 | 
												
													
														
															|  | 
 |  | +    if (commonUtil.isNumber(maxPriceRate) && maxPriceRate !== projectObj.project.property.maxPriceRate) {
 | 
												
													
														
															|  | 
 |  | +        properties['property.maxPriceRate'] = maxPriceRate;
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  | 
 |  | +    const minPriceRate = $('#min-price-rate') && +$('#min-price-rate').val();
 | 
												
													
														
															|  | 
 |  | +    if (commonUtil.isNumber(minPriceRate) && minPriceRate !== projectObj.project.property.minPriceRate) {
 | 
												
													
														
															|  | 
 |  | +        properties['property.minPriceRate'] = minPriceRate;
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  |      //清单工程量精度
 |  |      //清单工程量精度
 | 
												
													
														
															|  |      let newBillsDecimalDatas = billsDecimalView.toBillsDecimalDatas(billsDecimalView.cache);
 |  |      let newBillsDecimalDatas = billsDecimalView.toBillsDecimalDatas(billsDecimalView.cache);
 | 
												
													
														
															|  |      if(billsDecimalView.toUpdate(billsQuanDecimal.datas, newBillsDecimalDatas)){
 |  |      if(billsDecimalView.toUpdate(billsQuanDecimal.datas, newBillsDecimalDatas)){
 | 
												
											
												
													
														
															|  | @@ -2826,6 +2869,12 @@ $('#property_ok').click(function () {
 | 
												
													
														
															|  |                  window.location.href = '/main?project=' + projectID;
 |  |                  window.location.href = '/main?project=' + projectID;
 | 
												
													
														
															|  |              }
 |  |              }
 | 
												
													
														
															|  |              else{
 |  |              else{
 | 
												
													
														
															|  | 
 |  | +                if(mixDatas.properties.hasOwnProperty('property.maxPriceRate')){
 | 
												
													
														
															|  | 
 |  | +                    projectObj.project.property.maxPriceRate = maxPriceRate;
 | 
												
													
														
															|  | 
 |  | +                }
 | 
												
													
														
															|  | 
 |  | +                if(mixDatas.properties.hasOwnProperty('property.minPriceRate')){
 | 
												
													
														
															|  | 
 |  | +                    projectObj.project.property.minPriceRate = minPriceRate;
 | 
												
													
														
															|  | 
 |  | +                }
 | 
												
													
														
															|  |                  if(mixDatas.properties.hasOwnProperty('property.basicInformation')){
 |  |                  if(mixDatas.properties.hasOwnProperty('property.basicInformation')){
 | 
												
													
														
															|  |                      basicInfoView.orgDatas = basicInfoView.toViewDatas(mixDatas.properties['property.basicInformation']);
 |  |                      basicInfoView.orgDatas = basicInfoView.toViewDatas(mixDatas.properties['property.basicInformation']);
 | 
												
													
														
															|  |                  }
 |  |                  }
 | 
												
											
												
													
														
															|  | @@ -3026,14 +3075,18 @@ function canInsertRationNode(selected) {//判断是否能插入定额、量价
 | 
												
													
														
															|  |  }
 |  |  }
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  //导入类型(09表、广联达)
 |  |  //导入类型(09表、广联达)
 | 
												
													
														
															|  | -const uploadType = {lj: 'lj', gld: 'gld'};
 |  | 
 | 
												
													
														
															|  | 
 |  | +const uploadType = {general: 'general', lj: 'lj', gld: 'gld'};
 | 
												
													
														
															|  |  let fileType = uploadType.lj;
 |  |  let fileType = uploadType.lj;
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  $('#uploadLj').click(function () {
 |  |  $('#uploadLj').click(function () {
 | 
												
													
														
															|  | 
 |  | +    $('#uploadExample-general').show();
 | 
												
													
														
															|  | 
 |  | +    $('#uploadExample').text('下载示例2');
 | 
												
													
														
															|  |      fileType = uploadType.lj;
 |  |      fileType = uploadType.lj;
 | 
												
													
														
															|  |  });
 |  |  });
 | 
												
													
														
															|  |  $('#uploadGld').click(function () {
 |  |  $('#uploadGld').click(function () {
 | 
												
													
														
															|  | -   fileType = uploadType.gld;
 |  | 
 | 
												
													
														
															|  | 
 |  | +    $('#uploadExample-general').hide();
 | 
												
													
														
															|  | 
 |  | +    $('#uploadExample').text('下载示例');
 | 
												
													
														
															|  | 
 |  | +    fileType = uploadType.gld;
 | 
												
													
														
															|  |  });
 |  |  });
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  let importJson = null;
 |  |  let importJson = null;
 | 
												
											
												
													
														
															|  | @@ -3147,6 +3200,7 @@ $('#importConfirm').click(function () {
 | 
												
													
														
															|  |          });
 |  |          });
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |      catch (err){
 |  |      catch (err){
 | 
												
													
														
															|  | 
 |  | +        console.log(err);
 | 
												
													
														
															|  |          showUploadAlert(false, err);
 |  |          showUploadAlert(false, err);
 | 
												
													
														
															|  |          $(me).removeClass('disabled');
 |  |          $(me).removeClass('disabled');
 | 
												
													
														
															|  |          if($.bootstrapLoading.isLoading()){
 |  |          if($.bootstrapLoading.isLoading()){
 | 
												
											
												
													
														
															|  | @@ -3236,6 +3290,18 @@ function doAfterImportPosition(positionData){
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  |          ProjectController.syncDisplayNewNodes(projectObj.mainController, newNodes);
 |  |          ProjectController.syncDisplayNewNodes(projectObj.mainController, newNodes);
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  | 
 |  | +    if (positionData.insert.ration.length) {
 | 
												
													
														
															|  | 
 |  | +        const rationNodes = [];
 | 
												
													
														
															|  | 
 |  | +        positionData.insert.ration.forEach(ration => {
 | 
												
													
														
															|  | 
 |  | +            projectObj.project.Ration.datas.push(ration);
 | 
												
													
														
															|  | 
 |  | +            const rationNode = projectObj.project.mainTree.insert(ration.billsItemID, -1, ration.ID);
 | 
												
													
														
															|  | 
 |  | +            rationNode.source = ration;
 | 
												
													
														
															|  | 
 |  | +            rationNode.sourceType = projectObj.project.Ration.getSourceType();
 | 
												
													
														
															|  | 
 |  | +            rationNode.data = ration;
 | 
												
													
														
															|  | 
 |  | +            rationNodes.push(rationNode);
 | 
												
													
														
															|  | 
 |  | +        });
 | 
												
													
														
															|  | 
 |  | +        ProjectController.syncDisplayNewNodes(projectObj.mainController, rationNodes);
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  |  }
 |  |  }
 | 
												
													
														
															|  |  //导入后更新操作
 |  |  //导入后更新操作
 | 
												
													
														
															|  |  function doAfterImport(resData){
 |  |  function doAfterImport(resData){
 | 
												
											
												
													
														
															|  | @@ -3257,8 +3323,11 @@ function doAfterImport(resData){
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |  }
 |  |  }
 | 
												
													
														
															|  |  //下载导入清单示例文件
 |  |  //下载导入清单示例文件
 | 
												
													
														
															|  | 
 |  | +$('#uploadExample-general').click(function () {
 | 
												
													
														
															|  | 
 |  | +    window.location.href = `/bills/downloadExamp?type=${uploadType.general}`;
 | 
												
													
														
															|  | 
 |  | +});
 | 
												
													
														
															|  |  $('#uploadExample').click(function () {
 |  |  $('#uploadExample').click(function () {
 | 
												
													
														
															|  | -    window.location.href = `/bills/downloadExamp?type=${fileType}`;
 |  | 
 | 
												
													
														
															|  | 
 |  | +    window.location.href = `/bills/downloadExamp?type=${fileType === uploadType.lj ? uploadType.lj : uploadType.gld}`;
 | 
												
													
														
															|  |  });
 |  |  });
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  $(function () {
 |  |  $(function () {
 | 
												
											
												
													
														
															|  | @@ -3388,7 +3457,7 @@ $(function () {
 | 
												
													
														
															|  |          $("#div_createBlocks").modal("hide");
 |  |          $("#div_createBlocks").modal("hide");
 | 
												
													
														
															|  |      });
 |  |      });
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  | -    $("#btn_block_clone_ok").click(function () {
 |  | 
 | 
												
													
														
															|  | 
 |  | +    $("#btn_block_clone_ok").click(async function () {
 | 
												
													
														
															|  |          let projectNode = projectObj.project.mainTree.selected;
 |  |          let projectNode = projectObj.project.mainTree.selected;
 | 
												
													
														
															|  |          let block = blockLibObj.mainTree.selected;
 |  |          let block = blockLibObj.mainTree.selected;
 | 
												
													
														
															|  |          let options = {};
 |  |          let options = {};
 | 
												
											
												
													
														
															|  | @@ -3397,16 +3466,20 @@ $(function () {
 | 
												
													
														
															|  |          if ($('#clone_option_unit').prop("checked")) options.checkUnit = true;
 |  |          if ($('#clone_option_unit').prop("checked")) options.checkUnit = true;
 | 
												
													
														
															|  |          if ($('#clone_option_zeroQuantity').prop("checked")) options.zeroQuantity = true;
 |  |          if ($('#clone_option_zeroQuantity').prop("checked")) options.zeroQuantity = true;
 | 
												
													
														
															|  |          if ($('#clone_option_cover').prop("checked")) options.overwriteRations = true;
 |  |          if ($('#clone_option_cover').prop("checked")) options.overwriteRations = true;
 | 
												
													
														
															|  | -
 |  | 
 | 
												
													
														
															|  | 
 |  | +        
 | 
												
													
														
															|  | 
 |  | +        let nodes = [];
 | 
												
													
														
															|  | 
 |  | +        let calcNodes = [];
 | 
												
													
														
															|  |          switch (blockLibObj.cloneType) {
 |  |          switch (blockLibObj.cloneType) {
 | 
												
													
														
															|  |              case 1:
 |  |              case 1:
 | 
												
													
														
															|  | -                blockLibObj.oneToOneClone(projectNode, block, options);
 |  | 
 | 
												
													
														
															|  | 
 |  | +                nodes = await blockLibObj.oneToOneClone(projectNode, block, options);
 | 
												
													
														
															|  | 
 |  | +                calcNodes = calcNodes.concat(nodes[1]);
 | 
												
													
														
															|  |                  break;
 |  |                  break;
 | 
												
													
														
															|  |              case 2:
 |  |              case 2:
 | 
												
													
														
															|  |                  let bills = calcTools.getLeafBills(projectNode);
 |  |                  let bills = calcTools.getLeafBills(projectNode);
 | 
												
													
														
															|  |                  for (let bill of bills){
 |  |                  for (let bill of bills){
 | 
												
													
														
															|  |                      calcTools.forceSelect(bill);
 |  |                      calcTools.forceSelect(bill);
 | 
												
													
														
															|  | -                    blockLibObj.oneToOneClone(bill, block, options);
 |  | 
 | 
												
													
														
															|  | 
 |  | +                    nodes = await blockLibObj.oneToOneClone(bill, block, options);
 | 
												
													
														
															|  | 
 |  | +                    calcNodes = calcNodes.concat(nodes[1]);
 | 
												
													
														
															|  |                  };
 |  |                  };
 | 
												
													
														
															|  |                  break;
 |  |                  break;
 | 
												
													
														
															|  |              case 3:
 |  |              case 3:
 | 
												
											
												
													
														
															|  | @@ -3415,11 +3488,23 @@ $(function () {
 | 
												
													
														
															|  |                  for (let mtmBill of mtmBills){
 |  |                  for (let mtmBill of mtmBills){
 | 
												
													
														
															|  |                      for (let mtmBlock of mtmBlocks){
 |  |                      for (let mtmBlock of mtmBlocks){
 | 
												
													
														
															|  |                          calcTools.forceSelect(mtmBill);
 |  |                          calcTools.forceSelect(mtmBill);
 | 
												
													
														
															|  | -                        blockLibObj.oneToOneClone(mtmBill, mtmBlock, options);
 |  | 
 | 
												
													
														
															|  | 
 |  | +                        nodes = await blockLibObj.oneToOneClone(mtmBill, mtmBlock, options);
 | 
												
													
														
															|  | 
 |  | +                        calcNodes = calcNodes.concat(nodes[1]);
 | 
												
													
														
															|  |                      };
 |  |                      };
 | 
												
													
														
															|  |                  };
 |  |                  };
 | 
												
													
														
															|  |                  break;
 |  |                  break;
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  | 
 |  | +        if(calcNodes.length > 0){
 | 
												
													
														
															|  | 
 |  | +            // projectObj.project.calcProgram.calcNodesAndSave(calcNodes, function () {
 | 
												
													
														
															|  | 
 |  | +            //     installationFeeObj.calcInstallationFee();
 | 
												
													
														
															|  | 
 |  | +            // });
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +            projectObj.project.calcProgram.calcNodesAndSave(calcNodes, async function () {
 | 
												
													
														
															|  | 
 |  | +                installationFeeObj.calcInstallationFee();
 | 
												
													
														
															|  | 
 |  | +                await OVER_HEIGHT.reCalcOverHeightFee();
 | 
												
													
														
															|  | 
 |  | +                await itemIncreaseFeeObj.calcItemIncreaseFeeByNodes(nodes[0]);
 | 
												
													
														
															|  | 
 |  | +            });
 | 
												
													
														
															|  | 
 |  | +        }
 | 
												
													
														
															|  |      });
 |  |      });
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  
 |  |  
 | 
												
											
												
													
														
															|  | @@ -3454,6 +3539,8 @@ function disableTools(){
 | 
												
													
														
															|  |      $('#poj-settings-4').find('input').prop('disabled', 'disabled');
 |  |      $('#poj-settings-4').find('input').prop('disabled', 'disabled');
 | 
												
													
														
															|  |      //小数位数
 |  |      //小数位数
 | 
												
													
														
															|  |      $('#poj-settings-decimal').find('input').prop('disabled', 'disabled');
 |  |      $('#poj-settings-decimal').find('input').prop('disabled', 'disabled');
 | 
												
													
														
															|  | 
 |  | +    // 清单限价
 | 
												
													
														
															|  | 
 |  | +    $('.limit-price-input').prop('disabled', 'disabled');
 | 
												
													
														
															|  |      //人工单价调整
 |  |      //人工单价调整
 | 
												
													
														
															|  |      $('#std_labour_coe_files').prop('disabled', 'disabled');
 |  |      $('#std_labour_coe_files').prop('disabled', 'disabled');
 | 
												
													
														
															|  |      //呈现选项
 |  |      //呈现选项
 | 
												
											
												
													
														
															|  | @@ -3515,35 +3602,6 @@ function disableTools(){
 | 
												
													
														
															|  |      $('#cleanTender').prop('disabled', 'disabled');
 |  |      $('#cleanTender').prop('disabled', 'disabled');
 | 
												
													
														
															|  |      $('#calcTender').prop('disabled', 'disabled');
 |  |      $('#calcTender').prop('disabled', 'disabled');
 | 
												
													
														
															|  |  }
 |  |  }
 | 
												
													
														
															|  | -//项目只读,表格只读
 |  | 
 | 
												
													
														
															|  | -function disableSpread(spread){
 |  | 
 | 
												
													
														
															|  | -    spread.unbind(GC.Spread.Sheets.Events.ButtonClicked);
 |  | 
 | 
												
													
														
															|  | -    let sheetCount = spread.getSheetCount();
 |  | 
 | 
												
													
														
															|  | -    for(let i = 0; i < sheetCount; i++){
 |  | 
 | 
												
													
														
															|  | -        let sheet = spread.getSheet(i);
 |  | 
 | 
												
													
														
															|  | -        sheet.unbind(GC.Spread.Sheets.Events.ButtonClicked);
 |  | 
 | 
												
													
														
															|  | -        sheet.unbind(GC.Spread.Sheets.Events.EditStarting);
 |  | 
 | 
												
													
														
															|  | -        sheet.unbind(GC.Spread.Sheets.Events.EditEnded);
 |  | 
 | 
												
													
														
															|  | -        sheet.unbind(GC.Spread.Sheets.Events.RangeChanged);
 |  | 
 | 
												
													
														
															|  | -        sheet.unbind(GC.Spread.Sheets.Events.ClipboardChanging);
 |  | 
 | 
												
													
														
															|  | -        sheet.unbind(GC.Spread.Sheets.Events.ClipboardChanged);
 |  | 
 | 
												
													
														
															|  | -        sheet.unbind(GC.Spread.Sheets.Events.CellDoubleClick);
 |  | 
 | 
												
													
														
															|  | -        sheet.unbind(GC.Spread.Sheets.Events.CellClick);
 |  | 
 | 
												
													
														
															|  | -        sheet.unbind(GC.Spread.Sheets.Events.ValueChanged);
 |  | 
 | 
												
													
														
															|  | -        sheet.suspendPaint();
 |  | 
 | 
												
													
														
															|  | -        sheet.suspendEvent();
 |  | 
 | 
												
													
														
															|  | -        sheet.options.isProtected = true;
 |  | 
 | 
												
													
														
															|  | -        let rowCount = sheet.getRowCount();
 |  | 
 | 
												
													
														
															|  | -        let colCount = sheet.getColumnCount();
 |  | 
 | 
												
													
														
															|  | -        for(let row = 0; row < rowCount; row++){
 |  | 
 | 
												
													
														
															|  | -            for(let col = 0; col < colCount; col++){
 |  | 
 | 
												
													
														
															|  | -                sheet.getCell(row, col).locked(true);
 |  | 
 | 
												
													
														
															|  | -            }
 |  | 
 | 
												
													
														
															|  | -        }
 |  | 
 | 
												
													
														
															|  | -        sheet.resumePaint();
 |  | 
 | 
												
													
														
															|  | -        sheet.resumeEvent();
 |  | 
 | 
												
													
														
															|  | -    }
 |  | 
 | 
												
													
														
															|  | -}
 |  | 
 | 
												
													
														
															|  |  //根据触发改变计算基数、费率弹出框
 |  |  //根据触发改变计算基数、费率弹出框
 | 
												
													
														
															|  |  function changeCalcBaseFeeRate(toggle) {
 |  |  function changeCalcBaseFeeRate(toggle) {
 | 
												
													
														
															|  |      if(toggle === 'calcBase'){
 |  |      if(toggle === 'calcBase'){
 | 
												
											
												
													
														
															|  | @@ -3681,6 +3739,28 @@ $('#locate-other').click(() => {
 | 
												
													
														
															|  |      fastLocate(FastLocateType.OTHER);
 |  |      fastLocate(FastLocateType.OTHER);
 | 
												
													
														
															|  |  });
 |  |  });
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  | 
 |  | +// 清单限价
 | 
												
													
														
															|  | 
 |  | +$('.limit-price-input').bind('input', function () {
 | 
												
													
														
															|  | 
 |  | +    const limitType = $(this).data('limit');
 | 
												
													
														
															|  | 
 |  | +    const orgVal = limitType === 'max'
 | 
												
													
														
															|  | 
 |  | +        ? (projectObj.project.property.maxPriceRate || 0)
 | 
												
													
														
															|  | 
 |  | +        : (projectObj.project.property.minPriceRate || 0);
 | 
												
													
														
															|  | 
 |  | +    try {
 | 
												
													
														
															|  | 
 |  | +        const val = $(this).val();
 | 
												
													
														
															|  | 
 |  | +        if (isNaN(val)) {
 | 
												
													
														
															|  | 
 |  | +            throw '只能输入两位小数数值!';
 | 
												
													
														
															|  | 
 |  | +        }
 | 
												
													
														
															|  | 
 |  | +        const splits = val.split('.');
 | 
												
													
														
															|  | 
 |  | +        const decimalDigits = splits[1] && splits[1].length || 0;
 | 
												
													
														
															|  | 
 |  | +        if (decimalDigits > 2) {
 | 
												
													
														
															|  | 
 |  | +            const roundVal = scMathUtil.roundForObj(val, 2);
 | 
												
													
														
															|  | 
 |  | +            $(this).val(roundVal);
 | 
												
													
														
															|  | 
 |  | +        }
 | 
												
													
														
															|  | 
 |  | +    } catch (err) {
 | 
												
													
														
															|  | 
 |  | +        alert(err);
 | 
												
													
														
															|  | 
 |  | +        $(this).val(orgVal);
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  | 
 |  | +});
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  //导出接口
 |  |  //导出接口
 | 
												
													
														
															|  |  ExportView.exportListener();
 |  |  ExportView.exportListener();
 |