|
|
@@ -0,0 +1,833 @@
|
|
|
+<template>
|
|
|
+ <div class="box">
|
|
|
+ <div class="left">
|
|
|
+ <el-tree
|
|
|
+ ref="tree"
|
|
|
+ :data="treeData"
|
|
|
+ accordion
|
|
|
+ :props="defaultProps"
|
|
|
+ show-checkbox
|
|
|
+ node-key="id"
|
|
|
+ :default-checked-keys="treekeys"
|
|
|
+ @check="treechange"
|
|
|
+ :default-expand-all="expandshow"
|
|
|
+ class="stafftree"
|
|
|
+ >
|
|
|
+ </el-tree>
|
|
|
+ </div>
|
|
|
+ <div class="center">
|
|
|
+ <el-form
|
|
|
+ ref="queryFormRef"
|
|
|
+ :model="queryForm"
|
|
|
+ label-width="120px"
|
|
|
+ class="queryform"
|
|
|
+ >
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="供应商类型">
|
|
|
+ <el-select
|
|
|
+ :size="overSize"
|
|
|
+ v-model="supplierType"
|
|
|
+ placeholder="请选择供应商"
|
|
|
+ clearable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in supplierTypeEnumoptions"
|
|
|
+ :key="index"
|
|
|
+ :label="item.dictTag"
|
|
|
+ :value="item.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="省市区" prop="areaCode">
|
|
|
+ <el-cascader
|
|
|
+ :size="overSize"
|
|
|
+ v-model="queryForm.areaCode"
|
|
|
+ :options="areaOptions"
|
|
|
+ style="width: 100%"
|
|
|
+ :props="{
|
|
|
+ label: 'areaCname',
|
|
|
+ value: 'areaCode',
|
|
|
+ children: 'child',
|
|
|
+ checkStrictly: true,
|
|
|
+ }"
|
|
|
+ clearable
|
|
|
+ ref="area"
|
|
|
+ ></el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="保险公司">
|
|
|
+ <el-cascader
|
|
|
+ v-model="agreement.partnerCompaniesId"
|
|
|
+ :size="overSize"
|
|
|
+ :show-all-levels="false"
|
|
|
+ style="width: 100%"
|
|
|
+ :options="ztreeNodes"
|
|
|
+ :props="optionProps"
|
|
|
+ @change="handleChange"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ ></el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="协议类型">
|
|
|
+ <el-select
|
|
|
+ :size="overSize"
|
|
|
+ v-model="queryForm.agreementType"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="val in agreementTypeoptions"
|
|
|
+ :key="val.dictValue"
|
|
|
+ :label="val.dictTag"
|
|
|
+ :value="val.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="是否外部订单">
|
|
|
+ <el-select
|
|
|
+ :size="overSize"
|
|
|
+ v-model="queryForm.isExternal"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option label="是" :value="1"></el-option>
|
|
|
+ <el-option label="否" :value="0"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="6">
|
|
|
+ <el-form-item label="是否启用">
|
|
|
+ <el-select
|
|
|
+ :size="overSize"
|
|
|
+ v-model="queryForm.validStatus"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option label="禁用" :value="0"></el-option>
|
|
|
+ <el-option label="启用" :value="1"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="审核方式">
|
|
|
+ <el-select
|
|
|
+ :size="overSize"
|
|
|
+ v-model="queryForm.auditType"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择审核方式"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option label="人工审核" :value="1"></el-option>
|
|
|
+ <el-option label="自动审核" :value="2"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="协议有限时间">
|
|
|
+ <el-date-picker
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ v-model="queryForm.agreemenData"
|
|
|
+ style="width: 100%"
|
|
|
+ :size="overSize"
|
|
|
+ type="daterange"
|
|
|
+ align="left"
|
|
|
+ @change="agreemenChange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="录入人">
|
|
|
+ <el-input
|
|
|
+ :size="overSize"
|
|
|
+ clearable
|
|
|
+ v-model.trim="queryForm.creator"
|
|
|
+ placeholder="请输入录入人"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="修改人">
|
|
|
+ <el-input
|
|
|
+ :size="overSize"
|
|
|
+ clearable
|
|
|
+ v-model.trim="queryForm.modifiedName"
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-form-item label="录入时间">
|
|
|
+ <el-date-picker
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ v-model="queryForm.date"
|
|
|
+ style="width: 100%"
|
|
|
+ :size="overSize"
|
|
|
+ type="daterange"
|
|
|
+ align="left"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-form-item label="修改时间">
|
|
|
+ <el-date-picker
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ v-model="queryForm.updateData"
|
|
|
+ style="width: 100%"
|
|
|
+ :size="overSize"
|
|
|
+ type="daterange"
|
|
|
+ align="left"
|
|
|
+ @change="dateUpdateChange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="对接人">
|
|
|
+ <el-input
|
|
|
+ :size="overSize"
|
|
|
+ clearable
|
|
|
+ v-model.trim="queryForm.dockingPerson"
|
|
|
+ placeholder="请输入对接人"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row> </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div
|
|
|
+ style="font-weight: bold; font-size: 15px; color: #242833"
|
|
|
+ class="p-1 flex j-s a-c"
|
|
|
+ >
|
|
|
+ <span> 协议详情 </span>
|
|
|
+ <div>
|
|
|
+ <el-button :size="overSize" type="primary" @click="queryEsmInfo"
|
|
|
+ >查 询
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ :size="overSize"
|
|
|
+ ref="productTable"
|
|
|
+ :data="pageResult"
|
|
|
+ height="580"
|
|
|
+ v-loading="loading"
|
|
|
+ @selection-change="agreementSelectionChange"
|
|
|
+ @current-change="agreementCurrentChange"
|
|
|
+ highlight-current-row
|
|
|
+ stripe
|
|
|
+ :header-cell-style="{
|
|
|
+ background: '#F2F7FC',
|
|
|
+ fontWeight: '700',
|
|
|
+ color: '#606266',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ width="55"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="id"
|
|
|
+ label="编号"
|
|
|
+ width="50"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="agreementCode"
|
|
|
+ label="协议代码"
|
|
|
+ align="center"
|
|
|
+ width="180"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="agreementName"
|
|
|
+ label="协议"
|
|
|
+ align="center"
|
|
|
+ width="300"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span
|
|
|
+ >{{ scope.row.agreementName }} -
|
|
|
+ {{ scope.row.businessDescription }} -
|
|
|
+ {{ scope.row.jobDescription }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="dockingPerson"
|
|
|
+ label="对接人"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="agreementType"
|
|
|
+ label="协议类型"
|
|
|
+ align="center"
|
|
|
+ width="150"
|
|
|
+ :formatter="agreementtypeFormatter"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="startDate"
|
|
|
+ label="协议生效日期"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column prop="isExternal" label="外部订单" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.isExternal == "1" ? "是" : "否" }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="endDate"
|
|
|
+ label="协议失效日期"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="matchType"
|
|
|
+ label="匹配日期类型"
|
|
|
+ align="center"
|
|
|
+ :formatter="matchtypeFormatter"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="moneyTime"
|
|
|
+ label="结算周期"
|
|
|
+ align="center"
|
|
|
+ :formatter="moneytimeFormatter"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column prop="validStatus" label="是否启用" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span
|
|
|
+ :style="{
|
|
|
+ background:
|
|
|
+ scope.row.validStatus == '1'
|
|
|
+ ? 'linear-gradient( 180deg, #66CDBB 0%, #33A08D 100%)'
|
|
|
+ : '#A6A6A6',
|
|
|
+ borderRadius: '4px',
|
|
|
+ padding: '4px 10px',
|
|
|
+ color: '#fff',
|
|
|
+ }"
|
|
|
+ >{{ scope.row.validStatus == 1 ? "启用" : "禁用" }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="validStatus"
|
|
|
+ label="审核方式"
|
|
|
+ align="center"
|
|
|
+ width="100"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span
|
|
|
+ :style="{
|
|
|
+ background:
|
|
|
+ scope.row.auditType == '1'
|
|
|
+ ? 'linear-gradient( 180deg, #66CDBB 0%, #33A08D 100%)'
|
|
|
+ : '#A6A6A6',
|
|
|
+ borderRadius: '4px',
|
|
|
+ padding: '4px 10px',
|
|
|
+ color: '#fff',
|
|
|
+ }"
|
|
|
+ >{{ scope.row.auditType == "1" ? "人工审核" : "自动审核" }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="isValid"
|
|
|
+ label="是否有效"
|
|
|
+ align="center"
|
|
|
+ width="100"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span
|
|
|
+ :style="{
|
|
|
+ background:
|
|
|
+ scope.row.isValid == '1'
|
|
|
+ ? 'linear-gradient( 180deg, #66CDBB 0%, #33A08D 100%)'
|
|
|
+ : '#A6A6A6',
|
|
|
+ borderRadius: '4px',
|
|
|
+ padding: '4px 10px',
|
|
|
+ color: '#fff',
|
|
|
+ }"
|
|
|
+ >{{ scope.row.isValid == "1" ? "有效" : "无效" }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column prop="auditStatus" label="状态" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span :style="'color:' + agreestatusStyle(scope.row.auditStatus)">
|
|
|
+ {{ auditstatusFormatter(scope.row) }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column
|
|
|
+ prop="updateTime"
|
|
|
+ label="修改时间"
|
|
|
+ align="center"
|
|
|
+ :formatter="updatetimeFormatter"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="modifiedName"
|
|
|
+ label="修改人"
|
|
|
+ align="center"
|
|
|
+ width="130"
|
|
|
+ ></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ background
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="pageNum"
|
|
|
+ :page-sizes="[20, 50, 100, 200]"
|
|
|
+ :page-size="pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="totalSize"
|
|
|
+ style="float: right; margin-top: 5px"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ <div class="right">
|
|
|
+ <templateTable
|
|
|
+ ref="productTableSelect"
|
|
|
+ :tableConfig="selectedProtocol"
|
|
|
+ :data="rightList"
|
|
|
+ @getList="getRightPage"
|
|
|
+ >
|
|
|
+ </templateTable>
|
|
|
+ <div class="btn">
|
|
|
+ <el-button :size="overSize" type="primary" @click="saveProtocol"
|
|
|
+ >保 存</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import templateTable from "@/components/TemplateTable/index.vue";
|
|
|
+import CommonUtil from "@/utils/comutil.js";
|
|
|
+import { formatWithSeperator, format } from "@/utils/datetime.js";
|
|
|
+export default {
|
|
|
+ components: { templateTable },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ treeData: [],
|
|
|
+ defaultProps: {
|
|
|
+ //自定义参数
|
|
|
+ children: "children",
|
|
|
+ label: "name",
|
|
|
+ },
|
|
|
+ treekeys: [],
|
|
|
+ expandshow: false,
|
|
|
+ deptId: "",
|
|
|
+ selectedProtocol: {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: "id",
|
|
|
+ label: "编号",
|
|
|
+ width: 50,
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "agreementCode",
|
|
|
+ label: "协议代码",
|
|
|
+ width: 100,
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "name",
|
|
|
+ label: "协议",
|
|
|
+ width: 110,
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ optBtns: [
|
|
|
+ {
|
|
|
+ type: "primary",
|
|
|
+ label: "删除",
|
|
|
+ width: 50,
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.delete(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ loading: true,
|
|
|
+ isPaginationShow: true,
|
|
|
+ // isCheckBox: true,
|
|
|
+ tableHeight: "765px",
|
|
|
+ },
|
|
|
+ rightList: [], //右侧列表,
|
|
|
+
|
|
|
+ queryForm: {
|
|
|
+ // status: "1",
|
|
|
+ startDate: "", //开始时间
|
|
|
+ endDate: "", //结束时间
|
|
|
+ validStatus: 1,
|
|
|
+ auditType: "",
|
|
|
+ },
|
|
|
+ agreement: {
|
|
|
+ agreementAbbreviation: "", //协议简称
|
|
|
+ agreementCode: "", //协议代码
|
|
|
+ agreementName: "", // 协议名称
|
|
|
+ agreementType: "2", //协议类型
|
|
|
+ cooperationChannels: "", //合作渠道
|
|
|
+ dockingPerson: "", //对接人
|
|
|
+ dockingPhone: "", //联系方式(对接人)
|
|
|
+ endDate: "", //协议止期
|
|
|
+ fileId: "", // 附件id
|
|
|
+ insuranceCompanyId: "", //保险公司id
|
|
|
+ matchType: "", //保单日期类型
|
|
|
+ moneyTime: 0, //结算周期
|
|
|
+ moneyType: "", //佣金发放方式
|
|
|
+ startDate: "", //协议起期
|
|
|
+ validStatus: "", //有效状态
|
|
|
+ withTax: "", //含增值税结算
|
|
|
+ partnerCompaniesId: "", //合作公司
|
|
|
+ serialNumber: 0, //序号
|
|
|
+ auditType: "",
|
|
|
+ productsCode: "", //险种匹配
|
|
|
+ },
|
|
|
+ overSize: "small",
|
|
|
+ supplierType: "1", //协议类型
|
|
|
+ supplierTypeEnumoptions: [], //供应商类型
|
|
|
+ areaOptions: [],
|
|
|
+ ztreeNodes: [],
|
|
|
+ optionProps: {
|
|
|
+ //公司下拉列表配置
|
|
|
+ checkStrictly: true,
|
|
|
+ value: "id",
|
|
|
+ label: "name",
|
|
|
+ children: "children",
|
|
|
+ },
|
|
|
+ agreementTypeoptions: [], //协议类型
|
|
|
+ loading: "",
|
|
|
+ pageResult: [],
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ totalSize: null,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getLeftTree();
|
|
|
+ this.getDicType("InsInsuranceKind"); //险种类型
|
|
|
+ this.getDicType("agreementType"); //协议类型
|
|
|
+ this.getDicType("matchType"); //保单日期类型
|
|
|
+ this.getDicType("moneyType"); //佣金发放方式
|
|
|
+ this.getDicType("supplierTypeEnum"); //供应商类型
|
|
|
+ this.getDicType("approvalStatus"); //审批状态
|
|
|
+ this.getDicType("productsType"); //车险产品
|
|
|
+ this.getDicType("natureOfVehicleUse"); //车险产品
|
|
|
+ this.$api.dept.queryTree().then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.areaOptions = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.getPage();
|
|
|
+ this.getRightPage();
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.findLeftTreeData();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //获取左侧结构树
|
|
|
+ getLeftTree(data) {
|
|
|
+ this.$api.dept.findTree().then((res) => {
|
|
|
+ this.treeData = res.data;
|
|
|
+
|
|
|
+ this.setDisabled(this.treeData);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //获取选中节点
|
|
|
+ treechange(data, node, self) {
|
|
|
+ this.$refs.tree.setCheckedKeys([data.id]);
|
|
|
+ this.deptId = data.id;
|
|
|
+ this.getPage();
|
|
|
+ },
|
|
|
+ // 向有children的节点上增加disabled属性
|
|
|
+ setDisabled(treeData) {
|
|
|
+ if (treeData) {
|
|
|
+ treeData.forEach((item) => {
|
|
|
+ if (
|
|
|
+ !item.deptType ||
|
|
|
+ item.deptType !== "D" ||
|
|
|
+ !item.id.includes("M")
|
|
|
+ ) {
|
|
|
+ item.disabled = true;
|
|
|
+ this.setDisabled(item.children);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //获取中间列表
|
|
|
+ getPage() {
|
|
|
+ let areaCode = "";
|
|
|
+ if (this.queryForm.areaCode && this.queryForm.areaCode.length > 0) {
|
|
|
+ this.queryForm.level = this.$refs["area"].getCheckedNodes()[0].level;
|
|
|
+ areaCode = this.queryForm.areaCode[this.queryForm.areaCode.length - 1];
|
|
|
+ } else {
|
|
|
+ this.queryForm.areaCode = "";
|
|
|
+ this.queryForm.level = "";
|
|
|
+ }
|
|
|
+
|
|
|
+ let data = {
|
|
|
+ deptId: this.deptId,
|
|
|
+ pageNum: this.pageNum,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ partnerCompaniesId: this.agreement.partnerCompaniesId,
|
|
|
+ companiesType: this.supplierType,
|
|
|
+ startDate: this.queryForm.startDate,
|
|
|
+ endDate: this.queryForm.endDate,
|
|
|
+ validStatus: this.queryForm.validStatus,
|
|
|
+ ...this.queryForm,
|
|
|
+ areaCode,
|
|
|
+ };
|
|
|
+ // data.pageNum = this.pageNum,
|
|
|
+ this.$api.insCompany.agreement(data).then((res) => {
|
|
|
+ let productTable = this.$refs.productTable;
|
|
|
+ this.pageResult = res.data.content;
|
|
|
+ this.pageNum = res.data.pageNum;
|
|
|
+ this.pageSize = res.data.pageSize;
|
|
|
+ this.totalSize = res.data.totalSize;
|
|
|
+ // this.treeData = res.data;
|
|
|
+ // this.setDisabled(this.treeData);
|
|
|
+
|
|
|
+ this.pageResult.forEach((item) => {
|
|
|
+
|
|
|
+ if (item.check) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ productTable.toggleRowSelection(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.getRightPage();
|
|
|
+ },
|
|
|
+ //获取右侧列表
|
|
|
+ getRightPage() {
|
|
|
+ let deptId = this.deptId;
|
|
|
+ this.$api.insCompany.addOrUpdateAll(deptId).then((res) => {
|
|
|
+ this.rightList = res.data;
|
|
|
+ this.selectedProtocol.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //右侧删除
|
|
|
+ delete(row) {
|
|
|
+ this.rightList = this.rightList.filter((item) => item.id !== row.id);
|
|
|
+ },
|
|
|
+ //保存
|
|
|
+ saveProtocol() {
|
|
|
+ if (this.deptId == "") {
|
|
|
+ this.$message({
|
|
|
+ message: "请选择部门",
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ deptId: this.deptId,
|
|
|
+ agreementIds: this.rightList.map((item) => item.id),
|
|
|
+ };
|
|
|
+ this.$api.insCompany.agreementRelation(data).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: "保存成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.deptId = ''
|
|
|
+ this.getPage()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 选择合作公司Start
|
|
|
+ handleChange(value, selectedData) {
|
|
|
+ if (!value) {
|
|
|
+ //没数
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.agreement.partnerCompaniesId = value[value.length - 1];
|
|
|
+ this.agreement.insuranceCompanyId = value[0];
|
|
|
+ if (this.supplierType == "1") {
|
|
|
+ this.agreement.agreementType = "1";
|
|
|
+ } else if (this.supplierType == "0") {
|
|
|
+ this.agreement.agreementType = "2";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ agreemenChange(e) {
|
|
|
+ if (e == null) {
|
|
|
+ this.queryForm.agreementStartDate = ''
|
|
|
+ this.queryForm.agreementEndDate = ''
|
|
|
+ } else {
|
|
|
+ this.queryForm.agreementStartDate = e[0];
|
|
|
+ this.queryForm.agreementEndDate = e[1];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ dateUpdateChange(e) {
|
|
|
+ if (e == null) {
|
|
|
+ this.queryForm.updateStarTime = ''
|
|
|
+ this.queryForm.updateEndTime = ''
|
|
|
+ } else {
|
|
|
+ this.queryForm.updateStarTime = e[0];
|
|
|
+ this.queryForm.updateEndTime = e[1];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //通过查询条件查询分页数据Start
|
|
|
+ queryEsmInfo() {
|
|
|
+ if (this.queryForm.date != null) {
|
|
|
+ this.queryForm.startDate = this.queryForm.date[0];
|
|
|
+ this.queryForm.endDate = this.queryForm.date[1];
|
|
|
+ } else {
|
|
|
+ this.queryForm.startDate = "";
|
|
|
+ this.queryForm.endDate = "";
|
|
|
+ }
|
|
|
+ this.pageNum = 1;
|
|
|
+ this.getPage();
|
|
|
+ },
|
|
|
+ //像右侧添加
|
|
|
+ agreementSelectionChange(val) {
|
|
|
+ let temp = [];
|
|
|
+ val.forEach((res) => {
|
|
|
+ temp.push({
|
|
|
+ id: res.id,
|
|
|
+ agreementCode: res.agreementCode,
|
|
|
+ name:
|
|
|
+ res.agreementName +
|
|
|
+ "-" +
|
|
|
+ res.businessDescription +
|
|
|
+ "-" +
|
|
|
+ res.jobDescription,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.rightList = [...new Set(temp)];
|
|
|
+ },
|
|
|
+ agreementCurrentChange(val) {
|
|
|
+ this.agreementActiveInfo = val;
|
|
|
+ },
|
|
|
+ agreementtypeFormatter(row, column) {
|
|
|
+ //协议类型
|
|
|
+ let agreementType = row.agreementType;
|
|
|
+ return CommonUtil.getDataName({
|
|
|
+ dataList: this.agreementTypeoptions,
|
|
|
+ value: "dictValue",
|
|
|
+ label: "dictTag",
|
|
|
+ data: agreementType,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ matchtypeFormatter(row, column) {
|
|
|
+ //匹配日期类型
|
|
|
+ let matchType = row.matchType;
|
|
|
+ return CommonUtil.getDataName({
|
|
|
+ dataList: this.matchTypeoptions,
|
|
|
+ value: "dictValue",
|
|
|
+ label: "dictTag",
|
|
|
+ data: matchType,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ moneytimeFormatter(row, column) {
|
|
|
+ //结算周期
|
|
|
+ return "T+" + row.moneyTime;
|
|
|
+ },
|
|
|
+ updatetimeFormatter(row, column) {
|
|
|
+ let updateTime = row.updateTime;
|
|
|
+ return format(updateTime);
|
|
|
+ },
|
|
|
+ //分页条数
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.pageSize = val;
|
|
|
+ this.pageNum = 1;
|
|
|
+ this.getPage();
|
|
|
+ },
|
|
|
+ //分页页数
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.pageNum = val;
|
|
|
+ this.getPage();
|
|
|
+ },
|
|
|
+ //--数据字典 begin --
|
|
|
+ getDicType(type) {
|
|
|
+ this.$api.insCompany.dicType(type).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this[type + "options"] = res.data.ddList;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //--数据字典 end --
|
|
|
+ // 获取树数据
|
|
|
+ findLeftTreeData: function () {
|
|
|
+ let params = {
|
|
|
+ classname: "",
|
|
|
+ type: this.supplierType,
|
|
|
+ };
|
|
|
+ this.$api.insCompany.findLeftInsTree(params).then((res) => {
|
|
|
+ this.ztreeNodes = res.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.box {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ .left {
|
|
|
+ width: 15%;
|
|
|
+ height: 100%;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+ .center {
|
|
|
+ width: 65%;
|
|
|
+ height: 100%;
|
|
|
+ margin: 0px 5px;
|
|
|
+ }
|
|
|
+ .right {
|
|
|
+ width: 20%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .btn {
|
|
|
+ width: 100%;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+/deep/ {
|
|
|
+ .stafftree {
|
|
|
+ .el-tree-node {
|
|
|
+ .el-checkbox__input.is-disabled {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-form-item {
|
|
|
+ margin-bottom: 5px !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|