Procházet zdrojové kódy

Merge branch 'dev' of http://39.101.143.165:8090/dong_k/tenant-Platform into dev

@dongkboy před 5 měsíci
rodič
revize
6575d966bb

+ 7 - 6
src/views/additionalOrder/additional/index.vue

@@ -1200,7 +1200,7 @@
                               <el-table-column label="保额">
                                   <template #default="scope">
                                       <el-select v-model="scope.row.amount" style="width: 150px">
-                                          <el-option v-for="(item, index) in scope.row.options" :label="item.label" :value="item.id"></el-option>
+                                          <el-option v-for="(item, index) in scope.row.options" :label="item.label" :value="item.value"></el-option>
                                       </el-select>
                                   </template>
                               </el-table-column>
@@ -1577,14 +1577,14 @@
                   </template>
                   <div style="width: 100%">
                       <el-form-item class="white-m-p24" label="交强保单">
-                          <el-upload v-if="!jqPolicy" :auto-upload="false" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 4)">
+                          <el-upload v-if="!jqPolicy" :auto-upload="false" :show-file-list="false" accept=".pdf" @change="uploadImage($event, 4)">
                               <el-button link type="primary" icon="Upload">上传</el-button>
                           </el-upload>
                           <div class="fileInfo" v-else>
                               <img style="width: 40px; height: 40px" :src="jqPolicyName.includes('.png') || jqPolicyName.includes('.jpg') || jqPolicyName.includes('.jpeg')?image:jqPolicyName.includes('.pdf')?pdf:jqPolicyName.includes('.doc') || jqPolicyName.includes('.docx')?word:''" />
                               <div class="fileName">{{ jqPolicyName }}</div>
                               <div class="fileBtn">
-                                  <el-upload :auto-upload="false" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 4)" style="display: flex; align-items: center">
+                                  <el-upload :auto-upload="false" :show-file-list="false" accept=".pdf" @change="uploadImage($event, 4)" style="display: flex; align-items: center">
                                       <el-icon class="btn-icon"><Upload /></el-icon>
                                   </el-upload>
                                   <el-icon class="btn-icon" @click="imageView(4)"><View /></el-icon>
@@ -1594,14 +1594,14 @@
                           </div>
                       </el-form-item>
                       <el-form-item class="white-m-p24" label="商业保单">
-                          <el-upload v-if="!syPolicy" :auto-upload="false" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 5)">
+                          <el-upload v-if="!syPolicy" :auto-upload="false" :show-file-list="false" accept=".pdf" @change="uploadImage($event, 5)">
                               <el-button link type="primary" icon="Upload">上传</el-button>
                           </el-upload>
                           <div class="fileInfo" v-else>
                               <img style="width: 40px; height: 40px" :src="syPolicyName.includes('.png') || syPolicyName.includes('.jpg') || syPolicyName.includes('.jpeg')?image:syPolicyName.includes('.pdf')?pdf:syPolicyName.includes('.doc') || syPolicyName.includes('.docx')?word:''" />
                               <div class="fileName">{{ syPolicyName }}</div>
                               <div class="fileBtn">
-                                  <el-upload :auto-upload="false"  :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 5)" style="display: flex; align-items: center">
+                                  <el-upload :auto-upload="false"  :show-file-list="false" accept=".pdf" @change="uploadImage($event, 5)" style="display: flex; align-items: center">
                                       <el-icon class="btn-icon"><Upload /></el-icon>
                                   </el-upload>
                                   <el-icon class="btn-icon" @click="imageView(5)"><View /></el-icon>
