|
|
@@ -0,0 +1,864 @@
|
|
|
+<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.agreementGroupName"
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="是否默认">
|
|
|
+ <el-switch
|
|
|
+ v-model="queryForm.defaultFlag"
|
|
|
+ active-color="#D42426"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
+ :disabled="dialogTitle == '编辑' ? true : false"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </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.description"
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </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="isWatch == true ? '查看协议' : '配置协议'"
|
|
|
+ width="50%"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ >
|
|
|
+ <el-row :gutter="24">
|
|
|
+ <el-col :span="24">
|
|
|
+ <div class="title">协议内容</div>
|
|
|
+ <el-cascader
|
|
|
+ style="width: 30%; margin-bottom: 10px"
|
|
|
+ v-model="insuranceCompanyId"
|
|
|
+ :show-all-levels="false"
|
|
|
+ :options="prodInsurance"
|
|
|
+ :props="optionProps"
|
|
|
+ @change="prodhandleChange"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="请选择保险公司"
|
|
|
+ ></el-cascader>
|
|
|
+ <templateTable
|
|
|
+ ref="productTable"
|
|
|
+ :formList="[]"
|
|
|
+ :tableConfig="productcopyItemColumns"
|
|
|
+ @selectionChange="selectionChange"
|
|
|
+ @selectcurrentRow="selectcurrentRow"
|
|
|
+ :data="productcopyItemResult"
|
|
|
+ @getList="productcopyItemFindPage"
|
|
|
+ @handleSearchList="handleSearchList1"
|
|
|
+ :pagination="productcopypage"
|
|
|
+ v-if="!isWatch"
|
|
|
+ >
|
|
|
+ </templateTable>
|
|
|
+
|
|
|
+ <templateTable
|
|
|
+ ref="productTable"
|
|
|
+ :formList="[]"
|
|
|
+ :tableConfig="watchColumns"
|
|
|
+ :data="productcopyItemResult"
|
|
|
+ @getList="getAgreement"
|
|
|
+ @handleSearchList="watchhandleSearchList1"
|
|
|
+ :pagination="productcopypage"
|
|
|
+ v-else
|
|
|
+ >
|
|
|
+ </templateTable>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button size="small" @click="dialogVisible = false"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" size="small" @click="sumbitInstitution"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="排除部门"
|
|
|
+ :visible.sync="excludedialogVisible"
|
|
|
+ width="70%"
|
|
|
+ top="8vh"
|
|
|
+ class="scrollable-dialog"
|
|
|
+ @close="excludecloseDialog"
|
|
|
+ >
|
|
|
+ <el-tree
|
|
|
+ default-expand-all
|
|
|
+ ref="tree"
|
|
|
+ show-checkbox
|
|
|
+ :data="treeData"
|
|
|
+ node-key="id"
|
|
|
+ :props="defaultTreeProps"
|
|
|
+ :default-checked-keys="treekeys"
|
|
|
+ @check="treechange"
|
|
|
+ v-loading="treeLoading"
|
|
|
+ class="tree-load"
|
|
|
+ ></el-tree>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="excludedialogVisible = false"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ :disabled="disabledBtn"
|
|
|
+ @click="excludeSubmit"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+ <script>
|
|
|
+import templateTable from "@/components/TemplateTable/index.vue";
|
|
|
+import ProductCostForm from "@/components/Form/ProductCostForm.vue"; //表单组件
|
|
|
+import { Loading } from "element-ui";
|
|
|
+export default {
|
|
|
+ name: "ChannelCost",
|
|
|
+ components: { templateTable, ProductCostForm },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ prodInsurance: [],
|
|
|
+ productCostAddVehicleFactorVisible: false, //详情弹窗显示
|
|
|
+ activeName: "feiyong",
|
|
|
+ tabtitle: "",
|
|
|
+
|
|
|
+ overSize: "small",
|
|
|
+ productCostAddDialogType: "add",
|
|
|
+ permissions: null,
|
|
|
+ dynamicFormArray: [],
|
|
|
+ operatorlist: [],
|
|
|
+ //操作符字典
|
|
|
+ operator: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ columnFilters: {
|
|
|
+ label: { name: "label", value: "agreement_operator" },
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ dept: "",
|
|
|
+ queryForm: {
|
|
|
+ agreementGroupName: "",
|
|
|
+ defaultFlag: 0,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ dialogTitle: "新增",
|
|
|
+ rowId: "",
|
|
|
+ dialogVisible: false,
|
|
|
+ dialogVisibleadd: false,
|
|
|
+ labelWidth: "100px",
|
|
|
+ btnGroup: [
|
|
|
+ {
|
|
|
+ name: "新增",
|
|
|
+ click: () => this.add(),
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ formList: [
|
|
|
+ {
|
|
|
+ label: "协议组名称",
|
|
|
+ prop: "agreementGroupName",
|
|
|
+ type: "input",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+
|
|
|
+ searchData: {},
|
|
|
+ page: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ totalSize: 0,
|
|
|
+ },
|
|
|
+ productcopypage: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ totalSize: 0,
|
|
|
+ },
|
|
|
+ tableData: [],
|
|
|
+ tableConfig: {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: "agreementGroupName",
|
|
|
+ label: "协议组",
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "description",
|
|
|
+ label: "描述",
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "defaultFlag",
|
|
|
+ label: "是否默认",
|
|
|
+ type: "flag",
|
|
|
+ // formatter: this.defaultFlagFormatter,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ expand: false,
|
|
|
+ loading: true,
|
|
|
+ isPaginationShow: true,
|
|
|
+ optBtns: [
|
|
|
+ {
|
|
|
+ type: "primary",
|
|
|
+ label: "配置协议",
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.setFees(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "primary",
|
|
|
+ label: "查看协议",
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.watchAgreement(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "primary",
|
|
|
+ label: "授权",
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.excludeDepartment(row);
|
|
|
+ },
|
|
|
+ hide: (row) => {
|
|
|
+ return row.defaultFlag != 1;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "primary",
|
|
|
+ label: "编辑",
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.handleTableUpload(row);
|
|
|
+ },
|
|
|
+ hide: (row) => {
|
|
|
+ return row.defaultFlag != 1;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "primary",
|
|
|
+ label: "删除",
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.handleTableDatl(row);
|
|
|
+ },
|
|
|
+ hide: (row) => {
|
|
|
+ return row.defaultFlag != 1;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ productcopyItemColumns: {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: "companyName",
|
|
|
+ label: "保险公司名称",
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "agreementId",
|
|
|
+ label: "协议ID",
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "agreementName",
|
|
|
+ label: "协议名称",
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+
|
|
|
+ loading: true,
|
|
|
+ isPaginationShow: true,
|
|
|
+ isCheckBox: true,
|
|
|
+ tableHeight: "600px",
|
|
|
+ },
|
|
|
+ watchColumns: {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: "companyName",
|
|
|
+ label: "保险公司名称",
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "agreementId",
|
|
|
+ label: "协议ID",
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "agreementName",
|
|
|
+ label: "协议名称",
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "disableFlag",
|
|
|
+ label: "是否启用",
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "effectiveFlag",
|
|
|
+ label: "是否有效",
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ optBtns: [
|
|
|
+ {
|
|
|
+ type: "danger",
|
|
|
+ label: "删除",
|
|
|
+ width: 60,
|
|
|
+ // hide:(row) => {
|
|
|
+ // return row.importStatus == 1?true:false
|
|
|
+ // },
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.deleteAgreement(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+
|
|
|
+ loading: true,
|
|
|
+ isPaginationShow: true,
|
|
|
+ isCheckBox: false,
|
|
|
+ tableHeight: "600px",
|
|
|
+ },
|
|
|
+ selectedProtocol: {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: "agreementName",
|
|
|
+ label: "协议组名称",
|
|
|
+ width: 100,
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "costsDescription",
|
|
|
+ label: "描述",
|
|
|
+ width: 110,
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ optBtns: [
|
|
|
+ {
|
|
|
+ type: "primary",
|
|
|
+ label: "详情",
|
|
|
+ width: 60,
|
|
|
+ // hide:(row) => {
|
|
|
+ // return row.importStatus == 1?true:false
|
|
|
+ // },
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.details(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ loading: true,
|
|
|
+ isPaginationShow: true,
|
|
|
+ // isCheckBox: true,
|
|
|
+ tableHeight: "600px",
|
|
|
+ },
|
|
|
+
|
|
|
+ productcopyItemResult: [],
|
|
|
+ updateChildTable: false,
|
|
|
+ costIdList: [],
|
|
|
+ treeData: [], //左侧结构树
|
|
|
+ defaultProps: {
|
|
|
+ //自定义参数
|
|
|
+ children: "agreementList",
|
|
|
+ label: "name",
|
|
|
+ },
|
|
|
+ treekeys: [],
|
|
|
+ expandshow: false,
|
|
|
+ agreementList: [], //左侧树查询参数
|
|
|
+ rightList: [], //右侧列表
|
|
|
+ optionProps: {
|
|
|
+ //公司下拉列表配置
|
|
|
+ checkStrictly: true,
|
|
|
+ value: "id",
|
|
|
+ label: "name",
|
|
|
+ children: "children",
|
|
|
+ },
|
|
|
+ agreementsHistoryInfo: {
|
|
|
+ agreement: {},
|
|
|
+ attributionform: {},
|
|
|
+ dept: [],
|
|
|
+ },
|
|
|
+ defaultTreeProps: {
|
|
|
+ children: "children",
|
|
|
+ label: "name",
|
|
|
+ },
|
|
|
+ excludedialogVisible: false,
|
|
|
+ taxSourceVo: {
|
|
|
+ insCompanyId: "",
|
|
|
+ agreementTaxExcludeDeptList: [],
|
|
|
+ },
|
|
|
+ disabledBtn: false,
|
|
|
+ insuranceCompanyId: "",
|
|
|
+ defaultFlag: "",
|
|
|
+ isWatch: false,
|
|
|
+ treeLoading: false,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getList();
|
|
|
+
|
|
|
+ let params = {
|
|
|
+ classname: "",
|
|
|
+ type: "1",
|
|
|
+ };
|
|
|
+ this.$api.insCompany.findLeftInsTree(params).then((res) => {
|
|
|
+ this.prodInsurance = res.data;
|
|
|
+ });
|
|
|
+ this.$api.dept.findTree().then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.treeData = res.data;
|
|
|
+ this.treeLoading = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ defaultFlagFormatter(row, column) {
|
|
|
+ let operatorType = row.defaultFlag;
|
|
|
+ if (operatorType) {
|
|
|
+ return "是";
|
|
|
+ } else {
|
|
|
+ return "否";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deleteAgreement(row) {
|
|
|
+ this.$api.agreement
|
|
|
+ .deleteLinkAgreementList({
|
|
|
+ ids: [row.id],
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == "200") {
|
|
|
+ // this.dialogVisible = false;
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ this.getAgreement();
|
|
|
+
|
|
|
+ // this.disabledBtn = false;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ excludecloseDialog() {
|
|
|
+ if (this.treekeys.length) {
|
|
|
+ this.$refs.tree.setCheckedKeys([]);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //授权弹窗
|
|
|
+ async excludeDepartment(row) {
|
|
|
+ // var loadingLoad = Loading.service({
|
|
|
+ // text: "加载中......",
|
|
|
+ // spinner: "el-icon-loading",
|
|
|
+ // // background: "#fff",
|
|
|
+ // target: document.querySelector(".el-tree"),
|
|
|
+ // });
|
|
|
+
|
|
|
+ this.excludedialogVisible = true;
|
|
|
+ this.rowId = row.id;
|
|
|
+ this.$api.agreement
|
|
|
+ .findDeptIdsByPtlAgreementGroupId(row.id)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ // console.log(res);
|
|
|
+ // loadingLoad.close();
|
|
|
+ // this.treeData = res.data;
|
|
|
+ this.treekeys = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //保险公司选择
|
|
|
+ prodhandleChange(value) {
|
|
|
+ this.insuranceCompanyId = value[value.length - 1];
|
|
|
+ this.productcopyItemFindPage();
|
|
|
+ },
|
|
|
+ //弹窗关闭
|
|
|
+ productcloseDialog() {
|
|
|
+ this.productCostAddVehicleFactorVisible = false;
|
|
|
+ for (const key in this.productCostForm) {
|
|
|
+ if (key !== "agreementId" && key !== "costsAttrLinks") {
|
|
|
+ this.productCostForm[key] = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.productCostForm.productId = [];
|
|
|
+ this.productCostForm.productName = [];
|
|
|
+ this.productCostForm.isInquiryNow = "1";
|
|
|
+ },
|
|
|
+
|
|
|
+ //获取选中节点
|
|
|
+ //获取选中节点
|
|
|
+ treechange(data, node) {
|
|
|
+ this.taxSourceVo.agreementTaxExcludeDeptList = [];
|
|
|
+ node.checkedKeys.map((ele) => {
|
|
|
+ // console.log(ele);
|
|
|
+ this.taxSourceVo.agreementTaxExcludeDeptList.push(ele);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //授权部门提交
|
|
|
+ excludeSubmit() {
|
|
|
+ this.disabledBtn = true;
|
|
|
+ this.$api.agreement
|
|
|
+ .authorizeDeptList({
|
|
|
+ ids: this.taxSourceVo.agreementTaxExcludeDeptList,
|
|
|
+ ptlAgreementGroupId: this.rowId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == "200") {
|
|
|
+ this.excludedialogVisible = false;
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ this.disabledBtn = false;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ setFees(row) {
|
|
|
+ this.productcopypage.pageNum = 1;
|
|
|
+ this.productcopypage.pageSize = 10;
|
|
|
+ this.insuranceCompanyId = "";
|
|
|
+ this.rowId = row.id;
|
|
|
+ this.defaultFlag = row.defaultFlag;
|
|
|
+ this.dialogVisible = true;
|
|
|
+ this.isWatch = false;
|
|
|
+ this.productcopyItemFindPage();
|
|
|
+ },
|
|
|
+ async watchAgreement(row) {
|
|
|
+ this.productcopypage.pageNum = 1;
|
|
|
+ this.productcopypage.pageSize = 10;
|
|
|
+ this.insuranceCompanyId = "";
|
|
|
+ this.rowId = row.id;
|
|
|
+ this.defaultFlag = row.defaultFlag;
|
|
|
+ this.dialogVisible = true;
|
|
|
+ this.isWatch = true;
|
|
|
+ this.getAgreement();
|
|
|
+ },
|
|
|
+
|
|
|
+ //配置协议
|
|
|
+ handleSearchList1() {
|
|
|
+ this.productcopyItemFindPage();
|
|
|
+ },
|
|
|
+ //查看配置协议
|
|
|
+ watchhandleSearchList1() {
|
|
|
+ this.getAgreement();
|
|
|
+ },
|
|
|
+ getAgreement() {
|
|
|
+ this.$api.agreement
|
|
|
+ .findLinkAgreementList({
|
|
|
+ ...this.productcopypage,
|
|
|
+
|
|
|
+ companyId: this.insuranceCompanyId,
|
|
|
+ agreementGroupId: this.rowId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ // let productTable = this.$refs.productTable.$refs.table;
|
|
|
+ this.productcopyItemResult = res.data.content;
|
|
|
+ this.productcopypage.pageNum = res.data.pageNum;
|
|
|
+ this.productcopypage.pageSize = res.data.pageSize;
|
|
|
+ this.productcopypage.totalSize = res.data.totalSize;
|
|
|
+ this.watchColumns.loading = false;
|
|
|
+ // this.selectedProtocol.loading = false;
|
|
|
+ } else {
|
|
|
+ this.productcopyItemResult = [];
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ this.productcopypage.totalSize = 0;
|
|
|
+ this.watchColumns.loading = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ selectionChange(val, refs) {
|
|
|
+ this.costIdList = [];
|
|
|
+ this.costIdList = val;
|
|
|
+ },
|
|
|
+ selectcurrentRow(selection, row) {
|
|
|
+ this.hasDuplicates(row, this.rightList);
|
|
|
+ },
|
|
|
+ //勾选添加到右侧
|
|
|
+ hasDuplicates(row, array) {
|
|
|
+ let temp = [];
|
|
|
+ array.forEach((item) => {
|
|
|
+ temp.push(+item.id);
|
|
|
+ });
|
|
|
+ let numId = +row.id;
|
|
|
+ let containsItem = temp.indexOf(numId);
|
|
|
+
|
|
|
+ if (containsItem > -1) {
|
|
|
+ this.rightList = this.rightList.filter(
|
|
|
+ (_, index) => index !== containsItem
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.rightList.push(row);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ productcopyItemFindPage(data) {
|
|
|
+ this.productcopyItemColumns.loading = true;
|
|
|
+ this.$api.agreement
|
|
|
+ .findAgreementList({
|
|
|
+ ...this.productcopypage,
|
|
|
+ defaultFlag: this.defaultFlag,
|
|
|
+ companyId: this.insuranceCompanyId,
|
|
|
+ agreementGroupId: this.rowId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ // let productTable = this.$refs.productTable.$refs.table;
|
|
|
+ this.productcopyItemResult = res.data.content;
|
|
|
+ this.productcopypage.pageNum = res.data.pageNum;
|
|
|
+ this.productcopypage.pageSize = res.data.pageSize;
|
|
|
+ this.productcopypage.totalSize = res.data.totalSize;
|
|
|
+ this.productcopyItemColumns.loading = false;
|
|
|
+ this.selectedProtocol.loading = false;
|
|
|
+ } 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.queryForm = {};
|
|
|
+
|
|
|
+ this.dialogVisibleadd = true;
|
|
|
+ this.dialogTitle = "新增";
|
|
|
+ },
|
|
|
+ handleTableDatl(row) {
|
|
|
+ this.$confirm("确认删除该条数据吗?", "提示", {
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ this.$api.agreement.agreementGroupDelete({ id: row.id }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success(res.msg);
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ sumbit() {
|
|
|
+ if (this.dialogTitle == "新增") {
|
|
|
+ this.$api.agreement
|
|
|
+ .addAgreementGroup({
|
|
|
+ ...this.queryForm,
|
|
|
+ // infos: this.channelFeesData,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.getList();
|
|
|
+ this.$message.success(res.msg);
|
|
|
+ this.dialogVisibleadd = false;
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$api.agreement
|
|
|
+ .addAgreementGroup({
|
|
|
+ ...this.queryForm,
|
|
|
+ // infos: this.queryForm.sysChannelGroupInfos,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.getList();
|
|
|
+ this.$message.success(res.msg);
|
|
|
+ this.dialogVisibleadd = false;
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //列表数据
|
|
|
+ getList(data) {
|
|
|
+ this.tableConfig.loading = true;
|
|
|
+ this.$api.agreement
|
|
|
+ .queryAgreementGroupList({ ...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.agreement
|
|
|
+ // costIdList: this.costIdList.map((val) => val.id),
|
|
|
+ .setAgreementList({
|
|
|
+ agreementList: this.costIdList.map((val) => val.agreementId),
|
|
|
+ agreementGroupId: this.rowId,
|
|
|
+ // id:this.rowId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.getList();
|
|
|
+ this.$message.success(res.msg);
|
|
|
+
|
|
|
+ this.dialogVisible = false;
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleTableUpload(row) {
|
|
|
+ // this.channelFeesData = res.data.sysChannelGroupInfos;
|
|
|
+ this.dialogTitle = "编辑";
|
|
|
+ this.dialogVisibleadd = true;
|
|
|
+ // res.data.enabled += "";
|
|
|
+ this.queryForm = row;
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+ <style lang="scss" scoped>
|
|
|
+/deep/ {
|
|
|
+ .stafftree {
|
|
|
+ // 不可全选样式
|
|
|
+ .el-tree-node {
|
|
|
+ .el-checkbox__input.is-disabled {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .delete {
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.title {
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+.dialog-footer {
|
|
|
+ display: inline-block;
|
|
|
+ width: 100%;
|
|
|
+ text-align: right;
|
|
|
+}
|
|
|
+/deep/ {
|
|
|
+ .scrollable-dialog .el-dialog__body {
|
|
|
+ max-height: 600px;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|