Procházet zdrojové kódy

Merge remote-tracking branch 'origin/master'

ljy121 před 1 rokem
rodič
revize
c41215b5cf

+ 3 - 0
zjugis-business/src/main/resources/static/flow/css/formCommon.css

@@ -295,4 +295,7 @@
 
 .form-table-info .table-btn span {
   color: #2e77e6;
+}
+.z-hide {
+  display: none !important;
 }

+ 6 - 5
zjugis-business/src/main/resources/templates/CommonCost/index.ftl

@@ -4,6 +4,7 @@
     <div class="z-form-row" style="display: none;">
       <input type="text" value="${formEntity.instanceId!}" name="createReqVO$instanceId">
       <input type="text" value="${formEntity.id!}" name="createReqVO$id">
+      <input type="text" value="${formEntity.bz3!}" name="createReqVO$bz3">
       <input type="text" value='${costTypeJSON!}' id="costTypeJSON">
       <input type="text" value='${detailList!}' id="detailList">
     </div>
@@ -80,7 +81,7 @@
                   <input type="hidden" name="createReqVO$projectId" value="${formEntity.projectId!}">
                   <div class="z-comp-input" name="createReqVO$projectName">
                     <input type="text" value="${projectName!}">
-                    <div id="selectProject" style="width: 50px; float: right;">
+                    <div id="selectProject" name="selectProject" style="width: 50px; float: right;">
                       <div class="btn btn-sm btn-primary">选择</div>
                     </div>
                   </div>
@@ -120,7 +121,7 @@
             </td>
             <td>
               <div class="form-group">
-                <div class="z-comp-selecttree" name="paymentCompany">
+                <div class="z-comp-selecttree" name="createReqVO$paymentCompany">
                   <input type="hidden" name="createReqVO$paymentCompanyId" value="${formEntity.paymentCompanyId!}">
                   <div class="z-inputselect-bar">
                     <span> ${paymentCompanyName!} </span><i></i>
@@ -204,7 +205,7 @@
           <span>单据详情</span>
         </div>
         <div class="form-btn">
-          <div id="addData">
+          <div id="addData" name="addData">
             <img src="/imgs/addIcon.png" alt="">
             <span>新增</span>
           </div>
@@ -213,9 +214,9 @@
       <div class="qjsjxx-box">
         <table class="form-table-info">
           <tr style="height: 37px;">
-            <td style="width: 80px;">序号</td>
+            <td style="width: 70px;">序号</td>
             <td style="width: 200px;">发生日期</td>
-            <td>费用实际所属类型</td>
+            <td style="width: 300px;">费用实际所属类型</td>
             <td>发票内容</td>
             <td style="width: 100px;">单据张数</td>
             <td style="width: 200px;">金额</td>

+ 31 - 4
zjugis-business/src/main/resources/templates/CommonCost/js/index.js

@@ -1,5 +1,8 @@
 (function () {
   let isTimes = []
+  let viewState = z.ui.comm.getUrlParam("_o");
+  let read = z.ui.comm.getUrlParam("read");
+  let finance = z.ui.comm.getUrlParam("finance");
   window.onload = function (ex) {
     let timeObject = document.querySelector('#detailList')
     let arrays = JSON.parse(timeObject.value)
@@ -7,6 +10,7 @@
       let obj = {
         amount: "",
         bz1: "",
+        costType: "",
         commonCostId: "",
         costContent: "",
         costDate: "",
@@ -32,6 +36,7 @@
         let obj = {
           amount: arrays[i].amount,
           bz1: arrays[i].bz1,
+          costType: arrays[i].costType,
           commonCostId: arrays[i].commonCostId,
           costContent: arrays[i].costContent,
           costDate: arrays[i].costDate,
@@ -56,7 +61,7 @@
         + '<div class="form-flex">'
         + '<div class="form-item" style="width: 100%;margin-right: 5px;">'
         + '<div class="z-comp-date" name="CommonCostDetailDO[' + i + ']$costDate">'
-        + '<input type="text" value="' + isTimes[i].amount + '">'
+        + '<input type="text" value="' + isTimes[i].costDate + '">'
         + '</div>'
         + '</div>'
         + '</div>'
@@ -76,14 +81,14 @@
         + '<td>'
         + '<div class="form-item">'
         + '<div class="z-comp-input" name="CommonCostDetailDO[' + i + ']$costContent">'
-        + '<input type="text" value="' + isTimes[i].amount + '">'
+        + '<input type="text" value="' + isTimes[i].costContent + '">'
         + '</div>'
         + '</div>'
         + '</td>'
         + '<td>'
         + '<div class="form-item">'
         + '<div class="z-comp-input" name="CommonCostDetailDO[' + i + ']$invoiceNums">'
-        + '<input type="number" value="' + isTimes[i].amount + '">'
+        + '<input type="number" value="' + isTimes[i].invoiceNums + '">'
         + '</div>'
         + '</div>'
         + '</td>'
@@ -97,7 +102,7 @@
         + '<td>'
         + '<div class="form-item">'
         + '<div class="z-comp-input" name="CommonCostDetailDO[' + i + ']$bz1">'
-        + '<input type="text" value="' + isTimes[i].amount + '">'
+        + '<input type="text" value="' + isTimes[i].bz1 + '">'
         + '</div>'
         + '</div>'
         + '</td>'
@@ -115,6 +120,8 @@
       })
       selecttree("[name='costType[" + i + "]']", costTypeJSON, clickCostType, allowChildClick)
       z.ui.date("[name='CommonCostDetailDO[" + i + "]$costDate']").init()
+      z.ui.selecttree("[name='costType[" + i + "]']").setValue(isTimes[i].costType)
+      $("[name='CommonCostDetailDO[" + i + "]$costType']").val(isTimes[i].costType);
       $("#delBtn_" + i).click(function () {
         z.ui.confirm("compid").init({
           content: "确定删除吗?",
@@ -132,9 +139,29 @@
         })
 
       })
+      if(viewState === 'v' || read===1){
+        detailReadonly(i)
+      }
     }
     detailTotalInit()
   }
+
+  function detailReadonly(i){
+    //财务审核时可以核减修改金额
+    if(finance === 1){
+      //如果单据金额发生修改就代表核减了
+    }
+    $("#delBtn_" + i).css("display","none");
+    $("[name='costType[" + i + "]']").addClass("z-readonly");
+    $("[name='costType[" + i + "]']").css("pointer-events", "none");
+    let detailElement = document.getElementById("qjsj_" + i);
+    let detailInput = detailElement.getElementsByTagName("input");
+    for (let j = 0; j < detailInput.length; j++){
+      detailInput[j].disabled = true;
+      detailInput[j].className += "z-readonly"
+    }
+  }
+
   function detailTotalInit() {
     let obj = {
       amount: "",

+ 1 - 0
zjugis-business/src/main/resources/templates/public/workFlow.ftl

@@ -1,3 +1,4 @@
+<#setting number_format="0.####">
 <#macro workFlow title='工作流' javascripts=[''] styles=['']>
     <@h.html title=title
     javascripts = (WORKFLOW.JS![])+javascripts