From baf335094eb69b68a70c5a1010a5fb08bc1222cf Mon Sep 17 00:00:00 2001
From: yuxc <653031404@qq.com>
Date: 星期一, 03 七月 2023 18:01:37 +0800
Subject: [PATCH] 1、主要对修改码段选择层级码段时加了一个值截取长度的框以及相关处理逻辑。 2、对模板属性批量保存保存进行了修改。

---
 Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/VciQueryWrapperForDO.java |    8 +-
 Source/UBCS-WEB/src/views/code/code.vue                                                                          |  145 +++++++++++++++++++++++++++--------------------
 Source/UBCS-WEB/src/components/Tree/attrCrud.vue                                                                 |    2 
 3 files changed, 88 insertions(+), 67 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index 942a15c..68cdd6c 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -1264,7 +1264,7 @@
     },
     //淇濆瓨
     addsHandler() {
-      batchAddSave(this.ProData).then(res => {
+      batchAddSave(JSON.parse(JSON.stringify(this.ProData).replace(/classifyTemplateOid/g,"classifytemplateoid"))).then(res => {
         this.$message.success('淇濆瓨鎴愬姛')
       })
     },
diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index ca5372d..eff5c3f 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -92,7 +92,7 @@
             @click="handleRange">
             浣跨敤鑼冨洿
           </el-button>
-          <el-button 
+          <el-button
               size="small"
               icon="icon-qingkong"
               plain
@@ -118,7 +118,7 @@
       width="800px"
       style="height: 116vh; margin-top: -10vh;">
       <avue-crud
-        :option="dialogeOption" 
+        :option="dialogeOption"
         :table-loading="dialogLoading"
         :data="useRangeData"
         @refresh-change="refreshUseRangeChange">
@@ -326,8 +326,8 @@
                 <basic-container>
                   <div class="abox" style="height:54vh">
                     <avue-tree
-                      :data="classifyValueTreeData" 
-                      :option="classisyValueTreeOption" 
+                      :data="classifyValueTreeData"
+                      :option="classisyValueTreeOption"
                       @node-click="classisyValueTreeOnodeClick"
                       style="overflow-y: auto; height: 54vh"/>
                   </div>
@@ -431,7 +431,7 @@
             <el-form-item label="鐮佹鍚嶇О:" :label-width="leftFormLabelWidth" required>
               <el-input ref="name"  v-model="form.name" :readonly="basicSecOnlyRead"></el-input>
             </el-form-item>
-            
+
             <el-form-item label="鐮佹绫诲瀷" :label-width="leftFormLabelWidth" required>
               <el-select v-model="form.secType" placeholder="璇烽�夋嫨" @change="changeSectypeFormItems(null)" :disabled="basicSecOnlyRead">
                 <el-option
@@ -489,7 +489,7 @@
                 </el-input>
               </el-form-item>
               <el-form-item label="灞炴�ф墍鍦ㄥ垎绫�:" :label-width="rightFormLabelWidth">
-                <el-input 
+                <el-input
                   v-model="form.referCodeClassifyOidName"
                   disabled>
               </el-input>
@@ -566,7 +566,7 @@
                 <el-input v-model.number="form.codeLevelValue" ref="codeLevelValue"  :readonly="basicSecOnlyRead"></el-input>
               </el-form-item>
               <el-form-item label="瀛楃鎴彇绫诲瀷:" :label-width="rightFormLabelWidth" required>
-                <el-select v-model="form.valueCutType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+                <el-select v-model="form.valueCutType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead" @change="changeCutType($event)">
                   <el-option
                     v-for="item in enumParam.codeCutType"
                     :key="item.itemValue"
@@ -574,6 +574,9 @@
                     :value="item.itemValue">
                   </el-option>
                 </el-select>
+              </el-form-item>
+              <el-form-item id="ShowOrHide" v-mode="showCutLength" v-if="showCutLength==true" label="鍊兼埅鍙栭暱搴�:" :label-width="rightFormLabelWidth">
+                <el-input v-model.number="form.valueCutLength" ref="valueCutLength"  :readonly="basicSecOnlyRead"></el-input>
               </el-form-item>
               <el-form-item label="鍙栧�肩被鍨�:" :label-width="rightFormLabelWidth">
                 <el-select v-model="form.codeGetValueType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
@@ -590,7 +593,7 @@
             <div v-show="form.secType==='coderefersec' ? true:false">
               <el-form-item label="鍙傜収寮曠敤鐨勪笟鍔$被鍨�:" label-width="152px" required>
                 <el-input
-                  ref="referBtmId" 
+                  ref="referBtmId"
                   placeholder="璇烽�夋嫨"
                   prefix-icon="el-icon-search"
                   readonly="true"
@@ -602,7 +605,7 @@
               </el-form-item>
               <el-form-item label="鍙傜収閰嶇疆:" label-width="152px" required>
                 <el-input
-                  ref="referConfig" 
+                  ref="referConfig"
                   placeholder="璇烽�夋嫨"
                   prefix-icon="el-icon-search"
                   readonly="true"
@@ -731,9 +734,9 @@
       </el-dialog>
 
       <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝鍏紡缂栬緫妗嗗璇濇缁勪欢 -->
-      <formula-editor 
-        ref="formulaEditor" 
-        @updateFormulaContent="updateFormulaContent" 
+      <formula-editor
+        ref="formulaEditor"
+        @updateFormulaContent="updateFormulaContent"
         :thisSceneTableData="formulaEditorParams.thisSceneTableData"
         :visible.sync="formulaEditorParams.formulaEditorSettingBox"
         :systemVariableTableData="formulaEditorParams.systemVariableTableData">
@@ -749,7 +752,7 @@
         <avue-crud
           :page.sync="parentClsfyParams.parentClassifyDataPage"
           :ref="parentClsfyParams.ref"
-          :option="parentClsfyParams.parentClassifyParentOption" 
+          :option="parentClsfyParams.parentClassifyParentOption"
           :table-loading="parentClsfyParams.classifyDialogLoading"
           :data="parentClsfyParams.parentClassifyData"
           @refresh-change="refreshParentClassifyDataChange"
@@ -779,7 +782,7 @@
         ref="referConfigFormDialog"
         @echoReferConfig="echoReferConfig">
       </refer-config-form-dialog>
-      
+
       <!-- 绗簩灞傚璇濇,鐩存帴閫夋嫨鍙傜収閰嶇疆crud缁勪欢 -->
       <refer-config-crud-dialog
         ref="referConfigCrudDialog"
@@ -794,12 +797,12 @@
 
 <script>
   import { gridCodeRule, getDetail, add, update, remove, listUseRange, updateStatus,clone,clearAllCode } from "@/api/code/mdmrule";
-  import { 
-    gridCodeBasicSec, 
-    downOrderNum, 
-    upOrderNum, 
-    deleteData, 
-    editSave, 
+  import {
+    gridCodeBasicSec,
+    downOrderNum,
+    upOrderNum,
+    deleteData,
+    editSave,
     cloneCodeBasic,
     addSave,
     refDataGridClassifySec,
@@ -835,6 +838,7 @@
             total: 0
           },
           selectionList: [],
+          showCutLength: false,
           /*缂栫爜瑙勫垯琛ㄦ牸閰嶇疆*/
           optionRule: optionRule,
           data: [],
@@ -910,7 +914,7 @@
             codeFixedSecOid: "",
             description: "",
             id: "",
-          }, 
+          },
           isShowFixedForm: true, //true鏄剧ず鍥哄畾鐮佹鐮佸�肩鐞嗙晫闈紝false鏄剧ず鍒嗙被鐮佹鐮佸�肩鐞嗙晫闈�
           fixedValueData: [], //鍥哄畾鐮佹鐮佸�艰〃鏍兼暟鎹�
           fixedValueOption: fixedValueOption, //琛ㄦ牸閰嶇疆
@@ -935,7 +939,7 @@
           treeOption: treeOption,
           currentSelectTreeData: '', //褰撳墠閫変腑鐨勬爲鑺傜偣
           /* 涓哄睘鎬ч�夊�煎彸渚ц〃鏍肩浉鍏虫暟鎹� */
-          
+
           selectAttrParams: {
             ref: "selectionAttrCrud",
             attrOption: attrOption,
@@ -1013,7 +1017,7 @@
             ],
             formulaEditorSettingBox: false,
           },
