Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

ljy121 1 anno fa
parent
commit
6619ca31c2

+ 10 - 6
zjugis-business/src/main/java/com/zjugis/business/flow/commoncost/service/CommonCostServiceImpl.java

@@ -149,13 +149,15 @@ public class CommonCostServiceImpl implements CommonCostService {
     private Map<String, Object> createModelMap() {
         Map<String, Object> map = new HashMap<>();
         map.put("formEntity", new HashMap<>());
-        List<zTree> zTrees = getCostTypezTrees();
-        map.put("costTypeJSON", JSON.toJSONString(zTrees));
+        List<zTree> zTrees = getCostTypezTrees(DictConstants.COMMON_COST_TYPE_NOSUB);
+        List<zTree> zTrees2 = getCostTypezTrees(DictConstants.COMMON_COST_TYPE);
+        map.put("costTypeNoSubJSON", JSON.toJSONString(zTrees));
+        map.put("costTypeJSON", JSON.toJSONString(zTrees2));
         return map;
     }
 
-    private List<zTree> getCostTypezTrees() {
-        List<DictDataRespDTO> dictDataRespDTOS = dictDataApi.getDictDataList(DictConstants.COMMON_COST_TYPE_NOSUB).getCheckedData();
+    private List<zTree> getCostTypezTrees(String dictType) {
+        List<DictDataRespDTO> dictDataRespDTOS = dictDataApi.getDictDataList(dictType).getCheckedData();
         List<zTree> zTrees = new ArrayList<>();
         for (DictDataRespDTO dictDataRespDTO : dictDataRespDTOS) {
             zTree node = new zTree();
@@ -177,7 +179,9 @@ public class CommonCostServiceImpl implements CommonCostService {
             map.put("projectXmbh", project.getXmbh());
             map.put("projectZrbm", project.getZrbm());
         }
-        List<zTree> zTrees = getCostTypezTrees();
+        List<zTree> zTrees = getCostTypezTrees(DictConstants.COMMON_COST_TYPE_NOSUB);
+        map.put("costTypeNoSubJSON", JSON.toJSONString(zTrees));
+        List<zTree> zTrees2 = getCostTypezTrees(DictConstants.COMMON_COST_TYPE);
         map.put("costTypeJSON", JSON.toJSONString(zTrees));
         map.put("formEntity", entity);
         map.put("z_work_flow", workflowUrl);
@@ -214,7 +218,7 @@ public class CommonCostServiceImpl implements CommonCostService {
         // 更新
         CommonCostDO updateObj = CommonCostConvert.INSTANCE.convert(updateReqVO);
         commonCostDao.updateById(updateObj);
-        //发生核减后修改流程描述
+        //发生核减后修改流程描述z
         if(StringUtils.isNotEmpty(updateReqVO.getBz2())){
             CommonCostDO entity = commonCostDao.selectById(updateReqVO.getId());
             List<CommonCostDetailDO> detailList = commonCostDetailService.getListByCommonCostId(updateObj.getId());

+ 2 - 2
zjugis-business/src/main/resources/templates/AssetProcure/js/agentIndex.js

@@ -93,8 +93,8 @@
       $(".z-comp-selecttree").addClass("z-readonly");
       $(".z-comp-select").addClass("z-readonly");
     }
-    var list1 = JSON.parse(window.glcglist1);
-    var list2 = JSON.parse(window.glcglist2);
+    var list1 = JSON.parse(window.glcglist1.replace(/[\r|\n|\t]/g,""));
+    var list2 = JSON.parse(window.glcglist2.replace(/[\r|\n|\t]/g,""));
     var html="";
     if(list1&&list1.instanceId){
       html ="<a onclick=goAsset1('"+list1.instanceId+"')>"+list1.userNickname+"("+list1.createTime.substring(0,10)+")</a>";

+ 2 - 2
zjugis-business/src/main/resources/templates/AssetProcure/js/index.js

@@ -85,8 +85,8 @@
       $(".z-comp-selecttree").addClass("z-readonly");
       $(".z-comp-select").addClass("z-readonly");
     }
-    var list1 = JSON.parse(window.glcglist1);
-    var list2 = JSON.parse(window.glcglist2);
+    var list1 = JSON.parse(window.glcglist1.replace(/[\r|\n|\t]/g,""));
+    var list2 = JSON.parse(window.glcglist2.replace(/[\r|\n|\t]/g,""));
     var html="";
     if(list1&&list1.instanceId){
       html ="<a onclick=goAsset3('"+list1.instanceId+"')>"+list1.userNickname+"("+list1.createTime.substring(0,10)+")</a>";

+ 1 - 0
zjugis-business/src/main/resources/templates/CommonCost/agentIndex.ftl

@@ -8,6 +8,7 @@
       <input type="text" value="${formEntity.bz3!}" name="createReqVO$bz3">
       <input type="text" value="${formEntity.bz2!}" name="createReqVO$bz2">
       <input type="text" value='${costTypeJSON!}' id="costTypeJSON">
+      <input type="text" value='${costTypeNoSubJSON!}' id="costTypeNoSubJSON">
       <input type="text" value='${detailList!}' id="detailList">
     </div>
     <ul class="ow-tab-nav oa_tabBox">

+ 1 - 0
zjugis-business/src/main/resources/templates/CommonCost/index.ftl

@@ -7,6 +7,7 @@
       <input type="text" value="${formEntity.bz3!}" name="createReqVO$bz3">
       <input type="text" value="${formEntity.bz2!}" name="createReqVO$bz2">
       <input type="text" value='${costTypeJSON!}' id="costTypeJSON">
+      <input type="text" value='${costTypeNoSubJSON!}' id="costTypeNoSubJSON">
       <input type="text" value='${detailList!}' id="detailList">
     </div>
     <ul class="ow-tab-nav oa_tabBox">

+ 6 - 2
zjugis-business/src/main/resources/templates/CommonCost/js/agentIndex.js

@@ -7,6 +7,7 @@
     let detailProjectIndex = 0;
     let previousAmount = z.ui.input("[name='createReqVO$totalAmount']").getValue();
     let costTypeJSON = JSON.parse(document.querySelector('#costTypeJSON').value)
+    let costTypeNoSubJSON = JSON.parse(document.querySelector('#costTypeNoSubJSON').value)
     let lastProjectId = '';
     let lastProjectName = '';
     let lastProjectDeptName = '';
@@ -167,6 +168,9 @@
         let trFragment = document.createDocumentFragment();
         trFragment.appendChild(trDom);
         $(".tbody").append(trFragment)
+        if(viewState === 'v'){
+            costTypeJSON = costTypeNoSubJSON
+        }
         costTypeJSON.forEach(obj => {
             obj.treeName = 'CommonCostDetailDO[' + i + ']$costType';
         })
@@ -368,10 +372,10 @@
 
     //注册业务保存事件
     function bindEvents() {
-        var list = JSON.parse(window.glcglist);
+        var list = JSON.parse(window.glcglist.replace(/[\r|\n|\t]/g,""));
         var html="";
         for(var i=0;i<list.length;i++){
-            html +="<a onclick=goAsset('"+list[i].instanceId+"')>"+list[i].userNickname+"("+list[i].createTime.substring(0,10)+")</a>";
+            html +="<a onclick=goAsset('"+list[i].instanceId+"')>"+list[i].userNickname+"("+list[i].applyTime.substring(0,10)+")</a>";
         }
         $("#glcghtml").html(html);
         z.workflow.saveBtn.addListener("onSaveClick", saveForm);

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

@@ -7,6 +7,7 @@
     let detailProjectIndex = 0;
     let previousAmount = z.ui.input("[name='createReqVO$totalAmount']").getValue();
     let costTypeJSON = JSON.parse(document.querySelector('#costTypeJSON').value)
+    let costTypeNoSubJSON = JSON.parse(document.querySelector('#costTypeNoSubJSON').value)
     let lastProjectId = '';
     let lastProjectName = '';
     let lastProjectDeptName = '';
@@ -166,6 +167,9 @@
         let trFragment = document.createDocumentFragment();
         trFragment.appendChild(trDom);
         $(".tbody").append(trFragment)
+        if(viewState === 'v'){
+            costTypeJSON = costTypeNoSubJSON
+        }
         costTypeJSON.forEach(obj => {
             obj.treeName = 'CommonCostDetailDO[' + i + ']$costType';
         })

+ 2 - 2
zjugis-business/src/main/resources/templates/OutsourcePurchase/js/index.js

@@ -67,8 +67,8 @@
       $(".z-comp-selecttree").addClass("z-readonly");
       $(".z-comp-select").addClass("z-readonly");
     }
-    var list1 = JSON.parse(window.glcglist1);
-    var list2 = JSON.parse(window.glcglist2);
+    var list1 = JSON.parse(window.glcglist1.replace(/[\r|\n|\t]/g,""));
+    var list2 = JSON.parse(window.glcglist2.replace(/[\r|\n|\t]/g,""));
     var html="";
     if(list1&&list1.instanceId){
       html ="<a onclick=goAsset2('"+list1.instanceId+"')>"+list1.userNickname+"("+list1.createTime.substring(0,10)+")</a>";

+ 1 - 1
zjugis-business/src/main/resources/templates/UseMoney/js/agentIndex.js

@@ -79,7 +79,7 @@
       $(".z-comp-select").addClass("z-readonly");
       $(".z-comp-textarea").addClass("z-readonly");
     }
-    var list = JSON.parse(window.glcglist);
+    var list = JSON.parse(window.glcglist.replace(/[\r|\n|\t]/g,""));
     var html="";
     for(var i=0;i<list.length;i++){
       html +="<a onclick=goAsset('"+list[i].instanceId+"')>"+list[i].userNickname+"("+list[i].createTime.substring(0,10)+")</a>";

+ 1 - 1
zjugis-business/src/main/resources/templates/UseMoney/js/index.js

@@ -73,7 +73,7 @@
       $(".z-comp-select").addClass("z-readonly");
       $(".z-comp-textarea").addClass("z-readonly");
     }
-    var list = JSON.parse(window.glhtlist);
+    var list = JSON.parse(window.glhtlist.replace(/[\r|\n|\t]/g,""));
     var html="";
     if(list.instanceId){
       html +="<a onclick=goAsset('"+list.instanceId+"')>"+list.projectName+"("+list.applyDate.substring(0,10)+")</a>";