From 1bccfb0296202ecde9c59fd8a16c3d198210319c Mon Sep 17 00:00:00 2001 From: ludc Date: 星期一, 03 七月 2023 18:53:27 +0800 Subject: [PATCH] 依赖修改,部分不兼容关键字修改,SQL、 --- Source/UBCS-WEB/src/views/code/code.vue | 42 ++++++++++++++++++++++++++++++------------ 1 files changed, 30 insertions(+), 12 deletions(-) diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue index 9962d0a..7e47330 100644 --- a/Source/UBCS-WEB/src/views/code/code.vue +++ b/Source/UBCS-WEB/src/views/code/code.vue @@ -418,6 +418,8 @@ append-to-body style="height: 115vh; margin-top: -13vh; overflow: hidden" destroy-on-close + lock-scroll + :close-on-click-modal="false" @close="clearBasicAddForm"> <!-- 绗竴灞傚璇濇,娣诲姞鐮佹淇℃伅瀵硅瘽妗嗕腑鐨勫唴瀹� --> @@ -1113,18 +1115,18 @@ /* 寮曠敤鐮佹鍙傜収閰嶇疆,瀛愮粍浠跺~瀹屽弬鐓ч厤缃箣鍚庡唴瀹瑰洖鏄炬椂璋冪敤 */ echoReferConfig(content){ // console.log(content.referTypeName); - this.form.referBtmId = content.referType; - this.form.referBtmName = content.referTypeName; + this.form.referBtmId = content.referType || ''; + this.form.referBtmName = content.referTypeName || content.referType; //杞崲鎴怞SON瀛楃涓茶繘琛岀埗缁勪欢鍥炴樉 let submitFormJson = JSON.stringify(content); - this.form.referConfig = submitFormJson; - this.form.referValueInfo = submitFormJson; + this.form.referConfig = submitFormJson || ''; + this.form.referValueInfo = submitFormJson || ''; }, /** 寮曠敤鐮佹涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊间箣鍚庣殑鍐呭鍥炴樉鏃惰皟鐢� */ echoReferBtmType(content){ // 瀹炵幇鍥炴樉 - this.form.referBtmId = content.id; - this.form.referBtmName = content.name; + this.form.referBtmId = content.id || ''; + this.form.referBtmName = content.name || content.id; }, /** 鐖跺垎绫婚�夋嫨瀵硅瘽妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */ @@ -1651,7 +1653,7 @@ this.addBasicCodeSettingBox = true; }, // 鏂板鍩虹鐮佹 - saveOrEditBasicCode(){ + async saveOrEditBasicCode(){ if(this.selectionList[0].oid == null || this.selectionList[0].oid == ''){ this.$message.warning('缂哄け蹇呰鍙傛暟锛岃閲嶆柊閫夋嫨缂栫爜瑙勫垯鍚庡啀璇�!'); return; @@ -1659,7 +1661,7 @@ this.form.pkCodeRule = this.selectionList[0].oid; if(this.form.oid == '' || this.form.oid == null){ if(this.checkForm()){ - addSave(this.form).then(() => { + await addSave(this.form).then(() => { this.$message({ type: "success", message: "鎿嶄綔鎴愬姛!" @@ -1673,6 +1675,18 @@ // 鐐瑰嚮鏂板鍩虹鐮佹,鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇 this.loadBasic(this.selectionList[0]); }else{ + // 鍙兘鍙傜収寮曠敤鐨勪笟鍔$被鍨嬩細鍙戠敓鏀瑰彉鎵�浠ヨ繖鍎跨洿鎺ュreferConfig鐨刯son杩涜鏀瑰彉 + if(this.form.referConfig === "coderefersec"){ + let referConfig = JSON.parse(this.form.referConfig); + referConfig.referType = this.form.referBtmId; + referConfig.referTypeName = this.form.referBtmName; + this.form.referConfig = JSON.stringify(referConfig); + + let referValueInfo = JSON.parse(this.form.referValueInfo); + referValueInfo.referType = this.form.referBtmId; + this.form.referValueInfo = JSON.stringify(referValueInfo); + } + editSave(this.form).then(() => { // 鍏抽棴瀵硅瘽妗� this.addBasicCodeSettingBox = false @@ -1960,11 +1974,9 @@ }, // 涓婄Щ涓嬬Щ鍩虹鐮佹 upOrderNum(row){ - //console.log(row.oid); if(!this.tipsMessage(this.selectionList)){ return; } - let codeRuleOid = this.selectionList[0].oid; if (this.selectionList[0].lcStatus != 'Editing') { this.$message.warning("鍙湁缂栫爜瑙勫垯鐨勭姸鎬佹槸 [缂栬緫涓璢 鐨勬椂鍊欙紝鎵嶈兘璋冩暣鐮佹椤哄簭!"); return; @@ -1974,7 +1986,7 @@ return; } upOrderNum(row.oid).then(() => { - this.loadBasic({"oid":codeRuleOid}); + this.loadBasic(this.selectionList[0]); this.$message({ type: "success", message: "鎿嶄綔鎴愬姛!" @@ -2645,7 +2657,13 @@ this.enumParam.codeFillType = this.getLocalStorageEnum("codeFillType"); }, loadCodeFillSeparator(){ - this.enumParam.codeFillSeparator = this.getLocalStorageEnum("codeFillSeparator"); + let enumCach = JSON.parse(localStorage.getItem("codeFillSeparator")); + if(enumCach == null) { + getDictionary("codeFillSeparator").then(res=>{ + this.enumParam.codeFillSeparator = res.data.data; + localStorage.setItem(key,JSON.stringify(res.data.data)); + }) + } }, loadCodeLevelType(){ this.enumParam.codeLevelType = this.getLocalStorageEnum("codeLevelType"); -- Gitblit v1.9.3