-          
+
           /* 鐖跺垎绫荤爜娈靛璇濇 */
           parentClsfyParams: {
             ref: 'crudParentClassify',
@@ -1030,7 +1034,7 @@
             parentClassifyQuery: {}, //鏌ヨ鏉′欢
             parentClassifySelectionList: [], //褰撳墠閫変腑琛�
           },
-          
+
           /** 鍙傜収寮曠敤鐨勪笟鍔$被鍨嬪璇濇鐩稿叧鏁版嵁 */
           referBtmDialogParams: {
             ref: 'crudReferBtm',
@@ -1050,7 +1054,7 @@
             componentCodeFlag: false, //鏄惁鍙備笌缂栫爜
             pkCodeRule: '', //鎵�灞炵紪鐮佽鍒�
           },
-          
+
           //鏋氫妇鍜屽彲杈撳彲閫夋煡璇�
           enumParam: {
             secTypeList:[],    //鐮佹绫诲瀷
@@ -1126,8 +1130,8 @@
           this.form.referBtmId = content.id || '';
           this.form.referBtmName = content.name || content.id;
         },
-        
-        /** 鐖跺垎绫婚�夋嫨瀵硅瘽妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */ 
+
+        /** 鐖跺垎绫婚�夋嫨瀵硅瘽妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
         // 淇濆瓨褰撳墠鐖跺垎绫荤爜娈电殑閫変腑琛岋紝骞惰繘琛屽洖鏄�
         saveSelectedParentClassify(){
           //console.log(this.parentClsfyParams.parentClassifySelectionList.length);
@@ -1182,8 +1186,8 @@
           let conditionMaps = {};
           conditionMaps['conditionMap[pkCodeRule]'] = oid;
           refDataGridClassifySec(
-            page.currentPage, 
-            page.pageSize, 
+            page.currentPage,
+            page.pageSize,
             conditionMaps
           ).then(res => {
             //console.log(res.data);
@@ -1194,9 +1198,9 @@
             this.parentClassifySelectionClear();
           });
         },
-        
 
-        /** 鎵撳紑灞炴�ч�夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */ 
+
+        /** 鎵撳紑灞炴�ч�夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
         // 鑾峰彇褰撳墠琚�変腑鏍戣妭鐐圭殑oid
         nodeClick(data) {
           this.currentSelectTreeData = data;
@@ -1266,7 +1270,7 @@
           })
           this.isShowSelectAttrOption = false;
         },
-        
+
 
         /** 鍩虹鐮佹琛ㄤ腑鐨勭爜鍊肩鐞嗙殑鐩稿叧鏂规硶 */
         // 鐮佸�肩鐞嗗脊绐楁帶鍒�
