From d3239b6a098724db5a29b4f48ddad5f8a0402cea Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期三, 05 七月 2023 15:35:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/views/code/code.vue | 302 ++++++++++++++++++++++++++++----------------------
1 files changed, 170 insertions(+), 132 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index c5a378f..ecb6eac 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">
@@ -300,6 +300,7 @@
size="small"
icon="el-icon-search"
plain
+ :disabled="selectionList.length <= 0"
@click="openAdvancedQuery('codeBasicSec')">
楂樼骇鏌ヨ
</el-button>
@@ -325,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>
@@ -417,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">
<!-- 绗竴灞傚璇濇,娣诲姞鐮佹淇℃伅瀵硅瘽妗嗕腑鐨勫唴瀹� -->
@@ -430,7 +433,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
@@ -488,7 +491,7 @@
</el-input>
</el-form-item>
<el-form-item label="灞炴�ф墍鍦ㄥ垎绫�:" :label-width="rightFormLabelWidth">
- <el-input
+ <el-input
v-model="form.referCodeClassifyOidName"
disabled>
</el-input>
@@ -526,8 +529,8 @@
</el-option>
</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-form-item v-if="form.codeFillType!='code_fill_none'" label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth">
+ <el-select v-model="form.codeFillSeparator" @blur="inputSelectBlur" filterable placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
<el-option
v-for="item in enumParam.codeFillSeparator"
:key="item.itemValue"
@@ -565,7 +568,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"
@@ -573,6 +576,9 @@
:value="item.itemValue">
</el-option>
</el-select>
+ </el-form-item>
+ <el-form-item id="ShowOrHide" v-if="form.valueCutType!='code_cut_none'" 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">
@@ -589,7 +595,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"
@@ -601,7 +607,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"
@@ -663,8 +669,8 @@
</el-option>
</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-form-item v-if="form.codeFillType!='code_fill_none'" label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth">
+ <el-select v-model="form.codeFillSeparator" filterable @blur="inputSelectBlur" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
<el-option
v-for="item in enumParam.codeFillSeparator"
:key="item.itemValue"
@@ -730,9 +736,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">
@@ -748,7 +754,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"
@@ -778,6 +784,7 @@
ref="referConfigFormDialog"
@echoReferConfig="echoReferConfig">
</refer-config-form-dialog>
+
<!-- 绗簩灞傚璇濇,鐩存帴閫夋嫨鍙傜収閰嶇疆crud缁勪欢 -->
<refer-config-crud-dialog
ref="referConfigCrudDialog"
@@ -792,12 +799,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,
@@ -908,7 +915,7 @@
codeFixedSecOid: "",
description: "",
id: "",
- },
+ },
isShowFixedForm: true, //true鏄剧ず鍥哄畾鐮佹鐮佸�肩鐞嗙晫闈紝false鏄剧ず鍒嗙被鐮佹鐮佸�肩鐞嗙晫闈�
fixedValueData: [], //鍥哄畾鐮佹鐮佸�艰〃鏍兼暟鎹�
fixedValueOption: fixedValueOption, //琛ㄦ牸閰嶇疆
@@ -933,7 +940,7 @@
treeOption: treeOption,
currentSelectTreeData: '', //褰撳墠閫変腑鐨勬爲鑺傜偣
/* 涓哄睘鎬ч�夊�煎彸渚ц〃鏍肩浉鍏虫暟鎹� */
-
+
selectAttrParams: {
ref: "selectionAttrCrud",
attrOption: attrOption,
@@ -1011,7 +1018,7 @@
],
formulaEditorSettingBox: false,
},
-
+
/* 鐖跺垎绫荤爜娈靛璇濇 */
parentClsfyParams: {
ref: 'crudParentClassify',
@@ -1028,7 +1035,7 @@
parentClassifyQuery: {}, //鏌ヨ鏉′欢
parentClassifySelectionList: [], //褰撳墠閫変腑琛�
},
-
+
/** 鍙傜収寮曠敤鐨勪笟鍔$被鍨嬪璇濇鐩稿叧鏁版嵁 */
referBtmDialogParams: {
ref: 'crudReferBtm',
@@ -1048,7 +1055,7 @@
componentCodeFlag: false, //鏄惁鍙備笌缂栫爜
pkCodeRule: '', //鎵�灞炵紪鐮佽鍒�
},
-
+
//鏋氫妇鍜屽彲杈撳彲閫夋煡璇�
enumParam: {
secTypeList:[], //鐮佹绫诲瀷
@@ -1089,6 +1096,9 @@
watch:{
},
+ mounted(){
+ this.loadTotalEnum();
+ },
methods: {
/** 楂樼骇鏌ヨ瀵硅瘽妗嗙粍浠�,缁勪欢杩斿洖鐨勫�兼槸condtionMap[field]褰㈠紡鐨勬煡璇㈡潯浠讹紝淇濈暀浜嗗拰涔嬪墠涓�鏍风殑鏂瑰紡 */
@@ -1104,7 +1114,6 @@
//console.log(conditionMaps);
}
},
-
/* 鍏紡缂栬緫妗嗗唴瀹规敼鍙�,瀛愮粍浠剁紪杈戝畬鍏紡涔嬪悗鍐呭鍥炴樉鏃惰皟鐢� */
updateFormulaContent(content){
this.form.getValueClass = content;
@@ -1112,20 +1121,21 @@
/* 寮曠敤鐮佹鍙傜収閰嶇疆,瀛愮粍浠跺~瀹屽弬鐓ч厤缃箣鍚庡唴瀹瑰洖鏄炬椂璋冪敤 */
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.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;
},
-
- /** 鐖跺垎绫婚�夋嫨瀵硅瘽妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
+
+ /** 鐖跺垎绫婚�夋嫨瀵硅瘽妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
// 淇濆瓨褰撳墠鐖跺垎绫荤爜娈电殑閫変腑琛岋紝骞惰繘琛屽洖鏄�
saveSelectedParentClassify(){
//console.log(this.parentClsfyParams.parentClassifySelectionList.length);
@@ -1177,10 +1187,11 @@
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,
+ page.currentPage,
+ page.pageSize,
conditionMaps
).then(res => {
//console.log(res.data);
@@ -1191,9 +1202,9 @@
this.parentClassifySelectionClear();
});
},
-
- /** 鎵撳紑灞炴�ч�夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
+
+ /** 鎵撳紑灞炴�ч�夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
// 鑾峰彇褰撳墠琚�変腑鏍戣妭鐐圭殑oid
nodeClick(data) {
this.currentSelectTreeData = data;
@@ -1263,7 +1274,7 @@
})
this.isShowSelectAttrOption = false;
},
-
+
/** 鍩虹鐮佹琛ㄤ腑鐨勭爜鍊肩鐞嗙殑鐩稿叧鏂规硶 */
// 鐮佸�肩鐞嗗脊绐楁帶鍒�
@@ -1393,10 +1404,10 @@
window.console.log(error);
});
}
-
+
},
//鍒犻櫎鐮佸��
- delCodeSecValue(condition){
+ delCodeSecValue(condition){
//鍥哄畾鐮佹鐮佸�煎垹闄�
if(condition == 'codefixedsec'){
//console.log(this.selectedFixedOrCodeclassifyValue.oid);
@@ -1438,8 +1449,8 @@
message: "鎿嶄綔鎴愬姛!"
});
});
- }
-
+ }
+
},
//瀵瑰浐瀹氱爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣�
codeFixedValueOpetion(condition,row){
@@ -1500,7 +1511,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);
@@ -1513,10 +1524,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);
}
},
/**
@@ -1574,7 +1585,7 @@
});
this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid});
}
-
+
},
//鍒嗙被鐮佸�兼爲data鍔犺浇
loadClassifyValueData(row){
@@ -1648,15 +1659,15 @@
this.addBasicCodeSettingBox = true;
},
// 鏂板鍩虹鐮佹
- saveOrEditBasicCode(){
+ async saveOrEditBasicCode(){
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()){
- addSave(this.form).then(() => {
+ await addSave(this.form).then(() => {
this.$message({
type: "success",
message: "鎿嶄綔鎴愬姛!"
@@ -1667,11 +1678,19 @@
// 鍏抽棴瀵硅瘽妗�
this.addBasicCodeSettingBox = false
}
-
+ // 鐐瑰嚮鏂板鍩虹鐮佹,鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇
+ this.loadBasic(this.selectionList[0]);
}else{
+ // 鍙兘鍙傜収寮曠敤鐨勪笟鍔$被鍨嬩細鍙戠敓鏀瑰彉鎵�浠ヨ繖鍎跨洿鎺ュreferConfig鐨刯son杩涜鏀瑰彉
+ if(this.form.referConfig === "coderefersec" || this.form.referConfig != undefined){
+ 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;
+ }
editSave(this.form).then(() => {
- // 鍏抽棴瀵硅瘽妗�
- this.addBasicCodeSettingBox = false
this.$message({
type: "success",
message: "鎿嶄綔鎴愬姛!"
@@ -1679,9 +1698,10 @@
}, error => {
window.console.log(error);
});
+ this.loadBasic(this.selectionList[0]);
+ // 鍏抽棴瀵硅瘽妗�
+ this.addBasicCodeSettingBox = false
}
- // 鐐瑰嚮鏂板鍩虹鐮佹,鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇
- this.loadBasic(this.selectionList[0]);
},
// 鍥犱负elementui鐨勮〃鍗曟牎楠岃缃笉涓婃墍浠ラ噰鐢ㄥ垽鏂殑鏂瑰紡鏉ュ仛琛ㄥ崟妫�楠屾柟寮�
checkForm(){
@@ -1729,7 +1749,7 @@
return false;
}
}else if(this.form.secType==='codeserialsec'){
- console.log(form.codeFillType);
+ //console.log(form.codeFillType);
//娴佹按鐮佹
if(form.codeSecLength == ''){
this.$message.warning('(鐮佹鐨勯暱搴�)'+tipsMsg);
@@ -1755,7 +1775,7 @@
this.$message.warning('(缂栫爜琛ヤ綅鏂瑰紡)'+tipsMsg);
return false;
}
- if(form.codeFillType != '涓嶈ˉ浣�' && form.codeFillSeparatorSelect == ''){
+ if(form.codeFillType != '涓嶈ˉ浣�' && form.codeFillSeparator == ''){
this.$message.warning('褰撹ˉ浣嶆柟寮忎负宸﹁ˉ浣嶆垨鑰呭彸琛ヤ綅鐨勬椂鍊欙紝琛ヤ綅瀛楃涓嶈兘涓虹┖');
return false;
}
@@ -1779,11 +1799,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 +1870,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 +1919,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 +1934,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 => {
@@ -1955,21 +1977,19 @@
},
// 涓婄Щ涓嬬Щ鍩虹鐮佹
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;
+ return;
}
if(row.oid==null || row.oid==''){
this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
- return;
+ return;
}
upOrderNum(row.oid).then(() => {
- this.loadBasic({"oid":codeRuleOid});
+ this.loadBasic(this.selectionList[0]);
this.$message({
type: "success",
message: "鎿嶄綔鎴愬姛!"
@@ -1985,11 +2005,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});
@@ -2001,7 +2021,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 +2029,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 +2083,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',
}
]
@@ -2097,7 +2115,7 @@
this.getRangeCodeList()
},
// 鍔犺浇浣跨敤鑼冨洿鍒楄〃
- getRangeCodeList(){
+ getRangeCodeList(){
this.dialogLoading = true;
if(this.selectionList[0].oid==null){
this.$message.error("鏈幏鍙栧埌鍙傛暟!");
@@ -2112,17 +2130,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){
@@ -2176,7 +2183,7 @@
}, error => {
window.console.log(error);
});
- //console.log(data);
+ //console.log(data);
},
// 鎵撳紑浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�
openOtherCodeRuleDialog(){
@@ -2185,7 +2192,7 @@
}
if(this.selectionList[0].lcStatus != 'Editing'){
this.$message.warning("缂栫爜瑙勫垯宸茶寮曠敤锛屼笉鍏佽缂栬緫鎴栧垹闄�!");
- return;
+ return;
}
this.cloneOtherCodeRuleSettingBox = true;
},
@@ -2220,7 +2227,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 +2245,7 @@
//console.log(res);
let oidArr = [];
fromDialogPkCodebasic.forEach(ele => {
- oidArr.push(ele.id);
+ oidArr.push(ele.oid);
});
let data = {
"pkCodeRule": oid,
@@ -2286,6 +2293,7 @@
},
// 娣诲姞
rowSave(row, done, loading) {
+ console.log(row);
add(row).then(() => {
this.onLoad(this.page);
this.$message({
@@ -2360,27 +2368,42 @@
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;
this.onLoad(this.page);
done();
- },
+ },
// 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�
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]);
}
+ },
+ changeCutType(value){
+ if (value != 'code_cut_none'){
+ if(this.form.valueCutLength == ''){
+ this.form.valueCutLength = 1;
+ }
+ }else{
+ this.form.valueCutLength = '';
+ }
+ },
+ // 鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
+ codeRuleRowClick (row) {
+ // console.log(this.currentRuleLcStatus);
+ this.$refs.crud.toggleSelection();
+ this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛�
+
},
selectionClear() {
this.selectionList = [];
@@ -2398,8 +2421,8 @@
onLoad(page,params={}) {
this.loading = true;
gridCodeRule(
- page.currentPage,
- page.pageSize,
+ page.currentPage,
+ page.pageSize,
this.query
).then(res => {
//console.log(res.data);
@@ -2410,8 +2433,6 @@
// 鏌ヨ鐨勫�间负绌烘椂锛岃灏嗙爜娈电鐞嗙浉鍏崇殑鍐呭绂佺敤
if(data.records.length <= 0) {
this.hideBasicTable(false);
- this.selectionList = [];
- this.basicData = [];
return;
}
this.loadBasic(this.data[0])
@@ -2506,13 +2527,13 @@
},
// 琛ヤ綅鏃剁殑瀛楃锛屽疄鐜板彲杈撳彲閫�
inputSelectBlur(e){
- if (e.target.value) {
- this.form.codeFillSeparatorSelect = 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();
}
@@ -2568,8 +2589,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, //娴佹按鏄惁琛ョ爜
@@ -2595,6 +2616,7 @@
referBtmId: row!=null&&row.referBtmId != '' ? row.referBtmId:'', //鍙傜収寮曠敤鐨勪笟鍔$被鍨嬶紝鐨刬d
referBtmName: row!=null&&row.referBtmName != '' ? row.referBtmName:'', //鍙傜収寮曠敤鐨勪笟鍔$被鍨�
referConfig: row!=null&&row.referConfig != '' ? row.referConfig:'', //鍙傜収閰嶇疆
+ referValueInfo: row!=null&&row.referValueInfo != '' ? row.referValueInfo:'', //鍙傜収閰嶇疆
});
}else if(this.form.secType==='codedatesec'){
//鏃ユ湡鐮佹
@@ -2616,9 +2638,9 @@
//鍙彉鐮佹
this.form = Object.assign({}, this.form,{
codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'', //鐮佹鐨勯暱搴�
- codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_right', //缂栫爜閮ㄤ綅鏂瑰紡锛屾灇涓炬煡璇�
- codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0, //閫変腑鐨勮ˉ浣嶆椂鐨勫瓧绗︾殑涓嬫爣
- codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'', //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夋煡璇�
+ 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:'0', //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夋煡璇�
});
this.loadCodeFillType();
this.loadCodeFillSeparator();
@@ -2636,6 +2658,16 @@
}
return enumCach;
},
+ // 缁熶竴鍔犺浇鎵�鏈夋灇涓炬煡璇紝涓昏鏄负閬垮厤鍒囨崲鐮佹绫诲瀷鏃惰繕鏈姞杞藉畬鎴愮殑鎯呭喌
+ loadTotalEnum(){
+ this.loadCodeSecType();
+ this.loadCodeSecLength();
+ this.loadCodeFillType();
+ this.loadCodeFillSeparator();
+ this.loadCodeLevelType();
+ this.loadCodeCutType();
+ this.loadCodeGetValueType();
+ },
//鏋氫妇鍜屽彲杈撳彲閫夊唴瀹规煡璇�
loadCodeSecType(){
this.enumParam.secTypeList = this.getLocalStorageEnum("codeSecType");
@@ -2648,7 +2680,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");
@@ -2659,7 +2697,7 @@
loadCodeGetValueType(){
this.enumParam.codeGetValueType = this.getLocalStorageEnum("codeGetValueType");
},
-
+
}
};
@@ -2674,7 +2712,7 @@
.code-rule-crud > .avue-crud__pagination {
padding: 14px 0 2px 20px;
}
-
+
.clone-input-textarea > .el-form-item__content {
width: 495px;
}
@@ -2694,7 +2732,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;
}
@@ -2736,8 +2774,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;
@@ -2792,4 +2830,4 @@
padding: 5px 10px 10px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3