| | |
| | | @click="handleDelete"> |
| | | 删 除 |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-search" |
| | | plain |
| | | @click="openAdvancedQuery('codeRule')"> |
| | | 高级查询 |
| | | </el-button> |
| | | <el-button |
| | | size="small" |
| | | icon="icon-kelong" |
| | | plain |
| | | @click="openCodeRuleDialog"> |
| | | 克 隆 |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button |
| | | size="small" |
| | | icon="icon-lianjiekelong" |
| | | style="font-size: 12px;" |
| | | plain |
| | | @click="openOtherCodeRuleDialog"> |
| | | 从其他规则中克隆码段 |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button |
| | | size="small" |
| | | icon="el-icon-s-help" |
| | | plain |
| | | @click="handleRange"> |
| | | 使用范围 |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button |
| | | size="small" |
| | | icon="icon-qingkong" |
| | | plain |
| | | @click="clearAllCodeSec"> |
| | | 清空码值 |
| | | </el-button> |
| | | <el-button size="small" |
| | | icon="el-icon-search" |
| | | plain |
| | | @click="openAdvancedQuery"> |
| | | 高级查询 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | |
| | | <!-- 高级查询对话框 --> |
| | | <advanced-query |
| | | :ref="advancedQueryParam.ref" |
| | |
| | | :visible.sync="advancedQueryParam.advancedQuerySettingBox" |
| | | @echoContion="echoSeniorContionMap"> |
| | | </advanced-query> |
| | | |
| | | <!-- 编码规则相关对话框 --> |
| | | <el-dialog title="编码规则使用范围" |
| | | append-to-body |
| | |
| | | @refresh-change="refreshUseRangeChange"> |
| | | </avue-crud> |
| | | </el-dialog> |
| | | |
| | | <!-- 编码规则,克隆对话框 --> |
| | | <el-dialog title="克隆编码规则" |
| | | append-to-body |
| | |
| | | <el-button @click="cloneSettingBox = false">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 编码规则,从其他规则克隆对话框 --> |
| | | <el-dialog title="克隆编码规则的基础信息" |
| | | append-to-body |
| | |
| | | plain |
| | | @click="deleteBasicCode(scope.row)"> |
| | | 删 除 |
| | | </el-button> |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-search" |
| | | plain |
| | | :disabled="selectionList.length <= 0" |
| | | @click="openAdvancedQuery('codeBasicSec')"> |
| | | 高级查询 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | </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" |
| | |
| | | </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" |
| | |
| | | ref="referConfigFormDialog" |
| | | @echoReferConfig="echoReferConfig"> |
| | | </refer-config-form-dialog> |
| | | |
| | | <!-- 第二层对话框,直接选择参照配置crud组件 --> |
| | | <refer-config-crud-dialog |
| | | ref="referConfigCrudDialog" |
| | |
| | | advancedQueryParam: { |
| | | ref: 'advancedQuery', |
| | | advancedQuerySettingBox: false, |
| | | options: {}, |
| | | options: [], |
| | | currentOpen: '', //当前打开高级查询的窗口是 |
| | | //conditionMapParams: {}, |
| | | }, |
| | | |
| | |
| | | }; |
| | | }, |
| | | }, |
| | | created() { |
| | | MasterTable({ |
| | | codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | functionId: 5, |
| | | }).then(res=>{ |
| | | console.log(res.data.tableDefineVO.seniorQueryColumns); |
| | | this.advancedQueryParam.options = res.data.tableDefineVO.seniorQueryColumns; |
| | | }) |
| | | // this.advancedQueryParam.options = [ |
| | | // { |
| | | // data: [], |
| | | // title: '编号', |
| | | // fieldType: 'text', |
| | | // queryField: 'id', |
| | | // },{ |
| | | // data: [], |
| | | // title: '名称', |
| | | // fieldType: 'text', |
| | | // queryField: 'name', |
| | | // },{ |
| | | // data: [], |
| | | // title: '描述', |
| | | // fieldType: 'text', |
| | | // queryField: 'description', |
| | | // }, { |
| | | // data: [], |
| | | // title: '状态', |
| | | // fieldType: 'text', |
| | | // queryField: 'description', |
| | | // } |
| | | // ] |
| | | }, |
| | | watch:{ |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | /** 高级查询对话框组件,组件返回的值是condtionMap[field]形式的查询条件,保留和之前一样 */ |
| | | /** 高级查询对话框组件,组件返回的值是condtionMap[field]形式的查询条件,保留了和之前一样的方式 */ |
| | | echoSeniorContionMap(conditionMaps){ |
| | | console.log(conditionMaps); |
| | | |
| | | //console.log(conditionMaps); |
| | | if(JSON.stringify(conditionMaps)!='{}'){ |
| | | if(this.advancedQueryParam.currentOpen =='codeRule'){ |
| | | this.query = conditionMaps; |
| | | this.onLoad(this.page); |
| | | }else{ |
| | | this.sendGridCodeBasicSec(conditionMaps,true); |
| | | } |
| | | //console.log(conditionMaps); |
| | | } |
| | | }, |
| | | |
| | | /* 公式编辑框内容改变,子组件编辑完公式之后内容回显时调用 */ |
| | | updateFormulaContent(content){ |
| | | this.form.getValueClass = content; |
| | |
| | | //转换成JSON字符串进行父组件回显 |
| | | let submitFormJson = JSON.stringify(content); |
| | | 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; |
| | | }, |
| | | |
| | | /** 父分类选择对话框,第二层嵌套对话框,及其相关方法 */ |
| | |
| | | let parentClsParam = this.parentClsfyParams; |
| | | parentClsParam.classifyDialogLoading = true; |
| | | let oid = this.selectionList.length==0 ? this.form.pkCodeRule:this.selectionList[0].oid; |
| | | Object.assign(params,{pkCodeRule:oid}) |
| | | refDataGridClassifySec(page.currentPage, page.pageSize, Object.assign(params, parentClsParam.parentClassifyQuery)).then(res => { |
| | | let conditionMaps = {}; |
| | | conditionMaps['conditionMap[pkCodeRule]'] = oid; |
| | | refDataGridClassifySec( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | conditionMaps |
| | | ).then(res => { |
| | | //console.log(res.data); |
| | | const data = res.data.data; |
| | | parentClsParam.parentClassifyDataPage.total = data.total; |
| | |
| | | loadlistClassifyLinkAttr() { |
| | | let attrParam = this.selectAttrParams; |
| | | //console.log(this.currentSelectTreeData); |
| | | attrParam.selectAttrOptionLoading = true; |
| | | let param = {}; |
| | | // 多个conditionMap这样传参 |
| | | this.selectAttrParams.selectAttrOptionLoading = true; |
| | | let conditionMaps = {}; |
| | | if(attrParam.selectAttrQeury){ |
| | | Object.keys(attrParam.selectAttrQeury).forEach(key=>{ |
| | | param['conditionMap['+key+']'] = attrParam.selectAttrQeury[key]; |
| | | }); |
| | | } |
| | | param['conditionMap[codeClassifyOid]'] = this.currentSelectTreeData.oid; |
| | | param['conditionMap[btmTypeOid]'] = this.currentSelectTreeData.btmTypeOid; |
| | | listClassifyLinkAttr(param).then(res=>{ |
| | | //console.log(res.data.data); |
| | | attrParam.selectAttrData = res.data.data; |
| | | attrParam.selectAttrOptionLoading = false; |
| | | this.$nextTick(() => { |
| | | this.$refs[attrParam.ref].doLayout() |
| | | Object.keys(attrParam.selectAttrQeury).forEach(key=>{ |
| | | conditionMaps['conditionMap['+key+']'] = attrParam.selectAttrQeury[key].trim(); |
| | | }); |
| | | } |
| | | conditionMaps['conditionMap[codeClassifyOid]'] = this.currentSelectTreeData.oid; |
| | | conditionMaps['conditionMap[btmTypeOid]'] = this.currentSelectTreeData.btmTypeOid; |
| | | listClassifyLinkAttr(conditionMaps).then(res=>{ |
| | | const data = res.data; |
| | | this.$nextTick(() => { |
| | | this.$refs[attrParam.ref].doLayout() |
| | | }); |
| | | //console.log(data.data); |
| | | this.selectAttrParams.selectAttrData = data.data; |
| | | this.selectAttrParams.selectAttrOptionLoading = false; |
| | | // 将搜索框内容置空 |
| | | this.selectAttrParams.selectAttrQeury = {}; |
| | | }) |
| | | }, |
| | | // 点击搜索后触发该事件 |
| | |
| | | // 关闭对话框 |
| | | this.addBasicCodeSettingBox = false |
| | | } |
| | | |
| | | // 点击新增基础码段,关闭窗口之后触发重新加载 |
| | | this.loadBasic(this.selectionList[0]); |
| | | }else{ |
| | | editSave(this.form).then(() => { |
| | | // 关闭对话框 |
| | |
| | | }, error => { |
| | | window.console.log(error); |
| | | }); |
| | | this.loadBasic(this.selectionList[0]); |
| | | } |
| | | // 点击新增基础码段,关闭窗口之后触发重新加载 |
| | | this.loadBasic(this.selectionList[0]); |
| | | }, |
| | | // 因为elementui的表单校验设置不上所以采用判断的方式来做表单检验方式 |
| | | checkForm(){ |
| | |
| | | return false; |
| | | } |
| | | }else if(this.form.secType==='codeserialsec'){ |
| | | console.log(form.codeFillType); |
| | | //console.log(form.codeFillType); |
| | | //流水码段 |
| | | if(form.codeSecLength == ''){ |
| | | this.$message.warning('(码段的长度)'+tipsMsg); |
| | |
| | | this.$message.warning('(编码补位方式)'+tipsMsg); |
| | | return false; |
| | | } |
| | | if(form.codeFillType != '不补位' && form.codeFillSeparatorSelect == ''){ |
| | | if(form.codeFillType != '不补位' && form.codeFillSeparator == ''){ |
| | | this.$message.warning('当补位方式为左补位或者右补位的时候,补位字符不能为空'); |
| | | return false; |
| | | } |
| | |
| | | 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 == ''){ |
| | |
| | | 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; |
| | | } |
| | |
| | | } |
| | | // console.log(row.oid); |
| | | //存储当前关联的编码规则相关信息 |
| | | this.currentCodeRuleOid = row.oid; |
| | | this.currentRuleLcStatus = row.lcStatus; |
| | | this.sendGridCodeBasicSec({"pkCodeRule":row.oid}); |
| | | if(row!='' || row!=null){ |
| | | this.currentCodeRuleOid = row.oid; |
| | | this.currentRuleLcStatus = row.lcStatus; |
| | | this.sendGridCodeBasicSec({"pkCodeRule":row.oid},false); |
| | | } |
| | | }, |
| | | // 发送加载基础码段的请求 |
| | | sendGridCodeBasicSec(condition){ |
| | | sendGridCodeBasicSec(condition,isAdancedQuery/** 是否高级查询 */){ |
| | | // 如果当前基础码段表中的搜索按钮被隐藏,就需要在此开启 |
| | | if(this.selectionList.length>=0 && !this.$refs.crudBasic.option.column[0].search){ |
| | | this.hideBasicTable(true); |
| | | } |
| | | gridCodeBasicSec(1, -1, condition).then(res => { |
| | | let conditionMaps = {}; |
| | | if(condition && !isAdancedQuery){ |
| | | Object.keys(condition).forEach(key=>{ |
| | | conditionMaps['conditionMap['+key+']'] = condition[key].trim(); |
| | | }); |
| | | } |
| | | if(isAdancedQuery){ |
| | | condition['conditionMap[pkCodeRule]'] = this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' |
| | | ? this.selectionList[0].oid:this.currentCodeRuleOid; |
| | | } |
| | | gridCodeBasicSec(1, -1,isAdancedQuery ? condition:conditionMaps).then(res => { |
| | | const data = res.data.data; |
| | | if(this.cloneSettingBox){ |
| | | this.cloneData = data.records; |
| | |
| | | }, |
| | | basicSearchChange(params, done){ |
| | | //console.log(this.$refs.crudBasic); |
| | | this.sendGridCodeBasicSec(Object.assign(params,{"pkCodeRule":this.selectionList[this.selectionList.length-1].oid})); |
| | | this.sendGridCodeBasicSec(Object.assign(params,{"pkCodeRule":this.selectionList[this.selectionList.length-1].oid}),false); |
| | | done(); |
| | | }, |
| | | basicSearchReset(){ |
| | | this.sendGridCodeBasicSec({"pkCodeRule":this.selectionList[this.selectionList.length-1].oid}); |
| | | this.sendGridCodeBasicSec({"pkCodeRule":this.selectionList[this.selectionList.length-1].oid},false); |
| | | }, |
| | | // 上移下移基础码段 |
| | | upOrderNum(row){ |
| | |
| | | }, |
| | | // 基础码段刷新时查询 |
| | | refreshChangeBasicSec(){ |
| | | this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid}); |
| | | this.loadBasic(this.selectionList.at(-1)); |
| | | }, |
| | | // 操作基础码段中搜索清空等按钮的显示/隐藏 |
| | | hideBasicTable(hideBoolean){ |
| | |
| | | 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(){ |
| | | this.advancedQueryParam.advancedQuerySettingBox = !this.advancedQueryParam.advancedQuerySettingBox; |
| | | openAdvancedQuery(condition){ |
| | | if(condition=='codeRule'){ |
| | | this.advancedQueryParam.options = [ |
| | | { |
| | | data: [], |
| | | title: '编号', |
| | | fieldType: 'text', |
| | | queryField: 'id', |
| | | },{ |
| | | data: [], |
| | | title: '名称', |
| | | fieldType: 'text', |
| | | queryField: 'name', |
| | | },{ |
| | | data: [], |
| | | title: '描述', |
| | | fieldType: 'text', |
| | | queryField: 'description', |
| | | },{ |
| | | data: [ |
| | | // { |
| | | // key: '编辑中', |
| | | // value: 'Editing', |
| | | // }, |
| | | // { |
| | | // key: '已发布', |
| | | // value: 'Released', |
| | | // }, |
| | | // { |
| | | // key: '停用', |
| | | // value: 'Disabled', |
| | | // }, |
| | | ], |
| | | title: '状态', |
| | | fieldType: 'combox', |
| | | queryField: 'lcStatus', |
| | | comboxKey: 'codeSearchLCStatus', |
| | | }, |
| | | ] |
| | | }else { |
| | | this.advancedQueryParam.options = [ |
| | | { |
| | | data: [], |
| | | title: '码段编号', |
| | | fieldType: 'text', |
| | | queryField: 'id', |
| | | },{ |
| | | data: [], |
| | | title: '码段名称', |
| | | fieldType: 'text', |
| | | queryField: 'name', |
| | | },{ |
| | | data: [], |
| | | title: '描述', |
| | | fieldType: 'text', |
| | | queryField: 'description', |
| | | },{ |
| | | data: [], |
| | | title: '码段类型', |
| | | fieldType: 'combox', |
| | | queryField: 'secType', |
| | | comboxKey: 'codeSecType', |
| | | } |
| | | ] |
| | | } |
| | | this.advancedQueryParam.currentOpen = condition; |
| | | this.advancedQueryParam.advancedQuerySettingBox = true; |
| | | }, |
| | | // 查询使用范围 |
| | | handleRange(){ |
| | |
| | | // 刷新使用范围列表 |
| | | refreshUseRangeChange(){ |
| | | this.getRangeCodeList(); |
| | | }, |
| | | // 单击编码规则实现行选择 |
| | | codeRuleRowClick (row) { |
| | | // 这儿应该可以不要,因为toggleRowSelection也会触发行选择时间 |
| | | 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){ |
| | |
| | | this.selectionOtherCloneCodeBasicList = list; |
| | | this.$refs.crudCloneCodeBasicOther.setCurrentRow(this.selectionOtherCloneCodeBasicList[list.length-1]); |
| | | }, |
| | | // 从其他编码规则中克隆码段信息 |
| | | // 从其他编码规则中克隆码段信息 |
| | | saveOtherCodeBasic(){ |
| | | let oid = this.selectionList[0].oid; |
| | | let fromDialogPkCodebasic = this.selectionOtherCloneCodeBasicList; |
| | |
| | | //console.log(res); |
| | | let oidArr = []; |
| | | fromDialogPkCodebasic.forEach(ele => { |
| | | oidArr.push(ele.id); |
| | | oidArr.push(ele.oid); |
| | | }); |
| | | let data = { |
| | | "pkCodeRule": oid, |
| | |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | // 多个conditionMap这样传参,快速查询默认采用模糊查询 |
| | | let requestData = {}; |
| | | if(params){ |
| | | Object.keys(params).forEach(key=>{ |
| | | 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]); |
| | | } |
| | | }, |
| | | // 单击编码规则实现行选择 |
| | | codeRuleRowClick (row) { |
| | | // console.log(this.currentRuleLcStatus); |
| | | this.$refs.crud.toggleSelection(); |
| | | this.$refs.crud.toggleRowSelection(row); //选中当前行 |
| | | |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | onLoad(page,params={}) { |
| | | this.loading = true; |
| | | gridCodeRule(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | gridCodeRule( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | this.query |
| | | ).then(res => { |
| | | //console.log(res.data); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | // 查询的值为空时,要将码段管理相关的内容禁用 |
| | | if(data.records.length <= 0) { |
| | | this.hideBasicTable(false); |
| | | return; |
| | | } |
| | | this.loadBasic(this.data[0]) |
| | | this.$nextTick(() => { |
| | | this.$refs.crud.toggleRowSelection(this.data[0]); |
| | |
| | | // 补位时的字符,实现可输可选 |
| | | inputSelectBlur(e){ |
| | | if (e.target.value) { |
| | | this.form.codeFillSeparatorSelect = e.target.value; |
| | | this.form.codeFillSeparator = e.target.value; |
| | | } |
| | | }, |
| | | // 码段类型改变时,增加对应的form表单中的属性 |
| | |
| | | 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, //流水是否补码 |
| | |
| | | referBtmId: row!=null&&row.referBtmId != '' ? row.referBtmId:'', //参照引用的业务类型,的id |
| | | 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'){ |
| | | //日期码段 |
| | |
| | | //可变码段 |
| | | 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(); |
| | | } |
| | | // console.log(this.form); |
| | | }, |
| | | // 第一次请求的枚举数据放缓存 |
| | | getLocalStorageEnum(key){ |
| | | let enumCach = JSON.parse(localStorage.getItem(key)); |
| | | if(enumCach == null) { |
| | | getDictionary({code: key}).then(res=>{ |
| | | enumCach = res.data.data; |
| | | localStorage.setItem(key,JSON.stringify(res.data.data)); |
| | | }) |
| | | } |
| | | return enumCach; |
| | | }, |
| | | //枚举和可输可选内容查询 |
| | | loadCodeSecType(){ |
| | | getDictionary({code: "codeSecType"}).then(res=>{ |
| | | this.enumParam.secTypeList = res.data.data; |
| | | }) |
| | | this.enumParam.secTypeList = this.getLocalStorageEnum("codeSecType"); |
| | | this.loadCodeSecLength(); |
| | | }, |
| | | loadCodeSecLength(){ |
| | | getDictionary({code: "codeSecLength"}).then(res=>{ |
| | | this.enumParam.codeSecLengthType = res.data.data; |
| | | }) |
| | | this.enumParam.codeSecLengthType = this.getLocalStorageEnum("codeSecLength"); |
| | | }, |
| | | loadCodeFillType(){ |
| | | getDictionary({code: "codeFillType"}).then(res=>{ |
| | | this.enumParam.codeFillType = res.data.data; |
| | | }) |
| | | this.enumParam.codeFillType = this.getLocalStorageEnum("codeFillType"); |
| | | }, |
| | | loadCodeFillSeparator(){ |
| | | getDictionary({code: "codeFillSeparator"}).then(res=>{ |
| | | this.enumParam.codeFillSeparator = res.data.data; |
| | | }) |
| | | this.enumParam.codeFillSeparator = this.getLocalStorageEnum("codeFillSeparator"); |
| | | }, |
| | | loadCodeLevelType(){ |
| | | getDictionary({code: "codeLevelType"}).then(res=>{ |
| | | this.enumParam.codeLevelType = res.data.data; |
| | | }) |
| | | this.enumParam.codeLevelType = this.getLocalStorageEnum("codeLevelType"); |
| | | }, |
| | | loadCodeCutType(){ |
| | | getDictionary({code: "codeCutType"}).then(res=>{ |
| | | this.enumParam.codeCutType = res.data.data; |
| | | }) |
| | | this.enumParam.codeCutType = this.getLocalStorageEnum("codeCutType"); |
| | | }, |
| | | loadCodeGetValueType(){ |
| | | getDictionary({code: "codeGetValueType"}).then(res=>{ |
| | | this.enumParam.codeGetValueType = res.data.data; |
| | | }) |
| | | this.enumParam.codeGetValueType = this.getLocalStorageEnum("codeGetValueType"); |
| | | }, |
| | | |
| | | } |