Browse Source

分摊功能更新

zhangweicheng 5 năm trước cách đây
mục cha
commit
80e527de7a

+ 6 - 6
web/building_saas/main/html/divide.html

@@ -126,24 +126,24 @@
 
 <!--弹出 执行分摊-->
 <div class="modal fade" id="exec_divide_div" data-backdrop="static">
-  <div class="modal-dialog modal-lg" style="max-width: 1100px" role="document">
-      <div class="modal-content" style="width: 1100px">
+  <div class="modal-dialog" style="max-width: 1000px;" role="document">
+      <div class="modal-content" style="width: 1000px">
           <div class="modal-header">
               <h5 class="modal-title">执行分摊</h5>
               <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                   <span aria-hidden="true">&times;</span>
               </button>
           </div>
-          <div class="modal-body">
+          <div class="modal-body" style="padding: 0.5rem 1rem;">
             <label id="exec_divide_label">混凝土拌合站建设费<br>分摊到:</label>
-              <div class="row" style="height:400px;border-top: 1px solid #ccc;"><!--sjs id设置在这个div-->
+              <div class="row" style="height:300px;border-top: 1px solid #ccc;"><!--sjs id设置在这个div-->
                   <div style="overflow: hidden; width: 100%;" id="billSelectedSheet" > </div>
               </div>
-              <div class="row" style="height:250px"><!--sjs id设置在这个div-->
+              <div class="row" style="height:200px"><!--sjs id设置在这个div-->
                   <div style="overflow: hidden; width: 100%" id="execBillSheet"></div>
               </div>
           </div>
-          <div class="modal-footer" style="justify-content: left;">
+          <div class="modal-footer" style="justify-content: left;padding: .3rem 1rem;">
             <div class=" col-10" style="overflow: hidden" id="install_setting">
               <div >
                   <!--<div class="setting_title">整个项目统一计取</div>-->

+ 5 - 5
web/building_saas/main/js/views/divide_view.js

@@ -30,7 +30,7 @@ let divideObj = {
       {headerName: "清单编号", headerWidth: 160, dataCode: "code", hAlign:'left', dataType: "String"},
       {headerName: "名称", headerWidth: 300, dataCode: "name", dataType: "String"},
       {headerName: "单位", headerWidth: 60, dataCode: "unit", hAlign:'center'},
-      {headerName: "工程量", headerWidth: 100, dataCode: "quantity", dataType: "Number",validator:"number"},
+      {headerName: "工程量", headerWidth: 80, dataCode: "quantity", dataType: "Number",validator:"number"},
       {headerName: "单价", headerWidth: 100, dataCode: "unitFee", dataType: "Number",validator:"number"},
       {headerName: "金额", headerWidth: 100, dataCode: "totalFee", dataType: "Number",validator:"number"},
       {headerName: "不可分摊", headerWidth: 80, dataCode: "unDivide", dataType: "Number",cellType:'checkBox'}
@@ -230,7 +230,7 @@ let divideObj = {
          let IDMap = {};
          if(item.bills) IDMap = _.indexBy(item.bills,"ID");
          if(IDMap[e.ID]){
-          e.divideRate = IDMap[e.ID].divideRate;
+          e.divideRate = scMathUtil.roundForObj(parseFloat(IDMap[e.ID].divideRate) * 100,3);
          } 
       }else if(divideType == 0){//按清单金额比例
         if(e.totalFee != "" && total!=0) {
@@ -1257,9 +1257,9 @@ let divideObj = {
       let bNode = projectObj.project.mainTree.findNode(b.ID);
       if(!bNode) continue;
       let divideRate = scMathUtil.roundForObj(b.divideRate,3);
-      let marketUnitFee = item.marketPrice?scMathUtil.roundForObj(item.marketPrice,getDecimal("bills.unitPrice")):0;
-      let quantity = item.quantity?scMathUtil.roundForObj(item.quantity,3):0;
-      quantity = scMathUtil.roundForObj(quantity*divideRate,getDecimal("ration.quantity"))//量价数量为分摊项的数量*分摊比例
+      let marketUnitFee = item.marketTotalFee?scMathUtil.roundForObj(item.marketTotalFee,getDecimal("bills.totalPrice")):0;
+      let quantity = divideRate;//item.quantity?scMathUtil.roundForObj(item.quantity,3):0;
+      //quantity = scMathUtil.roundForObj(quantity*divideRate,getDecimal("ration.quantity"))//量价数量为分摊项的数量*分摊比例
       if(quantity > 0 && marketUnitFee > 0){
         let serialNo = 0;
         let preID = "";