祁鹏飞 hace 5 meses
padre
commit
024f58cbdd

+ 2 - 0
src/api/index.ts

@@ -15,6 +15,7 @@ import areaApi from "./modules/area"
 import operationApi from './modules/operation.ts'
 import menuApi from './modules/menu.ts'
 import commonApi from "./modules/common.ts";
+import dictApi from '@/api/modules/dict'
 import teamApi from "@/api/modules/team.ts";
 
 import advertisementApi from "@/api/modules/advertisement.ts"
@@ -151,6 +152,7 @@ const api = {
   saleApi: saleApi(axiosInstance),
   dispatchApi: dispatchApi(axiosInstance),
   companySortApi: companySortApi(axiosInstance),
+  dictApi: dictApi(axiosInstance),
   homeApi: homeApi(axiosInstance)
 }
 export default api

+ 59 - 0
src/api/modules/dict.ts

@@ -0,0 +1,59 @@
+import { ApiInstance } from '../type'
+
+// 字典实体(与后端 SysDictVo 对应)
+export interface SysDictVo {
+  id?: string
+  typeId?: string
+  typeCode?: string
+  parentValue?: string
+  value?: string
+  label?: string
+  description?: string
+  sort?: string
+  remarks?: string
+  child?: SysDictVo[]
+  // 前端扩展字段
+  isEditing?: boolean
+  tempLabel?: string
+}
+
+// 添加字典参数
+export interface AddDictParams {
+  typeId?: string       // 类型ID
+  typeCode?: string     // 类型编码
+  parentValue?: string  // 父级value
+  value: string         // 字典值(编码)
+  label: string         // 字典标签(名称)
+  description?: string  // 描述
+  sort?: string         // 排序
+  remarks?: string      // 备注
+}
+
+// 更新字典参数(所有字段可选,但必须传id)
+export interface UpdateDictParams {
+  id: string
+  typeId?: string
+  typeCode?: string
+  parentValue?: string
+  value?: string
+  label?: string
+  description?: string
+  sort?: string
+  remarks?: string
+}
+
+const dictApi = (axiosInstance: ApiInstance) => ({
+  // 树级查询列表
+  queryTree: () => axiosInstance.post('/dict/queryTree'),
+
+  // 添加字典
+  addDict: (data: AddDictParams) => axiosInstance.post('/dict/addDict', data),
+
+  // 修改字典
+  updateDict: (data: UpdateDictParams) => axiosInstance.post('/dict/updateDict', data),
+
+  // 删除字典
+  deleteDict: (id: string) => axiosInstance.post('/dict/deleteDict', { id })
+})
+
+export default dictApi

+ 207 - 122
src/views/additionalOrder/additional/index.vue

@@ -503,7 +503,8 @@
                               </el-col>
                               <el-col class="col-m-b-6" :span="8">
                                   <el-form-item label="车主姓名" prop="name1">
-                                      <el-input v-model="additionalForm.name1" placeholder="输入车主姓名"></el-input>
+                                      <el-input v-model="additionalForm.name1"
+                                      @change="additionalForm.taxpayerIdentifier==='01'? additionalForm.taxpayerName=additionalForm.name1:''" placeholder="输入车主姓名"></el-input>
                                   </el-form-item>
                               </el-col>
                               <el-col class="col-m-b-6" :span="8">
@@ -519,7 +520,9 @@
                               </el-col>
                               <el-col v-if="additionalForm.personType1 === '1'" class="col-m-b-6" :span="8">
                                   <el-form-item label="证件号码" prop="identifyNumber1">
-                                      <el-input v-model="additionalForm.identifyNumber1" placeholder="请输入证件号码" @change="getAgeByIdCard($event, additionalForm)"></el-input>
+                                      <el-input v-model="additionalForm.identifyNumber1"
+                                      @blur="additionalForm.taxpayerIdentifier==='01'? additionalForm.identifyNumber=additionalForm.identifyNumber1:''"
+                                       placeholder="请输入证件号码" @change="getAgeByIdCard($event, additionalForm)"></el-input>
                                   </el-form-item>
                               </el-col>
                               <el-col v-else class="col-m-b-6" :span="8">
@@ -623,7 +626,9 @@
                       </el-col>
                       <el-col class="col-m-b-6" :span="6">
                           <el-form-item label="车主姓名" prop="name1">
-                              <el-input v-model="additionalForm.name1" placeholder="输入车主姓名"></el-input>
+                              <el-input v-model="additionalForm.name1"
+                               @change="additionalForm.taxpayerIdentifier==='01'? additionalForm.taxpayerName=additionalForm.name1:''"
+                               placeholder="输入车主姓名"></el-input>
                           </el-form-item>
                       </el-col>
                       <el-col class="col-m-b-6" :span="6">
@@ -643,7 +648,9 @@
 
                       <el-col v-if="additionalForm.personType1 === '1'" class="col-m-b-6" :span="6">
                           <el-form-item class="white-m-p24" label="证件号码" prop="identifyNumber1">
-                              <el-input v-model="additionalForm.identifyNumber1" placeholder="请输入证件号码" @change="getAgeByIdCard($event, additionalForm)"></el-input>
+                              <el-input v-model="additionalForm.identifyNumber1"
+                               @blur="additionalForm.taxpayerIdentifier==='01'? additionalForm.identifyNumber=additionalForm.identifyNumber1:''"
+                               placeholder="请输入证件号码" @change="getAgeByIdCard($event, additionalForm);"></el-input>
                           </el-form-item>
                       </el-col>
                       <el-col v-else class="col-m-b-6" :span="6">
@@ -1231,12 +1238,9 @@
                           </el-form-item>
                           <el-row :gutter="20">
                               <el-col v-if="additionalForm.taxRelifFlag === '1'" :span="6">
-                                  <el-form-item v-if="additionalForm.personType === '1'" label="身份证号" prop="identifyNumber">
-                                      <el-input v-model="additionalForm.identifyNumber" placeholder="请输入身份证号"></el-input>
-                                  </el-form-item>
-                                  <el-form-item v-else label="纳税人识别号" prop="organizationCode">
-                                      <el-input v-model="additionalForm.organizationCode" placeholder="请输入纳税人识别号"></el-input>
-                                  </el-form-item>
+                                <el-form-item label="纳税人识别号" prop="identifyNumber">
+                                  <el-input v-model="additionalForm.identifyNumber" placeholder="请输入纳税人识别号"></el-input>
+                                </el-form-item>
                               </el-col>
                               <el-col v-if="additionalForm.taxRelifFlag === '1'" :span="6">
                                   <el-form-item label="纳税人名称" prop="taxpayerName">
@@ -1381,12 +1385,9 @@
                   <el-row :gutter="20">
                       <el-col :span="24">
                           <el-form-item class="white-m-p24" label="车辆投保信息" prop="transfer">
