|
|
@@ -0,0 +1,655 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <templateTable ref="expandTable" :formList="formList" :searchData.sync="searchData" :tableConfig="tableConfig"
|
|
|
+ :data="tableData" @getList="getList" :btnGroup="btnGroup" @handleSearchList="handleSearchList"
|
|
|
+ :pagination="page" @handleRowChange="handleRowChange">
|
|
|
+ <template slot="expand" slot-scope="scope">
|
|
|
+ <div style="width: 100%;margin-left:55px">
|
|
|
+ <el-table :data="scope.row.insAreaCompanyList" border size="small" :key="updateChildTable"
|
|
|
+ :header-cell-style="{
|
|
|
+ background: '#ccc',
|
|
|
+ fontWeight: '700',
|
|
|
+ color: '#606266',
|
|
|
+ }">
|
|
|
+ <el-table-column prop="gradeName" label="级别">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="jqCostsProportion" label="交强加投">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="syCostsProportion" label="商业加投">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="noCostsProportion" label="非车加投">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </templateTable>
|
|
|
+
|
|
|
+ <el-dialog :title="dialogTitle" width="40%" :visible.sync="dialogVisibleadd">
|
|
|
+ <el-form ref="queryFormRef" :model="queryForm" label-width="120px" class="queryform" size="small">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="名称">
|
|
|
+ <el-input clearable style="width:220px" v-model.trim="queryForm.name"
|
|
|
+ placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="是否启动">
|
|
|
+ <el-switch v-model="queryForm.enabled" active-color="#D42426" active-value="1"
|
|
|
+ inactive-value="0">
|
|
|
+ </el-switch>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="开始时间">
|
|
|
+ <el-date-picker v-model="queryForm.startTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime"
|
|
|
+ placeholder="选择日期时间"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="结束时间">
|
|
|
+ <el-date-picker v-model="queryForm.endTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime"
|
|
|
+ placeholder="选择日期时间"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="费用描述">
|
|
|
+ <el-input type="textarea" clearable v-model.trim="queryForm.remark"
|
|
|
+ placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-table :data="channelFeesData" border style="width: 100%">
|
|
|
+ <el-table-column prop="gradeName" label="分组级别">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="jqCostsProportion" label="交强加投比例">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input size="small" v-model.trim="scope.row.jqCostsProportion"
|
|
|
+ placeholder="请输入"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="syCostsProportion" label="商业加投比例">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input size="small" v-model.trim="scope.row.syCostsProportion"
|
|
|
+ placeholder="请输入"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="noCostsProportion" label="非车加投比例">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input size="small" v-model.trim="scope.row.noCostsProportion"
|
|
|
+ placeholder="请输入"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="dialogVisibleadd = false">取 消</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="sumbit">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="设置费用" width="80%" :visible.sync="dialogVisible">
|
|
|
+ <templateTable ref="productTable" :formList="formList1" :tableConfig="productcopyItemColumns"
|
|
|
+ @selectionChange="selectionChange" :data="productcopyItemResult" @getList="productcopyItemFindPage"
|
|
|
+ @handleSearchList="handleSearchList1" :pagination="productcopypage">
|
|
|
+ </templateTable>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="sumbitInstitution">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import templateTable from "@/components/TemplateTable/index.vue";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "ChannelCost",
|
|
|
+ components: { templateTable },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dept: '',
|
|
|
+ queryForm: {},
|
|
|
+ dialogTitle: '新增',
|
|
|
+ rowId: '',
|
|
|
+ dialogVisible: false,
|
|
|
+ dialogVisibleadd: false,
|
|
|
+ labelWidth: '100px',
|
|
|
+ btnGroup: [
|
|
|
+ {
|
|
|
+ name: '新增',
|
|
|
+ click: () => this.add()
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ formList: [
|
|
|
+ {
|
|
|
+ label: "渠道分组名称",
|
|
|
+ prop: "name",
|
|
|
+ type: "input",
|
|
|
+ },
|
|
|
+
|
|
|
+ ],
|
|
|
+ formList1: [
|
|
|
+ {
|
|
|
+ label: "保险公司",
|
|
|
+ prop: "companyId",
|
|
|
+ type: "company",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "协议",
|
|
|
+ prop: "agreementId",
|
|
|
+ type: "select",
|
|
|
+ options: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "产品类型",
|
|
|
+ prop: "productCode",
|
|
|
+ type: "select",
|
|
|
+ options: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "审核状态",
|
|
|
+ prop: "isAudit",
|
|
|
+ type: "select",
|
|
|
+ options: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "费用起期",
|
|
|
+ prop: "costStartDate",
|
|
|
+ type: "date",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "费用止期",
|
|
|
+ prop: "costsEndDate",
|
|
|
+ type: "date",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是否有效",
|
|
|
+ prop: "isEffective",
|
|
|
+ type: "select",
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ label: '失效',
|
|
|
+ value: '1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '有效',
|
|
|
+ value: '2'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "费用描述",
|
|
|
+ prop: "costsDescription",
|
|
|
+ type: "input",
|
|
|
+ },
|
|
|
+
|
|
|
+ ],
|
|
|
+ searchData: {},
|
|
|
+ page: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ totalSize: 0
|
|
|
+ },
|
|
|
+ productcopypage: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ totalSize: 0
|
|
|
+ },
|
|
|
+ tableData: [],
|
|
|
+ tableConfig: {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: "name",
|
|
|
+ label: "费用名称",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "remark",
|
|
|
+ label: "费用描述",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "startTime",
|
|
|
+ label: "开始时间",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "endTime",
|
|
|
+ label: "结束时间",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "enabled",
|
|
|
+ label: "是否启动",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ expand: true,
|
|
|
+ loading: true,
|
|
|
+ isPaginationShow: true,
|
|
|
+ optBtns: [
|
|
|
+ {
|
|
|
+ type: "primary",
|
|
|
+ label: "设置用费",
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.setFees(row)
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "primary",
|
|
|
+ label: "修改",
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.handleTableUpload(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "primary",
|
|
|
+ label: "删除",
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.handleTableDatl(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ productcopyItemColumns: {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: "productName", label: "产品名称",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "insuranceCompany", label: "保险公司名称",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "agreementName", label: "协议名称",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "costsStartDate", label: "费用起期",
|
|
|
+ width: 160,
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "costsEndDate", label: "费用止期",
|
|
|
+ width: 160,
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "costsDescription", label: "费用描述",
|
|
|
+ width: 220,
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "desc", label: "费用因子描述",
|
|
|
+ width: 500,
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "priorityLevel", label: "方案优先级",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // prop: "jqCarCostsProportion",
|
|
|
+ // label: "费用比例(交强)",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "jqCarOtherCostsProportion",
|
|
|
+ // label: "其他费用比例(交强)",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "jqCostsProportion",
|
|
|
+ // label: "总费用比例(交强)",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "jqExportRadioLevel1",
|
|
|
+ // label: "交强出口比例一级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "jqExportRadioLevel2",
|
|
|
+ // label: "交强出口比例二级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "jqExportRadioLevel3",
|
|
|
+ // label: "交强出口比例三级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "jqExportRadioLevel4",
|
|
|
+ // label: "交强出口比例四级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "jqExportRadioLevel5",
|
|
|
+ // label: "交强出口比例五级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: "syCarCostsProportion",
|
|
|
+ // label: "费用比例(商业)",
|
|
|
+ // minWidth: 120,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "syCarOtherCostsProportion",
|
|
|
+ // label: "其他费用比例(商业)",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "syCostsProportion",
|
|
|
+ // label: "总费用比例(商业)",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "syExportRadioLevel1",
|
|
|
+ // label: "商业出口比例一级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "syExportRadioLevel2",
|
|
|
+ // label: "商业出口比例二级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "syExportRadioLevel3",
|
|
|
+ // label: "商业出口比例三级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "syExportRadioLevel4",
|
|
|
+ // label: "商业出口比例四级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "syExportRadioLevel5",
|
|
|
+ // label: "商业出口比例五级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "noCarCostsProportion",
|
|
|
+ // label: "费用比例(非车)",
|
|
|
+ // minWidth: 120,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "noCarOtherCostsProportion",
|
|
|
+ // label: "其他费用比例(非车)",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "noCostsProportion",
|
|
|
+ // label: "总费用比例(非车)",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "noCarExportRadioLevel1",
|
|
|
+ // label: "非车出口比例一级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "noCarExportRadioLevel2",
|
|
|
+ // label: "非车出口比例二级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "noCarExportRadioLevel3",
|
|
|
+ // label: "非车出口比例三级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "noCarExportRadioLevel4",
|
|
|
+ // label: "非车出口比例四级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "noCarExportRadioLevel5",
|
|
|
+ // label: "非车出口比例五级",
|
|
|
+ // type: "text"
|
|
|
+ // },
|
|
|
+ ],
|
|
|
+ loading: true,
|
|
|
+ isPaginationShow: true,
|
|
|
+ isCheckBox: true
|
|
|
+ },
|
|
|
+ channelFeesData: [],
|
|
|
+ productcopyItemResult: [],
|
|
|
+ updateChildTable: false,
|
|
|
+ costIdList: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getList();
|
|
|
+ this.$api.insCompany.dicType("productsType").then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.formList1.forEach(val => {
|
|
|
+ if (val.prop == 'productCode') {
|
|
|
+ val.options = res.data.ddList
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.$api.insCompany.findAgreementByCompanyId({ isExternal: 0 }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.formList1.forEach(val => {
|
|
|
+ if (val.prop == 'agreementId') {
|
|
|
+ res.data.forEach(e => {
|
|
|
+ e.name = e.agreementName + (e.jobDescriptione ? '-' + e.jobDescription : '') + (e.businessDescription ? '-' + e.businessDescription : '')
|
|
|
+ })
|
|
|
+ val.options = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ let data = { "pageNum": 1, "pageSize": 10, "columnFilters": { "label": { "name": "label", "value": "agreement_audit_status" } } }
|
|
|
+ this.$api.dict.findPage(data).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.formList1.forEach(val => {
|
|
|
+ if (val.prop == 'isAudit') {
|
|
|
+ val.options = res.data.content
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ this.$api.dept.findDeptTree("9", "").then((res) => {
|
|
|
+ this.treedata = res.data;
|
|
|
+ });
|
|
|
+ this.$api.sys.sysChannelGradeList().then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ res.data.forEach(val => {
|
|
|
+ val.gradeId = val.id
|
|
|
+ val.gradeName = val.name
|
|
|
+ val.id = null
|
|
|
+ })
|
|
|
+ this.channelFeesData = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ setFees(row) {
|
|
|
+ this.rowId = row.id
|
|
|
+ this.dialogVisible = true
|
|
|
+ this.productcopyItemFindPage()
|
|
|
+
|
|
|
+ },
|
|
|
+ handleSearchList1(val) {
|
|
|
+ this.productcopyItemFindPage(val)
|
|
|
+ },
|
|
|
+ selectionChange(val, refs) {
|
|
|
+ this.costIdList = []
|
|
|
+ this.costIdList = val
|
|
|
+ },
|
|
|
+ productcopyItemFindPage(data) {
|
|
|
+ this.productcopyItemColumns.loading = true;
|
|
|
+ this.$api.sys
|
|
|
+ .agreementGetProductPage({ id: this.rowId, ...this.productcopypage, ...data })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ let productTable = this.$refs.productTable.$refs.table
|
|
|
+ this.productcopyItemResult = res.data.records;
|
|
|
+ this.productcopypage.pageNum = res.data.current;
|
|
|
+ this.productcopypage.pageSize = res.data.size;
|
|
|
+ this.productcopypage.totalSize = res.data.total;
|
|
|
+ this.productcopyItemColumns.loading = false;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.productcopyItemResult.forEach((val) => {
|
|
|
+ if (val.check) {
|
|
|
+ productTable.toggleRowSelection(val);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.productcopyItemResult = [];
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ this.productcopypage.totalSize = 0;
|
|
|
+ this.productcopyItemColumns.loading = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleRowChange(row) {
|
|
|
+ let expandTable = this.$refs.expandTable.$refs.table
|
|
|
+ if (!row.expanded) {
|
|
|
+ this.$api.sys.sysChannelGroupQuery(row.id).then(res => {
|
|
|
+ if (res.code == "200") {
|
|
|
+ this.tableData.map(item => {
|
|
|
+ if (item.id === row.id) {
|
|
|
+ item.insAreaCompanyList = res.data.sysChannelGroupInfos
|
|
|
+ }
|
|
|
+ return item;
|
|
|
+ });
|
|
|
+ this.updateChildTable = !this.updateChildTable;
|
|
|
+ row.expanded = !row.expanded;
|
|
|
+ expandTable.toggleRowExpansion(row, row.expanded);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message.info("暂无数据");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ row.expanded = !row.expanded;
|
|
|
+ this.$refs.expandTable.$refs.table.toggleRowExpansion(row, row.expanded);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ // 查询
|
|
|
+ handleSearchList(data) {
|
|
|
+ this.getList(data);
|
|
|
+ },
|
|
|
+ add() {
|
|
|
+ this.dialogVisibleadd = true
|
|
|
+ this.dialogTitle = '新增'
|
|
|
+ },
|
|
|
+ handleTableDatl(row) {
|
|
|
+ this.$confirm("确认删除该条数据吗?", "提示", {
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$api.sys
|
|
|
+ .sysChannelGroupDelete(row.id)
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.getList();
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ sumbit() {
|
|
|
+ if (this.dialogTitle == '新增') {
|
|
|
+ this.$api.sys
|
|
|
+ .sysChannelGroupChannel({ ...this.queryForm, infos: this.channelFeesData })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.getList();
|
|
|
+ this.dialogVisibleadd = false
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$api.sys
|
|
|
+ .sysChannelGroupGradeUp(this.queryForm.id, { ...this.queryForm, infos: this.queryForm.sysChannelGroupInfos })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.getList();
|
|
|
+ this.dialogVisibleadd = false
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //列表数据
|
|
|
+ getList(data) {
|
|
|
+ this.tableConfig.loading = true;
|
|
|
+ this.$api.sys
|
|
|
+ .queryChannelPage({ ...data, ...this.page })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ res.data.content.forEach(val => {
|
|
|
+ val.enabled = val.enabled == '1' ? '启动' : '禁用'
|
|
|
+ })
|
|
|
+ this.tableData = res.data.content;
|
|
|
+ this.page.pageNum = res.data.pageNum;
|
|
|
+ this.page.pageSize = res.data.pageSize;
|
|
|
+ this.page.totalSize = res.data.totalSize;
|
|
|
+ this.tableConfig.loading = false;
|
|
|
+ } else {
|
|
|
+ this.tableData = [];
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ this.page.totalSize = 0;
|
|
|
+ this.tableConfig.loading = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ sumbitInstitution() {
|
|
|
+ this.$api.sys
|
|
|
+ .sysChannelGroupCostSet({ costIdList: this.costIdList.map(val => val.id), id: this.rowId })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.getList();
|
|
|
+ this.dialogVisible = false
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
+ handleTableUpload(row) {
|
|
|
+ this.$api.sys
|
|
|
+ .sysChannelGroupDetail(row.id)
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.channelFeesData = res.data.sysChannelGroupInfos
|
|
|
+ this.dialogTitle = '编辑'
|
|
|
+ this.dialogVisibleadd = true
|
|
|
+ this.queryForm = res.data
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|