From e14d495581896374cc4be7ec929feb95005e6563 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 15 六月 2023 18:22:39 +0800 Subject: [PATCH] 修改系统管理、编码规则管理bug --- Source/UBCS-WEB/src/views/code/code.vue | 104 ++++++++++++++++++++++++--------------------------- 1 files changed, 49 insertions(+), 55 deletions(-) diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue index ddbcfbf..a5b8918 100644 --- a/Source/UBCS-WEB/src/views/code/code.vue +++ b/Source/UBCS-WEB/src/views/code/code.vue @@ -300,6 +300,7 @@ size="small" icon="el-icon-search" plain + :disabled="selectionList.length <= 0" @click="openAdvancedQuery('codeBasicSec')"> 楂樼骇鏌ヨ </el-button> @@ -527,7 +528,7 @@ </el-select> </el-form-item> <el-form-item label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth"> - <el-select v-model="form.codeFillSeparatorSelect" @blur="inputSelectBlur" filterable placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead"> + <el-select v-model="form.codeFillSeparator" @blur="inputSelectBlur" filterable placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead"> <el-option v-for="item in enumParam.codeFillSeparator" :key="item.itemValue" @@ -664,7 +665,7 @@ </el-select> </el-form-item> <el-form-item label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth"> - <el-select v-model="form.codeFillSeparatorSelect" filterable @blur="inputSelectBlur" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead"> + <el-select v-model="form.codeFillSeparator" filterable @blur="inputSelectBlur" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead"> <el-option v-for="item in enumParam.codeFillSeparator" :key="item.itemValue" @@ -1104,7 +1105,6 @@ //console.log(conditionMaps); } }, - /* 鍏紡缂栬緫妗嗗唴瀹规敼鍙�,瀛愮粍浠剁紪杈戝畬鍏紡涔嬪悗鍐呭鍥炴樉鏃惰皟鐢� */ updateFormulaContent(content){ this.form.getValueClass = content; @@ -1177,7 +1177,8 @@ let parentClsParam = this.parentClsfyParams; parentClsParam.classifyDialogLoading = true; let oid = this.selectionList.length==0 ? this.form.pkCodeRule:this.selectionList[0].oid; - let conditionMaps = this.paramsToConditionMa({"pkCodeRule":oid}); + let conditionMaps = {}; + conditionMaps['conditionMap[pkCodeRule]'] = oid; refDataGridClassifySec( page.currentPage, page.pageSize, @@ -1667,7 +1668,8 @@ // 鍏抽棴瀵硅瘽妗� this.addBasicCodeSettingBox = false } - + // 鐐瑰嚮鏂板鍩虹鐮佹,鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇 + this.loadBasic(this.selectionList[0]); }else{ editSave(this.form).then(() => { // 鍏抽棴瀵硅瘽妗� @@ -1679,9 +1681,8 @@ }, error => { window.console.log(error); }); + this.loadBasic(this.selectionList[0]); } - // 鐐瑰嚮鏂板鍩虹鐮佹,鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇 - this.loadBasic(this.selectionList[0]); }, // 鍥犱负elementui鐨勮〃鍗曟牎楠岃缃笉涓婃墍浠ラ噰鐢ㄥ垽鏂殑鏂瑰紡鏉ュ仛琛ㄥ崟妫�楠屾柟寮� checkForm(){ @@ -1755,7 +1756,7 @@ this.$message.warning('(缂栫爜琛ヤ綅鏂瑰紡)'+tipsMsg); return false; } - if(form.codeFillType != '涓嶈ˉ浣�' && form.codeFillSeparatorSelect == ''){ + if(form.codeFillType != '涓嶈ˉ浣�' && form.codeFillSeparator == ''){ this.$message.warning('褰撹ˉ浣嶆柟寮忎负宸﹁ˉ浣嶆垨鑰呭彸琛ヤ綅鐨勬椂鍊欙紝琛ヤ綅瀛楃涓嶈兘涓虹┖'); return false; } @@ -1779,11 +1780,10 @@ this.$refs.codeFillLimit.$el.querySelector('input').focus(); return false; } - if(form.codeFillFlag == ''){ - this.$message.warning('(娴佹按鏄惁琛ョ爜)'+tipsMsg); - this.$refs.switch.$el.querySelector('input').focus(); - return false; - } + // if(form.codeFillFlag == '' || ){ + // this.$message.warning('(娴佹按鏄惁琛ョ爜)'+tipsMsg); + // return false; + // } }else if(this.form.secType==='codelevelsec'){ //灞傜骇鐮佹 if(form.codeLevelType == ''){ @@ -1851,7 +1851,8 @@ this.$message.warning('(缂栫爜琛ヤ綅鏂瑰紡)'+tipsMsg); return false; } - if(form.codeFillType != '涓嶈ˉ浣�' && form.codeFillSeparatorSelect == ''){ + // console.log(form); + if(form.codeFillType != 'code_fill_none' && form.codeFillSeparator == ''){ this.$message.warning('褰撹ˉ浣嶆柟寮忎负宸﹁ˉ浣嶆垨鑰呭彸琛ヤ綅鐨勬椂鍊欙紝琛ヤ綅瀛楃涓嶈兘涓虹┖'); return false; } @@ -1899,9 +1900,11 @@ } // console.log(row.oid); //瀛樺偍褰撳墠鍏宠仈鐨勭紪鐮佽鍒欑浉鍏充俊鎭� - this.currentCodeRuleOid = row.oid; - this.currentRuleLcStatus = row.lcStatus; - this.sendGridCodeBasicSec({"pkCodeRule":row.oid},false); + if(row!='' || row!=null){ + this.currentCodeRuleOid = row.oid; + this.currentRuleLcStatus = row.lcStatus; + this.sendGridCodeBasicSec({"pkCodeRule":row.oid},false); + } }, // 鍙戦�佸姞杞藉熀纭�鐮佹鐨勮姹� sendGridCodeBasicSec(condition,isAdancedQuery/** 鏄惁楂樼骇鏌ヨ */){ @@ -1912,11 +1915,11 @@ let conditionMaps = {}; if(condition && !isAdancedQuery){ Object.keys(condition).forEach(key=>{ - conditionMaps['conditionMap[pl_code_basicsec.'+key+']'] = condition[key].trim(); + conditionMaps['conditionMap['+key+']'] = condition[key].trim(); }); } if(isAdancedQuery){ - condition['conditionMap[pl_code_basicsec.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 => { @@ -2001,7 +2004,7 @@ }, // 鍩虹鐮佹鍒锋柊鏃舵煡璇� refreshChangeBasicSec(){ - this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid}); + this.loadBasic(this.selectionList.at(-1)); }, // 鎿嶄綔鍩虹鐮佹涓悳绱㈡竻绌虹瓑鎸夐挳鐨勬樉绀�/闅愯棌 hideBasicTable(hideBoolean){ @@ -2009,18 +2012,16 @@ this.$refs.crudBasic.option.columnBtn = hideBoolean; this.$refs.crudBasic.option.column[0].search = hideBoolean; this.$refs.crudBasic.option.column[1].search = hideBoolean; + if(!hideBoolean){ + this.selectionList = []; + this.basicData = []; + } }, /** 缂栫爜瑙勫垯鐩稿叧鏂规硶 */ // 鎵撳紑楂樼骇鏌ヨ绐楀彛 openAdvancedQuery(condition){ - // MasterTable({ - // codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", - // functionId: 5, - // }).then(res=>{ - // console.log(res.data.tableDefineVO.seniorQueryColumns); - // }) if(condition=='codeRule'){ this.advancedQueryParam.options = [ { @@ -2065,22 +2066,22 @@ data: [], title: '鐮佹缂栧彿', fieldType: 'text', - queryField: 'pl_code_basicsec.id', + queryField: 'id', },{ data: [], title: '鐮佹鍚嶇О', fieldType: 'text', - queryField: 'pl_code_basicsec.name', + queryField: 'name', },{ data: [], title: '鎻忚堪', fieldType: 'text', - queryField: 'pl_code_basicsec.description', + queryField: 'description', },{ data: [], title: '鐮佹绫诲瀷', fieldType: 'combox', - queryField: 'pl_code_basicsec.secType', + queryField: 'secType', comboxKey: 'codeSecType', } ] @@ -2112,17 +2113,6 @@ // 鍒锋柊浣跨敤鑼冨洿鍒楄〃 refreshUseRangeChange(){ this.getRangeCodeList(); - }, - // 鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨 - codeRuleRowClick (row) { - // 杩欏効搴旇鍙互涓嶈锛屽洜涓簍oggleRowSelection涔熶細瑙﹀彂琛岄�夋嫨鏃堕棿 - this.selectionList = row; - this.$refs.crud.toggleSelection(); - this.$refs.crud.setCurrentRow(row); - this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛� - if(row!=''){ - this.loadBasic(row); - } }, // 鍚敤涓庡仠鐢� enableOrDeactivatse(oId,update){ @@ -2220,7 +2210,7 @@ this.selectionOtherCloneCodeBasicList = list; this.$refs.crudCloneCodeBasicOther.setCurrentRow(this.selectionOtherCloneCodeBasicList[list.length-1]); }, - // 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹淇℃伅 + // 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹淇℃伅 saveOtherCodeBasic(){ let oid = this.selectionList[0].oid; let fromDialogPkCodebasic = this.selectionOtherCloneCodeBasicList; @@ -2238,7 +2228,7 @@ //console.log(res); let oidArr = []; fromDialogPkCodebasic.forEach(ele => { - oidArr.push(ele.id); + oidArr.push(ele.oid); }); let data = { "pkCodeRule": oid, @@ -2360,7 +2350,7 @@ let requestData = {}; if(params){ Object.keys(params).forEach(key=>{ - requestData["conditionMap"+'['+key+']'] = params[key].trim(); + requestData["conditionMap"+'['+key+'_like]'] = params[key].trim(); }); } this.query = requestData; @@ -2370,17 +2360,23 @@ // 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙� selectionChange(list) { this.selectionList = list; - this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]); //褰撳墠閫変腑琛屼负绌虹殑鏃跺�欏氨灏嗙爜娈电鐞嗚〃鏍兼暟鎹疆绌�,骞剁鐢ㄧ浉鍏冲姛鑳� - if(list == ''){ - this.basicData = []; + if(this.selectionList.length <= 0){ this.hideBasicTable(false); } - if(this.selectionList.length > 0){ + if (this.selectionList.length > 0) { + this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]); this.currentCodeRuleOid = this.selectionList[list.length-1].oid; this.currentRuleLcStatus = this.selectionList[list.length-1].lcStatus; this.loadBasic(this.selectionList[list.length-1]); } + }, + // 鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨 + codeRuleRowClick (row) { + // console.log(this.currentRuleLcStatus); + this.$refs.crud.toggleSelection(); + this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛� + }, selectionClear() { this.selectionList = []; @@ -2410,8 +2406,6 @@ // 鏌ヨ鐨勫�间负绌烘椂锛岃灏嗙爜娈电鐞嗙浉鍏崇殑鍐呭绂佺敤 if(data.records.length <= 0) { this.hideBasicTable(false); - this.selectionList = []; - this.basicData = []; return; } this.loadBasic(this.data[0]) @@ -2507,7 +2501,7 @@ // 琛ヤ綅鏃剁殑瀛楃锛屽疄鐜板彲杈撳彲閫� inputSelectBlur(e){ if (e.target.value) { - this.form.codeFillSeparatorSelect = e.target.value; + this.form.codeFillSeparator = e.target.value; } }, // 鐮佹绫诲瀷鏀瑰彉鏃讹紝澧炲姞瀵瑰簲鐨刦orm琛ㄥ崟涓殑灞炴�� @@ -2568,8 +2562,8 @@ serialStart: row!=null&&row.serialStart != '' ? row.serialStart:1, //娴佹按鍙疯捣濮嬪�� serialStep: row!=null&&row.serialStep != '' ? row.serialStep:1, //娴佹按鐨勬闀� codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_left', //缂栫爜琛ヤ綅鏂瑰紡 - codeFillSeparatorSelect: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparatorSelect:0, //琛ヤ綅鏃剁殑瀛楃锛岄�変腑鐨勪笅鎷夋鐨勪笅鏍� - codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:0, //琛ヤ綅鏃剁殑瀛楃 + // codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0, //琛ヤ綅鏃剁殑瀛楃锛岄�変腑鐨勪笅鎷夋鐨勪笅鏍� + codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'0', //琛ヤ綅鏃剁殑瀛楃 codeFillLength: row!=null&&row.codeFillLength != '' ? row.codeFillLength:'', //濉厖闀垮害 codeFillLimit: row!=null&&row.codeFillLimit != '' ? row.codeFillLimit:'', //娴佹按涓婇檺 codeFillFlag: row!=null&&row.codeFillFlag != '' ? row.codeFillFlag=='true' ? true:false :false, //娴佹按鏄惁琛ョ爜 @@ -2617,8 +2611,8 @@ this.form = Object.assign({}, this.form,{ codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'', //鐮佹鐨勯暱搴� codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_left', //缂栫爜閮ㄤ綅鏂瑰紡锛屾灇涓炬煡璇� - codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0, //閫変腑鐨勮ˉ浣嶆椂鐨勫瓧绗︾殑涓嬫爣 - codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'', //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夋煡璇� + // codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0, //閫変腑鐨勮ˉ浣嶆椂鐨勫瓧绗︾殑涓嬫爣 + codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'0', //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夋煡璇� }); this.loadCodeFillType(); this.loadCodeFillSeparator(); -- Gitblit v1.9.3