| | |
| | | <template> |
| | | <el-dialog title="最大流水号" width="30%" append-to-body="true" :visible.sync="dialogVisible"> |
| | | <el-dialog title="最大流水号" width="30%" append-to-body="true" class="avue-dialog avue-dialog--top" top="-3%" :visible.sync="dialogVisible"> |
| | | <el-form :label-position="right" ref="ruleForm" label-width="80px" :model="formModel" :rules="rules"> |
| | | <el-form-item label="流水号" prop="maxSecNum"> |
| | | <el-input v-model="formModel.maxSecNum"></el-input> |
| | |
| | | ], |
| | | }, |
| | | selfColumnType: { |
| | | codefixedsec: "combox", |
| | | codeclassifysec: "refer", |
| | | codevariablesec: "text", |
| | | codeattrsec: "text", |
| | | codelevelsec: "text", |
| | | coderefersec: "refer", |
| | | codedatesec: "date", |
| | | codefixedsec: "combox",//固定码段 |
| | | codeclassifysec: "refer",//分类码段 |
| | | codevariablesec: "text",//可变码段 |
| | | coderefersec: "refer",//引用码段 |
| | | codeattrsec: "text", |
| | | codelevelsec: "text", |
| | | codedatesec: "date" |
| | | }, |
| | | selfColumnConfig: { |
| | | function: { |
| | |
| | | typeList.includes(item.secType) |
| | | ); |
| | | if (this.secVOList.length > 0) { |
| | | // this.showCodeApply = true; |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.CodeApply.templateRender(this.secVOList); |
| | | }); |
| | | } else { |
| | | // this.showCodeApply = false; |
| | | this.$refs.CodeApply.loading = false; |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.formModel['codeRuleOid'] = '' |
| | | this.formModel['maxSecNum'] = '' |
| | | this.$refs.ruleForm.clearValidate('maxSecNum') |
| | | |
| | | |
| | | }, |
| | | // 确认 |
| | | async comfirm() { |
| | | console.log(this.codeApplyForm) |
| | | const objcodekey = Object.keys(this.codeApplyForm) |
| | | console.log(objcodekey) |
| | | const filteredObj = objcodekey.reduce((acc, key) => { |
| | | const pattern = /[\u4e00-\u9fa5]/; // 匹配中文字符的正则表达式 |
| | | const patterns = /\$/; |
| | |
| | | }) |
| | | this.formModel['secDTOList'] = arrCode |
| | | this.formModel['codeRuleOid'] = this.ruleOid |
| | | console.log(this.formModel) |
| | | this.confirmLoadding = true |
| | | const rule = await this.$refs.CodeApply.validate() |
| | | this.$refs.ruleForm.validate(res => { |
| | | if (rule && res) { |
| | | console.log(rule) |
| | | saveMaxSerialNum(this.formModel).then(res => { |
| | | if (res.data.success) { |
| | | this.$message.success('操作成功!'); |
| | | this.confirmLoadding = false |
| | | this.cancel() |
| | | } |
| | | }).catch(error=>{ |
| | | this.confirmLoadding = false |
| | | }) |
| | | } else { |
| | | this.confirmLoadding = false |
| | |
| | | }, |
| | | // 参照组件数据变更 |
| | | referConfigDataUpdate(data) { |
| | | // console.log(data) |
| | | const { field } = data; |
| | | this.secVOList = this.secVOList.map((item) => { |
| | | if (item.parentClassifySecOid === field) { |
| | |
| | | } |
| | | }, |
| | | getReferConfig(item) { |
| | | // console.log(item) |
| | | let params = {}; |
| | | if (item.secType == "codeclassifysec") { |
| | | params = { |
| | |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | </script> |