Przeglądaj źródła

1、加投结算管理
2、渠道分组管理
3、渠道费用分组管理

lihongxiao 2 lat temu
rodzic
commit
69d5fa14a5

+ 2 - 2
config/dev.env.js

@@ -5,7 +5,7 @@ const prodEnv = require('./prod.env')
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG: '"dev"',
-  BASE_URL: '"https://test.baoxianzhanggui.com/web-api"',//测试服务器
+  // BASE_URL: '"https://test.baoxianzhanggui.com/web-api"',//测试服务器
   // BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"',//正式服务器
   // BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL: '"http://192.168.0.115:8080/"', //凯森
@@ -18,7 +18,7 @@ module.exports = merge(prodEnv, {
   // BASE_URL: '"http://192.168.0.250:8080/"',//
   // BASE_URL: '"http:///192.168.0.103:8080/"',//霍续亮
   // BASE_URL: '"http://192.168.0.52:8080/"',//贺礼霄
-  // BASE_URL: '"http:///192.168.0.55:8080/"',//蔡雅茹
+  BASE_URL: '"http:///192.168.0.55:8080/"',// 董鑫
   CONSOLE_BASE_URL: '"http://localhost:8080/"', //控制台测试服务器
   // CONSOLE_BASE_URL: '"https://test.baoxianzhanggui.com/console-api"' //控制台正式服务器
   APP_BASE_URL: '"https://pre.baoxianzhanggui.com/web-api"',    // app打包上传地址

+ 11 - 2
src/components/TemplateForm/index.vue

@@ -1,6 +1,6 @@
 <template>
-    <el-form :model="formData" 
-     ref="publicForm" :inline="true" size="small" >
+    <el-form :model="formData"  :rules="rules"
+     ref="publicForm" :inline="inline" size="small" >
         <el-row :gutter="20"> 
             <el-col :span="spanWidth?spanWidth:8" v-for="f in ruleForm" :key="f.prop">
                 <el-form-item :label="f.label" :prop="f.prop" :label-width="labelWidth||'120px'" >
@@ -14,6 +14,7 @@
                                 :placeholder="'请输入' + f.label"
                                 :disabled="f.disabled || false"
                                 :showPassword="f.showPassword"
+                                @change="f.change($event)"
                                 :clearable="f.clearable||true"/>
                         </template>
                         <!-- <template v-else-if="f.type === 'company'">
@@ -155,6 +156,14 @@ export default {
             type: Object,
             default: {}
         },
+        inline: {
+            type: Boolean,
+            default: true
+        },
+        rules: {
+            type: Object,
+            default: {}
+        },
         labelWidth: {
             type: String,
             default: ''

+ 17 - 1
src/components/TemplateTable/index.vue

@@ -207,8 +207,9 @@
       :show-summary="tableConfig.showSummary || false"
       :data="data"
       border
-      size="small"
+      
       style="width: 100%"
+      @expand-change="handleRowChange"
       :height="tableConfig.tableHeight || tableHeight"
       v-loading="tableConfig.loading"
       element-loading-text="数据加载中"
@@ -226,6 +227,11 @@
       :cell-class-name="rowClass"
       
     >
+    <el-table-column v-if="tableConfig.expand" type="expand" >
+      <template slot-scope="scope" >
+          <slot v-bind="scope" name="expand"></slot>
+       </template>
+       </el-table-column>
       <el-table-column
         type="selection"
         :width="tableConfig.selectionWidth || '50'"
@@ -494,6 +500,16 @@ export default {
         this.$emit("companySelectChange", { id, filed });
       }
     },
+    handleRowChange(row) {
+      this.$emit("handleRowChange", row);
+      //   if (!row.expanded) {
+      //     this.$emit("handleRowChange", row);
+      //       this.$refs.table.toggleRowExpansion(row, row.expanded);
+      // } else {
+      //   row.expanded = !row.expanded;
+      //   this.$refs.table.toggleRowExpansion(row, row.expanded);
+      // }
+    },
     formatDateTime(date) {
       let d = new Date(date),
         month = "" + (d.getMonth() + 1),

+ 149 - 0
src/http/moudules/sys.js

@@ -225,4 +225,153 @@ export const vehicleConfigOpen = (id) => {
         url: '/sys/vehicleConfig/open/' + id,
         method: 'put',
     })
+}
+
+// 渠道分组管理
+
+export const sysChannelGradePage = (data) => {
+    return axios({
+        url: '/sysChannelGrade/queryPage',
+        method: 'post',
+        data
+    })
+}
+export const sysChannelGradeGrade = (data) => {
+    return axios({
+        url: '/sysChannelGrade/grade',
+        method: 'post',
+        data
+    })
+}
+export const sysChannelGradeDelete = (params) => {
+    return axios({
+        url: '/sysChannelGrade/grade/' + params,
+        method: 'delete',
+    })
+}
+export const sysChannelGradeUp = (params,data) => {
+    return axios({
+        url: '/sysChannelGrade/grade/'+ params,
+        method: 'PUT',
+        data
+    })
+}
+
+export const sysChannelauthorized = (data) => {
+    return axios({
+        url: '/sysChannelGrade/grade/authorized',
+        method: 'post',
+        data
+    })
+}
+
+
+// 渠道费用分组
+export const queryChannelPage = (data) => {
+    return axios({
+        url: '/sysChannelGroup/queryChannelPage',
+        method: 'post',
+        data
+    })
+}
+export const sysChannelGroupChannel = (data) => {
+    return axios({
+        url: '/sysChannelGroup/channel',
+        method: 'post',
+        data
+    })
+}
+export const sysChannelGroupDelete = (params) => {
+    return axios({
+        url: '/sysChannelGroup/channel/' + params,
+        method: 'delete',
+    })
+}
+export const sysChannelGroupQuery = (id) => {
+    return axios({
+        url: '/sysChannelGroup/query/'+ id,
+        method: 'post',
+    })
+}
+export const sysChannelGradeList = () => {
+    return axios({
+        url: '/sysChannelGrade/queryList',
+        method: 'post',
+    })
+}
+export const sysChannelGroupGradeUp = (params,data) => {
+    return axios({
+        url: '/sysChannelGroup/channel/'+ params,
+        method: 'PUT',
+        data
+    })
+}
+export const sysChannelGroupDetail = (id) => {
+    return axios({
+        url: '/sysChannelGroup/query/'+ id,
+        method: 'post',
+    })
+}
+export const sysChannelGroupCostSet = (data) => {
+    return axios({
+        url: '/sysChannelGroup/channel/costSet',
+        method: 'post',
+        data
+    })
+    
+}
+export const agreementGetProductPage = (data) => {
+    return axios({
+        url: '/sysChannelGroup/queryInfo',
+        method: 'post',
+        data
+    })
+}
+export const queryRelationList = (id) => {
+    return axios({
+        url: '/sysChannelGrade/queryRelationList/'+ id,
+        method: 'post',
+    })
+}
+
+// 加投结算管理
+export const sysChannelCostPage = (data) => {
+    return axios({
+        url: '/sysChannelCost/queryPage',
+        method: 'post',
+        data
+    })
+}
+export const sysChannelCostDetail = (id) => {
+    return axios({
+        url: '/sysChannelCost/query/'+ id,
+        method: 'post',
+    })
+}
+export const sysChannelGroupDel = (params) => {
+    return axios({
+        url: '/sysChannelCost/del/' + params,
+        method: 'delete',
+    })
+}
+export const sysChannelCostModify = (params,data) => {
+    return axios({
+        url: '/sysChannelCost/modify/'+ params,
+        method: 'PUT',
+        data
+    })
+}
+export const sysChannelCostExport = (data) => {
+    return axios({
+        url: '/sysChannelCost/export',
+        method: 'post',
+        data
+    })
+}
+export const sysChannelCostAudit = (data) => {
+    return axios({
+        url: '/sysChannelCost/audit/',
+        method: 'post',
+        data
+    })
 }

+ 655 - 0
src/views/AgreementManage/ChannelCost.vue

@@ -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>
+  

+ 494 - 0
src/views/FinancialManagement/AddInvestment.vue

@@ -0,0 +1,494 @@
+<template>
+    <div>
+        <templateTable :formList="formList" :searchData.sync="searchData" :tableConfig="tableConfig" :data="tableData"
+            @getList="getList" :btnGroup="btnGroup" @handleSearchList="handleSearchList" :pagination="page">
+        </templateTable>
+        <el-dialog title="编辑" width="60%" :visible.sync="dialogVisibleadd">
+            <templateForm ref="templateForm" :ruleForm="ruleForm" :formData="formData" :inline="false" :rules="rules"
+                :labelWidth="labelWidth"></templateForm>
+            <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>
+    </div>
+</template>
+<script>
+import templateTable from "@/components/TemplateTable/index.vue";
+import templateForm from "@/components/TemplateForm/index.vue";
+
+export default {
+    name: "policyImport",
+    components: { templateTable, templateForm },
+    data() {
+        return {
+            formData: {},
+            dialogVisible: false,
+            dialogVisibleadd: false,
+            labelWidth: '150px',
+            rules: {
+                jqCostsProportion: [
+                    { required: true, message: '请输入加投比例(交强)', trigger: 'blur' },
+                ],
+                syCostsProportion: [
+                    { required: true, message: '请输入加投比例(商业)', trigger: 'blur' },
+                ],
+                noCostsProportion: [
+                    { required: true, message: '请输入加投比例(非车)', trigger: 'blur' },
+                ],
+
+            },
+            btnGroup: [
+                {
+                    name: '导出',
+                    click: () => this.export()
+                }
+            ],
+            formList: [
+                {
+                    label: "工号",
+                    prop: "userId",
+                    type: "input",
+                },
+                {
+                    label: "渠道名称",
+                    prop: "userName",
+                    type: "input",
+                }, {
+                    prop: "status",
+                    label: "审核状态",
+                    type: "select",
+                    options: [
+                        {
+                            label: '未审核',
+                            value: '0'
+                        },
+                        {
+                            label: '审核通过',
+                            value: '1'
+                        }
+                    ]
+                }, {
+                    label: "车牌号",
+                    prop: "licenseNo",
+                    type: "input",
+                },
+            ],
+            ruleForm: [
+                {
+                    label: '加投比例(交强)',
+                    prop: 'jqCostsProportion',
+                    type: 'input',
+                    change: (e) => this.jqCostsProportionFun(e)
+                },
+
+                {
+                    label: '加投比例(商业)',
+                    prop: 'syCostsProportion',
+                    type: 'input',
+                    change: (e) => this.syCostsProportionFun(e)
+                },
+                {
+                    label: '加投比例(非车)',
+                    prop: 'noCostsProportion',
+                    type: 'input',
+                    change: (e) => this.noCostsProportionFun(e)
+                },
+                {
+                    label: '加投金额(交强)',
+                    prop: 'jqJtPremium',
+                    type: 'input',
+                    disabled: true
+                },
+                {
+                    label: '加投金额(商业)',
+                    prop: 'syJtPremium',
+                    type: 'input',
+                    disabled: true
+                },
+                {
+                    label: '加投金额(非车)',
+                    prop: 'jyJtPremium',
+                    type: 'input',
+                    disabled: true
+                },
+                {
+                    label: '交强险费用',
+                    prop: 'jqPremium',
+                    type: 'input',
+                    disabled: true
+                },
+                {
+                    label: '商业险费用',
+                    prop: 'syPremium',
+                    type: 'input',
+                    disabled: true
+                },
+                {
+                    label: '驾意险费用',
+                    prop: 'jyPremium',
+                    type: 'input',
+                    disabled: true
+                },
+
+            ],
+            searchData: {},
+            page: {
+                pageNum: 1,
+                pageSize: 20,
+                totalSize: 0
+            },
+            tableData: [],
+            tableConfig: {
+                columns: [
+                    {
+                        prop: "orderNo",
+                        label: "订单号",
+                        type: "text"
+                    },
+                    {
+                        prop: "userId",
+                        label: "工号",
+                        type: "text"
+                    },
+                    {
+                        prop: "userName",
+                        label: "渠道名称",
+                        type: "text"
+                    },
+                    {
+                        prop: "leaderName",
+                        label: "维护人员",
+                        type: "text"
+                    },
+                    {
+                        prop: "status",
+                        label: "审核状态",
+                        type: "statMap",
+                        options: [
+                            {
+                                label: '未审核',
+                                value: '0'
+                            },
+                            {
+                                label: '审核通过',
+                                value: '1'
+                            }
+                        ]
+                    },
+                    {
+                        prop: "licenseNo",
+                        label: "车牌号",
+                        type: "text"
+                    },
+                    {
+                        prop: "insuredName",
+                        label: "被保险人姓名",
+                        type: "text"
+                    },
+                    {
+                        prop: "companyId",
+                        label: "保险公司编号",
+                        type: "text"
+                    },
+                    {
+                        prop: "inscompany",
+                        label: "保险名称",
+                        type: "text"
+                    },
+
+                    {
+                        prop: "partnerCompaniesName",
+                        label: "合作公司名称",
+                        type: "text"
+                    },
+                    {
+                        prop: "productName",
+                        label: "产品名称",
+                        type: "text"
+                    },
+                    {
+                        prop: "dockingPerson",
+                        label: "对接人",
+                        type: "text"
+                    },
+                    {
+                        prop: "jqCostsProportion",
+                        label: "加投比例(交强)",
+                        type: "text"
+                    },
+                    {
+                        prop: "syCostsProportion",
+                        label: "加投比例(商业)",
+                        type: "text"
+                    },
+                    {
+                        prop: "noCostsProportion",
+                        label: "加投比例(非车)",
+                        type: "text"
+                    },
+                    {
+                        prop: "signingTime",
+                        label: "签单时间",
+                        type: "text"
+                    },
+                    {
+                        prop: "payDate",
+                        label: "支付时间",
+                        type: "text"
+                    },
+                    {
+                        prop: "jqJtPremium",
+                        label: "加投金额(交强)",
+                        type: "text"
+                    },
+                    {
+                        prop: "syJtPremium",
+                        label: "加投金额(商业)",
+                        type: "text"
+                    },
+                    {
+                        prop: "jyJtPremium",
+                        label: "加投金额(非车)",
+                        type: "text"
+                    },
+                    {
+                        prop: "createBy",
+                        label: "创建人",
+                        type: "text"
+                    },
+                    {
+                        prop: "createTime",
+                        label: "创建时间",
+                        type: "text"
+                    },
+                    {
+                        prop: "updateTime",
+                        label: "更新时间",
+                        type: "text"
+                    },
+                    {
+                        prop: "jqPolicyNo",
+                        label: "交强保单号",
+                        type: "text"
+                    },
+                    {
+                        prop: "syPolicyNo",
+                        label: "商业保单号",
+                        type: "text"
+                    },
+                    {
+                        prop: "noPolicyNo",
+                        label: "非车保单号",
+                        type: "text"
+                    },
+                    {
+                        prop: "taxAmount",
+                        label: "车船税费用",
+                        type: "text"
+                    },
+                    {
+                        prop: "jqPremium",
+                        label: "交强险费用",
+                        type: "text"
+                    },
+                    {
+                        prop: "syPremium",
+                        label: "商业险费用",
+                        type: "text"
+                    },
+                    {
+                        prop: "jyPremium",
+                        label: "驾意险费用",
+                        type: "text"
+                    },
+                    {
+                        prop: "jqCostsExportProportion",
+                        label: "交强出口比例",
+                        type: "text"
+                    },
+                    {
+                        prop: "syCostsExportProportion",
+                        label: "商业出口比例",
+                        type: "text"
+                    },
+                    {
+                        prop: "noCostsExportProportion",
+                        label: "非车出口比例",
+                        type: "text"
+                    },
+                    {
+                        prop: "totalPremium",
+                        label: "加投补贴金额",
+                        type: "text"
+                    },
+                    {
+                        prop: "settlementAmount",
+                        label: "结算金额",
+                        type: "text"
+                    },
+                ],
+                loading: true,
+                isPaginationShow: true,
+                operationWidth: 300,
+                optBtns: [
+                    {
+                        type: "primary",
+                        label: "修改",
+                        click: (row, index) => {
+                            return this.handleTableUpload(row);
+                        },
+                    },
+                    {
+                        type: "primary",
+                        label: "审核通过",
+                        hide: (row) => {
+                            return !row.status
+                        },
+                        click: (row, index) => {
+                            return this.handleTableAudit(row);
+                        },
+                    },
+                    {
+                        type: "primary",
+                        label: "删除",
+                        click: (row, index) => {
+                            return this.handleTableDatl(row);
+                        },
+                    },
+
+                ],
+            },
+            seachData: {}
+        };
+    },
+    created() {
+        this.getList();
+
+    },
+    methods: {
+        jqCostsProportionFun(val) {
+            this.formData.jqJtPremium = (Number(val) * Number(this.formData.jqPremium)).toFixed(2)
+        },
+        syCostsProportionFun(val) {
+            this.formData.syJtPremium = (Number(val) * Number(this.formData.syPremium)).toFixed(2)
+        },
+        noCostsProportionFun(val) {
+            this.formData.jyJtPremium = (Number(val) * Number(this.formData.jyPremium)).toFixed(2)
+
+        },
+        handleTableAudit(val) {
+            this.$api.sys
+                .sysChannelCostAudit({ id: val.id, isAudit: 1 })
+                .then(res => {
+                    if (res.code == 200) {
+                        this.getList();
+                        this.$message({
+                            message: res.msg || '审核通过',
+                            type: 'success'
+                        });
+                    } else {
+                        this.$message.error(res.msg);
+                    }
+                });
+        },
+        export() {
+            this.$api.sys
+                .sysChannelCostExport(this.seachData)
+                .then(res => {
+                    if (res.code == 200) {
+                        let url = process.env.BASE_URL + res.data; // 3.创建一个临时的url指向blob对象
+                        let a = document.createElement("a");
+                        a.href = url;
+                        a.click();
+                        window.URL.revokeObjectURL(url);
+                    } else {
+                        this.$message.error(res.msg);
+                    }
+                });
+        },
+        // 查询
+        handleSearchList(data) {
+            this.seachData = data
+            this.getList(data);
+        },
+        add() {
+            this.dialogVisibleadd = true
+            // this.dialogTitle = '新增'
+        },
+        handleTableDatl(row) {
+            this.$confirm("确认删除该条数据吗?", "提示", {
+                type: "warning",
+            })
+                .then(() => {
+                    this.$api.sys
+                        .sysChannelGroupDel(row.id)
+                        .then(res => {
+                            if (res.code == 200) {
+                                this.getList();
+
+                            } else {
+                                this.$message.error(res.msg);
+                            }
+                        });
+                })
+        },
+        sumbit() {
+            this.$refs.templateForm.$refs.publicForm.validate((valid) => {
+                if (valid) {
+                    this.$api.sys
+                        .sysChannelCostModify(this.formData.id, { ... this.formData })
+                        .then(res => {
+                            if (res.code == 200) {
+                                this.getList();
+                                this.dialogVisibleadd = false
+
+                            } else {
+                                this.$message.error(res.msg);
+                            }
+                        });
+                } else {
+                    return false;
+                }
+
+            })
+
+        },
+        //列表数据
+        getList(data) {
+            this.tableConfig.loading = true;
+            this.$api.sys
+                .sysChannelCostPage({ ...data, ...this.page })
+                .then(res => {
+                    if (res.code == 200) {
+                        this.tableData = res.data.records;
+                        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;
+                    }
+                });
+        },
+        handleTableUpload(row) {
+
+            this.$api.sys
+                .sysChannelCostDetail(row.id)
+                .then(res => {
+                    if (res.code == 200) {
+                        this.formData = res.data
+                        this.dialogVisibleadd = true
+                    } else {
+                        this.$message.error(res.msg)
+                    }
+                });
+
+        },
+    }
+};
+</script>
+<style lang="scss" scoped></style>

+ 2 - 1
src/views/FinancialManagement/CostVerification/Baosi.vue

@@ -578,7 +578,8 @@ export default {
       });
   },
   async exportNum(row){
-    window.open("http://192.168.0.111:8080/api/inv/insExternalBills/export/"+row.id)
+    let url= process.env.BASE_URL
+    window.open(url+"api/inv/insExternalBills/export/"+row.id)
     // let res = await this.$api.cost.exportBatchNum(row.id);
     //   const blob = new Blob([res.data]);
     //   const fileName = "测试.xlsx";

+ 1 - 0
src/views/Login.vue

@@ -492,6 +492,7 @@ export default {
     /**获取当前登录的ip地址 */
     getUserIP(ip => {
       getAddressLocation(ip, info => {
+        console.log(info,22222222222);
         this.addressInfo = info;
       });
     });

+ 54 - 22
src/views/PeopleManage/Institutional.vue

@@ -34,8 +34,8 @@
     <el-dialog :title="dialogTitle" width="40%" :visible.sync="dialogVisible" :close-on-click-modal="false"
       :before-close="handleDialogBefore" @close="closeDialog" v-dialogDrag>
       <el-form :model="formData" :rules="rules" ref="formData" :inline="true" label-width="110px" size="small">
+      <div class="info-title" style="padding-top: 0">机构信息</div>
         <el-row>
-
           <el-col :span="12">
             <el-form-item label="机构编码" prop="deptId">
               <el-input v-model="formData.deptId" disabled></el-input>
@@ -50,17 +50,24 @@
               </el-select> -->
             </el-form-item>
           </el-col>
+         
+         
           <el-col :span="12">
-            <el-form-item label="工号" prop="userId">
-              <el-input v-model="formData.userId" disabled></el-input>
+            <el-form-item label="机构等级" prop="comlevel">
+              <el-select v-model="formData.comlevel" style="width: 200px;" disabled>
+                <el-option v-for="val in comleveloptions" :key="val.value" :label="val.label"
+                  :value="val.value">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="名称" prop="userName">
-              <el-select v-model="formData.userName" style="width: 200px;" clearable filterable placeholder="选择管理员名称"
-                @change="userChange">
-                <el-option v-for="(item, index) in useroption" :key="index" :label="item.name"
-                  :value="item.name"></el-option>
+            <el-form-item label="业务来源" prop="source">
+              <!-- <el-input v-model="formData.source" disabled></el-input> -->
+              <el-select v-model="formData.source" style="width: 200px;" clearable placeholder="请选择业务来源" disabled>
+                <el-option v-for="val in organizationSourceoptions" :key="val.dictValue" :label="val.dictTag"
+                  :value="val.dictValue">
+                </el-option>
               </el-select>
             </el-form-item>
           </el-col>
@@ -69,26 +76,36 @@
               <el-input v-model="formData.proportional" placeholder="请输入抽成比例"></el-input>
             </el-form-item>
           </el-col>
+        </el-row>
+        <div class="info-title" style="padding-top: 0">负责人信息</div>
+        <el-row>
           <el-col :span="12">
-            <el-form-item label="机构等级" prop="comlevel">
-              <el-input v-model="formData.comlevel" disabled></el-input>
+            <el-form-item label="工号" prop="userId">
+              <el-input v-model="formData.userId" disabled></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="业务来源" prop="source">
-              <!-- <el-input v-model="formData.source" disabled></el-input> -->
-              <el-select v-model="formData.source" style="width: 200px;" clearable placeholder="请选择业务来源" disabled>
-                <el-option v-for="val in organizationSourceoptions" :key="val.dictValue" :label="val.dictTag"
-                  :value="val.dictValue">
-                </el-option>
+            <el-form-item label="名称" prop="userName">
+              <el-select v-model="formData.userName" style="width: 200px;" clearable filterable placeholder="选择管理员名称"
+                @change="userChange">
+                <el-option v-for="(item, index) in useroption" :key="index" :label="item.name"
+                  :value="item.name"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
+        </el-row>
+        <div class="info-title" style="padding-top: 0">推荐人信息</div>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="推荐人工号" prop="suggestId">
+              <el-input v-model="formData.suggestId" disabled></el-input>
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
-            <el-form-item label="推荐人" prop="suggestId">
-              <el-select v-model="formData.suggestId" style="width: 200px;" :disabled="isdisabled" @change="suggestChange"
+            <el-form-item label="推荐人姓名" prop="suggestName">
+              <el-select v-model="formData.suggestName" style="width: 200px;" :disabled="isdisabled" @change="suggestChange"
                 clearable placeholder="请选择推荐人">
-                <el-option v-for="val in sysPartnerOption" :key="val.userId" :label="val.userName" :value="val.userId">
+                <el-option v-for="val in sysPartnerOption" :key="val.userId" :label="val.userName" :value="val.userName">
                 </el-option>
               </el-select>
 
@@ -114,6 +131,7 @@ export default {
   },
   data() {
     return {
+      comleveloptions:[],
       isdisabled: false,
       ztreeNodes: [],
       leftSplitWidth: 20,
@@ -249,7 +267,14 @@ export default {
         this.organizationSourceoptions = res.data.ddList;
       }
     });
-
+    let data={
+      columnFilters:{label:{name:"label",value:"comlevel"}}
+    }
+    this.$api.dict.findPage(data).then((res) => {
+      if (res.code == 200) {
+        this.comleveloptions = res.data.content;
+      }
+    });
   },
   methods: {
     findLeftTreeData: function () {
@@ -260,6 +285,7 @@ export default {
     },
     //添加人员
     handleAddButton() {
+      this.isdisabled=false
       if (this.currentTreeNode == null) {
         this.$message.info("请选择所属公司或部门");
         return;
@@ -306,9 +332,9 @@ export default {
       this.findPage();
     },
     suggestChange(e) {
-      this.formData.suggestName = ''
+      this.formData.suggestId = ''
       if (e) {
-        this.formData.suggestName = this.sysPartnerOption.find(val => val.userId == e).userName
+        this.formData.suggestId = this.sysPartnerOption.find(val => val.userId == e).userId
       }
     },
     userChange(val) {
@@ -504,4 +530,10 @@ export default {
   top: 10px;
   text-align: center;
 }
+.info-title {
+  color: #262626;
+  font-size: 18px;
+  padding: 16px 0;
+  font-family: PingFang SC, PingFang SC;
+}
 </style>

+ 3 - 1
src/views/PeopleManage/PcLoginRecord.vue

@@ -19,7 +19,7 @@
           :value="option.code"></el-option>
       </el-select>
       <el-button size="small" type="primary" @click="onSearch">搜索</el-button>
-      <el-button size="small" type="primary" @click="onCircular">圆形定位</el-button>
+      <!-- <el-button size="small" type="primary" @click="onCircular">圆形定位</el-button> -->
       <!-- <el-button size="small" type="primary" @click="map.remove(circle)">删除定位</el-button> -->
     </div>
     <div class="source-window">
@@ -56,6 +56,8 @@
         </el-table-column>
         <el-table-column prop="address" label="地址">
         </el-table-column>
+        <el-table-column prop="operationTime" label="登录时间">
+        </el-table-column>
       </el-table>
       <div class="bottomFixed">
         <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum"

+ 2 - 0
src/views/PeopleManage/UserMap.vue

@@ -56,6 +56,8 @@
         </el-table-column>
         <el-table-column prop="address" label="地址">
         </el-table-column>
+        <el-table-column prop="createTime" label="登录时间">
+        </el-table-column>
       </el-table>
       <div class="bottomFixed">
         <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum"

+ 288 - 0
src/views/Sys/ChannelGrouping.vue

@@ -0,0 +1,288 @@
+<template>
+    <div>
+        <templateTable :formList="formList" :searchData.sync="searchData" :tableConfig="tableConfig" :data="tableData"
+            @getList="getList" :btnGroup="btnGroup" @handleSearchList="handleSearchList" :pagination="page">
+        </templateTable>
+        <el-dialog :title="dialogTitle" width="25%" :visible.sync="dialogVisibleadd">
+            <div class="flex" style="line-height: 50px;">
+                <span>渠道分组名称:</span>
+                <el-input size="small" style="width:220px" v-model="name" placeholder="请输入渠道分组名称"></el-input>
+            </div>
+            <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="25%" :visible.sync="dialogVisible">
+                <el-tree ref="tree" :data="treedata" accordion :props="defaultProps" show-checkbox node-key="id" 
+              :default-checked-keys="treekeys"   @check-change="treechange"  
+              :default-expand-all="expandshow" class="stafftree">
+            </el-tree>
+            <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";
+import templateForm from "@/components/TemplateForm/index.vue";
+
+export default {
+    name: "policyImport",
+    components: { templateTable, templateForm },
+    data() {
+        return {
+            dept: [],
+            name: '',
+            dialogTitle: '新增',
+            rowId: '',
+            dialogVisible: false,
+            dialogVisibleadd: false,
+            labelWidth: '100px',
+            btnGroup: [
+                {
+                    name: '新增',
+                    click: () => this.add()
+                }
+            ],
+            formList: [
+                {
+                    label: "渠道分组名称",
+                    prop: "name",
+                    type: "input",
+                },
+
+            ],
+            searchData: {},
+            page: {
+                pageNum: 1,
+                pageSize: 20,
+                totalSize: 0
+            },
+            tableData: [],
+            tableConfig: {
+                columns: [
+                    {
+                        prop: "name",
+                        label: "渠道分组名称",
+                        type: "text"
+                    },
+                    {
+                        prop: "createTime",
+                        label: "创建时间",
+                        type: "text"
+                    },
+                    {
+                        prop: "updateBy",
+                        label: "操作人",
+                        type: "text"
+                    },
+                ],
+                loading: true,
+                isPaginationShow: true,
+                optBtns: [
+                    {
+                        type: "primary",
+                        label: "授权机构",
+                        click: (row, index) => {
+                            return this.uthorizedAgency(row) 
+                        },
+                    },
+                    {
+                        type: "primary",
+                        label: "修改",
+                        click: (row, index) => {
+                            return this.handleTableUpload(row);
+                        },
+                    },
+                    {
+                        type: "primary",
+                        label: "删除",
+                        click: (row, index) => {
+                            return this.handleTableDatl(row);
+                        },
+                    },
+
+                ],
+            },
+            treedata: [], //授权结构树
+            defaultProps: {
+        //自定义参数
+        children: "children",
+        label: "name",
+      },
+      treekeys: [],
+      expandshow: false,
+        };
+    },
+    created() {
+        this.getList();
+        this.$api.dept.findDeptTree("9", "").then((res) => {
+            this.treedata = res.data;
+            this.setDisabled(this.treedata)
+        });
+    },
+    methods: {
+        uthorizedAgency(row){
+             this.rowId=row.id
+            this.$api.sys
+                        .queryRelationList(row.id)
+                        .then(res => {
+                            if (res.code == 200) {
+                                this.dialogVisible=true
+                                setTimeout(()=>{
+                                    this.dept=res.data
+                                    this.$refs.tree.setCheckedKeys(res.data);
+                                },500)
+                               
+                            } else {
+                                this.$message.error(res.msg);
+                            }
+                        });
+        },
+         //获取选中节点
+    treechange(item, node, self) {
+        if(item.children.length==0){
+            if (node === true) {
+        this.dept.push(item.id)
+
+      } else {
+        let index = this.dept.indexOf(this.dept.filter(e=>e==item.id)[0]);
+        if (index !== -1) {
+            this.dept.splice(index, 1);
+        }
+      }
+        }
+    
+    },
+    //  向有children的节点上增加disabled属性
+    setDisabled(treeData) {
+            if (treeData) {
+                treeData.forEach(item => {
+                    if (!item.deptType || item.deptType!=='D') {
+                        item.disabled = true
+                        this.setDisabled(item.children)
+                    }
+                })
+            }
+ 
+        },
+        // 查询
+        handleSearchList(data) {
+            this.getList(data);
+        },
+        add() {
+            this.dialogVisibleadd = true
+            this.dialogTitle = '新增'
+        },
+        handleTableDatl(row) {
+            this.$confirm("确认删除该条数据吗?", "提示", {
+                type: "warning",
+            })
+                .then(() => {
+                    this.$api.sys
+                        .sysChannelGradeDelete(row.id)
+                        .then(res => {
+                            if (res.code == 200) {
+                                this.getList();
+
+                            } else {
+                                this.$message.error(res.msg);
+                            }
+                        });
+                })
+        },
+        sumbit() {
+            if (this.name) {
+                if (this.dialogTitle == '新增') {
+                    this.$api.sys
+                        .sysChannelGradeGrade({ name: this.name })
+                        .then(res => {
+                            if (res.code == 200) {
+                                this.getList();
+                                this.dialogVisibleadd = false
+                            } else {
+                                this.$message.error(res.msg);
+                            }
+                        });
+                }
+                else {
+                    this.$api.sys
+                        .sysChannelGradeUp(this.rowId, { name: this.name })
+                        .then(res => {
+                            if (res.code == 200) {
+                                this.getList();
+                                this.dialogVisibleadd = false
+
+                            } else {
+                                this.$message.error(res.msg);
+                            }
+                        });
+                }
+            }
+            else {
+                this.$message({
+                    message: '请输入渠道分组名称!',
+                    type: 'warning'
+                });
+            }
+        },
+        //列表数据
+        getList(data) {
+            this.tableConfig.loading = true;
+            this.$api.sys
+                .sysChannelGradePage({ ...data, ...this.page })
+                .then(res => {
+                    if (res.code == 200) {
+                        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
+                        .sysChannelauthorized({ areaIdList: this.dept,id:this.rowId })
+                        .then(res => {
+                            if (res.code == 200) {
+                                this.getList();
+                                this.dialogVisible = false
+
+                            } else {
+                                this.$message.error(res.msg);
+                            }
+                        });
+
+        },
+        handleTableUpload(row) {
+            this.name = row.name
+            this.rowId = row.id
+            this.dialogTitle = '编辑'
+            this.dialogVisibleadd = true
+        },
+    }
+};
+</script>
+<style lang="scss" scoped>
+/deep/{
+    .stafftree {
+ 
+ // 不可全选样式
+ .el-tree-node {
+     .el-checkbox__input.is-disabled {
+         display: none;
+     }
+ }
+ 
+}
+} 
+</style>