From 41f11d5fd764a2bc7e8463a70bb340467d99a3ca Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期五, 14 七月 2023 09:42:36 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/views/code/code.vue | 71 ++++++++++++++++++++++++++--------- 1 files changed, 53 insertions(+), 18 deletions(-) diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue index ecb6eac..275d740 100644 --- a/Source/UBCS-WEB/src/views/code/code.vue +++ b/Source/UBCS-WEB/src/views/code/code.vue @@ -99,6 +99,13 @@ @click="clearAllCodeSec"> 娓呯┖鐮佸�� </el-button> + <el-button + size="small" + icon="el-icon-guide" + plain + @click="escapeOwner"> + 杞Щ鎵�鏈夎�� + </el-button> </template> </avue-crud> </basic-container> @@ -1394,6 +1401,11 @@ }); }else { this.codeClassifyForm.oid = this.selectedFixedOrCodeclassifyValue.attributes.oid; + // 鍒嗙被鐮佹锛屽瓙鍒嗙被鍜岀埗鍒嗙被涔嬮棿涓嶈兘鐩镐簰鏇存敼 + if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){ + return; + } + this.$delete(this.codeClassifyForm,"parentClassifyValueOid"); editCodeClassifyValue(this.codeClassifyForm).then(() => { this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid}) this.$message({ @@ -1430,6 +1442,9 @@ }); }); }else{ + if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){ + return; + } //鍒嗙被鐮佹鐮佸�煎垹闄� this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", { confirmButtonText: "纭畾", @@ -1450,7 +1465,6 @@ }); }); } - }, //瀵瑰浐瀹氱爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣� codeFixedValueOpetion(condition,row){ @@ -1490,10 +1504,13 @@ }, //瀵瑰垎绫荤爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣� codeClassifyValueOpetion(condition){ + if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){ + return; + } //姝ゅ娑夊強鍒版繁娴呮嫹璐濋棶棰橈紝浣嗘槸鎵ц涓婁笅绉讳繚瀛樻搷浣滀箣鍚庝細閲嶆柊鍔犺浇treedata锛屾墍浠ュ奖鍝嶄笉澶� let currentTreeList = this.getCodeClassifyValueTreeData(); let saveData = []; - console.log(currentTreeList.treeList); + // console.log(currentTreeList.treeList); if(condition == 'up'){ if(currentTreeList.index-1>=0){ // 璋冩暣椤哄簭 @@ -1513,8 +1530,6 @@ this.saveCodeFixedOrClassifyValueOption('classifyValue',saveData); } } - console.log(saveData); - console.log(this.classifyValueTreeData); }, //閫変腑琚皟鏁撮『搴忕殑涓や釜鏍戠殑鑺傜偣 getCodeClassifyValueTreeData(){ @@ -1553,7 +1568,7 @@ } }, //涓婄Щ涓嬬Щ绛夋搷浣滅殑淇濆瓨 - saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){ + async saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){ //淇濆瓨瀵瑰浐瀹氱爜娈电爜鍊肩殑涓婄Щ涓嬬Щ绉诲嚭绛夋搷浣� if(condition == "fixedValue"){ let data = { @@ -1572,7 +1587,7 @@ }); }else { //淇濆瓨瀵瑰垎绫荤爜鍊肩爜娈电爜鍊肩殑涓婄Щ涓嬬Щ绉诲嚭绛夋搷浣� - saveCodeClassifyValueOrder({ + await saveCodeClassifyValueOrder({ "codeClassifySecOid": this.codefixedsecOrCodeclassifysecOid, "dtoList": JSON.stringify(editOrderNumdata), }).then(() => { @@ -1611,7 +1626,21 @@ this.codeClassifyForm.id = node.attributes.id; this.codeClassifyForm.name = node.attributes.name; this.codeClassifyForm.parentClassifyValueOid = node.attributes.oid; - //console.log(this.codeClassifyForm); + // console.log(this.codeClassifyForm); + }, + /** + * 鍒嗙被鐮佹鐮佸�硷紝淇敼銆佸垹闄ゃ�佷笂涓嬬Щ涔嬪墠锛屾鏌ユ槸鍚︿负瀛愬垎绫诲拰鐖跺垎绫讳箣闂寸浉浜掓洿鏀� + * @currentRowClassOid 褰撳墠閫変腑琛宱id + * @updateClassOid 瑕佷慨鏀圭殑鍒嗙被鐮佸�紀id + */ + checkClassUpdate(currentRowClassOid,updateClassOid){ + if(currentRowClassOid!=updateClassOid){ + this.$message({ + type: "error", + message: "鎿嶄綔澶辫触銆愬瓙鍒嗙被涓庣埗鍒嗙被涔嬮棿涓嶈兘鐩镐簰淇敼鐮佸�笺��!" + }); + } + return currentRowClassOid!=updateClassOid; }, @@ -1708,6 +1737,7 @@ let form = this.form; //console.log(form); const regNumber = /^[0-9]+\.{0,1}[0-9]*$/; //鏁板瓧鎴栧皬鏁版鍒欐牎楠� + const regPos = /^[0-9]*[1-9][0-9]*$/; //闈炶礋鏁存暟姝e垯鏍¢獙 const tipsMsg = "蹇呭~椤逛笉鑳戒负绌�"; if(form.id == ''){ this.$message.warning("(鐮佹缂栧彿)"+tipsMsg); @@ -1728,7 +1758,7 @@ //鍥哄畾鐮佹 if(form.codeSecLengthType == ''){ this.$message.warning("(鐮佹闀垮害绫诲瀷)"+tipsMsg); - this.$refs.codeSecLengthType.$el.querySelector('select').focus(); + // this.$refs.codeSecLengthType.$el.querySelector('select').focus(); return false; } if(form.codeSecLength == ''){ @@ -1809,14 +1839,19 @@ this.$message.warning('(灞傜骇绫诲瀷)'+tipsMsg); return false; } - if(!regNumber.test(form.codeLevelValue)){ - this.$message.warning('灞傜骇鐨勫��)鍙兘濉啓鏁板瓧'); + if(form.codeLevelType != 'code_level_min'&& !regNumber.test(form.codeLevelValue)){ + this.$message.warning('(灞傜骇鐨勫��)鍙兘濉啓鏁板瓧'); this.$refs.codeLevelValue.$el.querySelector('input').focus(); return false; } if(form.valueCutType == ''){ this.$message.warning('(瀛楃鎴彇绫诲瀷)'+tipsMsg); - this.$refs.valueCutType.$el.querySelector('select').focus(); + // this.$refs.valueCutType.$el.querySelector('select').focus(); + return false; + } + if(form.valueCutType != 'code_cut_none' && !regPos.test(form.valueCutLength)){ + this.$message.warning('(鍊兼埅鍙栭暱搴�)鍙兘濉啓姝f暣鏁�'); + this.$refs.valueCutLength.$el.querySelector('input').focus(); return false; } }else if(this.form.secType==='coderefersec'){ @@ -1976,7 +2011,7 @@ this.sendGridCodeBasicSec({"pkCodeRule":this.selectionList[this.selectionList.length-1].oid},false); }, // 涓婄Щ涓嬬Щ鍩虹鐮佹 - upOrderNum(row){ + async upOrderNum(row){ if(!this.tipsMessage(this.selectionList)){ return; } @@ -1988,7 +2023,7 @@ this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!"); return; } - upOrderNum(row.oid).then(() => { + await upOrderNum(row.oid).then(() => { this.loadBasic(this.selectionList[0]); this.$message({ type: "success", @@ -2648,12 +2683,12 @@ // console.log(this.form); }, // 绗竴娆¤姹傜殑鏋氫妇鏁版嵁鏀剧紦瀛� - getLocalStorageEnum(key){ - let enumCach = JSON.parse(localStorage.getItem(key)); + getLocalStorageEnum(enumKey){ + let enumCach = JSON.parse(localStorage.getItem(enumKey)); if(enumCach == null) { - getDictionary({code: key}).then(res=>{ + getDictionary({code: enumKey}).then(res=>{ enumCach = res.data.data; - localStorage.setItem(key,JSON.stringify(res.data.data)); + localStorage.setItem(enumKey,JSON.stringify(res.data.data)); }) } return enumCach; @@ -2697,7 +2732,7 @@ loadCodeGetValueType(){ this.enumParam.codeGetValueType = this.getLocalStorageEnum("codeGetValueType"); }, - + } }; -- Gitblit v1.9.3