| | |
| | | <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick"> |
| | | <el-tab-pane label="最大流水号" name="codeApply"> |
| | | <form-template v-bind="$attrs" type="add" :selfColumnType="selfColumnType" |
| | | :trendsSpan="24" |
| | | :selfColumnConfig="selfColumnConfig" ref="CodeApply" @getFormData="getCodeApplyFormData" |
| | | @referConfigDataUpdate="referConfigDataUpdate"></form-template> |
| | | </el-tab-pane> |
| | |
| | | }, |
| | | selfColumnConfig: { |
| | | handler(newval) { |
| | | console.log('selfColumnConfig', newval) |
| | | // console.log('selfColumnConfig', newval) |
| | | }, |
| | | immediate: true, |
| | | deep: true |
| | |
| | | codefixedsec: "combox", |
| | | codeclassifysec: "refer", |
| | | codevariablesec: "text", |
| | | codeattrsec: "text", |
| | | codelevelsec: "text", |
| | | coderefersec: "refer", |
| | | codedatesec: "date", |
| | | }, |
| | | selfColumnConfig: { |
| | | function: { |
| | |
| | | label: "name", |
| | | maxlength: "codeSecLength", |
| | | data: "fixedValueVOList", |
| | | dateFormate: "codeDateFormatStr" |
| | | }, |
| | | directVoluation: { |
| | | search: true, |
| | |
| | | methods: { |
| | | // 获取码段 |
| | | async apiGetCode() { |
| | | this.activeName = "codeApply"; |
| | | const response = await getCodePrice({ ruleOid: this.ruleOid }) |
| | | const res = response.data |
| | | if (res.success && res.code === 200) { |
| | | console.log(response) |
| | | const typeList = [ |
| | | "codefixedsec", |
| | | "codeclassifysec", |
| | | "codevariablesec", |
| | | "coderefersec", |
| | | "codeattrsec", |
| | | "codelevelsec", |
| | | "codedatesec" |
| | | ]; |
| | | this.secVOList = (res.data.secVOList || []).filter((item) => |
| | | typeList.includes(item.secType) |
| | | ); |
| | | console.log(this.secVOList) |
| | | if (this.secVOList.length > 0) { |
| | | // this.showCodeApply = true; |
| | | this.activeName = "codePrice"; |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.CodeApply.templateRender(this.secVOList); |
| | | }); |
| | |
| | | } |
| | | }, |
| | | handleClick(tab, event) { |
| | | console.log(event) |
| | | // console.log(event) |
| | | }, |
| | | getCodeApplyFormData(codeApplyForm) { |
| | | this.codeApplyForm = codeApplyForm; |
| | | }, |
| | | // 参照组件数据变更 |
| | | referConfigDataUpdate(data) { |
| | | console.log(data) |
| | | // console.log(data) |
| | | const { field } = data; |
| | | this.secVOList = this.secVOList.map((item) => { |
| | | if (item.parentClassifySecOid === field) { |
| | |
| | | } |
| | | return item; |
| | | }); |
| | | console.log(this.secVOList) |
| | | // console.log(this.secVOList) |
| | | this.$refs.CodeApply.templateRender(this.secVOList); |
| | | }, |
| | | isRequired(item) { |
| | |
| | | } |
| | | }, |
| | | getReferConfig(item) { |
| | | console.log(item) |
| | | // console.log(item) |
| | | let params = {}; |
| | | if (item.secType == "codeclassifysec") { |
| | | params = { |
| | |
| | | } else if (item.secType == "coderefersec") { |
| | | params = JSON.parse(item.referValueInfo); |
| | | } |
| | | console.log(params) |
| | | // console.log(params) |
| | | return params; |
| | | |
| | | }, |