@@ -3379,10 +3379,11 @@ let insuranceShow = ref(false)
 const handleInsurance = () => {
   insuranceShow.value = true
   nextTick(() => {
-    InsuranceSelectRef.value.initEditData()
+    InsuranceSelectRef.value.initEditData(insuranceData.value, additionalForm.value.productId)
   })
 }
 const handleInsuranceSelect = (data) => {
+  console.log("🚀 ~ handleInsuranceSelect ~ data:", data)
   insuranceShow.value = false
   let list = [...data.list]
   if(list && list.length > 0) {

+ 104 - 88
src/views/additionalOrder/additional/modules/insuranceSelect.vue

@@ -2,19 +2,34 @@
   <div class="insuranceSelect">
     <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 }">
+        <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>
+      <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" >
+    <div class="footer">
       <el-button plain @click="handleCancel">取消</el-button>
       <el-button type="primary" @click="handleConfirm">确定</el-button>
     </div>
@@ -22,25 +37,25 @@
 </template>
 
 <script setup lang="ts">
-import api from '@/api'
+import api from "@/api";
 import { ElMessage } from "element-plus";
 
 // emits
-const emits = defineEmits(['close'])
+const emits = defineEmits(["close"]);
 
 // 方案类型
-let insuranceType = ref(null)
+let insuranceType = ref(null);
 
 // 当前选择的险种
-let choiceItem = ref({})
+let choiceItem = ref({});
 // 初始化险种数据
-let insuranceTypeList = ref([])
-let typeList = ref([])
+let insuranceTypeList = ref([]);
+let typeList = ref([]);
 const handleType = (item, index) => {
-  choiceItem.value = item
-}
+  choiceItem.value = item;
+};
 // 投保金额选择
-const handleSubType =( item, sub, index) => {
+const handleSubType = (item, sub, index) => {
   // if(insuranceType.value === 1) {
   //   item.options.forEach(a => {
   //     a.checked = false
@@ -52,113 +67,114 @@ const handleSubType =( item, sub, index) => {
   //   let bool = item.options.some(a => a.checked)
   //   item.checked = bool
   // }
-  item.options.forEach(a => {
-    a.checked = false
-  })
-  sub.checked = true
-  item.checked = true
-}
+  item.options.forEach((a) => {
+    a.checked = false;
+  });
+  sub.checked = true;
+  item.checked = true;
+};
 
 // 取消
 const handleCancel = () => {
-  let list = [...insuranceTypeList.value]
-  let checkedList = list.filter(a => a.checked)
-  emits('close', {
-    list: checkedList
-  })
-}
+  let list = [...insuranceTypeList.value];
+  let checkedList = list.filter((a) => a.checked);
+  emits("close", {
+    list: checkedList,
+  });
+};
 // 保存
 const handleConfirm = () => {
-  let list = [...insuranceTypeList.value]
-  let checkedList = list.filter(a => a.checked)
-  emits('close', {
-    list: checkedList
-  })
-}
+  let list = [...insuranceTypeList.value];
+  let checkedList = list.filter((a) => a.checked);
+  emits("close", {
+    list: checkedList,
+  });
+};
 
 // 修改数据
 const initEditData = (data, type) => {
-  console.log('险种已选的数据', data)
-  insuranceType.value = type
+  console.log("险种已选的数据", data);
+  insuranceType.value = type;
   api.projectApi.getBusinessInsurance().then((res: any) => {
-    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
-          })
-        })
-        typeList.value = JSON.parse(JSON.stringify(res.data))
-        if(data && data.length > 0) {
-          data.forEach(item => {
-              typeList.value.forEach(sub => {
-              if(item.id === sub.id) {
-                sub.checked = true
-                if(item.unitAmount) {
-                  sub.options.forEach(min => {
-                    if(min.value === item.unitAmount) {
-                      min.checked = true
+    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;
+          });
+        });
+        typeList.value = JSON.parse(JSON.stringify(res.data));
+        if (data && data.length > 0) {
+          data.forEach((item) => {
+            typeList.value.forEach((sub) => {
+              if (item.id === sub.id) {
+                sub.checked = true;
+                if (item.unitAmount) {
+                  sub.options.forEach((min) => {
+                    if (min.value === item.unitAmount) {
+                      min.checked = true;
                     }
-                  })
+                  });
                 } else {
-                  sub.options.forEach(min => {
-                    item.options.forEach(max => {
-                      if(min.id === max.id) {
-                        min.checked = true
+                  sub.options.forEach((min) => {
+                    item.options.forEach((max) => {
+                      if (max.id === min.id && max.checked) {
+                        min.checked = true;
                       }
-                    })
-                  })
+                    });
+                  });
                 }
               }
-            })
-          })
-          insuranceTypeList.value = typeList.value
-          console.log('回显的数据111', insuranceTypeList.value)
+            });
+          });
+          insuranceTypeList.value = typeList.value;
+          console.log("回显的数据111", insuranceTypeList.value);
         } else {
-          insuranceTypeList.value = res.data
-          console.log('回显的数据222', insuranceType.value)
+          insuranceTypeList.value = res.data;
+          console.log("回显的数据222", insuranceType.value);
         }
       }
     } else {
       ElMessage({
         message: res.msg,
-        type: 'warning'
-      })
+        type: "warning",
+      });
     }
