Эх сурвалжийг харах

fix: 修改抽奖、开发报价配置-方案管理

wuguojie 1 жил өмнө
parent
commit
eca2bc983a

+ 4 - 0
src/api/index.ts

@@ -22,6 +22,8 @@ import contentApi from "@/api/modules/content.ts";
 // const router = useRouter()
 import router from "@/router"
 import lotteryApi from '@/api/modules/lottery.ts';
+import insuranceApi from '@/api/modules/insurance.ts'
+import projectApi from '@/api/modules/project.ts'
 
 const axiosInstance:ApiInstance = axios.create({
   baseURL: (import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true') ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
@@ -118,5 +120,7 @@ const api = {
   lotteryApi: lotteryApi(axiosInstance),
   contentApi:contentApi(axiosInstance),
   advertisementApi:advertisementApi(axiosInstance),
+  insuranceApi: insuranceApi(axiosInstance),
+  projectApi: projectApi(axiosInstance)
 }
 export default api

+ 46 - 0
src/api/modules/insurance.ts

@@ -0,0 +1,46 @@
+import { ApiInstance } from '../type'
+
+export interface SearchInsurance {
+  pages: number,
+  size: number,
+  username?: string,
+  insCompanyId?: string,
+  quoteStatus?: string,  //  0:启用 1:禁用
+  useStatus?: string, // 0 正常 1 不可用 2 未知
+  userDept?: string
+}
+
+interface FieldsItem {
+  type: string,
+  field: string,
+  label: string,
+  value: string,
+  isEdit: boolean
+}
+export interface AddAgreementAttribution {
+  insCompanyId: string,
+  userDept: string,
+  loginUrl: string,
+  username: string,
+  password: string,
+  fields: FieldsItem[],
+  userAbbr?: string,
+}
+export interface UpdateAgreementAttribution extends AddAgreementAttribution {
+  id: string
+}
+
+const insuranceApi = (axiosInstance: ApiInstance) => ({
+  getAgreementAttributionList: (data: SearchInsurance) => axiosInstance.post('/manager/attribution/getAgreementAttributionList', data), // 列表查询
+  leftList: (data: any) => axiosInstance.get(`/esmInsCompany/gainTopList?type=${data}`), //获取顶级保险公司
+  getDeptTree: (data: { sysCode: string }) => axiosInstance.post('/dept/getDeptTree', data), // 归属
+  addAgreementAttribution: (data: AddAgreementAttribution) => axiosInstance.post('/manager/attribution/addAgreementAttribution', data), // 新增
+  getPtlInsAttributionTemplate: (data: { insCompanyId: string }) => axiosInstance.post('/manager/attributionTemplate/getPtlInsAttributionTemplate', data), // 配置
+  getLoginUrl: (data: { companyId: string }) => axiosInstance.post('/manager/attribution/getLoginUrl', data), // 登录地址
+  getAgreementAttribution: (data: { id: string }) => axiosInstance.post('/manager/attribution/getAgreementAttribution', data), // 详情
+  updateAgreementAttribution: (data: any) => axiosInstance.post('/manager/attribution/updateAgreementAttribution', data), // 编辑
+  enableAgreementAttribution: (data: { ids: string[] }) => axiosInstance.post('/manager/attribution/enableAgreementAttribution', data), // 启用
+  disableAgreementAttribution: (data: { ids: string[] }) => axiosInstance.post('/manager/attribution/disableAgreementAttribution', data), // 禁用
+  deleteAgreementAttribution: (data: { ids: string[] }) => axiosInstance.post('/manager/attribution/deleteAgreementAttribution', data)
+})
+export default insuranceApi

+ 18 - 0
src/api/modules/project.ts

@@ -0,0 +1,18 @@
+import { ApiInstance } from '../type'
+
+export interface GetSchemeList {
+  pages: number,
+  size: number,
+  companyId: string,
+  productId?: string,
+  schemeType?: string,
+  description?: string
+}
+
+const projectApi = (axiosInstance: ApiInstance) => ({
+  getBusinessInsurance: () => axiosInstance.get('/scheme/getBusinessInsurance'),
+  getScheme: () => axiosInstance.get('/scheme/getScheme'),
+  getSchemeList: (data: GetSchemeList) => axiosInstance.post('/scheme/getSchemeList', data)
+})
+
+export default projectApi

+ 188 - 0
src/layouts/components/InsuranceType/index.vue

@@ -0,0 +1,188 @@
+<!--险种选择组件-->
+
+<template>
+  <div class="insurance" :style="[defineStyle]">
+    <div class="insuranceList">
+      <div class="insuranceLeft">
+        <div class="insuranceItem" v-for="(item, index) in insuranceTypeList" @click="handleType(item, index)">
+          <span class="checkIcon" :class="{ 'active': item.checked }">
+            <el-icon><Select /></el-icon>
+          </span>
+          <span>{{ item.kindName }}</span>
+        </div>
+      </div>
+      <el-divider direction="vertical" style="height: 100%;"></el-divider>
+      <div class="insuranceRight" v-show="choiceItem.id === item.id" v-for="(item, index) in insuranceTypeList">
+        <p class="account" :class="{'active': sub.checked}" v-for="sub in item.options" @click="handleSubType(item, sub, index)">{{ sub.label }}</p>
+      </div>
+    </div>
+    <div class="footer" >
+      <el-button plain @click="handleCancel">{{ props.cancelText }}</el-button>
+      <el-button type="primary" @click="handleConfirm">{{ props.confirmText }}</el-button>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import api from '@/api'
+import { ElMessage } from "element-plus";
+
+// props
+const props = withDefaults(
+  defineProps<{
+    width?: string | number,  // 弹框宽度
+    height?: string | number,  // 弹框高度
+    cancelText?: string, // 取消按钮文字
+    confirmText?: string, // 保存按钮文字
+  }>(),
+  {
+    width: 400,
+    height: 300,
+    cancelText: '取消',
+    confirmText: '保存'
+  }
+)
+
+// emits
+const emits = defineEmits(['close'])
+
+// 合并自定义样式
+const defineStyle = {
+  width:`${props.width}px`,
+  height: `${props.height}px`
+}
+
+// 当前选择的险种
+let choiceItem = ref({})
+// 初始化险种数据
+let insuranceTypeList = ref([])
+let typeList = ref([])
+const initInsurance = () => {
+  api.projectApi.getBusinessInsurance().then(res => {
+    if(res.code == 200) {
+      if(res.data&&res.data.length>0) {
+        choiceItem.value = res.data[0]
+        res.data.forEach(item => {
+          item.checked = false
+          item.options.forEach(sub => {
+            sub.checked = false
+          })
+        })
+        insuranceTypeList.value = res.data
+        typeList.value = res.data
+      }
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+// 险种选择
+const handleType = (item, index) => {
+  choiceItem.value = item
+}
+// 投保金额选择
+const handleSubType =( item, sub, index) => {
+  item.options.forEach(a => {
+    a.checked = false
+  })
+  sub.checked = true
+  item.checked = true
+}
+
+// 取消
+const handleCancel = () => {
+  emits('close', [])
+}
+// 保存
+const handleConfirm = () => {
+  let list = [...insuranceTypeList.value]
+  let checkedList = list.filter(a => a.checked)
+  emits('close', checkedList)
+}
+
+// 修改数据
+const initEditData = (data) => {
+  console.log(123, data)
+  nextTick(() => {
+    console.log(456, typeList.value)
+    const result = typeList.value.map(item1 => {
+      const item2 = data.find(item => item.id === item1.id);
+      return item2 || item1; // 如果找到匹配项则替换,否则保留原值
+    });
+    insuranceTypeList.value = [...result]
+    console.log(789, insuranceTypeList.value)
+  })
+}
+
+onMounted(() => {
+  initInsurance()
+})
+
+defineExpose({
+  initEditData
+})
+
+</script>
+
+<style scoped lang="scss">
+.insurance{
+  margin: 0 auto;
+  .insuranceList{
+    height: calc(100% - 40px);
+    overflow: hidden;
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 10px;
+    .insuranceLeft, .insuranceRight{
+      height: 100%;
+      overflow-y: auto;
+    }
+    .insuranceLeft{
+      width: calc(100% - 110px);
+      .insuranceItem{
+        cursor: pointer;
+        display: flex;
+        align-items: center;
+        margin: 10px 0;
+        span{
+          margin-left: 10px;
+        }
+        .checkIcon{
+          width: 14px;
+          height: 14px;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          border: 1px solid #ccc;
+          border-radius: 2px;
+          font-size: 10px;
+          color: #fff;
+        }
+        .active{
+          color: #fff;
+          background: #3994FB;
+          border-color: #3994FB;
+        }
+      }
+    }
+    .insuranceRight{
+      width: 70px;
+      .account{
+        text-align: center;
+        cursor: pointer;
+      }
+      .active{
+        color: #3994FB;
+      }
+    }
+  }
+  .footer{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+}
+</style>

+ 33 - 0
src/router/modules/quoteConfig.ts

@@ -67,6 +67,39 @@ const routes: RouteRecordRaw = {
         title: '保司账号',
         // auth:['role.add','role.view','role.delete','role.edit']
       },
+      children: [
+        {
+          path: 'insuranceAccountAdd',
+          name: 'InsuranceAccountAdd',
+          component: () => import('@/views/quoteConfig/insuranceCompanyAccount/modules/insuranceAccountAdd.vue'),
+          meta: {
+            title: '保司账号',
+            menu:false,
+            auth: []
+          },
+        }
+      ]
+    },
+    {
+      path: 'project',
+      name: 'Project',
+      component: () => import('@/views/quoteConfig/project/index.vue'),
+      meta: {
+        title: '方案管理',
+        // auth:['role.add','role.view','role.delete','role.edit']
+      },
+      children: [
+        {
+          path: 'projectAdd',
+          name: 'ProjectAdd',
+          component: () => import('@/views/quoteConfig/project/modules/projectAdd.vue'),
+          meta: {
+            title: '方案管理',
+            menu:false,
+            auth: []
+          },
+        }
+      ]
     },
   ],
 }

+ 7 - 3
src/views/marketingManagement/configurate.vue

@@ -41,6 +41,7 @@
                         placeholder="请选择"
                         format="YYYY-MM-DD"
                         value-format="YYYY-MM-DD"
+                        :disabled-date="disabledDateStart"
                         style="width: 100%"
                       />
                     </el-form-item>
@@ -53,7 +54,7 @@
                         placeholder="请选择"
                         format="YYYY-MM-DD"
                         value-format="YYYY-MM-DD"
-                        :disabled-date="disabledDate"
+                        :disabled-date="disabledDateEnd"
                         style="width: 100%"
                       />
                     </el-form-item>
@@ -244,8 +245,11 @@ const basicRules = ref<FormRules>({
   ]
 })
 
-const disabledDate = (time: Date) => {
-  return time.getTime() < Date.now()
+const disabledDateStart = (time: Date) => {
+  return time.getTime() < Date.now() - 8.64e7
+}
+const disabledDateEnd = (time: Date) => {
+  return time.getTime() < new Date(basicForm.value.actStartTime) - 8.64e7
 }
 
 let deptData = ref([])

+ 6 - 2
src/views/marketingManagement/lottery.vue

@@ -37,8 +37,12 @@
         </template>
       </el-table-column>
       <el-table-column prop="actDept" label="所属机构" width="300"></el-table-column>
-      <el-table-column prop="f" label="参与范围" width="300"></el-table-column>
-      <el-table-column prop="g" label="参与用户" width="150"></el-table-column>
+      <el-table-column prop="depts" label="参与范围" width="300"></el-table-column>
+      <el-table-column prop="userCount" label="参与用户" width="150">
+        <template #default="scope">
+          {{ scope.row.userCount }}个
+        </template>
+      </el-table-column>
       <el-table-column prop="actStatus" label="状态" width="150">
         <template #default="scope">
           {{ scope.row.actStatus == '1'?'未开始':scope.row.actStatus == '2'?'进行中':scope.row.actStatus == '3'?'已结束':'' }}

+ 572 - 3
src/views/quoteConfig/insuranceCompanyAccount/insuranceCompanyAccount.vue

@@ -1,15 +1,584 @@
 <template>
   <div class="insuranceAccount">
-    <el-form :model="insuranceForm" ref="InsuranceRefs" label-width="100">
-
+    <el-form :model="insuranceForm" ref="InsuranceFormRefs" label-width="70">
+      <el-row :gutter="29">
+        <el-col :span="8">
+          <el-form-item label="账号信息">
+            <el-input v-model="insuranceForm.username" placeholder="输入用户名,简称查找" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="保险公司">
+            <el-select v-model="insuranceForm.insCompanyId" placeholder="请选择" clearable>
+              <el-option v-for="item in bankOption" :key="item.companyCode" :value="item.companyCode" :label="item.name"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="归属">
+            <el-cascader
+              style="width: 100%"
+              v-model="insuranceForm.userDept"
+              placeholder="请选择"
+              :options="deptOption"
+              :props="cascaderProps"
+              clearable
+            ></el-cascader>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="8">
+          <el-form-item label="可用状态">
+            <el-select v-model="insuranceForm.useStatus" placeholder="请选择" clearable>
+              <el-option key="0" label="正常" value="0"></el-option>
+              <el-option key="1" label="不可用" value="1"></el-option>
+              <el-option key="2" label="未知" value="2"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="报价状态">
+            <el-select v-model="insuranceForm.quoteStatus" placeholder="请选择" clearable>
+              <el-option key="0" label="启用" value="0"></el-option>
+              <el-option key="1" label="禁用" value="1"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <div style="display: flex; justify-content: flex-end">
+            <el-button type="primary" @click="search">查询</el-button>
+            <el-button plain @click="reset">重置</el-button>
+          </div>
+        </el-col>
+      </el-row>
     </el-form>
+    <div class="btns">
+      <el-button type="primary" icon="plus" @click="addInsuranceAccount">添加账号</el-button>&nbsp;
+      <el-dropdown @command="batchCommand">
+        <el-button plain>批量管理</el-button>
+        <template #dropdown>
+          <el-dropdown-menu>
+            <el-dropdown-item command="删除">删除</el-dropdown-item>
+            <el-dropdown-item command="启用">启用</el-dropdown-item>
+            <el-dropdown-item command="禁用">禁用</el-dropdown-item>
+            <el-dropdown-item command="账号授权">账号授权</el-dropdown-item>
+          </el-dropdown-menu>
+        </template>
+      </el-dropdown>
+    </div>
+    <el-table
+      :data="tableData"
+      ref="insuranceDataRefs"
+      @selectionChange="tableSelectChange"
+      height="520"
+    >
+      <el-table-column type="selection" width="80"></el-table-column>
+      <el-table-column prop="username" label="账号信息" width="300">
+        <template #default="scope">
+          <div>用户名:{{ scope.row.username }}</div>
+          <div>简称:{{ scope.row.userAbbr }}</div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="insCompanyName" label="保险公司"></el-table-column>
+      <el-table-column prop="url" label="账号登录地址"></el-table-column>
+      <el-table-column prop="deptName" label="归属"></el-table-column>
+      <el-table-column prop="useStatus">
+        <template #header>
+          <div style="display: flex; align-items: center">
+            可用状态&nbsp;
+            <el-tooltip
+              class="box-item"
+              effect="dark"
+              content="<span>使用该账号报价后,保司返回的账号可用结果</br>
+              正常:说明该账号可使用</br>
+              不可用:说明该账号在最近1次的报价时,保司返回的账号状态</br>
+              未知:超过7天未使用该账号报价出单</span>"
+              placement="top-start"
+              raw-content
+            >
+              <el-icon size="14"><QuestionFilled /></el-icon>
+            </el-tooltip>
+          </div>
+        </template>
+        <template #default="scope">
+          <div class="tableState">
+            <span :class="{'state-use': scope.row.useStatus==='0','state-noUse': scope.row.useStatus==='1','state-noKnow': scope.row.useStatus==='2', }"></span>{{ scope.row.useStatus==='0'?'正常':scope.row.useStatus==='1'?'不可用':scope.row.useStatus==='2'?'未知':'' }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="quoteStatus" label="报价状态">
+        <template #default="scope">
+          <div class="tableState">
+            <span :class="{'state-use': scope.row.quoteStatus==='0','state-noUse': scope.row.quoteStatus==='1'}"></span>{{ scope.row.quoteStatus==='0'?'启用':scope.row.quoteStatus==='1'?'禁用':''  }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="userDesc" label="账号描述"></el-table-column>
+      <el-table-column label="操作">
+        <template #default="scope">
+          <div style="display: flex; align-items: center">
+            <el-button link type="primary" @click="editInsuranceAccount(scope.row)">编辑</el-button>
+            <el-dropdown @command="tableDataCommand(scope, $event)">
+              <el-button link type="primary">更多</el-button>
+              <template #dropdown>
+                <el-dropdown-item command="删除">删除</el-dropdown-item>
+                <el-dropdown-item command="启用">启用</el-dropdown-item>
+                <el-dropdown-item command="禁用">禁用</el-dropdown-item>
+                <el-dropdown-item command="账号授权">账号授权</el-dropdown-item>
+              </template>
+            </el-dropdown>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="paginationBox">
+      <el-pagination
+        v-model:current-page="currentPage"
+        v-model:page-size="pageSize"
+        :page-sizes="[10, 20, 30, 40]"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      ></el-pagination>
+    </div>
+    <el-drawer
+      v-model="accreditDrawer"
+      title="账号授权"
+      :size="800"
+    >
+      <el-row :gutter="10" style="height: 100%;">
+        <el-col :span="8" style="height: 100%;">
+          <el-input prefix-icon="search" @keyup.enter="searchInsurance"></el-input>
+          <div class="insuranceItem" v-for="item in insuranceList" :key="item.id">{{ item.name }}</div>
+        </el-col>
+        <el-divider direction="vertical" style="height: 100%;"></el-divider>
+        <el-col :span="15" style="height: 100%;">
+          <el-checkbox @change="insuranceSelectAll">全选</el-checkbox>
+          <el-tree
+            ref="insuranceTreeRefs"
+            :data="insuranceTree"
+            show-checkbox
+            default-expand-all
+            node-key="id"
+          />
+        </el-col>
+      </el-row>
+    </el-drawer>
   </div>
 </template>
 
 <script setup lang="ts">
+import { ElMessage, ElMessageBox } from "element-plus";
+import { useRouter } from 'vue-router'
+import api from '@/api'
+
+const myRouter = useRouter()
+
+let insuranceForm = ref({})
+
+// 列表数据
+let tableData = ref([
+  {
+    id: '111'
+  }
+])
+// 查询
+const search = () => {
+  initData()
+}
+// 重置
+const reset = () => {
+  insuranceForm.value = {}
+  initData()
+}
+// 新增账号
+const addInsuranceAccount = () => {
+  myRouter.push({
+    path: '/quoteConfig/agreement/insuranceCompanyAccount/insuranceAccountAdd',
+  })
+}
+// 编辑账号
+const editInsuranceAccount = (row) => {
+  myRouter.push({
+    path: '/quoteConfig/agreement/insuranceCompanyAccount/insuranceAccountAdd',
+    query: {
+      id: row.id
+    }
+  })
+}
+// 批量操作
+const batchCommand = (e) => {
+  if(selectRows.value.length == 0) {
+    ElMessage({
+      message: '请选择需要操作的数据!',
+      type: 'warning'
+    })
+    return
+  }
+  switch (e) {
+    case '删除':
+      ElMessageBox({
+        title: '确定删除保司账号吗?',
+        message: '保司账号删除后不可恢复,请谨慎操作',
+        type: 'warning',
+        showCancelButton: true,
+        confirmButtonText: '确定删除',
+        cancelButtonText: '取消',
+      }).then((  action ) => {
+        if(action === 'confirm') {
+          api.insuranceApi.deleteAgreementAttribution({ ids: [...selectRows.value] }).then(res => {
+            if(res.code == 200) {
+              initData()
+              ElMessage({
+                message: res.msg,
+                type: 'success'
+              })
+            } else {
+              ElMessage({
+                message: res.msg,
+                type: 'warning'
+              })
+            }
+          })
+        }
+      })
+      break;
+    case '禁用':
+      ElMessageBox({
+        title: '禁用账号',
+        message: '确定要禁用该保司账号吗,禁用后当前租户/机构无法正常使用此账号报价出单',
+        type: 'warning',
+        showCancelButton: true,
+        confirmButtonText: '确定禁用',
+        cancelButtonText: '取消',
+      }).then((  action ) => {
+        if(action === 'confirm') {
+          api.insuranceApi.disableAgreementAttribution({ ids: [...selectRows.value] }).then(res => {
+            if(res.code == 200) {
+              initData()
+              ElMessage({
+                message: res.msg,
+                type: 'success'
+              })
+            } else {
+              ElMessage({
+                message: res.msg,
+                type: 'warning'
+              })
+            }
+          })
+        }
+      })
+      break;
+    case '启用':
+      // 启用的逻辑
+      api.insuranceApi.enableAgreementAttribution({ ids: [...selectRows.value] }).then(res => {
+        if(res.code == 200) {
+          initData()
+          ElMessage({
+            message: res.msg,
+            type: 'success'
+          })
+        } else {
+          ElMessage({
+            message: res.msg,
+            type: 'warning'
+          })
+        }
+      })
+      break;
+    case '账号授权':
+      // 账号授权的逻辑
+      accreditDrawer.value = true
+      break;
+  }
+}
+// 单条数据操作
+const tableDataCommand = (scope, e) => {
+  switch (e) {
+    case '删除':
+      ElMessageBox({
+        title: '确定删除保司账号吗?',
+        message: '保司账号删除后不可恢复,请谨慎操作',
+        type: 'warning',
+        showCancelButton: true,
+        confirmButtonText: '确定删除',
+        cancelButtonText: '取消',
+      }).then((  action ) => {
+        if(action === 'confirm') {
+          api.insuranceApi.deleteAgreementAttribution({ ids: [scope.row.id] }).then(res => {
+            if(res.code == 200) {
+              initData()
+              ElMessage({
+                message: res.msg,
+                type: 'success'
+              })
+            } else {
+              ElMessage({
+                message: res.msg,
+                type: 'warning'
+              })
+            }
+          })
+        }
+      })
+      break;
+    case '禁用':
+      ElMessageBox({
+        title: '禁用账号',
+        message: '确定要禁用该保司账号吗,禁用后当前租户/机构无法正常使用此账号报价出单',
+        type: 'warning',
+        showCancelButton: true,
+        confirmButtonText: '确定禁用',
+        cancelButtonText: '取消',
+      }).then((  action ) => {
+        if(action === 'confirm') {
+          api.insuranceApi.disableAgreementAttribution({ ids: [scope.row.id] }).then(res => {
+            if(res.code == 200) {
+              initData()
+              ElMessage({
+                message: res.msg,
+                type: 'success'
+              })
+            } else {
+              ElMessage({
+                message: res.msg,
+                type: 'warning'
+              })
+            }
+          })
+        }
+      })
+      break;
+    case '启用':
+      api.insuranceApi.enableAgreementAttribution({ ids: [scope.row.id] }).then(res => {
+        if(res.code == 200) {
+          initData()
+          ElMessage({
+            message: res.msg,
+            type: 'success'
+          })
+        } else {
+          ElMessage({
+            message: res.msg,
+            type: 'warning'
+          })
+        }
+      })
+      break;
+    case '账号授权':
+      // 账号授权的逻辑
+      accreditDrawer.value = true
+      break;
+  }
+}
+// 表格多选
+let selectRows = ref([])
+const tableSelectChange = (rows) => {
+  selectRows.value = []
+  if(rows.length>0) {
+    rows.forEach(item => {
+      selectRows.value.push(item.id)
+    })
+  }
+}
+// 分页功能
+let currentPage = ref(0)
+let pageSize = ref(10)
+let total = ref(0)
+
+const handleSizeChange = (size) => {
+  pageSize.value = size
+  initData()
+}
+const handleCurrentChange = (page) => {
+  currentPage.value = page
+  initData()
+}
+
+// 授权
+let accreditDrawer = ref(false)
+let insuranceList = ref([
+  {
+    name: '保司1',
+    id: '1'
+  },{
+    name: '保司2',
+    id: '2'
+  }
+])
+let insuranceTree = ref([
+  {
+    id: 1,
+    label: 'Level one 1',
+    children: [
+      {
+        id: 4,
+        label: 'Level two 1-1',
+        children: [
+          {
+            id: 9,
+            label: 'Level three 1-1-1',
+          },
+          {
+            id: 10,
+            label: 'Level three 1-1-2',
+          },
+        ],
+      },
+    ],
+  },
+  {
+    id: 2,
+    label: 'Level one 2',
+    children: [
+      {
+        id: 5,
+        label: 'Level two 2-1',
+      },
+      {
+        id: 6,
+        label: 'Level two 2-2',
+      },
+    ],
+  },
+  {
+    id: 3,
+    label: 'Level one 3',
+    children: [
+      {
+        id: 7,
+        label: 'Level two 3-1',
+      },
+      {
+        id: 8,
+        label: 'Level two 3-2',
+      },
+    ],
+  }
+])
+const treeProps = {
+
+}
+const searchInsurance = () => {
+
+}
+const insuranceSelectAll = (e) => {
+
+}
+
+// 列表数据初始化
+const initData = () => {
+  api.insuranceApi.getAgreementAttributionList({
+    ...insuranceForm.value,
+    pages: currentPage.value,
+    size: pageSize.value
+  }).then(res => {
+    if(res.code == 200) {
+      tableData.value = res.data.records
+      total.value = res.data.total
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+// 保险公司列表
+let bankOption = ref([])
+const initCompany = () => {
+  api.insuranceApi.leftList('').then(res => {
+    if(res.code == 200) {
+      bankOption.value = res.data
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+
+// 归属
+let deptOption = ref([])
+const cascaderProps = {
+  value: 'id',
+  label: 'name',
+  children: 'children',
+  checkStrictly: true,
+}
+const initDept = () => {
+  api.insuranceApi.getDeptTree({ sysCode: localStorage.getItem('sysCode')}).then(res => {
+    if(res.code == 200) {
+      deptOption.value = res.data
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+
+onMounted(() => {
+  initData()
+  initCompany()
+  initDept()
+})
 
 </script>
 
 <style scoped lang="scss">
-
+.insuranceAccount{
+  width: 100%;
+  height: 100%;
+  background: white;
+  padding: 20px;
+  .btns{
+    margin: 10px 0 20px;
+  }
+  .paginationBox{
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+  }
+  .insuranceItem{
+    padding: 5px 10px;
+    border-radius: 5px;
+    cursor: pointer;
+    margin: 10px 0;
+    &:hover{
+      background: #00a3ec;
+      color: white;
+    }
+  }
+  .tableState{
+    display: flex;
+    align-items: center;
+    .state-use{
+      width: 6px;
+      height: 6px;
+      background: #00a3ec;
+      border-radius: 50%;
+      margin-right: 10px;
+    }
+    .state-noUse{
+      width: 6px;
+      height: 6px;
+      background: red;
+      border-radius: 50%;
+      margin-right: 10px;
+    }
+    .state-noKnow{
+      width: 6px;
+      height: 6px;
+      background: orange;
+      border-radius: 50%;
+      margin-right: 10px;
+    }
+  }
+}
 </style>

+ 299 - 0
src/views/quoteConfig/insuranceCompanyAccount/modules/insuranceAccountAdd.vue

@@ -0,0 +1,299 @@
+<template>
+  <div class="insuranceAccountAdd">
+    <el-form :model="insuranceAccountForm" :rules="insuranceAccountRules" ref="insuranceAccountRefs" label-width="130" style="height: 700px">
+      <el-descriptions title="基本信息">
+        <el-descriptions-item>
+          <template #default>
+            <el-row :gutter="20">
+              <el-col :span="12">
+                <el-form-item label="保险公司" prop="insCompanyId">
+                  <el-select v-model="insuranceAccountForm.insCompanyId" placeholder="请选择" clearable @change="companyChange" filterable>
+                    <el-option v-for="item in bankOption" :key="item.companyCode" :value="item.companyCode" :label="item.name"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="账号归属" prop="userDept">
+                  <el-cascader
+                    style="width: 100%"
+                    v-model="insuranceAccountForm.userDept"
+                    placeholder="请选择"
+                    :options="deptOption"
+                    :props="cascaderProps"
+                    clearable
+                  ></el-cascader>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="账号登录地址" prop="loginUrl">
+                  <el-select v-model="insuranceAccountForm.loginUrl" placeholder="请选择" clearable>
+                    <el-option v-for="item in loginUrlOption" :key="item.id" :label="item.url" :value="item.id"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="用户名" prop="username">
+                  <el-input v-model="insuranceAccountForm.username" placeholder="请填写用户名" clearable></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="密码" prop="password">
+                  <el-input v-model="insuranceAccountForm.password" placeholder="请填写密码" clearable></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="账号简称" prop="userAbbr">
+                  <el-input v-model="insuranceAccountForm.userAbbr" placeholder="请填写账号简称,不设置系统会默认账号简称" clearable></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </template>
+        </el-descriptions-item>
+      </el-descriptions>
+      <el-divider></el-divider>
+      <el-descriptions title="账号配置">
+        <el-descriptions-item>
+          <template #default>
+            <el-row :gutter="20">
+              <el-col :span="12" v-for="item in fielsOption" :key="item.field">
+                <el-form-item :label="item.label" :prop="item.field">
+                  <el-input v-model="insuranceAccountForm[item.field]" placeholder="请填写配置字段"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </template>
+        </el-descriptions-item>
+      </el-descriptions>
+    </el-form>
+    <div class="buts">
+      <el-button plain @click="cancel(insuranceAccountRefs)">取消</el-button>
+      <el-button type="primary" @click="submit(insuranceAccountRefs)">保存</el-button>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { type FormRules, ElMessage, type FormInstance } from 'element-plus'
+import api from '@/api'
+import { useRoute, useRouter } from 'vue-router'
+
+const myRoute = useRoute()
+const myRouter = useRouter()
+
+const insuranceAccountRefs = ref(null)
+
+let insuranceAccountForm = ref({})
+let insuranceAccountRules = ref<FormRules>({
+  insCompanyId: [
+    { required: true, trigger: "change", message: "请选择保险公司"  }
+  ],
+  userDept: [
+    { required: true, trigger: "change", message: "请选择账号归属"  }
+  ],
+  loginUrl: [
+    { required: true, trigger: "change", message: "请选择账号登录地址"  }
+  ],
+  username: [
+    { required: true, trigger: "blur", message: "请填写用户名"  }
+  ],
+  password: [
+    { required: true, trigger: "blur", message: "请填写密码"  }
+  ],
+
+})
+
+// 保险公司列表
+let bankOption = ref([])
+const initCompany = () => {
+  api.insuranceApi.leftList('').then(res => {
+    if(res.code == 200) {
+      bankOption.value = res.data
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+
+// 归属
+let deptOption = ref([])
+const cascaderProps = {
+  value: 'id',
+  label: 'name',
+  children: 'children',
+  checkStrictly: true,
+}
+const initDept = () => {
+  api.insuranceApi.getDeptTree({ sysCode: localStorage.getItem('sysCode')}).then(res => {
+    if(res.code == 200) {
+      deptOption.value = res.data
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+// 获取配置
+const companyChange = (e) => {
+  getPtlInsAttributionTemplate(e, insuranceAccountRefs.value)
+  getLoginUrl(e)
+}
+// 获取登录地址
+let loginUrlOption = ref([])
+const getLoginUrl = (id) => {
+  api.insuranceApi.getLoginUrl({ companyId: id }).then(res => {
+    if(res.code == 200) {
+      loginUrlOption.value = res.data
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+// 配置项
+let fielsOption = ref([])
+const getPtlInsAttributionTemplate = (id, formRef) => {
+  api.insuranceApi.getPtlInsAttributionTemplate({ insCompanyId: id }).then(res => {
+    if(res.code == 200) {
+      if(res.data.fields&&res.data.fields.length>0) {
+        fielsOption.value = res.data.fields
+        res.data.fields.forEach(item => {
+          insuranceAccountRules.value[item.field] = [
+            { required: true, trigger: "blur", message: `请填写${item.label}` }
+          ]
+        })
+        setTimeout(() => {
+          formRef.clearValidate()
+        }, 50)
+      }
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+
+const cancel = (formRef) => {
+  formRef.resetFields()
+}
+const submit = async (formRef) => {
+  if(!formRef) {
+    formRef.resetFields()
+    return
+  }
+  await formRef.validate((valid) => {
+    if(valid) {
+      let formData = {
+        insCompanyId: insuranceAccountForm.value.insCompanyId,
+        userDept: insuranceAccountForm.value.userDept,
+        loginUrl: insuranceAccountForm.value.loginUrl,
+        username: insuranceAccountForm.value.username,
+        password: insuranceAccountForm.value.password,
+        userAbbr: insuranceAccountForm.value.userAbbr,
+        fields: []
+      }
+      formData.userDept = typeof formData.userDept==='string'?formData.userDept:formData.userDept[formData.userDept.length-1]
+      fielsOption.value.forEach(item => {
+        let obj = {...item}
+        obj.value = insuranceAccountForm.value[item.field]
+        formData.fields.push(obj)
+      })
+      if(myRoute.query.id) {
+        api.insuranceApi.updateAgreementAttribution({
+          ...formData,
+          id: myRoute.query.id
+        }).then(res => {
+          if(res.code == 200) {
+            ElMessage({
+              message: res.msg,
+              type: 'success'
+            })
+            myRouter.push({
+              path: '/quoteConfig/agreement/insuranceCompanyAccount'
+            })
+          } else {
+            ElMessage({
+              message: res.msg,
+              type: 'warning'
+            })
+          }
+        })
+      } else {
+        api.insuranceApi.addAgreementAttribution(formData).then(res => {
+          if(res.code == 200) {
+            ElMessage({
+              message: res.msg,
+              type: 'success'
+            })
+            myRouter.push({
+              path: '/quoteConfig/agreement/insuranceCompanyAccount'
+            })
+          } else {
+            ElMessage({
+              message: res.msg,
+              type: 'warning'
+            })
+          }
+        })
+      }
+    }
+  })
+}
+
+// 详情
+const initEditData = () => {
+  if(myRoute.query.id) {
+    api.insuranceApi.getAgreementAttribution({ id: myRoute.query.id }).then(res => {
+      if(res.code == 200) {
+        insuranceAccountForm.value = {...res.data}
+        getPtlInsAttributionTemplate(insuranceAccountForm.value.insCompanyId, insuranceAccountRefs.value)
+        getLoginUrl(insuranceAccountForm.value.insCompanyId)
+        if(res.data.fields.length>0) {
+          res.data.fields.forEach(item => {
+            insuranceAccountForm.value[item.field] = item.value
+          })
+          res.data.fields.forEach(item => {
+            insuranceAccountRules.value[item.field] = [
+              { required: true, trigger: "blur", message: `请填写${item.label}` }
+            ]
+          })
+          fielsOption.value = {...res.data.fields}
+        }
+      } else {
+        ElMessage({
+          message: res.msg,
+          type: 'warning'
+        })
+      }
+    })
+  }
+}
+
+onMounted(() => {
+  initCompany()
+  initDept()
+  initEditData()
+})
+
+</script>
+
+<style scoped lang="scss">
+.insuranceAccountAdd{
+  width: 100%;
+  height: 100%;
+  background: white;
+  padding: 20px;
+  .buts{
+    display: flex;
+    justify-content: center;
+  }
+}
+</style>

+ 204 - 0
src/views/quoteConfig/project/index.vue

@@ -0,0 +1,204 @@
+<template>
+  <div class="project">
+    <el-row :gutter="20" style="height: 100%; padding: 10px">
+      <el-col :span="4">
+        <el-input placeholder="请输入保险公司名称" v-model="company" prefix-icon="search" @keyup.enter="searchCompany"></el-input>
+        <div class="companyList">
+          <div class="companyItem" :class="{'active': companyIndex === index}" v-for="(item, index) in companyOption" @click="companyChose(item, index)">{{ item.nameSimple }}</div>
+        </div>
+      </el-col>
+      <el-col :span="20">
+        <el-row :gutter="20" align="middle">
+          <el-col :span="20">
+            <h4>险种方案配置</h4>
+            <p>配置各家保险公司险种方案套餐,报价时根据规则信息匹配符合报价车辆的保司与保司内的方案</p>
+          </el-col>
+          <el-col :span="4">
+            <el-button icon="plus" type="primary" @click="addProject">添加新方案</el-button>
+          </el-col>
+        </el-row>
+        <el-divider></el-divider>
+        <el-form :model="projectForm" ref="projectRefs">
+          <el-row :gutter="20">
+            <el-col :span="4">
+              <el-form-item label="方案类型">
+                <el-select v-model="projectForm.schemeType" placeholder="请选择">
+                  <el-option key="1" value="1" label="">基础方案</el-option>
+                  <el-option key="2" value="2" label="">自选方案</el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="4">
+              <el-form-item label="险种">
+                <el-select v-model="projectForm.productId" placeholder="请选择">
+                  <el-option key="1" value="1" label="">单交</el-option>
+                  <el-option key="2" value="2" label="">交商</el-option>
+                  <el-option key="3" value="3" label="">交三</el-option>
+                  <el-option key="4" value="4" label="">单三</el-option>
+                  <el-option key="5" value="5" label="">单商</el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="4">
+              <el-form-item>
+                <el-input prefix-icon="search" placeholder="输入规则描述查找" @keyup.enter="search" v-model="projectForm.description"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <el-table
+          :data="tableData"
+          height="600"
+        >
+          <el-table-column label="方案名称" prop="a"></el-table-column>
+          <el-table-column label="方案描述" prop="b"></el-table-column>
+          <el-table-column label="方案类型" prop="c"></el-table-column>
+          <el-table-column label="险种" prop="d"></el-table-column>
+          <el-table-column label="驾意险" prop="e"></el-table-column>
+          <el-table-column label="规则描述" prop="f"></el-table-column>
+          <el-table-column label="操作">
+            <template #default="scope">
+              <el-button link type="primary">编辑</el-button>
+              <el-button link type="primary">删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="paginationBox">
+          <el-pagination
+            v-model:current-page="currentPage"
+            v-model:page-size="pageSize"
+            :page-sizes="[10, 20, 30, 40]"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="total"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+          ></el-pagination>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+import api from '@/api'
+import { ElMessage } from "element-plus";
+import { useRouter, useRoute } from 'vue-router'
+
+const myRouter = useRouter()
+const muRoute = useRoute()
+
+const searchCompany = () => {
+
+}
+let company = ref('')
+const search = () => {
+
+}
+// 保险公司
+let companyOption = ref([])
+let companyIndex = ref(0)
+let companyId = ref('')
+const initCompany = () => {
+  api.insuranceApi.leftList('').then(res => {
+    if(res.code == 200) {
+      companyOption.value = res.data
+      companyId.value = companyOption.value[companyIndex.value].companyCode
+      initData()
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+const companyChose = (item, index) => {
+  companyIndex.value = index
+  companyId.value = item.companyCode
+  initData()
+}
+
+const addProject = () => {
+  myRouter.push({
+    path: '/quoteConfig/agreement/project/projectAdd'
+  })
+}
+
+let projectForm = ref({})
+let tableData = ref([{
+
+}])
+// 分页数据
+let currentPage = ref(0)
+let pageSize = ref(10)
+let total = ref(0)
+const initData = () => {
+  // api.projectApi.getBusinessInsurance().then(res => {
+  //
+  // })
+  // api.projectApi.getScheme().then(res => {
+  //
+  // })
+  api.projectApi.getSchemeList({
+    pages: currentPage.value,
+    size: pageSize.value,
+    companyId: companyId.value,
+    productId: projectForm.value.productId,
+    schemeType: projectForm.value.schemeType,
+    description: projectForm.value.description
+  }).then(res => {
+
+  })
+}
+const handleSizeChange = (size) => {
+  pageSize.value = size
+  initData()
+}
+const handleCurrentChange = (page) => {
+  currentPage.value = page
+  initData()
+}
+
+onMounted(() => {
+  initCompany()
+})
+
+</script>
+
+<style scoped lang="scss">
+.project{
+  width: 100%;
+  height: 100%;
+  background: white;
+  h4,p{
+    margin: 5px 0;
+  }
+  .companyList{
+    height: 700px;
+    overflow-y: auto;
+    margin-top: 20px;
+    .companyItem{
+      padding: 10px;
+      cursor: pointer;
+      margin: 10px 0;
+      width: 100%;
+      overflow: hidden;
+      white-space: nowrap;
+      text-overflow: ellipsis;
+      &:hover{
+        background: #f0f0f0;
+      }
+    }
+    .active{
+      padding: 10px;
+      background: #F0F0F0;
+      color: #00a3ec;
+    }
+  }
+  .paginationBox{
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+  }
+}
+</style>

+ 276 - 0
src/views/quoteConfig/project/modules/projectAdd.vue

@@ -0,0 +1,276 @@
+<template>
+  <div class="projectAdd">
+    <el-form :model="projectAddFrom" :rules="projectAddRules" ref="projectAddRefs">
+      <el-descriptions title="基本信息">
+        <el-descriptions-item>
+          <el-form-item label="保险公司" prop="companyId">
+            <el-select v-model="projectAddFrom.companyId" placeholder="请选择" style="width: 40%">
+              <el-option v-for="item in companyOption" :key="item.id" :value="item.companyCode" :label="item.nameSimple"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="方案类型" prop="schemeType">
+            <el-radio-group v-model="projectAddFrom.schemeType">
+              <el-radio :value="1">基础方案</el-radio>
+              <el-radio :value="2">自选方案</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="险种类型" prop="productId">
+            <el-radio-group v-model="projectAddFrom.productId">
+              <el-radio-button v-for="item in insuranceType" :key="item.id" :value="item.id">{{ item.label }}</el-radio-button>
+            </el-radio-group>
+          </el-form-item>
+          <div style="display: flex;">
+            <span style="width: 10%"><a style="color: red">*</a>规则条件</span>
+            <div class="ruleList">
+              <div class="ruleItem">
+                <el-input placeholder="请填写" style="width: 300px"></el-input>&nbsp;
+                <el-select style="width: 100px">
+                  <el-option key="1" value="1" label="="></el-option>
+                  <el-option key="2" value="2" label=">"></el-option>
+                  <el-option key="3" value="3" label="<"></el-option>
+                </el-select>&nbsp;
+                <el-input placeholder="请填写" style="width: 300px"></el-input>&nbsp;
+                <el-icon><CircleCloseFilled /></el-icon>&nbsp;
+              </div>
+            </div>
+          </div>
+          <el-button style="margin: 10px 10%" plain type="primary" icon="plus">添加条件</el-button>
+          <el-descriptions>
+            <template #title>
+              <div style="display: flex; align-items: center">
+                <span>方案配置</span>
+                <el-button type="primary" icon="plus" style="margin-left: 20px;" @click="addProject">添加新方案</el-button>
+              </div>
+            </template>
+            <el-descriptions-item>
+              <div class="configuration" v-for="(item, index) in projectAddFrom.schemeList">
+                <el-form-item label="方案名称" prop="schemeName">
+                  <el-input v-model="item.schemeName"></el-input>
+                </el-form-item>
+                <el-form-item label="方案描述" prop="description">
+                  <el-input type="textarea" v-model="item.description" maxlength="500"></el-input>
+                </el-form-item>
+                <div>
+                  <div style="display: flex; align-items: center; margin-bottom: 10px">
+                    <span style="margin-right: 20px">驾意险</span>
+                    <el-button link icon="plus" type="primary">选择驾意险</el-button>
+                  </div>
+                  <el-table
+                    :data="projectAddFrom.A"
+                  >
+                    <el-table-column label="名称" prop="a">
+                      <template #default="scope">
+                        <a>名称名称</a>
+                      </template>
+                    </el-table-column>
+                    <el-table-column label="客户端状态" prop="f">
+                      <template #default="scope">
+                        <el-select v-model="projectAddFrom.f">
+                          <el-option label="默认不选中" key="1" value="1"></el-option>
+                          <el-option label="默认选中" key="2" value="2"></el-option>
+                          <el-option label="强制选中" key="3" value="3"></el-option>
+                        </el-select>
+                      </template>
+                    </el-table-column>
+                    <el-table-column label="份数" prop="g">
+                      <el-input v-model="projectAddFrom.g"></el-input>份
+                    </el-table-column>
+                    <el-table-column label="操作">
+                      <template #default="scope">
+                        <el-button link>删除</el-button>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                </div>
+                <div>
+                  <div style="display: flex; align-items: center; margin: 10px 0">
+                    <span style="margin-right: 20px">险种</span>
+                    <el-button link icon="plus" type="primary" @click="handlePopover(item, index)">选择险种</el-button>
+<!--                    <el-popover placement="bottom-end" trigger="click" width="500" v-model:visible="insuranceShow" @show="handlePopover(item)">
+                      <template #reference>
+                        <el-button link icon="plus" type="primary">选择险种</el-button>
+                      </template>
+
+                    </el-popover>-->
+                    <el-dialog
+                      v-model="insuranceShow"
+                      title="选择险种"
+                      width="500"
+                    >
+                      <insurance ref="InsuranceTypeRef" @close="handleClose(item, $event, index)" ></insurance>
+                    </el-dialog>
+                  </div>
+                  <el-table
+                    :data="item.tableData"
+                  >
+                    <el-table-column label="险种" prop="kindName">
+                      <template #default="scope">
+                        <a>{{ scope.row.kindName }}</a>
+                      </template>
+                    </el-table-column>
+                    <el-table-column label="保额" prop="quota">
+                      <template #default="scope">
+                        <el-select v-model="scope.row.quota" style="width: 150px">
+                          <el-option v-for="m in scope.row.options" :label="m.label" :key="m.value" :value="m.value"></el-option>
+                        </el-select>
+                      </template>
+                    </el-table-column>
+                    <el-table-column label="操作">
+                      <template #default="scope">
+                        <el-button link type="primary" @click="insuranceTypeDel(item, scope.row)">删除</el-button>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                </div>
+              </div>
+            </el-descriptions-item>
+          </el-descriptions>
+        </el-descriptions-item>
+      </el-descriptions>
+    </el-form>
+    <div class="btns">
+      <el-button plain @click="quit">取消</el-button>
+      <el-button type="primary" @click="save">保存</el-button>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+
+import api from "@/api";
+import { ElMessage } from "element-plus";
+import insurance from '../../../../layouts/components/InsuranceType/index.vue'
+
+const InsuranceTypeRef = ref(null)
+
+let projectAddFrom = ref({
+  rulesList: [{
+
+  }],
+  schemeList: [{
+    schemeName: '',
+    description: '',
+    tableData: [],
+    schemeInsuranceList: []
+  }]
+})
+let projectAddRules = ref({
+  companyId: [
+    { required: true, trigger: "change", message: "请选择保险公司" }
+  ],
+  schemeType: [
+    { required: true, trigger: "change", message: "请选择方案类型" }
+  ]
+})
+
+// 保险公司
+let companyOption = ref([])
+const initCompany = () => {
+  api.insuranceApi.leftList('').then(res => {
+    if(res.code == 200) {
+      companyOption.value = res.data
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+
+// 新增方案
+const addProject = () => {
+  projectAddFrom.value.schemeList.push({
+    schemeName: '',
+    description: '',
+    tableData: [],
+    schemeInsuranceList: []
+  })
+}
+
+// 险种类型
+let insuranceType = ref([])
+const initType = () => {
+  api.commonApi.personInfo('insurance_type').then(res => {
+    if(res.code == 200) {
+      insuranceType.value = res.data
+      projectAddFrom.value.productId = insuranceType.value[0].id
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+
+// 险种
+let insuranceShow = ref(false)
+// let insuranceList = ref([])
+// let checkInsuranceList = ref([])
+// let checkSubInsuranceList = ref([])
+const handleClose = (item, list, index ) => {
+  if(list && list.length > 0) {
+    list.forEach(a => {
+      let obj = a.options.find(b => b.checked)
+      a.quota = obj.value
+    })
+    item.tableData = list
+  }
+  insuranceShow.value = false
+}
+
+// 险种删除
+const insuranceTypeDel = (item, row) => {
+  let data = item.tableData.filter(a => a.id != row.id)
+  item.tableData = [...data]
+}
+
+const handlePopover = (item, index) => {
+  insuranceShow.value = true
+  nextTick(() => {
+    InsuranceTypeRef.value[index].initEditData(item.tableData)
+  })
+}
+
+// 取消
+const quit = () => {
+
+}
+// 保存
+const save = () => {
+  console.log(123, projectAddFrom.value)
+}
+
+onMounted(() => {
+  initType()
+  initCompany()
+  // initInsurance()
+})
+
+</script>
+
+<style scoped lang="scss">
+.projectAdd{
+  width: 100%;
+  height: 100%;
+  background: white;
+  padding: 20px;
+  .ruleList{
+    width: 90%;
+    .ruleItem{
+      display: flex;
+      align-items: center;
+      justify-content: flex-start;
+      margin: 10px 0;
+    }
+  }
+  .configuration{
+    width: 100%;
+    background: #f0f0f0;
+    padding: 20px 100px;
+    margin-bottom: 10px;
+    border-radius: 5px;
+  }
+}
+</style>