| | |
| | | append-to-body |
| | | style="height: 115vh; margin-top: -13vh; overflow: hidden" |
| | | destroy-on-close |
| | | lock-scroll |
| | | :close-on-click-modal="false" |
| | | @close="clearBasicAddForm"> |
| | | |
| | | <!-- 第一层对话框,添加码段信息对话框中的内容 --> |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="补位时的字符:" :label-width="rightFormLabelWidth"> |
| | | <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" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item id="ShowOrHide" v-mode="showCutLength" v-if="showCutLength==true" label="值截取长度:" :label-width="rightFormLabelWidth"> |
| | | <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-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="补位时的字符:" :label-width="rightFormLabelWidth"> |
| | | <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" |
| | |
| | | total: 0 |
| | | }, |
| | | selectionList: [], |
| | | showCutLength: false, |
| | | /*编码规则表格配置*/ |
| | | optionRule: optionRule, |
| | | data: [], |
| | |
| | | }, |
| | | watch:{ |
| | | |
| | | }, |
| | | mounted(){ |
| | | this.loadTotalEnum(); |
| | | }, |
| | | methods: { |
| | | |
| | |
| | | this.loadBasic(this.selectionList[0]); |
| | | }else{ |
| | | // 可能参照引用的业务类型会发生改变所以这儿直接对referConfig的json进行改变 |
| | | if(this.form.referConfig != undefined){ |
| | | 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); |
| | | } |
| | | if(this.form.referValueInfo != undefined){ |
| | | 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 |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | |
| | | window.console.log(error); |
| | | }); |
| | | this.loadBasic(this.selectionList[0]); |
| | | // 关闭对话框 |
| | | this.addBasicCodeSettingBox = false |
| | | } |
| | | }, |
| | | // 因为elementui的表单校验设置不上所以采用判断的方式来做表单检验方式 |
| | |
| | | }, |
| | | // 添加 |
| | | rowSave(row, done, loading) { |
| | | console.log(row); |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | |
| | | }, |
| | | changeCutType(value){ |
| | | if (value != 'code_cut_none'){ |
| | | this.showCutLength = true; |
| | | if(this.form.valueCutLength == ''){ |
| | | this.form.valueCutLength = 1; |
| | | } |
| | | }else{ |
| | | this.form.valueCutLength = ''; |
| | | this.showCutLength = false; |
| | | } |
| | | }, |
| | | // 单击编码规则实现行选择 |
| | |
| | | valueCutLength: row!=null&&row.valueCutLength != '' ? row.valueCutLength:'', // |
| | | codeGetValueType: row!=null&&row.codeGetValueType != '' ? row.codeGetValueType:'code_get_value_all_up', //取值类型 枚举查询 |
| | | }); |
| | | if(this.form.valueCutType === 'code_cut_none'){ |
| | | this.showCutLength = false; |
| | | }else{ |
| | | this.showCutLength = true; |
| | | } |
| | | |
| | | this.loadCodeLevelType(); |
| | | this.loadCodeCutType(); |
| | | this.loadCodeGetValueType(); |
| | |
| | | } |
| | | return enumCach; |
| | | }, |
| | | // 统一加载所有枚举查询,主要是为避免切换码段类型时还未加载完成的情况 |
| | | loadTotalEnum(){ |
| | | this.loadCodeSecType(); |
| | | this.loadCodeSecLength(); |
| | | this.loadCodeFillType(); |
| | | this.loadCodeFillSeparator(); |
| | | this.loadCodeLevelType(); |
| | | this.loadCodeCutType(); |
| | | this.loadCodeGetValueType(); |
| | | }, |
| | | //枚举和可输可选内容查询 |
| | | loadCodeSecType(){ |
| | | this.enumParam.secTypeList = this.getLocalStorageEnum("codeSecType"); |