-  })
-}
+  });
+};
 
 defineExpose({
-  initEditData
-})
+  initEditData,
+});
 </script>
 
 <style scoped lang="scss">
-.insuranceSelect{
+.insuranceSelect {
   height: 300px;
-  .insuranceList{
+  .insuranceList {
     height: calc(100% - 40px);
     overflow: hidden;
     display: flex;
     justify-content: space-between;
     margin-bottom: 10px;
-    .insuranceLeft, .insuranceRight{
+    .insuranceLeft,
+    .insuranceRight {
       height: 100%;
       overflow-y: auto;
     }
-    .insuranceLeft{
+    .insuranceLeft {
       width: calc(100% - 110px);
-      .insuranceItem{
+      .insuranceItem {
         cursor: pointer;
         display: flex;
         align-items: center;
         margin: 10px 0;
-        span{
+        span {
           margin-left: 10px;
         }
-        .checkIcon{
+        .checkIcon {
           width: 14px;
           height: 14px;
           display: flex;
@@ -169,25 +185,25 @@ defineExpose({
           font-size: 10px;
           color: #fff;
         }
-        .active{
+        .active {
           color: #fff;
-          background: #3994FB;
-          border-color: #3994FB;
+          background: #3994fb;
+          border-color: #3994fb;
         }
       }
     }
-    .insuranceRight{
+    .insuranceRight {
       width: 70px;
-      .account{
+      .account {
         text-align: center;
         cursor: pointer;
       }
-      .active{
-        color: #3994FB;
+      .active {
+        color: #3994fb;
       }
     }
   }
-  .footer{
+  .footer {
     display: flex;
     justify-content: center;
     align-items: center;

+ 33 - 6
src/views/operationManagement/channel.vue

@@ -45,17 +45,17 @@
             </template>
           </el-table-column>
           <el-table-column label="手机号" prop="mobile" width="150"></el-table-column>
-          <el-table-column label="工号" prop="workNumber" width="200"></el-table-column>
+          <el-table-column label="工号" prop="userId" 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,33 @@ 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 => {
@@ -398,7 +425,7 @@ const tableDataCommand = (scope, e) => {
         if(action === 'confirm') {
           api.teamApi.deleteAssociatedUsers({
             id: teamInfo.value.id,
-            userIds: [scope.row.id]
+            userIds: [scope.row.userId]
           }).then(res => {
             if(res?.code == 200) {
               ElMessage({
@@ -429,7 +456,7 @@ const tableDataCommand = (scope, e) => {
       }).then(( action ) => {
         if(action === 'confirm') {
           let data = {
-            id: [scope.row.id],
+            ids: [scope.row.id],
             isEnable: 1,
             getAll: 0
           }
@@ -463,7 +490,7 @@ const tableDataCommand = (scope, e) => {
       }).then(( action ) => {
         if(action === 'confirm'){
           let data = {
-            id: [scope.row.id],
+            ids: [scope.row.id],
             isEnable: 0,
             getAll: 0
           }

+ 2 - 2
src/views/operationManagement/operationDetail.vue

@@ -304,8 +304,8 @@ const typeAttrMap=(value)=>{
     "4": '工作是管理员',
     "5": '团队',
     "6": '个代',
-    "7": '电销',
-    "8": '渠道',
+    "7": '渠道',
+    "8": '电销',
   }
   return map[value]
 }

+ 3 - 3
src/views/operationManagement/team.vue

@@ -187,8 +187,8 @@ const typeAttrMap=(value)=>{
     "4": '工作是管理员',
     "5": '团队',
     "6": '个代',
-    "7": '电销',
-    "8": '渠道',
+    "7": '渠道',
+    "8": '电销',
   }
   return map[value]
 }
@@ -394,7 +394,7 @@ const tableDataCommand = (scope, e) => {
         if (action === 'confirm') {
           api.teamApi.deleteAssociatedUsers({
             id: teamInfo.value.id,
-            userIds: [scope.row.id]
+            userIds: [scope.row.userId]
           }).then(res => {
             if (res?.code == 200) {
               ElMessage({

+ 3 - 3
src/views/operationManagement/telemarketing.vue

@@ -398,7 +398,7 @@ const tableDataCommand = (scope, e) => {
         if(action === 'confirm') {
           api.teamApi.deleteAssociatedUsers({
             id: teamInfo.value.id,
-            userIds: [scope.row.id]
+            userIds: [scope.row.userId]
           }).then(res => {
             if(res?.code == 200) {
               ElMessage({
@@ -429,7 +429,7 @@ const tableDataCommand = (scope, e) => {
       }).then(( action ) => {
         if(action === 'confirm') {
           let data = {
-            id: [scope.row.id],
+            ids: [scope.row.id],
             isEnable: 1,
             getAll: 0
           }
@@ -463,7 +463,7 @@ const tableDataCommand = (scope, e) => {
       }).then(( action ) => {
         if(action === 'confirm'){
           let data = {
-            id: [scope.row.id],
+            ids: [scope.row.id],
             isEnable: 0,
             getAll: 0
           }

+ 2 - 1
src/views/quoteConfig/agreement/components/ruleFeeDialogEdit.vue

@@ -150,7 +150,7 @@
           <el-button type="primary" @click="save(editFormRefs)">提交审核</el-button>
         </div>
 <!--          <div class="flex f-c " v-if="!costitemEditInfo?.reviewDescription && props.operationType == 'audit'">-->
-        <div class="flex f-c " v-if="!costitemEditInfo?.approved">
+        <div class="flex f-c " v-if="!costitemEditInfo?.approved && !isHideFoot">
           <el-checkbox v-model="automatic" label="审核后,自动跳支审核下一条费用" size="large" />
           <div class="flex a-c">
             <el-button @click="rejectOperation">审核驳回</el-button>
@@ -181,6 +181,7 @@ let RuleConditionRefs = ref()
 
 const props = defineProps<{
   ruleFeeVisible: boolean,
+  isHideFoot: {type:boolean,default:false},  // 是否隐藏底部审核信息
   agreementInfo: any,//协议信息
   RulesInfo: any,//费用信息
   costitemEditInfo: any,//编辑回显数据

+ 1 - 1
src/views/quoteConfig/costManagement.vue

@@ -88,7 +88,7 @@
     <ruleFeeDialog v-if="ruleFeeVisible" :ruleFeeVisible="ruleFeeVisible" :agreementInfo="AgreementInfo"
       :RulesInfo="ruleInfo" @save="ruleFeeSave" @cancel="ruleFeeVisible = false" />
     <!-- 规则费用编辑组件 -->
-    <ruleFeeDialogEdit :ruleFeeVisible="ruleFeeEditVisible" :headerTitle="ruleFeeHeaderTitle"
+    <ruleFeeDialogEdit :ruleFeeVisible="ruleFeeEditVisible" :headerTitle="ruleFeeHeaderTitle" :isHideFoot="true"
       :agreementInfo="AgreementInfo" :RulesInfo="ruleInfo" :costitemEditInfo="costitemEditInfo" @save="ruleFeeEditSave"
       @cancel="ruleFeeEditVisible = false" />
   </div>

+ 25 - 24
src/views/sale/settings.vue

@@ -33,7 +33,7 @@
             {{ item.describe }}
           </div>
         </ElFormItem>
-        
+
         <!-- 佣金比例设置 - 拆分为独立的FormItem以显示各自的校验提示 -->
         <ElFormItem label="佣金比例" style="margin-bottom: 0;">
           <!-- 一级佣金比例 -->
@@ -61,7 +61,7 @@
               </el-input>
             </div>
           </ElFormItem>
-          
+
           <!-- 二级佣金比例 -->
           <ElFormItem
             prop="commissionRatioLevel2"
@@ -88,7 +88,7 @@
               </el-input>
             </div>
           </ElFormItem>
-          
+
           <!-- 三级佣金比例 -->
           <ElFormItem
             prop="commissionRatioLevel3"
@@ -128,7 +128,7 @@
             <el-radio label="2" size="large">加入组织自动成为分销员</el-radio>
           </el-radio-group>
         </ElFormItem>
-        
+
         <!-- 不参与分销的机构 -->
         <ElFormItem
           label="不参与分销的机构"
@@ -152,7 +152,7 @@
             +选择机构
           </div>
         </ElFormItem>
-        
+
         <!-- 已选机构列表 -->
         <el-table
           :data="selectData"
@@ -185,10 +185,10 @@
 
       <!-- 保存按钮 -->
       <div class="btn">
-        <el-button type="primary" @click="handleSubmit" v-if="form.systemCode">修改</el-button>
-        <el-button type="primary" @click="handleUpdate" v-else>保存</el-button>
+        <el-button type="primary" @click="handleUpdate" v-if="form.systemCode">修改</el-button>
+        <el-button type="primary" @click="handleSubmit" v-else>保存</el-button>
       </div>
-      
+
       <!-- 机构选择抽屉 -->
       <Drawer
         :Drawer="showDeptDrawer"
@@ -263,9 +263,9 @@ const rules = reactive<FormRules>({
       message: "请输入二级佣金比例",
       trigger: "blur",
     },
-    { 
-      type: "number", 
-      message: "佣金比例必须为数字", 
+    {
+      type: "number",
+      message: "佣金比例必须为数字",
       trigger: "blur",
       required: false,
     },
@@ -291,9 +291,9 @@ const rules = reactive<FormRules>({
       message: "请输入三级佣金比例",
       trigger: "blur",
     },
-    { 
-      type: "number", 
-      message: "佣金比例必须为数字", 
+    {
+      type: "number",
+      message: "佣金比例必须为数字",
       trigger: "blur",
       required: false,
     },
@@ -398,7 +398,7 @@ const handleDrawerCancel = () => {
 const handleDrawerSave = (selectedIds: string[]) => {
   showDeptDrawer.value = false;
   selectData.value = [];
-  
+
   // 从机构树中查找选中的节点
   const findNodesById = (nodes: TreeOption[], ids: string[]): TreeOption[] => {
     const result: TreeOption[] = [];
@@ -419,20 +419,20 @@ const handleDrawerSave = (selectedIds: string[]) => {
 
 // 搜索机构
 const handleDrawerQuery = async (searchName: string) => {
-  
+
   try {
     // const filteredData = deptTreeData.value.filter(
     //   // (node:TreeOption) => node.name.includes(searchName)
-    //    (node: TreeOption) => 
+    //    (node: TreeOption) =>
     // node.name.toLowerCase().includes(searchName.toLowerCase())
     // );
     // deptTreeData.value = filteredData;
     searchName?deptTreeData.value = filterTree(deptTreeData.value, searchName):agreementAuth()
-    
+
   } catch (error) {
     console.error("筛选机构失败:", error);
   }
-  
+
 };
 // 递归筛选树形结构
 const filterTree = (tree: TreeOption[], searchName: string) => {
@@ -505,7 +505,7 @@ const handleSubmit = async () => {
   } catch (error) {
   }
 };
-const handleUpdate=async()=>{ 
+const handleUpdate=async()=>{
   if (!formRef.value) return;
 
   try {
@@ -513,6 +513,7 @@ const handleUpdate=async()=>{
 
     const formData = {
       ...form,
+      id:form.id + '',
       commissionRatioLevel1: form.commissionRatioLevel1 || 0,
       commissionRatioLevel2: form.commissionRatioLevel2 || 0,
       commissionRatioLevel3: form.commissionRatioLevel3 || 0,
@@ -527,7 +528,7 @@ const handleUpdate=async()=>{
 }
 
 //获取详情回显
-const getDetail = async () => { 
+const getDetail = async () => {
   const res = await api.saleApi.details();
   // form.value = res.data;
   Object.assign(form, res.data);
@@ -545,7 +546,7 @@ p {
   border-bottom: 1px solid #eeeeee;
   margin-top: -1.25rem;
   margin-bottom: 33px;
-  
+
   span {
     display: inline-block;
     width: 4px;
@@ -570,7 +571,7 @@ p {
   cursor: pointer;
   display: inline-block;
   vertical-align: top;
-  
+
   h2 {
     font-size: 14px;
     font-weight: 600;
@@ -582,7 +583,7 @@ p {
 .type-box.active {
   border: 1px solid #0083ff;
   position: relative;
-  
+
   img {
     width: 24px;
     height: 24px;