fujunling
2023-08-23 44246a2082c74db213faa0e2c97445ec1173068b
Source/UBCS-WEB/src/components/code-dialog-page/maxSerialnumDialog.vue
@@ -8,6 +8,7 @@
        <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>
@@ -48,7 +49,7 @@
        },
        selfColumnConfig: {
            handler(newval) {
                console.log('selfColumnConfig', newval)
                // console.log('selfColumnConfig', newval)
            },
            immediate: true,
            deep: true
@@ -69,7 +70,10 @@
                codefixedsec: "combox",
                codeclassifysec: "refer",
                codevariablesec: "text",
                codeattrsec: "text",
                codelevelsec: "text",
                coderefersec: "refer",
                codedatesec: "date",
            },
            selfColumnConfig: {
                function: {
@@ -88,6 +92,7 @@
                    label: "name",
                    maxlength: "codeSecLength",
                    data: "fixedValueVOList",
                    dateFormate: "codeDateFormatStr"
                },
                directVoluation: {
                    search: true,
@@ -102,23 +107,25 @@
    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);
                    });
@@ -128,14 +135,14 @@
            }
        },
        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) {
@@ -144,7 +151,7 @@
                }
                return item;
            });
            console.log(this.secVOList)
            // console.log(this.secVOList)
            this.$refs.CodeApply.templateRender(this.secVOList);
        },
        isRequired(item) {
@@ -165,7 +172,7 @@
            }
        },
        getReferConfig(item) {
            console.log(item)
            // console.log(item)
            let params = {};
            if (item.secType == "codeclassifysec") {
                params = {
@@ -214,7 +221,7 @@
            } else if (item.secType == "coderefersec") {
                params = JSON.parse(item.referValueInfo);
            }
            console.log(params)
            // console.log(params)
            return params;
        },