From ea73e6f6c84d27357170168bdf70902a01b5560b Mon Sep 17 00:00:00 2001 From: ludc Date: 星期一, 10 七月 2023 15:45:01 +0800 Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs --- Source/UBCS-WEB/src/views/code/code.vue | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue index ecb6eac..807ace5 100644 --- a/Source/UBCS-WEB/src/views/code/code.vue +++ b/Source/UBCS-WEB/src/views/code/code.vue @@ -1708,6 +1708,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 +1729,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 +1810,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'){ @@ -2648,12 +2654,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 +2703,7 @@ loadCodeGetValueType(){ this.enumParam.codeGetValueType = this.getLocalStorageEnum("codeGetValueType"); }, - + } }; -- Gitblit v1.9.3