-                              <el-radio-group v-model="additionalForm.transfer">
-                                  <el-radio value="1">是否过户车</el-radio>
-                                  <el-radio value="2">商业险是否过户</el-radio>
-                                  <!--                    <el-radio value="3">是否脱保</el-radio>
-                                                      <el-radio value="4">是否二手车</el-radio>-->
-                              </el-radio-group>
+
+                              <el-checkbox v-model="additionalForm.transfer" label="是否过户车" />
+                              <el-checkbox v-model="additionalForm.transferBi" label="商业险是否过户" />
                           </el-form-item>
                       </el-col>
                       <el-col :span="6">
@@ -1991,7 +1992,7 @@ let additionalForm = ref({
     identifyNumber: '', // 纳税人识别号
     organizationCode: '', // 企业纳税人识别号
     taxpayerName: '', // 纳税人名称
-    taxpayerIdentifier: '', // 证件类型
+    taxpayerIdentifier: '01', // 证件类型
 
     extendChar2: '', // 减免税凭证号
     relifReason: '', // 减免税原因
@@ -2009,7 +2010,8 @@ let additionalForm = ref({
     syEnd: '', // 商业起保时间止期
 
     //车辆投保信息
-    transfer: null,
+    transferBi: false,
+    transfer: false,
     companyId: '',
     signingTime: '',
     scope: '',
@@ -2275,11 +2277,11 @@ let btns = ref({
     checked: true
   }],
   ower2: [{
-    text: '同保人',
-    checked: true
+    text: '同保人',
+    checked: false
   },{
     text: '同车主',
-    checked: false
+    checked: true
   }]
 })
 const handleChange = (item, type) => {
@@ -2320,7 +2322,7 @@ const handleChange = (item, type) => {
       btns.value.ower2show = btns.value.ower2.some(a => a.checked)
       if(btns.value.ower2show) {
         let obj = btns.value.ower2.find(a => a.checked)
-        if(obj.text === '同保人') {
+        if(obj.text === '同保人') {
             additionalForm.value.personType3 = additionalForm.value.personType2 // 1个人2法人
             additionalForm.value.carOwner3 = 2
             additionalForm.value.name3 = additionalForm.value.name2
@@ -2564,16 +2566,6 @@ const SYChange = (item) => {
   }
 }
 
-//车辆投保信息
-let quoteRules = ref({
-  companyId: [
-    { required: true, message: "请选择保险公司", trigger: "change" }
-  ],
-  signingTime: [
-    { required: true, message: "请选择签单日期", trigger: "change" }
-  ]
-})
-
 // 根据保险公司获取协议
 let agreementList = ref([])
 const handleSelectCompany = (e) => {
@@ -2828,22 +2820,10 @@ const uploadImage = async (file, type) => {
                   additionalForm.value.mobile1 = data.mobile
                   additionalForm.value.addr1 = data.addr
                   additionalForm.value.identifyNumber1 = data.identifyNumber
-                  additionalForm.value.identifyValidDate1 =
-                      data.identifyValidDate.substring(0, 4) +
-                      "-" +
-                      data.identifyValidDate.substring(4, 6) +
-                      "-" +
-                      data.identifyValidDate.substring(6, 8);
-                  additionalForm.value.identifyValidEndDate1 = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                      data.identifyValidEndDate.substring(0, 4) +
-                      "-" +
-                      data.identifyValidEndDate.substring(4, 6) +
-                      "-" +
-                      data.identifyValidEndDate.substring(6, 8):''
                   additionalForm.value.age1 = getAgeByIdCard(data.identifyNumber)
                   additionalForm.value.gender1 = data.identifyIssuedCom
                   additionalForm.value.email1 = data.email
-                  additionalForm.value.organizationCode = data.identifyNumber
+                  additionalForm.value.identifyNumber = data.identifyNumber
                   additionalForm.value.taxpayerName = data.name
                   additionalForm.value.taxpayerIdentifier = data.identifyType
               } else {
@@ -3383,7 +3363,6 @@ const handleInsurance = () => {
   })
 }
 const handleInsuranceSelect = (data) => {
-  console.log("🚀 ~ handleInsuranceSelect ~ data:", data)
   insuranceShow.value = false
   let list = [...data.list]
   if(list && list.length > 0) {
@@ -3407,7 +3386,7 @@ const handleSave = () => {
           realQuoteUserId: realQuoteUserId.value,
           productId: additionalForm.value.productId
       },
-      vehicleAndVesselTax: {},
+      vehicleAndVesselTaxVo : {},
       ciRiskInfoVo: {},
       biRiskInfoVo: {},
       insOrdersOtherInfo: {},
@@ -3440,44 +3419,87 @@ const handleSave = () => {
         registerDate: additionalForm.value.registerDate, // 注册日期
         issueDate: additionalForm.value.issueDate, // 发证日期
         isRegistered: additionalForm.value.isRegistered, // 是否上牌
+        transfer: additionalForm.value.transfer, //
+        transferBi: additionalForm.value.transferBi, //
     }
     obj.ownersInfo = {
-        personType1: additionalForm.value.personType1, // 1个人2法人
-        name1: additionalForm.value.name1,
-        mobile1: additionalForm.value.mobile1,
-        addr1: additionalForm.value.addr1,
-        identifyNumber1: additionalForm.value.identifyNumber1,
-        identifyValidDate1: additionalForm.value.identifyValidDate1,
-        identifyValidEndDate1: additionalForm.value.identifyValidEndDate1,
-        age1: additionalForm.value.age1,
-        gender1: additionalForm.value.gender1,
-        email1: additionalForm.value.email1,
+        personType: additionalForm.value.personType1, // 1个人2法人
+        name: additionalForm.value.name1,
+        mobile: additionalForm.value.mobile1,
+        addr: additionalForm.value.addr1,
+        identifyNumber: additionalForm.value.identifyNumber1,
+        identifyValidDate: additionalForm.value.identifyValidDate1,
+        identifyValidEndDate: additionalForm.value.identifyValidEndDate1,
+        age: additionalForm.value.age1,
+        gender: additionalForm.value.gender1,
+        email: additionalForm.value.email1,
+    }
+    if(btns.value.ower1Show) {
+      additionalForm.value.personType2 = additionalForm.value.personType1 // 1个人2法人
+      additionalForm.value.carOwner2 = 1
+      additionalForm.value.name2 = additionalForm.value.name1
+      additionalForm.value.mobile2 = additionalForm.value.mobile1
+      additionalForm.value.addr2 = additionalForm.value.addr1
+      additionalForm.value.identifyNumber2 = additionalForm.value.identifyNumber1
+      additionalForm.value.identifyValidDate2 = additionalForm.value.identifyValidDate1
+      additionalForm.value.identifyValidEndDate2 = additionalForm.value.identifyValidEndDate1
+      additionalForm.value.age2 = additionalForm.value.age1
+      additionalForm.value.gender2 = additionalForm.value.gender1
+      additionalForm.value.email2 = additionalForm.value.email1
     }
     obj.policyHolderInfo = {
-        personType2: additionalForm.value.personType2, // 1个人2法人
-        name2: additionalForm.value.name2,
-        mobile2: additionalForm.value.mobile2,
-        addr2: additionalForm.value.addr2,
-        identifyNumber2: additionalForm.value.identifyNumber2,
-        identifyValidDate2: additionalForm.value.identifyValidDate2,
-        identifyValidEndDate2: additionalForm.value.identifyValidEndDate2,
-        age2: additionalForm.value.age2,
-        gender2: additionalForm.value.gender2,
-        email2: additionalForm.value.email2,
+        personType: additionalForm.value.personType2, // 1个人2法人
+        name: additionalForm.value.name2,
+        mobile: additionalForm.value.mobile2,
+        addr: additionalForm.value.addr2,
+        identifyNumber: additionalForm.value.identifyNumber2,
+        identifyValidDate: additionalForm.value.identifyValidDate2,
+        identifyValidEndDate: additionalForm.value.identifyValidEndDate2,
+        age: additionalForm.value.age2,
+        gender: additionalForm.value.gender2,
+        email: additionalForm.value.email2,
+    }
+    if(btns.value.ower2show) {
+    let obj = btns.value.ower2.find(a => a.checked)
+    if(obj.text === '同投保人') {
+        additionalForm.value.personType3 = additionalForm.value.personType2 // 1个人2法人
+        additionalForm.value.carOwner3 = 2
+        additionalForm.value.name3 = additionalForm.value.name2
+        additionalForm.value.mobile3 = additionalForm.value.mobile2
+        additionalForm.value.addr3 = additionalForm.value.addr2
+        additionalForm.value.identifyNumber3 = additionalForm.value.identifyNumber2
+        additionalForm.value.identifyValidDate3 = additionalForm.value.identifyValidDate2
+        additionalForm.value.identifyValidEndDate3 = additionalForm.value.identifyValidEndDate2
+        additionalForm.value.age3 = additionalForm.value.age2
+        additionalForm.value.gender3 = additionalForm.value.gender2
+        additionalForm.value.email3 = additionalForm.value.email2
+    } else {
+        additionalForm.value.personType3 = additionalForm.value.personType1 // 1个人2法人
+        additionalForm.value.carOwner3 = 1
+        additionalForm.value.name3 = additionalForm.value.name1
+        additionalForm.value.mobile3 = additionalForm.value.mobile1
+        additionalForm.value.addr3 = additionalForm.value.addr1
+        additionalForm.value.identifyNumber3 = additionalForm.value.identifyNumber1
+        additionalForm.value.identifyValidDate3 = additionalForm.value.identifyValidDate1
+        additionalForm.value.identifyValidEndDate3 = additionalForm.value.identifyValidEndDate1
+        additionalForm.value.age3 = additionalForm.value.age1
+        additionalForm.value.gender3 = additionalForm.value.gender1
+        additionalForm.value.email3 = additionalForm.value.email1
     }
+  }
     obj.insuredPersonInfo = {
-        personType3: additionalForm.value.personType3, // 1个人2法人
-        name3: additionalForm.value.name3,
-        mobile3: additionalForm.value.mobile3,
-        addr3: additionalForm.value.addr3,
-        identifyNumber3: additionalForm.value.identifyNumber3,
-        identifyValidDate3: additionalForm.value.identifyValidDate3,
-        identifyValidEndDate3: additionalForm.value.identifyValidEndDate3,
-        age3: additionalForm.value.age3,
-        gender3: additionalForm.value.gender3,
-        email3: additionalForm.value.email3,
+        personType: additionalForm.value.personType3, // 1个人2法人
+        name: additionalForm.value.name3,
+        mobile: additionalForm.value.mobile3,
+        addr: additionalForm.value.addr3,
+        identifyNumber: additionalForm.value.identifyNumber3,
+        identifyValidDate: additionalForm.value.identifyValidDate3,
+        identifyValidEndDate: additionalForm.value.identifyValidEndDate3,
+        age: additionalForm.value.age3,
+        gender: additionalForm.value.gender3,
+        email: additionalForm.value.email3,
     }
-  obj.vehicleAndVesselTax = {
+  obj.vehicleAndVesselTaxVo  = {
     taxRelifFlag: additionalForm.value.taxRelifFlag,
     identifyNumber: additionalForm.value.identifyNumber,
     organizationCode: additionalForm.value.organizationCode,
@@ -3543,9 +3565,6 @@ const handleSave = () => {
     ]
   }
     obj.insOrdersOtherInfo = {
-        transfer: additionalForm.value.transfer,
-        companyId: additionalForm.value.companyId,
-        signingTime: additionalForm.value.signingTime,
         scope: additionalForm.value.scope,
         taxPremium: additionalForm.value.taxPremium,
         jqApplyNo: additionalForm.value.jqApplyNo,
@@ -3557,6 +3576,11 @@ const handleSave = () => {
         syPremium: additionalForm.value.syPremium,
         sumPremium: additionalForm.value.sumPremium,
     }
+    obj.insOrders={
+    ...obj.insOrders,
+    companyId: additionalForm.value.companyId,
+    signingTime: additionalForm.value.signingTime,
+  }
   obj.insOrdersExternalPolicy = {
     jqPolicy: jqPolicyId.value,
     syPolicy: syPolicyId.value,
@@ -3616,7 +3640,7 @@ const handleSubmit = async (FormRefs) => {
       realQuoteUserId: realQuoteUserId.value,
       productId: additionalForm.value.productId
     },
-    vehicleAndVesselTax: {},
+    vehicleAndVesselTaxVo : {},
     ciRiskInfoVo: {},
     biRiskInfoVo: {},
     insOrdersOtherInfo: {},
@@ -3646,47 +3670,90 @@ const handleSubmit = async (FormRefs) => {
       registerDate: additionalForm.value.registerDate, // 注册日期
       issueDate: additionalForm.value.issueDate, // 发证日期
       isRegistered: additionalForm.value.isRegistered, // 是否上牌
+      transfer: additionalForm.value.transfer, //
+      transferBi: additionalForm.value.transferBi, //
   }
   obj.ownersInfo = {
-      personType1: additionalForm.value.personType1, // 1个人2法人
-      name1: additionalForm.value.name1,
-      mobile1: additionalForm.value.mobile1,
-      addr1: additionalForm.value.addr1,
-      identifyNumber1: additionalForm.value.identifyNumber1,
-      identifyValidDate1: additionalForm.value.identifyValidDate1,
-      identifyValidEndDate1: additionalForm.value.identifyValidEndDate1,
-      age1: additionalForm.value.age1,
-      gender1: additionalForm.value.gender1,
-      email1: additionalForm.value.email1,
+      personType: additionalForm.value.personType1, // 1个人2法人
+      name: additionalForm.value.name1,
+      mobile: additionalForm.value.mobile1,
+      addr: additionalForm.value.addr1,
+      identifyNumber: additionalForm.value.identifyNumber1,
+      identifyValidDate: additionalForm.value.identifyValidDate1,
+      identifyValidEndDate: additionalForm.value.identifyValidEndDate1,
+      age: additionalForm.value.age1,
+      gender: additionalForm.value.gender1,
+      email: additionalForm.value.email1,
+  }
+  if(btns.value.ower1Show) {
+      additionalForm.value.personType2 = additionalForm.value.personType1 // 1个人2法人
+      additionalForm.value.carOwner2 = 1
+      additionalForm.value.name2 = additionalForm.value.name1
+      additionalForm.value.mobile2 = additionalForm.value.mobile1
+      additionalForm.value.addr2 = additionalForm.value.addr1
+      additionalForm.value.identifyNumber2 = additionalForm.value.identifyNumber1
+      additionalForm.value.identifyValidDate2 = additionalForm.value.identifyValidDate1
+      additionalForm.value.identifyValidEndDate2 = additionalForm.value.identifyValidEndDate1
+      additionalForm.value.age2 = additionalForm.value.age1
+      additionalForm.value.gender2 = additionalForm.value.gender1
+      additionalForm.value.email2 = additionalForm.value.email1
   }
   obj.policyHolderInfo = {
-      personType2: additionalForm.value.personType2, // 1个人2法人
-      name2: additionalForm.value.name2,
-      mobile2: additionalForm.value.mobile2,
-      addr2: additionalForm.value.addr2,
-      identifyNumber2: additionalForm.value.identifyNumber2,
-      identifyValidDate2: additionalForm.value.identifyValidDate2,
-      identifyValidEndDate2: additionalForm.value.identifyValidEndDate2,
-      age2: additionalForm.value.age2,
-      gender2: additionalForm.value.gender2,
-      email2: additionalForm.value.email2,
+      personType: additionalForm.value.personType2, // 1个人2法人
+      name: additionalForm.value.name2,
+      mobile: additionalForm.value.mobile2,
+      addr: additionalForm.value.addr2,
+      identifyNumber: additionalForm.value.identifyNumber2,
+      identifyValidDate: additionalForm.value.identifyValidDate2,
+      identifyValidEndDate: additionalForm.value.identifyValidEndDate2,
+      age: additionalForm.value.age2,
+      gender: additionalForm.value.gender2,
+      email: additionalForm.value.email2,
+  }
+  if(btns.value.ower2show) {
+    let obj = btns.value.ower2.find(a => a.checked)
+    if(obj.text === '同投保人') {
+        additionalForm.value.personType3 = additionalForm.value.personType2 // 1个人2法人
+        additionalForm.value.carOwner3 = 2
+        additionalForm.value.name3 = additionalForm.value.name2
+        additionalForm.value.mobile3 = additionalForm.value.mobile2
+        additionalForm.value.addr3 = additionalForm.value.addr2
+        additionalForm.value.identifyNumber3 = additionalForm.value.identifyNumber2
+        additionalForm.value.identifyValidDate3 = additionalForm.value.identifyValidDate2
+        additionalForm.value.identifyValidEndDate3 = additionalForm.value.identifyValidEndDate2
+        additionalForm.value.age3 = additionalForm.value.age2
+        additionalForm.value.gender3 = additionalForm.value.gender2
+        additionalForm.value.email3 = additionalForm.value.email2
+    } else {
+        additionalForm.value.personType3 = additionalForm.value.personType1 // 1个人2法人
+        additionalForm.value.carOwner3 = 1
+        additionalForm.value.name3 = additionalForm.value.name1
+        additionalForm.value.mobile3 = additionalForm.value.mobile1
+        additionalForm.value.addr3 = additionalForm.value.addr1
+        additionalForm.value.identifyNumber3 = additionalForm.value.identifyNumber1
+        additionalForm.value.identifyValidDate3 = additionalForm.value.identifyValidDate1
+        additionalForm.value.identifyValidEndDate3 = additionalForm.value.identifyValidEndDate1
+        additionalForm.value.age3 = additionalForm.value.age1
+        additionalForm.value.gender3 = additionalForm.value.gender1
+        additionalForm.value.email3 = additionalForm.value.email1
+    }
   }
   obj.insuredPersonInfo = {
-      personType3: additionalForm.value.personType3, // 1个人2法人
-      name3: additionalForm.value.name3,
-      mobile3: additionalForm.value.mobile3,
-      addr3: additionalForm.value.addr3,
-      identifyNumber3: additionalForm.value.identifyNumber3,
-      identifyValidDate3: additionalForm.value.identifyValidDate3,
-      identifyValidEndDate3: additionalForm.value.identifyValidEndDate3,
-      age3: additionalForm.value.age3,
-      gender3: additionalForm.value.gender3,
-      email3: additionalForm.value.email3,
+      personType: additionalForm.value.personType3, // 1个人2法人
+      name: additionalForm.value.name3,
+      mobile: additionalForm.value.mobile3,
+      addr: additionalForm.value.addr3,
+      identifyNumber: additionalForm.value.identifyNumber3,
+      identifyValidDate: additionalForm.value.identifyValidDate3,
+      identifyValidEndDate: additionalForm.value.identifyValidEndDate3,
+      age: additionalForm.value.age3,
+      gender: additionalForm.value.gender3,
+      email: additionalForm.value.email3,
   }
   if(detailData.value) {
     obj.insOrders = detailData.value.insOrders
   }
-  obj.vehicleAndVesselTax = {
+  obj.vehicleAndVesselTaxVo  = {
     taxRelifFlag: additionalForm.value.taxRelifFlag,
     identifyNumber: additionalForm.value.identifyNumber,
     organizationCode: additionalForm.value.organizationCode,
@@ -3714,9 +3781,6 @@ const handleSubmit = async (FormRefs) => {
     riskCode: '0510'
   }
   obj.insOrdersOtherInfo = {
-      transfer: additionalForm.value.transfer,
-      companyId: additionalForm.value.companyId,
-      signingTime: additionalForm.value.signingTime,
       scope: additionalForm.value.scope,
       taxPremium: additionalForm.value.taxPremium,
       jqApplyNo: additionalForm.value.jqApplyNo,
@@ -3728,6 +3792,11 @@ const handleSubmit = async (FormRefs) => {
       syPremium: additionalForm.value.syPremium,
       sumPremium: additionalForm.value.sumPremium,
   }
+  obj.insOrders={
+    ...obj.insOrders,
+    companyId: additionalForm.value.companyId,
+    signingTime: additionalForm.value.signingTime,
+  }
   if(fileList.value.length>0) {
     obj.imagesAdds.images = fileList.value
   } else {
@@ -3823,9 +3892,9 @@ const initEditData = () => {
         let obj = {...res.data}
         detailData.value = {...res.data}
 
-          form.value.name = obj.salesmanInfo.name
-          form.value.type = obj.salesmanInfo.name
-          form.value.deptId = obj.salesmanInfo.deptId
+          form.value.name = obj.salesmanInfo?.name
+          form.value.type = obj.salesmanInfo?.name
+          form.value.deptId = obj.salesmanInfo?.deptId
 
           additionalForm.value.licenseNo = obj.carInfoVo.licenseNo
           additionalForm.value.vinNo = obj.carInfoVo.vinNo
@@ -3845,6 +3914,8 @@ const initEditData = () => {
           additionalForm.value.registerDate = obj.carInfoVo.registerDate
           additionalForm.value.issueDate = obj.carInfoVo.issueDate
           additionalForm.value.isRegistered = obj.carInfoVo.isRegistered
+          additionalForm.value.transfer = obj.carInfoVo.transfer
+          additionalForm.value.transferBi = obj.carInfoVo.transferBi
 
           additionalForm.value.personType1 = obj.ownersInfo.personType // 1个人2法人
           // additionalForm.value.carOwner1 = 1
@@ -3887,6 +3958,20 @@ const initEditData = () => {
           additionalForm.value.jqEnd = obj.ciRiskInfoVo?.endDate
           additionalForm.value.syStart = obj.biRiskInfoVo?.startDate
           additionalForm.value.syEnd = obj.biRiskInfoVo?.endDate
+
+          additionalForm.value.identifyNumber = obj.insOrdersTax?.identifyNumber
+          additionalForm.value.taxpayerName = obj.insOrdersTax?.taxpayerName
+          additionalForm.value.extendChar2 = obj.insOrdersTax?.extendChar2
+          additionalForm.value.paidFreeCertificate = obj.insOrdersTax?.paidFreeCertificate
+          additionalForm.value.relifReason = obj.insOrdersTax?.relifReason
+          additionalForm.value.taxComCode = obj.insOrdersTax?.taxComCode
+          additionalForm.value.taxComName = obj.insOrdersTax?.taxComName
+          additionalForm.value.taxDocumentDate = obj.insOrdersTax?.taxDocumentDate
+          additionalForm.value.taxPaidAreaCode = obj.insOrdersTax?.taxPaidAreaCode
+          additionalForm.value.taxRelief = obj.insOrdersTax?.taxRelief
+          additionalForm.value.taxRelifFlag = obj.insOrdersTax?.taxRelifFlag + ''
+          additionalForm.value.taxpayerIdentifier = obj.insOrdersTax?.taxpayerIdentifier
+
         fileList.value = obj.imagesAdds?.images
         // 有对应图片说明是通过识别拿到的信息
         if(fileList.value&&fileList.value.length>0) {
@@ -3913,9 +3998,9 @@ const initEditData = () => {
         } else {
           ower2Switch.value = false
         }
-          additionalForm.value.transfer = obj.insOrdersOtherInfo.transfer
-          additionalForm.value.companyId = obj.insOrdersOtherInfo.companyId
-          additionalForm.value.signingTime = obj.insOrdersOtherInfo.signingTime
+
+          additionalForm.value.companyId = obj.insOrders.companyId
+          additionalForm.value.signingTime = obj.insOrders.signingTime
           additionalForm.value.scope = obj.insOrdersOtherInfo.scope
           additionalForm.value.taxPremium = obj.insOrdersOtherInfo.taxPremium
           additionalForm.value.jqApplyNo = obj.insOrdersOtherInfo.jqApplyNo

+ 544 - 146
src/views/basics/dictionaries.vue

@@ -1,169 +1,567 @@
 <template>
-    <div class="dictionaries">
-        <el-row :gutter="20">
-            <el-col :span="4">
-                <div class="title">
-                    <span>一级类目</span>
-                </div>
-                <div class="first">
-                    <div class="firstItem" v-for="(item, index) in dictionaries" :key="index">
-                        <span>{{ item.name }}</span>
-                        <el-icon><ArrowRightBold /></el-icon>
-                    </div>
-                </div>
-            </el-col>
-            <el-col :span="4">
-                <div class="title">
-                    <span>二级类目</span>
-                    <el-button link type="primary" icon="plus" @click="addShow = true">添加类目</el-button>
-                </div>
-                <el-tree
-                    style="width: 100%"
-                    :data="dataSource"
-                    node-key="id"
-                    default-expand-all
-                    :expand-on-click-node="false"
-                >
-                    <template #default="{ node, data }">
-                        <div class="custom-tree-node">
-                            <span v-if="!node.bool">{{ node.label }}</span>
-                            <el-input style="width: 120px" v-else v-model="node.label" placeholder="请输入"></el-input>
-                            <div v-if="!node.bool">
-                                <el-button icon="Edit" type="primary" link @click="editNode(node, data)"></el-button>
-                                <el-button style="margin-left: 4px" icon="Delete" type="danger" link @click="remove(node, data)"></el-button>
-                            </div>
-                            <div v-else>
-                                <el-button icon="CircleCheck" type="primary" link @click="saveNode(node, data)"></el-button>
-                                <el-button style="margin-left: 4px" icon="CircleClose" type="danger" link @click="cancelNode(node, data)"></el-button>
-                            </div>
-                        </div>
-                    </template>
-                </el-tree>
-            </el-col>
-        </el-row>
-        <el-dialog
-            v-model="addShow"
-            width="600"
-            title="添加"
+  <div class="dictionaries">
+    <el-row :gutter="20">
+      <!-- 一级类目 -->
+      <el-col :span="6">
+        <div class="title">
+          <span>一级类目</span>
+        </div>
+        <div class="first">
+          <div
+            class="firstItem"
+            v-for="(item) in sortedCategories"
+            :key="item.id"
+            :class="{ active: selectedCategory?.id === item.id }"
+            @click="selectCategory(item)"
+          >
+            <span>{{ item.label }}</span>
+          </div>
+        </div>
+      </el-col>
+
+      <!-- 二级类目 -->
+      <el-col :span="18">
+        <div class="title">
+          <span>二级类目</span>
+          <el-button link type="primary" icon="plus" @click="openAddDialog">
+            添加类目
+          </el-button>
+        </div>
+        <el-tree
+          ref="treeRef"
+          style="width: 100%"
+          :data="treeData"
+          node-key="id"
+          :default-expanded-keys="expandedKeys"
+          :expand-on-click-node="true"
+          :props="{ children: 'child', label: 'label' }"
+          class="dict-tree"
+          @node-click="handleNodeClick"
         >
-            <el-form v-model="addForm" :rules="addRules" label-width="80">
-                <el-form-item prop="a">
-                    <el-radio-group v-model="addForm.a">
-                        <el-radio label="主类目" value="1"></el-radio>
-                        <el-radio label="子类目" value="2"></el-radio>
-                    </el-radio-group>
-                </el-form-item>
-                <el-form-item prop="b" label="上级类目">
-                    <el-select v-model="addForm.b" placeholder="请选择">
-                        <el-option value="1" label="1"></el-option>
-                    </el-select>
-                </el-form-item>
-                <el-form-item prop="c" label="类目名称">
-                    <el-input v-model="addForm.c" placeholder="请输入"></el-input>
-                </el-form-item>
-            </el-form>
-        </el-dialog>
-    </div>
+          <template #default="{ node, data }">
+            <div class="custom-tree-node" @mouseenter="data.showActions = true" @mouseleave="data.showActions = false">
+              <span v-if="!data.isEditing" class="node-label">{{ node.label }}</span>
+              <el-input
+                v-else
+                v-model="data.tempLabel"
+                placeholder="请输入"
+                style="width: 150px"
+                maxlength="20"
+              />
+              <div v-if="!data.isEditing && data.showActions" class="node-actions">
+                <el-button icon="Edit" type="primary" link @click.stop="editNode(data)" />
+                <el-button icon="Delete" type="danger" link @click.stop="remove(node, data)" />
+              </div>
+              <div v-else-if="data.isEditing" class="node-actions">
+                <el-button icon="CircleCheck" type="primary" link @click.stop="saveNode(data)" />
+                <el-button icon="CircleClose" type="danger" link @click.stop="cancelNode(data)" />
+              </div>
+            </div>
+          </template>
+        </el-tree>
+      </el-col>
+    </el-row>
+
+    <!-- 添加/编辑弹窗 -->
+    <el-dialog v-model="addShow" width="450" :title="isEdit ? '编辑类目' : '添加'" :close-on-click-modal="false">
+      <el-form ref="addFormRef" :model="addForm" :rules="addRules" label-width="100">
+        <el-form-item prop="type">
+          <el-radio-group v-model="addForm.type" :disabled="isEdit" @change="onTypeChange">
+            <el-radio label="1">主类目</el-radio>
+            <el-radio label="2">子类目</el-radio>
+          </el-radio-group>
+        </el-form-item>
+
+        <el-form-item prop="parentId" label="上级类目">
+          <el-cascader
+            v-model="addForm.parentId"
+            :options="cascaderOptions"
+            :props="cascaderProps"
+            placeholder="请选择"
+            :disabled="addForm.type === '1' || isEdit"
+            clearable
+            style="width: 100%"
+          />
+        </el-form-item>
+
+        <el-form-item prop="dictName" label="类目名称">
+          <el-input
+            v-model="addForm.dictName"
+            placeholder="请输入类目名称"
+            maxlength="20"
+            show-word-limit
+          />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <el-button @click="addShow = false">取消</el-button>
+        <el-button type="primary" @click="handleAdd">确定</el-button>
+      </template>
+    </el-dialog>
+  </div>
 </template>
 
 <script setup lang="ts">
-let dictionaries = ref([
-    {
-        id: '1',
-        name: '资金归属',
-        children: [
-            {
-                id: '1-1',
-                label: '二级1',
-                bool: false
-            },{
-                id: '1-2',
-                label: '二级2',
-                bool: false
-            }
-        ]
-    },{
-        id: '1',
-        name: '收支泪目',
-        children: [
-            {
-                id: '2-1',
-                label: '二级1',
-                bool: false
-            },{
-                id: '2-2',
-                label: '二级2',
-                bool: false
-            }
-        ]
-    }
-])
-let dataSource = ref([])
-const editNode = (node, data) => {
-    node.bool = true
+import { ref, onMounted, computed, nextTick } from 'vue'
+import { ElMessage, ElMessageBox } from 'element-plus'
+import api from '@/api'
+
+// 类型定义(继承后端 SysDictVo)
+import type { SysDictVo, AddDictParams, UpdateDictParams } from '@/api/modules/dict'
+
+interface DictItem extends SysDictVo {
+  isEditing?: boolean
+  tempLabel?: string
+  showActions?: boolean
+}
+
+// 数据
+const dictCategories = ref<SysDictVo[]>([])
+const selectedCategory = ref<SysDictVo | null>(null)
+const addShow = ref(false)
+const addFormRef = ref()
+const treeRef = ref<any>(null)
+const isEdit = ref(false)
+const editId = ref('')
+const expandedKeys = ref<string[]>([])
+const editingData = ref<DictItem | null>(null)
+
+// 表单数据
+const addForm = ref({
+  type: '1',
+  parentId: [] as string[],
+  dictName: ''
+})
+
+// 表单校验规则
+const addRules = {
+  type: [{ required: true, message: '请选择类型', trigger: 'change' }],
+  parentId: [{
+    required: true,
+    message: '请选择上级类目',
+    trigger: 'change',
+    validator: (rule: any, value: any, callback: any) => {
+      if (addForm.value.type === '2' && (!value || value.length === 0)) {
+        callback(new Error('请选择上级类目'))
+      } else {
+        callback()
+      }
+    }
+  }],
+  dictName: [{ required: true, message: '请输入类目名称', trigger: 'blur' }]
+}
+
+// 计算属性:一级类目排序(资金归属=1,收支类目=2)
+const sortedCategories = computed(() => {
+  const orderMap: Record<string, number> = {
+    '资金归属': 1,
+    '收支类目': 2
+  }
+  return [...dictCategories.value].sort((a, b) => {
+    const orderA = orderMap[a.label || ''] || 99
+    const orderB = orderMap[b.label || ''] || 99
+    return orderA - orderB
+  })
+})
+
+// 计算属性:当前选中的类目的树数据
+const treeData = computed(() => {
+  // 二级类目按创建时间倒叙排序
+  const sortedChild = [...(selectedCategory.value?.child || [])].sort((a, b) => {
+    // 假设后端返回的数据有sort字段或按数组顺序代表创建时间,这里按原顺序倒序
+    return 0
+  })
+  return sortedChild
+})
+
+// 计算属性:级联选择器选项(包含1级类目)
+const cascaderOptions = computed(() => {
+  if (!selectedCategory.value) return []
+
+  // 构建包含1级类目的选项
+  const firstLevelOption = {
+    value: selectedCategory.value.id,
+    label: selectedCategory.value.label,
+    children: selectedCategory.value.child ? selectedCategory.value.child.map(item => ({
+      value: item.id,
+      label: item.label,
+      children: item.child && item.child.length > 0 ? item.child.map(child => ({
+        value: child.id,
+        label: child.label
+      })) : undefined
+    })) : undefined
+  }
+
+  return [firstLevelOption]
+})
+
+// 级联选择器配置
+const cascaderProps = {
+  checkStrictly: true,
+  emitPath: true
 }
-const remove = (node, data) => {
 
+// 获取字典树数据
+const fetchDictTree = async () => {
+  try {
+    const res: any = await api.dictApi.queryTree()
+    if (res.code === 200) {
+      // 为每个节点添加编辑状态标记
+      const addMeta = (item: SysDictVo): DictItem => ({
+        ...item,
+        isEditing: false,
+        tempLabel: '',
+        showActions: false,
+        child: item.child ? item.child.map(addMeta) : undefined
+      })
+
+      dictCategories.value = (res.data || []).map(addMeta)
+
+      // 更新 selectedCategory,使其指向新数组中的对应对象
+      if (dictCategories.value.length > 0) {
+        if (selectedCategory.value) {
+          // 如果之前有选中的类目,在新数组中找到对应的类目
+          const newSelected = dictCategories.value.find(item => item.id === selectedCategory.value?.id)
+          selectedCategory.value = newSelected || dictCategories.value[0]
+        } else {
+          // 默认选中收支类目(顺序=2),如果没有则选第一个
+          const expenseCategory = dictCategories.value.find(item => item.label === '收支类目')
+          selectedCategory.value = expenseCategory || dictCategories.value[0]
+        }
+      }
+
+      // 展开所有2级目录
+      expandAllNodes()
+    }
+  } catch (error) {
+    console.error('获取字典树失败:', error)
+  }
 }
-const saveNode = (node, data) => {
 
+// 展开所有节点
+const expandAllNodes = () => {
+  if (!selectedCategory.value?.child) return
+
+  const getAllNodeIds = (items: SysDictVo[]): string[] => {
+    let ids: string[] = []
+    items.forEach(item => {
+      if (item.id) {
+        ids.push(item.id)
+      }
+      if (item.child && item.child.length > 0) {
+        ids = [...ids, ...getAllNodeIds(item.child)]
+      }
+    })
+    return ids
+  }
+
+  expandedKeys.value = getAllNodeIds(selectedCategory.value.child)
+
+  // 使用 nextTick 确保 DOM 更新后再展开
+  nextTick(() => {
+    // 增加延迟时间,确保树完全渲染
+    setTimeout(() => {
+      expandedKeys.value.forEach(id => {
+        treeRef.value?.expand(id)
+      })
+    }, 200)
+  })
 }
-const cancelNode = (node, data) => {
-    node.bool = false
+
+// 选择一级类目
+const selectCategory = (item: SysDictVo) => {
+  selectedCategory.value = item
+  // 展开所有2级目录
+  expandAllNodes()
 }
 
-// 新增
- let addShow = ref(false)
-let addForm = ref({})
-const addRules = ref({
-    a: [{ required: true, trigger: "blur", message: "请输入" }]
-})
+// 处理节点点击 - 切换展开/收起
+const handleNodeClick = (data: DictItem, node: any) => {
+  // 点击节点时切换展开状态,这是 Element Plus 的默认行为
+  // 这里不需要额外处理,避免重复切换
+}
+
+// 类型变化回调
+const onTypeChange = (val: string) => {
+  if (val === '1') {
+    // 主类目:选中1级类目作为父级
+    addForm.value.parentId = selectedCategory.value?.id ? [selectedCategory.value.id] : []
+  } else {
+    // 子类目:清空选择
+    addForm.value.parentId = []
+  }
+}
+
+// 打开添加弹窗
+const openAddDialog = () => {
+  isEdit.value = false
+  editId.value = ''
+  addForm.value = {
+    type: '1',
+    // 默认选中1级类目作为父级
+    parentId: selectedCategory.value?.id ? [selectedCategory.value.id] : [],
+    dictName: ''
+  }
+  addShow.value = true
+}
+
+// 添加类目
+const handleAdd = async () => {
+  await addFormRef.value.validate()
+
+  try {
+    // 确定父级id
+    let parentId: string | undefined
+    if (addForm.value.type === '2' && addForm.value.parentId.length > 0) {
+      // 子类目:从级联选择器获取
+      parentId = addForm.value.parentId[addForm.value.parentId.length - 1]
+    } else if (addForm.value.type === '1') {
+      // 主类目:使用选中的1级类目的id作为父id
+      parentId = selectedCategory.value?.id
+    }
+
+    const params: AddDictParams = {
+      typeId: selectedCategory.value?.typeId,
+      typeCode: selectedCategory.value?.typeCode,
+      parentValue: parentId,
+      value: addForm.value.dictName,
+      label: addForm.value.dictName,
+      description: addForm.value.dictName,
+      sort: '0'
+    }
+
+    let res: any
+    if (isEdit.value) {
+      // 修改时传递所有必要的字段
+      const updateParams: UpdateDictParams = {
+        id: editId.value,
+        typeId: editingData.value?.typeId,
+        typeCode: editingData.value?.typeCode,
+        parentValue: editingData.value?.parentValue,
+        value: addForm.value.dictName,
+        label: addForm.value.dictName,
+        description: addForm.value.dictName,
+        sort: editingData.value?.sort
+      }
+      res = await api.dictApi.updateDict(updateParams)
+    } else {
+      res = await api.dictApi.addDict(params)
+    }
+
+    if (res.code === 200) {
+      ElMessage.success(isEdit.value ? '修改成功' : '添加成功')
+      addShow.value = false
+      // 刷新树数据
+      await fetchDictTree()
+    }
+  } catch (error: any) {
+    // 处理重复名称错误
+    if (error?.response?.data?.message?.includes('已存在')) {
+      ElMessage.error('类目名称已存在')
+    } else {
+      console.error(isEdit.value ? '修改失败:' : '添加失败:', error)
+    }
+  }
+}
+
+// 编辑节点 - 改为弹窗编辑
+const editNode = (data: DictItem) => {
+  isEdit.value = true
+  editId.value = data.id || ''
+  editingData.value = data
+
+  // 判断是主类目还是子类目
+  // 主类目:parentValue 是1级类目的id 或 为空
+  // 子类目:parentValue 是2级或3级类目的id
+  const isMainCategory = !data.parentValue || data.parentValue === selectedCategory.value?.id
+
+  addForm.value = {
+    type: isMainCategory ? '1' : '2',
+    parentId: [],
+    dictName: data.label || ''
+  }
+
+  // 设置上级类目
+  if (isMainCategory) {
+    // 主类目:父级是1级类目
+    addForm.value.parentId = selectedCategory.value?.id ? [selectedCategory.value.id] : []
+  } else if (selectedCategory.value?.child) {
+    // 子类目:查找上级路径
+    const findPath = (items: SysDictVo[], targetId: string, path: string[] = []): string[] | null => {
+      for (const item of items) {
+        if (item.id === targetId) {
+          return [...path, item.id!]
+        }
+        if (item.child) {
+          const result = findPath(item.child, targetId, [...path, item.id!])
+          if (result) return result
+        }
+      }
+      return null
+    }
+    const path = findPath(selectedCategory.value.child, data.parentValue!)
+    if (path) {
+      addForm.value.parentId = path
+    }
+  }
+
+  addShow.value = true
+}
+
+// 行内保存节点(备用)
+const saveNode = async (data: DictItem) => {
+  if (!data.tempLabel || !data.tempLabel.trim()) {
+    ElMessage.warning('名称不能为空')
+    return
+  }
+
+  try {
+    const params: UpdateDictParams = {
+      id: data.id!,
+      label: data.tempLabel
+    }
+    const res: any = await api.dictApi.updateDict(params)
+
+    if (res.code === 200) {
+      data.label = data.tempLabel
+      data.isEditing = false
+      data.showActions = false
+      ElMessage.success('修改成功')
+    }
+  } catch (error) {
+    console.error('修改失败:', error)
+  }
+}
+
+// 取消编辑
+const cancelNode = (data: DictItem) => {
+  data.isEditing = false
+  data.tempLabel = ''
+  data.showActions = false
+}
+
+// 删除节点
+const remove = async (node: any, data: DictItem) => {
+  try {
+    await ElMessageBox.confirm('确认删除该类目?', '提示', {
+      type: 'warning'
+    })
+
+    const res: any = await api.dictApi.deleteDict(data.id)
+    if (res.code === 200) {
+      ElMessage.success('删除成功')
+      fetchDictTree()
+    }
+  } catch (error: any) {
+    if (error !== 'cancel') {
+      console.error('删除失败:', error)
+    }
+  }
+}
 
 onMounted(() => {
-    dataSource.value = dictionaries.value[0].children
+  fetchDictTree()
 })
 </script>
 
 <style scoped lang="scss">
-.dictionaries{
-    height: calc(100vh - 130px);
-    width: calc(100% - 24px);
-    margin: 12px auto;
-    padding: 12px;
-    background: #FFFFFF;
-    overflow-y: auto;
-    .title{
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        font-size: 18px;
-    }
-    .first{
-        padding: 10px;
-        .firstItem{
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            margin-bottom: 5px;
-            padding: 8px 10px;
-
-            cursor: pointer;
-            &:hover{
-                background-color: #409EFF;
-                color: #FFFFFF;
-                border-radius: 5px;
-            }
-        }
+.dictionaries {
+  height: calc(100vh - 130px);
+  width: calc(100% - 24px);
+  margin: 12px auto;
+  padding: 16px;
+  background: #FFFFFF;
+  overflow-y: auto;
+
+  .title {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    font-size: 14px;
+    font-weight: 500;
+    color: #303133;
+    margin-bottom: 12px;
+    padding-bottom: 8px;
+    border-bottom: 1px solid #e4e7ed;
+  }
+
+  .first {
+    .firstItem {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      margin-bottom: 4px;
+      padding: 10px 12px;
+      cursor: pointer;
+      border-radius: 4px;
+      font-size: 14px;
+      color: #606266;
+      transition: all 0.2s;
+
+      &:hover {
+        background-color: #f5f7fa;
+        color: #409EFF;
+      }
+
+      &.active {
+        background-color: #ecf5ff;
+        color: #409EFF;
+        font-weight: 500;
+      }
     }
-    .custom-tree-node{
-        width: 100%;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        font-size: 16px;
+  }
+
+  .custom-tree-node {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    font-size: 14px;
+    padding: 4px 0;
+
+    .node-label {
+      color: #606266;
     }
-    :deep(.el-tree-node) {
-        padding: 12px 0;
+
+    .node-actions {
+      display: flex;
+      align-items: center;
+      gap: 4px;
+      margin-left: 8px;
+
+      .el-button {
+        padding: 4px;
+        font-size: 14px;
+      }
+    }
+  }
+
+  :deep(.el-tree-node) {
+    padding: 2px 0;
+  }
+
+  :deep(.el-tree-node__content) {
+    height: 36px;
+    padding: 0 8px;
+    border-radius: 4px;
+
+    &:hover {
+      background-color: #f5f7fa;
     }
+  }
+
+  :deep(.el-tree-node__expand-icon) {
+    font-size: 14px;
+    color: #909399;
+  }
+
+  :deep(.el-tree-node__children) {
+    margin-left: 16px;
+    padding-left: 4px;
+  }
+
+  .dict-tree {
+    padding: 8px 0;
+  }
 }
 </style>

+ 31 - 2
src/views/operationManagement/telemarketing.vue

@@ -48,14 +48,14 @@
           <el-table-column label="工号" prop="workNumber" width="200"></el-table-column>
           <el-table-column label="类型" prop="typeAttr" width="100">
             <template #default="scope">
-              {{ scope.row.typeAttr == '1'?'个代':scope.row.typeAttr == '3'?'渠道':scope.row.typeAttr == '2'?'团队':scope.row.typeAttr == '4'?'电销组': '' }}
+              {{ typeAttrMap(scope.row.typeAttr) || '--'}}
             </template>
           </el-table-column>
           <el-table-column label="归属" prop="deptName" width="200"></el-table-column>
           <el-table-column label="所属机构" prop="deptName" width="200"></el-table-column>
           <el-table-column label="人员状态" prop="status" width="150">
             <template #default="scope">
-              {{ scope.row.status == '0'?'待认证':scope.row.status == '1'?'已认证':scope.row.status == '2'?'待提交资料':scope.row.status == '3'?'已入职':'' }}
+              {{ statusMap(scope.row.status) || '--' }}
             </template>
           </el-table-column>
           <el-table-column label="账号状态" prop="isEnable" width="150">
@@ -179,6 +179,35 @@ const cascaderProps = {
     children: 'children'
 }
 let options = ref([])
+
+const typeAttrMap=(value)=>{
+  const map = {
+    "1": '前线人员',
+    "2": '后线人员',
+    "3": '合伙人',
+    "4": '工作是管理员',
+    "5": '团队',
+    "6": '个代',
+    "7": '渠道',
+    "8": '电销',
+  }
+  return map[value]
+}
+const statusMap = (value: any) => {
+  const map = {
+    "0": '未认证',
+    "1": '认证中',
+    "2": '认证失败',
+    "3": '待入职',
+    "4": '入司审核中',
+    "5": '入司审核失败',
+    "6": '已入职',
+    "7": '离职待审核',
+    "8": '离职',
+  }
+  return map[value]
+}
+
 // 获取机构数据
 const institutionList = () => {
   api.institutionApi.institutionList({ name: '', system: '' }).then(res => {

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

@@ -423,7 +423,6 @@ const initProduct = (e) => {
 // 险种
 let insuranceTypeList = ref([])
 const initInsurance = () => {
-    console.log(111, projectAddFrom.value)
   api.projectApi.getBusinessInsurance(projectAddFrom.value.productId).then(res => {
     if(res.code == 200) {
       // res.data.forEach(item => {