@@ -1396,10 +1400,10 @@
                 window.console.log(error);
             });
           }
-            
+
         },
         //鍒犻櫎鐮佸��
-        delCodeSecValue(condition){ 
+        delCodeSecValue(condition){
           //鍥哄畾鐮佹鐮佸�煎垹闄�
           if(condition == 'codefixedsec'){
             //console.log(this.selectedFixedOrCodeclassifyValue.oid);
@@ -1441,8 +1445,8 @@
                 message: "鎿嶄綔鎴愬姛!"
               });
             });
-          }            
-          
+          }
+
         },
         //瀵瑰浐瀹氱爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣�
         codeFixedValueOpetion(condition,row){
@@ -1503,7 +1507,7 @@
               saveData[0].orderNum = parseInt(saveData[0].orderNum)+1;
               saveData[1].orderNum = parseInt(saveData[1].orderNum)-1;
               this.saveCodeFixedOrClassifyValueOption('classifyValue',saveData);
-            } 
+            }
           }
           console.log(saveData);
           console.log(this.classifyValueTreeData);
@@ -1516,10 +1520,10 @@
           */
           //璇存槑鏄牴鑺傜偣锛岀洿鎺ユ壘鍐嶅垽鏂槸鍚︽槸杈圭晫鍊�
           if(currentNodeTreeData.parentId.trim() == ''){
-            return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.oid,true);   
+            return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.oid,true);
           }else{
             //璇存槑涓嶆槸鏍硅妭鐐�,鍏堟壘鍒扮埗鑺傜偣鍐嶆壘鍒板瓙鑺傜偣,鍒ゆ柇鏄惁鏄竟鐣屽��
-            return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.parentId,false); 
+            return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.parentId,false);
           }
         },
         /**
@@ -1577,7 +1581,7 @@
             });
             this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid});
           }
-          
+
         },
         //鍒嗙被鐮佸�兼爲data鍔犺浇
         loadClassifyValueData(row){
@@ -1655,7 +1659,7 @@
           if(this.selectionList[0].oid == null ||  this.selectionList[0].oid == ''){
             this.$message.warning('缂哄け蹇呰鍙傛暟锛岃閲嶆柊閫夋嫨缂栫爜瑙勫垯鍚庡啀璇�!');
             return;
-          }        
+          }
           this.form.pkCodeRule = this.selectionList[0].oid;
           if(this.form.oid == '' || this.form.oid == null){
             if(this.checkForm()){
@@ -1930,7 +1934,7 @@
             });
           }
           if(isAdancedQuery){
-            condition['conditionMap[pkCodeRule]'] = this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' 
+            condition['conditionMap[pkCodeRule]'] = this.currentCodeRuleOid == null || this.currentCodeRuleOid == ''
             ? this.selectionList[0].oid:this.currentCodeRuleOid;
           }
           gridCodeBasicSec(1, -1,isAdancedQuery ? condition:conditionMaps).then(res => {
@@ -1974,11 +1978,11 @@
           }
           if (this.selectionList[0].lcStatus != 'Editing') {
             this.$message.warning("鍙湁缂栫爜瑙勫垯鐨勭姸鎬佹槸 [缂栬緫涓璢 鐨勬椂鍊欙紝鎵嶈兘璋冩暣鐮佹椤哄簭!");
-            return; 
+            return;
           }
           if(row.oid==null || row.oid==''){
             this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
-            return;        
+            return;
           }
           upOrderNum(row.oid).then(() => {
             this.loadBasic(this.selectionList[0]);
@@ -1997,11 +2001,11 @@
           //console.log(this.selectionList);
           if (this.selectionList[0].lcStatus != 'Editing') {
             this.$message.warning("鍙湁缂栫爜瑙勫垯鐨勭姸鎬佹槸 [缂栬緫涓璢 鐨勬椂鍊欙紝鎵嶈兘璋冩暣鐮佹椤哄簭!");
-            return; 
+            return;
           }
           if(row.oid==null || row.oid==''){
             this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
-            return;        
+            return;
           }
           downOrderNum(row.oid).then(() => {
             this.loadBasic({"oid":codeRuleOid});
@@ -2107,7 +2111,7 @@
           this.getRangeCodeList()
         },
         // 鍔犺浇浣跨敤鑼冨洿鍒楄〃
-        getRangeCodeList(){        
+        getRangeCodeList(){
           this.dialogLoading = true;
           if(this.selectionList[0].oid==null){
             this.$message.error("鏈幏鍙栧埌鍙傛暟!");
@@ -2175,7 +2179,7 @@
           }, error => {
             window.console.log(error);
           });
-          //console.log(data); 
+          //console.log(data);
         },
         // 鎵撳紑浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�
         openOtherCodeRuleDialog(){
@@ -2184,7 +2188,7 @@
           }
           if(this.selectionList[0].lcStatus != 'Editing'){
             this.$message.warning("缂栫爜瑙勫垯宸茶寮曠敤锛屼笉鍏佽缂栬緫鎴栧垹闄�!");
-            return; 
+            return;
           }
           this.cloneOtherCodeRuleSettingBox = true;
         },
@@ -2365,7 +2369,7 @@
           this.query = requestData;
           this.onLoad(this.page);
           done();
-        }, 
+        },
         // 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�
         selectionChange(list) {
           this.selectionList = list;
@@ -2380,12 +2384,23 @@
             this.loadBasic(this.selectionList[list.length-1]);
           }
         },
+        changeCutType(value){
+          if (value != 'code_cut_none'){
+            this.showCutLength = true;
+            if(this.form.valueCutLength == ''){
+              this.form.valueCutLength = 1;
+            }
+          }else{
+            this.form.valueCutLength = '';
+            this.showCutLength = false;
+          }
+        },
         // 鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
         codeRuleRowClick (row) {
           // console.log(this.currentRuleLcStatus);
           this.$refs.crud.toggleSelection();
           this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛�
-  
+
         },
         selectionClear() {
           this.selectionList = [];
@@ -2403,8 +2418,8 @@
         onLoad(page,params={}) {
           this.loading = true;
           gridCodeRule(
-            page.currentPage, 
-            page.pageSize, 
+            page.currentPage,
+            page.pageSize,
             this.query
           ).then(res => {
             //console.log(res.data);
@@ -2509,13 +2524,13 @@
         },
         // 琛ヤ綅鏃剁殑瀛楃锛屽疄鐜板彲杈撳彲閫�
         inputSelectBlur(e){
-          if (e.target.value) {  
+          if (e.target.value) {
             this.form.codeFillSeparator = e.target.value;
           }
         },
         // 鐮佹绫诲瀷鏀瑰彉鏃讹紝澧炲姞瀵瑰簲鐨刦orm琛ㄥ崟涓殑灞炴��
-        changeSectypeFormItems(row){     
-          //console.log(row);   
+        changeSectypeFormItems(row){
+          //console.log(row);
           if(this.enumParam.secTypeList.length==0){
             this.loadCodeSecType();
           }
@@ -2589,6 +2604,12 @@
               valueCutLength: row!=null&&row.valueCutLength != '' ? row.valueCutLength:'',    //
               codeGetValueType: row!=null&&row.codeGetValueType != '' ? row.codeGetValueType:'code_get_value_all_up',  //鍙栧�肩被鍨� 鏋氫妇鏌ヨ
             });
+            if(this.form.valueCutType === 'code_cut_none'){
+              this.showCutLength = false;
+            }else{
+              this.showCutLength = true;
+            }
+
             this.loadCodeLevelType();
             this.loadCodeCutType();
             this.loadCodeGetValueType();
@@ -2669,7 +2690,7 @@
         loadCodeGetValueType(){
           this.enumParam.codeGetValueType =  this.getLocalStorageEnum("codeGetValueType");
         },
-        
+
       }
   };
 
@@ -2684,7 +2705,7 @@
   .code-rule-crud > .avue-crud__pagination {
     padding: 14px 0 2px 20px;
   }
-  
+
   .clone-input-textarea > .el-form-item__content {
     width: 495px;
   }
@@ -2704,7 +2725,7 @@
   .other-clone-coderule-crud > .el-card> .el-card__body > .avue-crud__menu {
     display: none!important;
   }
-  
+
   .el-table--small .el-table__cell {
     padding: 3px 0;
   }
@@ -2746,8 +2767,8 @@
 
   .left > .el-form-item > .el-form-item__content > .el-input-number > .el-input > .el-input__inner {
     width:120px;
-  } 
-  
+  }
+
   .el-col>.el-card > .el-card__header {
     background: rgb(213 231 239);
     border-radius: inherit;
@@ -2802,4 +2823,4 @@
     padding: 5px 10px 10px;
  }
 
-</style>
\ No newline at end of file
+</style>
diff --git a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/VciQueryWrapperForDO.java b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/VciQueryWrapperForDO.java
index c8d4854..857ea02 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/VciQueryWrapperForDO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/VciQueryWrapperForDO.java
@@ -98,10 +98,10 @@
 		};
 		BASE_MODEL_COMPATIBILITY_MAP = new HashMap() {
 			{
-				this.put("lastr", "islastr");
-				this.put("firstr", "isfirstr");
-				this.put("lastv", "islastv");
-				this.put("firstv", "isfirstv");
+				this.put("lastr", "lastr");
+				this.put("firstr", "firstr");
+				this.put("lastv", "lastv");
+				this.put("firstv", "firstv");
 			}
 		};
 		LIFECYCLE_MANAGE_FIELD_MAP = new HashMap() {

--
Gitblit v1.9.3