Преглед изворни кода

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

祁鹏飞 пре 4 месеци
родитељ
комит
3475cf63b9

+ 21 - 37
src/views/additionalOrder/additional/modules/carTypeSelect.vue

@@ -1,21 +1,8 @@
 <template>
   <div class="carTypeSelect">
-    <el-row :gutter="20">
-      <el-col :span="8">
-        <el-input v-model="searchValue" prefix-icon="Search" placeholder="请输入车辆识别代码查询"></el-input>
-      </el-col>
-      <el-col :span="8">
-        <el-button type="primary" @click="handleSearch">查询</el-button>
-      </el-col>
-    </el-row>
-    <el-table
-      ref="CarTypeRef"
-      row-key="a"
-      :data="tableData"
-      style="margin: 24px 0; max-height: 400px"
-      @select="handleSelect"
-    >
-      <el-table-column type="selection" width="80"></el-table-column>
+    <span class="flex a-c  mb-2" style="color: #409eff;font-size: 13px;">(单击后确定 或 双击选中车型)</span>
+    <el-table ref="CarTypeRef" row-key="id" highlight-current-row :data="tableData"
+      style="margin: 24px 0; max-height: 400px" @row-dblclick="handleSelectedRow" @current-change="handleCurrentChange">
       <el-table-column prop="modelCode" label="厂牌型号代码"></el-table-column>
       <el-table-column prop="modelName" label="厂牌型号"></el-table-column>
       <el-table-column prop="replacementValue" label="新车购置价"></el-table-column>
@@ -34,41 +21,38 @@
 <script setup lang="ts">
 
 import api from "@/api";
-import {ElMessage} from "element-plus";
+import { ElMessage } from "element-plus";
 
 const emits = defineEmits(['close'])
 const CarTypeRef = ref()
 
-// 查询
-let searchValue = ref('')
-const handleSearch = () => {
+let selectRowData = ref<CarInfo | {}>({})
 
-}
 
+const handleSelectedRow = (row: any, column: any) => {
+  selectRowData.value = row
+  handleConfirm()
+}
+// 车型选中事件
+const handleCurrentChange = (row: any) => {
+  selectRowData.value = row
+}
 // 列表
-let selectItem = ref(null)
 let tableData = ref([])
-const handleSelect = (val, row) => {
-  selectItem.value = row
-  if(val.length > 1) {
-    CarTypeRef.value.clearSelection()
-    CarTypeRef.value.toggleRowSelection(row);
-  }
-}
 
 // 取消
 const handleCancel = () => {
-  emits('close', selectItem.value)
+  emits('close', null)
 }
 // 确定
 const handleConfirm = () => {
-  emits('close', selectItem.value)
+  emits('close', selectRowData.value)
 }
 const initData = (data, type) => {
   tableData.value = []
-  if(type === 1) {
+  if (type === 1) {
     api.additionalApi.vinSearch(data).then((res: any) => {
-      if(res.code == 200) {
+      if (res.code == 200) {
         tableData.value = res.data
       } else {
         ElMessage({
@@ -78,11 +62,11 @@ const initData = (data, type) => {
       }
     })
   }
-  if(type === 2) {
+  if (type === 2) {
     api.additionalApi.licenseSearch({
       modelName: data.replace(/[^u4e00-u9fa5|,]+/gi, "")
     }).then((res: any) => {
-      if(res.code == 200) {
+      if (res.code == 200) {
         tableData.value = res.data
       } else {
         ElMessage({
@@ -101,8 +85,8 @@ defineExpose({
 </script>
 
 <style scoped lang="scss">
-.carTypeSelect{
-  .footer{
+.carTypeSelect {
+  .footer {
     display: flex;
     align-items: center;
     justify-content: flex-end;

+ 9 - 9
src/views/finance/audit.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="audit">
-        <el-tabs class="demo-tabs" @tab-click="handleClick">
+        <el-tabs class="demo-tabs" v-model="activeName" @tab-click="handleClick">
             <el-tab-pane name="0">
                 <template #label>
                     <el-badge :value="total1">
@@ -129,7 +129,7 @@
                     <el-table-column prop="jyPremium" label="驾意险" width="120"></el-table-column>
                     <el-table-column label="操作" fixed="right" width="200">
                         <template #default="scope">
-                            <el-button link type="primary" size="small" @click="handleToDetail(scope, 1)">审核</el-button>
+                            <el-button link type="primary" size="small" @click="handleToDetail(scope, 1, '0')">审核</el-button>
                             <el-button link type="primary" size="small" @click="handleUpdateToQuestionOrder(scope)">设置疑问订单</el-button>
                         </template>
                     </el-table-column>
@@ -276,7 +276,7 @@
                     <el-table-column prop="auditTime" label="审核时间" width="120"></el-table-column>
                     <el-table-column label="操作" fixed="right" width="200">
                         <template #default="scope">
-                            <el-button link type="primary" size="small" @click="handleToDetail(scope, 0)">详情</el-button>
+                            <el-button link type="primary" size="small" @click="handleToDetail(scope, 0,'1')">详情</el-button>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -423,7 +423,7 @@
                     <el-table-column prop="refuse" label="驳回原因" width="120"></el-table-column>
                     <el-table-column label="操作" fixed="right" width="200">
                         <template #default="scope">
-                            <el-button link type="primary" size="small" @click="handleToDetail(scope, 0)">详情</el-button>
+                            <el-button link type="primary" size="small" @click="handleToDetail(scope, 0,'2')">详情</el-button>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -567,7 +567,7 @@
                     <el-table-column prop="jyPremium" label="驾意险" width="120"></el-table-column>
                     <el-table-column label="操作" fixed="right" width="200">
                         <template #default="scope">
-                            <el-button link type="primary" size="small" @click="handleToDetail(scope, 0)">详情</el-button>
+                            <el-button link type="primary" size="small" @click="handleToDetail(scope, 0,'3')">详情</el-button>
                             <el-button link type="primary" size="small" @click="handleCancel(scope)">取消疑问订单</el-button>
                         </template>
                     </el-table-column>
@@ -596,8 +596,7 @@ import { useRouter, useRoute } from 'vue-router'
 
 const myRouter = useRouter()
 const myRoute = useRoute()
-
-let activeName = ref('0')
+let activeName = ref(myRoute.query.activeindex as any || '0')
 const handleClick = (e) => {
     activeName.value = e.props.name
     pages.value = 1
@@ -730,12 +729,13 @@ const initList = (type) => {
     })
 }
 
-const handleToDetail = (scope, bool) => {
+const handleToDetail = (scope, bool,index) => {
     myRouter.push({
         path: '/finance/auditOrderDetail',
         query: {
             id: scope.row.orderNo,
-            isShow: bool
+            isShow: bool,
+            activeindex: index
         }
     })
 }

+ 45 - 39
src/views/finance/modules/auditDetail.vue

@@ -78,25 +78,25 @@
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">签单日期</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.ciApplyNumber || '--'}}</span>
+                            <span>{{ detailData?.order?.signingTime || '--'}}</span>
                         </span>
                     </el-col>
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">评分</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.ciPolicyNumber || '--'}}</span>
+                            <span>{{ detailData?.scoreVo?.score || '--'}}</span>
                         </span>
                     </el-col>
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">车船税</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.ciPolicyNumber || '--'}}</span>
+                            <span>{{ detailData?.costs?.vvTax || '--'}}</span>
                         </span>
                     </el-col>
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">交强险保单号</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.biApplyNumber || '--'}}</span>
+                            <span>{{ detailData?.order?.ciPolicyNumber || '--'}}</span>
                         </span>
                     </el-col>
                     <el-col :span="6" class="TBMsgItem">
@@ -108,19 +108,19 @@
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">交强险保费</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.biApplyNumber || '--'}}</span>
+                            <span>{{ detailData?.costs?.ciPremium || '--'}}</span>
                         </span>
                     </el-col>
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">驾意险保费</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.biApplyNumber || '--'}}</span>
+                            <span>{{ detailData?.costs?.niPremium || '--'}}</span>
                         </span>
                     </el-col>
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">商业险保单号</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.biPolicyNumber || '--'}}</span>
+                            <span>{{ detailData?.order?.biApplyNumber || '--'}}</span>
                         </span>
                     </el-col>
                     <el-col :span="6" class="TBMsgItem">
@@ -132,37 +132,37 @@
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">商业险保费</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.biApplyNumber || '--'}}</span>
+                            <span>{{ detailData?.costs?.biPremium  || '--'}}</span>
                         </span>
                     </el-col>
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">保费总额</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.quoteTime || '--' }}</span>
+                            <span>{{ detailData?.costs?.sumPremium || '--' }}</span>
                         </span>
                     </el-col>
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">是否过户车</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.signingTime || '--' }}</span>
+                            <span>--</span>
                         </span>
                     </el-col>
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">商业险是否过户</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.payTime || '--' }}</span>
+                            <span>--</span>
                         </span>
                     </el-col>
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">是否脱保</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.payTime || '--' }}</span>
+                            <span>--</span>
                         </span>
                     </el-col>
                     <el-col :span="6" class="TBMsgItem">
                         <span class="label">是否二手车</span>
                         <span class="value">
-                            <span>{{ detailData?.order?.payTime || '--' }}</span>
+                            <span>--</span>
                         </span>
                     </el-col>
                 </el-row>
@@ -296,13 +296,13 @@
                     </el-col>
                     <el-col :span="6" class="personMsgItem">
                         <span class="label">证件类型</span>
-                        <span class="value">{{ detailData?.ownersInfo?.identifyType === '01'?'身份证':detailData?.ownersInfo?.identifyType === '02'?'营业执照': '--' }}</span>
+                        <span class="value">{{ detailData?.ownersInfo?.identifyType === '1'?'身份证':detailData?.ownersInfo?.identifyType === '2'?'营业执照': '--' }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '01'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '1'">
                         <span class="label">证件号码</span>
                         <span class="value">{{ detailData?.ownersInfo?.identifyNumber }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '2'">
                         <span class="label">统一社会信用代码</span>
                         <span class="value">{{ detailData?.ownersInfo?.identifyNumber }}</span>
                     </el-col>
@@ -319,23 +319,23 @@
                         <span class="value">{{ detailData?.ownersInfo?.addr }}</span>
                     </el-col>
 
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '2'">
                         <span class="label">投保人座机</span>
                         <span class="value">{{ detailData?.ownersInfo?.telephone || '--' }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '2'">
                         <span class="label">投保人联系人</span>
                         <span class="value">{{ detailData?.ownersInfo?.name }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '2'">
                         <span class="label">联系人证件号码</span>
                         <span class="value">{{ detailData?.ownersInfo?.name }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '2'">
                         <span class="label">注册资金</span>
                         <span class="value">{{ detailData?.ownersInfo?.name }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '2'">
                         <span class="label">电子邮箱</span>
                         <span class="value">{{ detailData?.ownersInfo?.email || '--' }}</span>
                     </el-col>
@@ -357,13 +357,13 @@
                     </el-col>
                     <el-col :span="6" class="personMsgItem">
                         <span class="label">证件类型</span>
-                        <span class="value">{{ detailData?.policyHolderInfo?.identifyType === '01'?'身份证':detailData?.policyHolderInfo?.identifyType === '02'?'营业执照': '--' }}</span>
+                        <span class="value">{{ detailData?.policyHolderInfo?.identifyType === '1'?'身份证':detailData?.policyHolderInfo?.identifyType === '2'?'营业执照': '--' }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '01'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '1'">
                         <span class="label">证件号码</span>
                         <span class="value">{{ detailData?.policyHolderInfo?.identifyNumber }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '2'">
                         <span class="label">统一社会信用代码</span>
                         <span class="value">{{ detailData?.policyHolderInfo?.identifyNumber }}</span>
                     </el-col>
@@ -380,23 +380,23 @@
                         <span class="value">{{ detailData?.policyHolderInfo?.addr }}</span>
                     </el-col>
 
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '2'">
                         <span class="label">投保人座机</span>
                         <span class="value">{{ detailData?.policyHolderInfo?.telephone || '--' }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '2'">
                         <span class="label">投保人联系人</span>
                         <span class="value">{{ detailData?.policyHolderInfo?.name }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '2'">
                         <span class="label">联系人证件号码</span>
                         <span class="value">{{ detailData?.policyHolderInfo?.name }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '2'">
                         <span class="label">注册资金</span>
                         <span class="value">{{ detailData?.policyHolderInfo?.name }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '2'">
                         <span class="label">电子邮箱</span>
                         <span class="value">{{ detailData?.policyHolderInfo?.email || '--' }}</span>
                     </el-col>
@@ -418,13 +418,13 @@
                     </el-col>
                     <el-col :span="6" class="personMsgItem">
                         <span class="label">证件类型</span>
-                        <span class="value">{{ detailData?.insuredPersonInfo?.identifyType === '01'?'身份证':detailData?.insuredPersonInfo?.identifyType === '02'?'营业执照': '--' }}</span>
+                        <span class="value">{{ detailData?.insuredPersonInfo?.identifyType === '1'?'身份证':detailData?.insuredPersonInfo?.identifyType === '2'?'营业执照': '--' }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '01'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '1'">
                         <span class="label">证件号码</span>
                         <span class="value">{{ detailData?.insuredPersonInfo?.identifyNumber }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '2'">
                         <span class="label">统一社会信用代码</span>
                         <span class="value">{{ detailData?.insuredPersonInfo?.identifyNumber }}</span>
                     </el-col>
@@ -441,23 +441,23 @@
                         <span class="value">{{ detailData?.insuredPersonInfo?.addr }}</span>
                     </el-col>
 
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '2'">
                         <span class="label">投保人座机</span>
                         <span class="value">{{ detailData?.insuredPersonInfo?.telephone || '--' }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '2'">
                         <span class="label">投保人联系人</span>
                         <span class="value">{{ detailData?.insuredPersonInfo?.name }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '2'">
                         <span class="label">联系人证件号码</span>
                         <span class="value">{{ detailData?.insuredPersonInfo?.name }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '2'">
                         <span class="label">注册资金</span>
                         <span class="value">{{ detailData?.insuredPersonInfo?.name }}</span>
                     </el-col>
-                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '02'">
+                    <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '2'">
                         <span class="label">电子邮箱</span>
                         <span class="value">{{ detailData?.insuredPersonInfo?.email || '--' }}</span>
                     </el-col>
@@ -778,7 +778,12 @@
                     <el-button @click="handleAudit(2)">确定</el-button>
                 </template>
             </el-popconfirm>
-            <el-button plain @click="myRouter.push('/finance/audit')">关闭</el-button>
+            <el-button plain @click="myRouter.push({
+                path: '/finance/audit',
+                query: {
+                    activeindex: activeindex
+                }
+            })">关闭</el-button>
         </div>
         <el-dialog
             title="图片预览"
@@ -818,6 +823,7 @@ import {ElMessage} from "element-plus";
 
 const myRoute = useRoute()
 const myRouter = useRouter()
+const activeindex = ref(myRoute.query.activeindex)
 
 // 页签
 let tipsIndex = ref(0)
@@ -1583,4 +1589,4 @@ onUnmounted(() => {
             display: none;
         }
     }
-</style>
+</style>

+ 10 - 8
src/views/insurancePolicy/index.vue

@@ -411,13 +411,14 @@
           </template>
           <el-row :gutter="20" class="formItem formBlock" v-if="btns.owner1Text === '其他人'">
             <el-col :span="6">
-              <el-form-item label="车主姓名" prop="name2">
-                <el-input v-model="insurancePolicyForm.name2" placeholder="输入车主姓名"></el-input>
+              <el-form-item label="投保人姓名" prop="name2">
+                <el-input v-model="insurancePolicyForm.name2" placeholder="请输入投保人姓名"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="车主手机号" prop="mobile2">
-                <el-input v-model="insurancePolicyForm.mobile2" placeholder="请输入车主手机号"></el-input>
+              <el-form-item label="投保人手机号" prop="mobile2">
+                <el-input v-model="insurancePolicyForm.mobile2" placeholder="请输入投保人手机号" maxlength="11"
+                show-word-limit></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
@@ -554,13 +555,14 @@
           </template>
           <el-row :gutter="20" class="formItem formBlock" v-if="btns.owner2Text === '其他人'">
             <el-col :span="6">
-              <el-form-item label="车主姓名" prop="name3">
-                <el-input v-model="insurancePolicyForm.name3" placeholder="输入车主姓名"></el-input>
+              <el-form-item label="被保人姓名" prop="name3">
+                <el-input v-model="insurancePolicyForm.name3" placeholder="请输入被保人姓名"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="车主手机号" prop="mobile3">
-                <el-input v-model="insurancePolicyForm.mobile3" placeholder="请输入车主手机号"></el-input>
+              <el-form-item label="被保人手机号" prop="mobile3">
+                <el-input v-model="insurancePolicyForm.mobile3" placeholder="请输入被保人手机号" maxlength="11"
+                  show-word-limit></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">

+ 9 - 9
src/views/insurancePolicy/order.vue

@@ -110,12 +110,12 @@
       <el-table-column label="业务员信息" prop="salesmanInfo" width="200"></el-table-column>
       <el-table-column label="业务员类型" prop="salesmanType" width="200">
         <template #default="scope">
-          {{ typeAttrMap(scope.row.salesmanType) }}
+          {{ processPartnerTypeAttr(scope.row.salesmanType) }}
         </template>
       </el-table-column>
       <el-table-column label="出单机构" prop="deptName" width="200"></el-table-column>
       <el-table-column label="出单协议" prop="agreementName" width="200"></el-table-column>
-      <el-table-column label="录单人" prop="recorder" width="200"></el-table-column>
+      <el-table-column label="录单人" prop="createBy" width="200"></el-table-column>
       <el-table-column label="签单时间" prop="signingTime" width="200"></el-table-column>
       <el-table-column label="支付时间" prop="payTime" width="200"></el-table-column>
       <el-table-column label="交强险" prop="ciPremium" width="200"></el-table-column>
@@ -267,20 +267,20 @@ const allFields = {
   ]
 };
 
-const typeAttrMap=(value)=>{
+const processPartnerTypeAttr = (partnerTypeAttr: string) => {
+  if(!partnerTypeAttr) return ''
   const map = {
-    "1": '前线人员',
-    "2": '后线人员',
-    "3": '合伙人',
-    "4": '工作是管理员',
     "5": '团队',
     "6": '个代',
     "7": '电销',
     "8": '渠道',
   }
-  return map[value]
+  // 将字符串转为数组
+  const arr = partnerTypeAttr.split(',').map(item => item.trim());
+  // 过滤掉等于1、2、3、4的数据
+  const filteredArr = arr.filter(item => !['1', '2', '3', '4'].includes(item));
+  return map[filteredArr];
 }
-
 // 创建反向映射
 const fieldMap = Object.fromEntries(
   [...allFields.basic, ...allFields.other].map(item => [item.value, item.label])

+ 54 - 32
src/views/insurancePolicy/orderDetail.vue

@@ -9,13 +9,17 @@
             '1' ? '待核保' : detailData?.order?.orderStatus === '2' ? '核保中' : detailData?.order?.orderStatus ===
               '3' ? '人工处理' : detailData?.order?.orderStatus === '4' ? '待缴费' : detailData?.order?.orderStatus ===
                 '5' ? '已承保' : detailData?.order?.orderStatus === '6' ? '报价失败' : detailData?.order?.orderStatus ===
-                  '7' ? '核保失败' :detailData?.order?.orderStatus === '8'?'订单关闭':'--' }}</span>
+                  '7' ? '核保失败' : detailData?.order?.orderStatus === '8' ? '订单关闭' : '--' }}</span>
         </el-col>
         <el-col :span="12" class="orderTips">
-          <span class="tips">{{ detailData?.order?.orderStatus === '0' ? '订单报价中,请耐心等待' : detailData?.order?.orderStatus ===
-            '1' ? '订单已完成报价,请立即核保!' : detailData?.order?.orderStatus === '2' ? '订单核保中,请耐心等待' : detailData?.order?.orderStatus ===
-              '3' ? '订单人工处理中,请耐心等待' : detailData?.order?.orderStatus === '4' ? '订单核保已通过,请尽快支付!' : detailData?.order?.orderStatus
-                === '5' ? '已承保' : detailData?.order?.orderStatus === '6' ? '计算保费失败,请按要求修改订单' : detailData?.order?.orderStatus ===
+          <span class="tips">{{ detailData?.order?.orderStatus === '0' ? '订单报价中,请耐心等待' : detailData?.order?.orderStatus
+            ===
+            '1' ? '订单已完成报价,请立即核保!' : detailData?.order?.orderStatus === '2' ? '订单核保中,请耐心等待' :
+            detailData?.order?.orderStatus ===
+              '3' ? '订单人工处理中,请耐心等待' : detailData?.order?.orderStatus === '4' ? '订单核保已通过,请尽快支付!' :
+              detailData?.order?.orderStatus
+                === '5' ? '已承保' : detailData?.order?.orderStatus === '6' ? '计算保费失败,请按要求修改订单' :
+                detailData?.order?.orderStatus ===
                   '7' ? '核保不通过,请按意见修改订单' : detailData?.order?.orderStatus === '8'?'订单已关闭,有投保需求请重新报价':'--' }}</span>
         </el-col>
       </el-row>
@@ -28,9 +32,11 @@
           </el-icon>
           <div class="infoBox">
             <!-- 批单状态 = 待审核 -->
-            <div class="name" v-if="detailData?.insOrderAdjustVo.status === 1">{{ `订单申请${detailData?.insOrderAdjustVo.type === 0 ? '整单退保' : '险种批改' },等待审核处理` }}</div>
+            <div class="name" v-if="detailData?.insOrderAdjustVo.status === 1">{{
+              `订单申请${detailData?.insOrderAdjustVo.type === 0 ? '整单退保' : '险种批改' },等待审核处理` }}</div>
             <!-- 批单状态 = 退回修改 -->
-            <div class="name" v-if="detailData?.insOrderAdjustVo.status === 3">{{ `订单申请${detailData?.insOrderAdjustVo.type === 0 ? '整单退保' : '险种批改' }被退回,等修改后重新提交审核` }}</div>
+            <div class="name" v-if="detailData?.insOrderAdjustVo.status === 3">{{
+              `订单申请${detailData?.insOrderAdjustVo.type === 0 ? '整单退保' : '险种批改' }被退回,等修改后重新提交审核` }}</div>
             <div class="desc" style="color: var(--el-text-color-regular)">
               {{ `申请批改${handleCompute(detailData?.insOrderAdjustVo.afterPremium, detailData?.insOrderAdjustVo.premium)
                 > 0 ? '补缴保费金额' : '退款金额'}:¥${Math.abs(handleCompute(detailData?.insOrderAdjustVo.afterPremium,
@@ -59,8 +65,10 @@
         </el-col>
         <el-col :span="6">
           <span class="label">业务员类型</span>
-          <span class="words">{{ detailData?.salesmanInfo?.typeAttr == '5' ? '团队' : detailData?.salesmanInfo?.typeAttr ==
-            '6' ? '个代' : detailData?.salesmanInfo?.typeAttr == '7' ? '渠道' : detailData?.salesmanInfo?.typeAttr == '8' ?'电销组':'--'
+          <span class="words">{{ detailData?.salesmanInfo?.typeAttr == '5' ? '团队' : detailData?.salesmanInfo?.typeAttr
+            ==
+            '6' ? '个代' : detailData?.salesmanInfo?.typeAttr == '7' ? '渠道' : detailData?.salesmanInfo?.typeAttr == '8'
+              ?'电销组':'--'
             }}</span>
         </el-col>
         <el-col :span="6">
@@ -71,13 +79,14 @@
           <span class="label">出单协议</span>
           <span class="words" style="color: #00a0f4" @click="toAgreementDetail">{{ detailData?.order?.agreementName ||
             '--'
-            }}</span>
+          }}</span>
         </el-col>
         <el-col :span="6">
           <span class="label">协议类型</span>
-          <span class="words">{{ detailData?.order?.agreementType === '1' ? '平台协议-平台结算' : detailData?.order?.agreementType
-            ===
-            '2' ? '私有协议-自行结算' : detailData?.order?.agreementType === '3'?'网销协议-自行结算':'--' }}</span>
+          <span class="words">{{ detailData?.order?.agreementType === '1' ? '平台协议-平台结算' :
+            detailData?.order?.agreementType
+              ===
+              '2' ? '私有协议-自行结算' : detailData?.order?.agreementType === '3' ?'网销协议-自行结算':'--' }}</span>
         </el-col>
         <el-col :span="6">
           <span class="label">录单人</span>
@@ -129,7 +138,7 @@
             <span class="label">协议类型</span>
             <span class="value">
               <span>{{ detailData?.order?.agreementType === '1' ? '平台协议-平台结算' : detailData?.order?.agreementType ===
-                '2' ? '私有协议-自行结算' : detailData?.order?.agreementType === '3' ?'网销协议-自行结算':'--' }}</span>
+                '2' ? '私有协议-自行结算' : detailData?.order?.agreementType === '3' ? '网销协议-自行结算' : '--' }}</span>
             </span>
           </el-col>
           <el-col :span="6" class="TBMsgItem">
@@ -149,7 +158,7 @@
             <span class="value">
               <span>{{ detailData?.ciRiskInfoVo?.startDate ||
                 detailData?.ciRiskInfoVo?.endDate ? `${detailData?.ciRiskInfoVo?.startDate} -
-                ${detailData?.ciRiskInfoVo?.endDate}`:'--'}}</span>
+                ${detailData?.ciRiskInfoVo?.endDate}` : '--' }}</span>
             </span>
           </el-col>
           <el-col :span="6" class="TBMsgItem">
@@ -169,7 +178,7 @@
             <span class="value">
               <span>{{ detailData?.biRiskInfoVo?.startDate ||
                 detailData?.biRiskInfoVo?.endDate ? `${detailData?.biRiskInfoVo?.startDate} -
-                ${detailData?.biRiskInfoVo?.endDate}`:'--'}}</span>
+                ${detailData?.biRiskInfoVo?.endDate}` : '--' }}</span>
             </span>
           </el-col>
           <el-col :span="6" class="TBMsgItem">
@@ -196,7 +205,7 @@
           <div class="taxList">
             <span class="taxItem" :class="{ 'active': item.bool }" v-for="(item, index) in taxList" :key="index">{{
               item.name
-              }}</span>
+            }}</span>
           </div>
         </div>
         <el-row :gutter="20">
@@ -326,9 +335,10 @@
         <el-row :gutter="20">
           <el-col :span="6" class="carMsgItem">
             <span class="label">类型</span>
-            <span class="value">{{ detailData?.carInfoVo?.isRegistered == '0' ? '已上牌' : detailData?.carInfoVo?.isRegistered
-              ==
-              '1'?'未上牌':'--' }}</span>
+            <span class="value">{{ detailData?.carInfoVo?.isRegistered == '0' ? '已上牌' :
+              detailData?.carInfoVo?.isRegistered
+                ==
+                '1' ?'未上牌':'--' }}</span>
           </el-col>
           <el-col :span="6" class="carMsgItem">
             <span class="label">车牌</span>
@@ -350,12 +360,12 @@
           <el-col :span="6" class="carMsgItem">
             <span class="label">使用性质</span>
             <span class="value">{{ dictChange(optionObj['car_nature_code'], detailData?.carInfoVo?.carNatureCode)
-              }}</span>
+            }}</span>
           </el-col>
           <el-col :span="6" class="carMsgItem">
             <span class="label">车辆用途</span>
             <span class="value">{{ dictChange(optionObj['vehicle_use_code'], detailData?.carInfoVo?.vehicleUseCode)
-              }}</span>
+            }}</span>
           </el-col>
           <el-col :span="6" class="carMsgItem">
             <span class="label">车辆种类</span>
@@ -364,12 +374,12 @@
           <el-col :span="6" class="carMsgItem">
             <span class="label">车辆类型</span>
             <span class="value">{{ dictChange(optionObj['car_type_code'], detailData?.carInfoVo?.carTypeCode)
-              }}</span>
+            }}</span>
           </el-col>
           <el-col :span="6" class="carMsgItem">
             <span class="label">能源种类</span>
             <span class="value">{{ dictChange(optionObj['energy_type_code'], detailData?.carInfoVo?.energyTypeCode)
-              }}</span>
+            }}</span>
           </el-col>
           <el-col :span="6" class="carMsgItem">
             <span class="label">注册日期</span>
@@ -426,7 +436,7 @@
             <span class="label">证件类型</span>
             <span class="value">{{ detailData?.ownersInfo?.identifyType ===
               '01' ? '身份证' : detailData?.ownersInfo?.identifyType
-              === '02'?'营业执照': '--' }}</span>
+                === '02' ? '营业执照' : '--' }}</span>
           </el-col>
           <el-col :span="6" class="personMsgItem" v-if="detailData?.ownersInfo?.identifyType === '01'">
             <span class="label">证件号码</span>
@@ -475,7 +485,7 @@
           <div class="taxList">
             <span class="taxItem" :class="{ 'active': item.bool }" v-for="(item, index) in tbList" :key="index">{{
               item.name
-              }}</span>
+            }}</span>
           </div>
         </div>
         <el-row :gutter="20" v-if="!tbList[0].bool">
@@ -490,7 +500,7 @@
           <el-col :span="6" class="personMsgItem">
             <span class="label">证件类型</span>
             <span class="value">{{ detailData?.policyHolderInfo?.identifyType ===
-              '01' ? '身份证' : detailData?.policyHolderInfo?.identifyType === '02' ?'营业执照': '--' }}</span>
+              '01' ? '身份证' : detailData?.policyHolderInfo?.identifyType === '02' ? '营业执照' : '--' }}</span>
           </el-col>
           <el-col :span="6" class="personMsgItem" v-if="detailData?.policyHolderInfo?.identifyType === '01'">
             <span class="label">证件号码</span>
@@ -539,7 +549,7 @@
           <div class="taxList">
             <span class="taxItem" :class="{ 'active': item.bool }" v-for="(item, index) in bbList" :key="index">{{
               item.name
-              }}</span>
+            }}</span>
           </div>
         </div>
         <el-row :gutter="20" v-if="!bbList[0].bool && !bbList[1].bool">
@@ -554,7 +564,7 @@
           <el-col :span="6" class="personMsgItem">
             <span class="label">证件类型</span>
             <span class="value">{{ detailData?.insuredPersonInfo?.identifyType ===
-              '01' ? '身份证' : detailData?.insuredPersonInfo?.identifyType === '02' ?'营业执照': '--' }}</span>
+              '01' ? '身份证' : detailData?.insuredPersonInfo?.identifyType === '02' ? '营业执照' : '--' }}</span>
           </el-col>
           <el-col :span="6" class="personMsgItem" v-if="detailData?.insuredPersonInfo?.identifyType === '01'">
             <span class="label">证件号码</span>
@@ -1447,11 +1457,23 @@ const handleImageSave = () => {
 const handleImageUpload = () => {
   let list = images.value.filter(a => a.checked)
   if (list.length > 0) {
+    let arr = images.value.map(a => {
+      return {
+        imageCode: a.imageType,
+        imageBase64List: [
+          {
+            imageId: a.imageId
+          }
+        ]
+      }
+    })
     api.insurancePolicyApi.imagesUpload({
       order: {
         ordersNo: detailData.value?.order?.ordersNo,
         quoteNo: quoteNo.value
-      }
+      },
+      imageVoList: arr,
+      list: images.value
     }).then((res: any) => {
       if (res.code == 200) {
         ElMessage({
@@ -1765,11 +1787,11 @@ const initDetail = () => {
   })
 }
 // 影像查询
-const imageEcho = (item: any)=>{
+const imageEcho = (item: any) => {
   api.insurancePolicyApi.getImage(item).then((res: any) => {
     if (res.code == 200) {
       console.log(res)
-      images.value=res.data.images.map((val:any)=>{
+      images.value = res.data.images.map((val: any) => {
         return {
           ...val,
           checked: false

Разлика између датотеке није приказан због своје велике величине
+ 407 - 332
src/views/operationManagement/modules/addOperation.vue


+ 343 - 86
src/views/operationManagement/operationDetail.vue

@@ -19,9 +19,12 @@
               <span class="allName">{{ dataDetail?.name }}</span>
             </el-col>
             <el-col :span="12" style="display: flex; justify-content: flex-end">
-              <el-button class="bg-white" style="border-radius: 2px" plain type="primary" @click="checkPass" v-if="dataDetail?.status == 0 ||dataDetail?.status == 1 ||dataDetail?.status == 2 ||dataDetail?.status == 3 ">审核通过</el-button>
-              <el-button class="bg-white" style="border-radius: 2px" plain type="primary" @click="checkNotPass" v-if="dataDetail?.status != 5&&dataDetail?.status != 6&&dataDetail?.status != 7&&dataDetail?.status != 8">审核不通过</el-button>
-              <el-button class="bg-white" style="border-radius: 2px" plain type="primary" @click="editDetail">编辑</el-button>&nbsp;
+              <el-button class="bg-white" style="border-radius: 2px" plain type="primary" @click="checkPass"
+                v-if="dataDetail?.status == 0 || dataDetail?.status == 1 || dataDetail?.status == 2 || dataDetail?.status == 3">审核通过</el-button>
+              <el-button class="bg-white" style="border-radius: 2px" plain type="primary" @click="checkNotPass"
+                v-if="dataDetail?.status != 5 && dataDetail?.status != 6 && dataDetail?.status != 7 && dataDetail?.status != 8">审核不通过</el-button>
+              <el-button class="bg-white" style="border-radius: 2px" plain type="primary"
+                @click="editDetail">编辑</el-button>&nbsp;
               <el-dropdown trigger="click" @command="handleCommand">
                 <el-button class="bg-white" style="border-radius: 2px" plain type="primary">更多</el-button>
                 <template #dropdown>
@@ -38,7 +41,7 @@
         </template>
         <el-descriptions-item label="工号:" width="33%">{{ dataDetail?.userId }}</el-descriptions-item>
         <el-descriptions-item label="所属机构:" width="33%">{{ dataDetail?.deptName }}</el-descriptions-item>
-        <el-descriptions-item label="状态:" width="33%">{{  statusMap(dataDetail?.status)}}</el-descriptions-item>
+        <el-descriptions-item label="状态:" width="33%">{{ statusMap(dataDetail?.status) }}</el-descriptions-item>
         <el-descriptions-item label="类型:" width="33%">{{ typeAttrMap(dataDetail?.typeAttr) }}</el-descriptions-item>
         <el-descriptions-item label="所属团队:" width="33%">{{ dataDetail?.organizationName }}</el-descriptions-item>
         <el-descriptions-item label="创建人:" width="33%">{{ dataDetail?.updateBy }}</el-descriptions-item>
@@ -53,7 +56,8 @@
               <el-descriptions-item label="姓名:" width="33%">{{ dataDetail?.name }}</el-descriptions-item>
               <el-descriptions-item label="手机号:" width="33%">{{ dataDetail?.mobile }}</el-descriptions-item>
               <el-descriptions-item label="证件号:" width="33%">{{ dataDetail?.identity }}</el-descriptions-item>
-              <el-descriptions-item label="证件有效期始:" width="33%">{{ dataDetail?.identityTimeStart }}</el-descriptions-item>
+              <el-descriptions-item label="证件有效期始:" width="33%">{{ dataDetail?.identityTimeStart
+                }}</el-descriptions-item>
               <el-descriptions-item label="证件有效期止:" width="33%">{{ dataDetail?.identityTimeEnd }}</el-descriptions-item>
             </el-descriptions>
             <el-descriptions title="其他信息">
@@ -79,17 +83,15 @@
             <el-descriptions title="银行卡信息">
               <el-descriptions-item>
                 <template #default>
-                  <el-table
-                    :data="dataDetail?.bankCardList"
-                    height="300"
-                  >
+                  <el-table :data="dataDetail?.bankCardList" height="300">
                     <el-table-column prop="name" label="姓名"></el-table-column>
                     <el-table-column prop="bankName" label="开户行"></el-table-column>
                     <el-table-column prop="bankCardNumber" label="卡号"></el-table-column>
                     <el-table-column prop="bankAddress" label="开户支行"></el-table-column>
                     <el-table-column prop="auditStatus" label="审核状态">
                       <template #default="scope">
-                        {{ scope.row.auditStatus == '0'?'未审核':scope.row.auditStatus == '1'?'审核通过':scope.row.auditStatus == '2'?'审核驳回':''}}
+                        {{ scope.row.auditStatus == '0' ? '未审核' : scope.row.auditStatus == '1' ? '审核通过' : scope.row.auditStatus
+                        == '2'?'审核驳回':''}}
                       </template>
                     </el-table-column>
                     <el-table-column label="操作">
@@ -101,7 +103,8 @@
                 </template>
               </el-descriptions-item>
             </el-descriptions>
-            <el-button class="bg-white" plain type="primary" icon="plus" style="width: 100%; border-radius: 2px" @click="addBankCard">添加银行卡</el-button>
+            <el-button class="bg-white" plain type="primary" icon="plus" style="width: 100%; border-radius: 2px"
+              @click="addBankCard">添加银行卡</el-button>
           </div>
         </el-tab-pane>
         <el-tab-pane label="资料附件" name="file" style="padding: 0 24px">
@@ -113,21 +116,85 @@
                     <span class="label">身份证(人像面)</span>
                     <div class="fileName">
                       <span class="file-name">{{ imageChangeName('sfz1') }}</span>
-                      <el-icon class="file-icon" @click="imageView('sfz1')"><View /></el-icon>
+                      <el-icon class="file-icon" @click="imageView('sfz1')">
+                        <View />
+                      </el-icon>
+                      <el-icon class="file-icon" @click="downloadImage('sfz1')">
+                        <Download />
+                      </el-icon>
                     </div>
                   </div>
                   <div class="fileItem" v-if="imageChangeName('sfz2')">
                     <span class="label">身份证(国徽面)</span>
                     <div class="fileName">
                       <span class="file-name">{{ imageChangeName('sfz2') }}</span>
-                      <el-icon class="file-icon" @click="imageView('sfz2')"><View /></el-icon>
+                      <el-icon class="file-icon" @click="imageView('sfz2')">
+                        <View />
+                      </el-icon>
+                      <el-icon class="file-icon" @click="downloadImage('sfz2')">
+                        <Download />
+                      </el-icon>
                     </div>
                   </div>
                   <div class="fileItem" v-if="imageChangeName('qualification')">
                     <span class="label">展业资格证</span>
                     <div class="fileName">
                       <span class="file-name">{{ imageChangeName('qualification') }}</span>
-                      <el-icon class="file-icon" @click="imageView('qualification')"><View /></el-icon>
+                      <el-icon class="file-icon" @click="imageView('qualification')">
+                        <View />
+                      </el-icon>
+                      <el-icon class="file-icon" @click="downloadImage('qualification')">
+                        <Download />
+                      </el-icon>
+                    </div>
+                  </div>
+
+                  <div class="fileItem" v-if="imageChangeName('contract')">
+                    <span class="label">劳动合同</span>
+                    <div class="fileName">
+                      <span class="file-name">{{ imageChangeName('contract') }}</span>
+                      <el-icon class="file-icon" @click="imageView('contract')">
+                        <View />
+                      </el-icon>
+                      <el-icon class="file-icon" @click="downloadImage('contract')">
+                        <Download />
+                      </el-icon>
+                    </div>
+                  </div>
+                  <div class="fileItem" v-if="imageChangeName('applicant')">
+                    <span class="label">应聘表</span>
+                    <div class="fileName">
+                      <span class="file-name">{{ imageChangeName('applicant') }}</span>
+                      <el-icon class="file-icon" @click="imageView('applicant')">
+                        <View />
+                      </el-icon>
+                      <el-icon class="file-icon" @click="downloadImage('applicant')">
+                        <Download />
+                      </el-icon>
+                    </div>
+                  </div>
+                  <div class="fileItem" v-if="imageChangeName('salaryTable')">
+                    <span class="label">定薪表</span>
+                    <div class="fileName">
+                      <span class="file-name">{{ imageChangeName('salaryTable') }}</span>
+                      <el-icon class="file-icon" @click="imageView('salaryTable')">
+                        <View />
+                      </el-icon>
+                      <el-icon class="file-icon" @click="downloadImage('salaryTable')">
+                        <Download />
+                      </el-icon>
+                    </div>
+                  </div>
+                  <div class="fileItem" v-if="imageChangeName('leaveTable')">
+                    <span class="label">离职表</span>
+                    <div class="fileName">
+                      <span class="file-name">{{ imageChangeName('leaveTable') }}</span>
+                      <el-icon class="file-icon" @click="imageView('leaveTable')">
+                        <View />
+                      </el-icon>
+                      <el-icon class="file-icon" @click="downloadImage('leaveTable')">
+                        <Download />
+                      </el-icon>
                     </div>
                   </div>
                 </template>
@@ -137,41 +204,28 @@
         </el-tab-pane>
       </el-tabs>
     </div>
-    <el-dialog
-      v-model="bankCardDialogShow"
-      :title="bankTitle"
-      width="500"
-    >
+    <el-dialog v-model="bankCardDialogShow" :title="bankTitle" width="500">
       <addCard v-if="bankCardDialogShow" @closeDialog="closeAddBankCard" :userInfo="bankCardInfo"></addCard>
     </el-dialog>
-    <el-dialog
-      v-model="dialogShow"
-      title="编辑"
-      width="1000"
-    >
+    <el-dialog v-model="dialogShow" title="编辑" width="1000">
       <addOperation ref="AddOperationRef" @closeDialog="closeAddOperation"></addOperation>
     </el-dialog>
-    <el-dialog
-      v-model="allocationShow"
-      title="分配管理人"
-      width="800"
-    >
+    <el-dialog v-model="allocationShow" title="分配管理人" width="800">
       <allocation ref="AllocationRef" @closeDialog="closeAllocation"></allocation>
     </el-dialog>
-    <el-dialog
-      v-model="imageShow"
-      title="预览"
-      width="500"
-    >
+    <el-dialog v-model="imageShow" title="预览" width="500">
       <div class="image-box">
         <img class="image-view" :src="imageUrl" />
       </div>
     </el-dialog>
+    <el-dialog title="文件预览" v-model="fileShow">
+      <vue-office-docx :src="fileUrl" style="height: 600px; margin: 0; padding: 0"></vue-office-docx>
+    </el-dialog>
   </div>
 </template>
 
 <script setup lang="ts">
-import {nextTick, ref} from 'vue'
+import { nextTick, ref } from 'vue'
 import addOperation from './modules/addOperation.vue'
 import addCard from './modules/addCard.vue'
 import allocation from './modules/allocation.vue'
@@ -180,9 +234,11 @@ import { ElMessage, ElMessageBox } from 'element-plus'
 import Allocation from "@/views/operationManagement/modules/allocation.vue";
 import { useRoute, useRouter } from 'vue-router'
 import api from '@/api'
-import {OperationIsEnable} from "@/api/modules/operation.ts";
+import { OperationIsEnable } from "@/api/modules/operation.ts";
 import router from "@/router";
 import Detail from '../representative/detail.vue';
+import VueOfficeDocx from "@vue-office/docx";
+
 
 let AddOperationRef = ref(null)
 const AllocationRef = ref(null)
@@ -201,12 +257,12 @@ const handleCommand = (e) => {
         showCancelButton: true,
         confirmButtonText: '确定',
         cancelButtonText: '取消',
-      }).then(( action ) => {
-        if(action === 'confirm') {
+      }).then((action) => {
+        if (action === 'confirm') {
           let ids = [myRoute.query.id]
           operationDel(ids)
         }
-      }).catch(( action ) => {
+      }).catch((action) => {
 
       })
       break;
@@ -218,8 +274,8 @@ const handleCommand = (e) => {
         showCancelButton: true,
         confirmButtonText: '确定',
         cancelButtonText: '取消',
-      }).then(( action ) => {
-        if(action === 'confirm') {
+      }).then((action) => {
+        if (action === 'confirm') {
           let data = {
             ids: [myRoute.query.ids],
             isEnable: 1,
@@ -227,7 +283,7 @@ const handleCommand = (e) => {
           }
           operationIsEnable(data)
         }
-      }).catch(( action ) => {
+      }).catch((action) => {
 
       })
       break;
@@ -239,8 +295,8 @@ const handleCommand = (e) => {
         showCancelButton: true,
         confirmButtonText: '确定',
         cancelButtonText: '取消',
-      }).then(( action ) => {
-        if(action === 'confirm'){
+      }).then((action) => {
+        if (action === 'confirm') {
           let data = {
             ids: [myRoute.query.ids],
             isEnable: 0,
@@ -248,7 +304,7 @@ const handleCommand = (e) => {
           }
           operationIsEnable(data)
         }
-      }).catch(( action ) => {
+      }).catch((action) => {
 
       })
       break;
@@ -281,7 +337,7 @@ const statusMap = (value: any) => {
   return map[value]
 }
 //人员类型匹配
-const typeAttrMap=(value)=>{
+const typeAttrMap = (value) => {
   const map = {
     "1": '前线人员',
     "2": '后线人员',
@@ -319,7 +375,7 @@ const addBankCard = () => {
 
 }
 // 编辑银行卡
-const editBankCard = (row:any) => {
+const editBankCard = (row: any) => {
   bankTitle.value = '查看银行卡'
   bankCardInfo.value = {
     userJzgInfoId: dataDetail.value.id,
@@ -332,7 +388,7 @@ const editBankCard = (row:any) => {
 }
 // 关闭添加银行卡弹框
 const closeAddBankCard = (type: string) => {
-  if(type == '确定') {
+  if (type == '确定') {
     initDetail()
   }
   bankCardDialogShow.value = false
@@ -344,7 +400,7 @@ const operationDel = (id: string[]) => {
     ids: id,
     getAll: 0
   }).then(res => {
-    if(res?.code == 200) {
+    if (res?.code == 200) {
       ElMessage({
         message: res.msg,
         type: 'success'
@@ -363,7 +419,7 @@ const operationDel = (id: string[]) => {
 // 启用/禁用
 const operationIsEnable = (data: OperationIsEnable) => {
   api.operationApi.operationIsEnable(data).then(res => {
-    if(res?.code == 200) {
+    if (res?.code == 200) {
       ElMessage({
         message: res.msg,
         type: 'success'
@@ -381,7 +437,7 @@ const operationIsEnable = (data: OperationIsEnable) => {
 // 审核通过
 const checkPass = () => {
   api.operationApi.salesmanAuthSuccess({ userInfoId: dataDetail.value.id }).then(res => {
-    if(res.code == 200) {
+    if (res.code == 200) {
       ElMessage({
         message: res.msg,
         type: 'success',
@@ -405,13 +461,13 @@ const checkNotPass = () => {
     showCancelButton: true,
     confirmButtonText: '确定',
     cancelButtonText: '取消',
-  }).then(({ value, action } ) => {
-    if(action == 'confirm') {
+  }).then(({ value, action }) => {
+    if (action == 'confirm') {
       api.operationApi.salesmanAuthFailed({
         userInfoId: dataDetail.value.id,
         approvalOpinion: value
       }).then(res => {
-        if(res.code == 200) {
+        if (res.code == 200) {
           ElMessage({
             message: res.msg,
             type: 'success',
@@ -425,7 +481,7 @@ const checkNotPass = () => {
         }
       })
     }
-  }).catch(( action ) => {
+  }).catch((action) => {
 
   })
 }
@@ -439,7 +495,7 @@ const editDetail = () => {
   })
 }
 const closeAddOperation = (text: string) => {
-  if(text == '确定') {
+  if (text == '确定') {
     initDetail()
   }
   dialogShow.value = false
@@ -447,33 +503,200 @@ const closeAddOperation = (text: string) => {
 
 // 附件转换
 const imageChangeName = (type) => {
-  if(dataDetail.value&&dataDetail.value.fileList.length>0) {
+  if (dataDetail.value && dataDetail.value.fileList.length > 0) {
     let obj = dataDetail.value.fileList.find(item => item.fileType === type)
     return obj?.fileName
   }
 }
 const imageChangeUrl = (type) => {
-  if(dataDetail.value.fileList.length>0) {
+  if (dataDetail.value.fileList.length > 0) {
     let obj = dataDetail.value.fileList.find(item => item.fileType == type)
     return obj?.fileUrl
   }
 }
-
+// 身份证人像面
+let IDCardFrontName = ref("");
+let IDCardFront = ref("");
+// 身份证国徽面
+let IDCardBackName = ref("");
+let IDCardBack = ref("");
+// 展业资格证
+let businessLicenseName = ref("");
+let businessLicense = ref("");
+// 劳务合同
+let contractName = ref("");
+let contract = ref("");
+// 应聘表
+let applicantName = ref("");
+let applicant = ref("");
+// 定薪表
+let decidePayName = ref("");
+let decidePay = ref("");
+// 离职表
+let dimissionName = ref("");
+let dimission = ref("");
 // 预览
 let imageUrl = ref('')
 let imageShow = ref(false)
 const imageView = (type: string) => {
-  imageUrl.value = imageChangeUrl(type)
-  imageShow.value = true
+  switch (type) {
+    case "sfz1":
+      imageShow.value = true;
+      imageUrl.value = IDCardFront.value;
+      break;
+    case "sfz2":
+      imageShow.value = true;
+      imageUrl.value = IDCardBack.value;
+      break;
+    case "qualification":
+      imageShow.value = true;
+      imageUrl.value = businessLicense.value;
+      break;
+    case "contract":
+      imageUrl.value = contract.value;
+      nextTick(() => {
+        // loadPdf(contract.value)
+        if (contract.value.includes('.pdf')) {
+          window.open(contract.value, '_blank')
+        } else if (contract.value.includes('.doc') || contract.value.includes('.docx')) {
+          fileShow.value = true
+          nextTick(() => {
+            filePreview(contract.value)
+          })
+        } else if (contract.value.includes('.jpg') || contract.value.includes('.jpeg') || contract.value.includes('.png')) {
+          imageShow.value = true
+        }
+      })
+      break;
+    case "applicant":
+      imageUrl.value = applicant.value;
+      nextTick(() => {
+        // loadPdf(applicant.value)
+        if (applicant.value.includes('.pdf')) {
+          window.open(applicant.value, '_blank')
+        } else if (applicant.value.includes('.doc') || applicant.value.includes('.docx')) {
+          fileShow.value = true
+          filePreview(applicant.value)
+        } else if (applicant.value.includes('.jpg') || applicant.value.includes('.jpeg') || applicant.value.includes('.png')) {
+          imageShow.value = true
+        }
+      })
+      break;
+    case "salaryTable":
+      imageUrl.value = decidePay.value;
+      nextTick(() => {
+        // loadPdf(decidePay.value)
+        if (decidePay.value.includes('.pdf')) {
+          window.open(decidePay.value, '_blank')
+        } else if (decidePay.value.includes('.doc') || decidePay.value.includes('.docx')) {
+          fileShow.value = true
+          filePreview(decidePay.value)
+        } else if (decidePay.value.includes('.jpg') || decidePay.value.includes('.jpeg') || decidePay.value.includes('.png')) {
+          imageShow.value = true
+        }
+      })
+      break;
+    case "leaveTable":
+      imageUrl.value = dimission.value;
+      nextTick(() => {
+        // loadPdf(dimission.value)
+        if (dimission.value.includes('.pdf')) {
+          window.open(dimission.value, '_blank')
+        } else if (dimission.value.includes('.doc') || dimission.value.includes('.docx')) {
+          fileShow.value = true
+          filePreview(dimission.value)
+        } else if (dimission.value.includes('.jpg') || dimission.value.includes('.jpeg') || dimission.value.includes('.png')) {
+          imageShow.value = true
+        }
+      })
+      break;
+  }
+};
+const downloadImage = (type: string) => {
+  switch (type) {
+    case "sfz1":
+      download(IDCardFront.value, IDCardFrontName.value)
+      break;
+    case "sfz2":
+      download(IDCardBack.value, IDCardBackName.value)
+      break;
+    case "qualification":
+      download(businessLicense.value, businessLicenseName.value)
+      break;
+    case "contract":
+      download(contract.value, contractName.value)
+      break;
+    case "applicant":
+      download(applicant.value, applicantName.value)
+      break;
+    case "salaryTable":
+      download(decidePay.value, decidePayName.value)
+      break;
+    case "leaveTable":
+      download(dimission.value, dimissionName.value)
+      break;
+  }
 }
+// 图片下载
+const download = (url, name) => {
+  let a_link = document.createElement('a')
+  fetch(url).then((res) => res.blob())
+    .then((blob) => {
+      // 将链接地址字符内容转变成blob地址
+      a_link.href = URL.createObjectURL(blob)
+      console.log(a_link.href)
+      a_link.download = name //下载的文件的名字
+      document.body.appendChild(a_link)
+      a_link.click()
+    })
 
+}
+let fileShow = ref(false)
+let fileUrl = ref('')
+const filePreview = (file) => {
+  nextTick(() => {
+    fileUrl.value = file
+  })
+}
 // 详情
 let dataDetail = ref(null)
 const initDetail = () => {
   let id = myRoute.query?.id
-  api.operationApi.operationDetail(id).then((res:any) => {
-    if(res?.code == 200) {
+  api.operationApi.operationDetail(id).then((res: any) => {
+    if (res?.code == 200) {
       dataDetail.value = res.data
+      res.data.fileList.map((item: any) => {
+        switch (item.fileType) {
+          case "sfz1":
+            IDCardFrontName.value = item.fileName;
+            IDCardFront.value = item.fileUrl;
+            break;
+          case "sfz2":
+            IDCardBackName.value = item.fileName;
+            IDCardBack.value = item.fileUrl;
+            break;
+          case "qualification":
+            businessLicenseName.value = item.fileName;
+            businessLicense.value = item.fileUrl;
+            break;
+          case "contract":
+            contractName.value = item.fileName;
+            contract.value = item.fileUrl;
+            break;
+          case "applicant":
+            applicantName.value = item.fileName;
+            applicant.value = item.fileUrl;
+            break
+          case "salaryTable":
+            decidePayName.value = item.fileName;
+            decidePay.value = item.fileUrl;
+            break;
+          case "leaveTable":
+            dimissionName.value = item.fileName;
+            dimission.value = item.fileUrl;
+            break;
+        }
+      })
     } else {
       ElMessage({
         message: res.msg,
@@ -486,8 +709,8 @@ const initDetail = () => {
 // 初始化银行数据
 let bankOption = ref([])
 const initBankCard = () => {
-  api.commonApi.personInfo('bank_info').then((res:any) => {
-    if(res?.code == 200) {
+  api.commonApi.personInfo('bank_info').then((res: any) => {
+    if (res?.code == 200) {
       bankOption.value = res.data
     } else {
       ElMessage({
@@ -501,7 +724,7 @@ const initBankCard = () => {
 
 // 名字转换首字母
 const initName = (name: string) => {
-  return name?pinyin.getFullChars(name).substring(0, 1):''
+  return name ? pinyin.getFullChars(name).substring(0, 1) : ''
 }
 
 onMounted(() => {
@@ -512,12 +735,13 @@ onMounted(() => {
 </script>
 
 <style scoped lang="scss">
-.detail{
+.detail {
   margin: 0 10px;
   height: calc(100vh - 120px);
   background-color: white;
   overflow-y: auto;
-  .state{
+
+  .state {
     border: 1px solid #FF4545;
     border-radius: 10px;
     padding: 10px 20px;
@@ -526,31 +750,38 @@ onMounted(() => {
     margin: 5px 0;
     font-weight: 400;
     color: #333333;
-    h3{
+
+    h3 {
       font-size: 16px;
       margin: 0 0 10px;
-      color: rgba(0,0,0,.64);
+      color: rgba(0, 0, 0, .64);
     }
-    p{
+
+    p {
       font-size: 14px;
       margin: 10px 0;
     }
   }
-  .info{
+
+  .info {
     background: white;
     padding: 24px;
     margin: 10px 0;
     border-radius: 10px;
+
     :deep(.el-descriptions__title) {
       width: 100%;
     }
+
     :deep(.el-tabs__nav-wrap) {
       padding: 0 25px;
     }
+
     :deep(.el-tabs__item) {
       font-size: 18px;
     }
-    .firstName{
+
+    .firstName {
       width: 30px;
       height: 30px;
       text-align: center;
@@ -561,75 +792,101 @@ onMounted(() => {
       font-size: 18px;
       margin-right: 10px;
     }
-    .allName{
+
+    .allName {
       font-size: 14px;
     }
   }
-  .message{
+
+  .message {
     background: white;
+
     :deep(.el-tabs__nav-scroll) {
       padding: 24px 0 0 24px;
     }
-    .other{
-      .fileItem{
+
+    .other {
+      .fileItem {
         display: flex;
         justify-content: flex-start;
         align-items: center;
         margin: 10px 0;
-        .label{
+
+        .label {
           width: 200px;
         }
-        .fileName{
+
+        .fileName {
           width: calc(100% - 500px);
           line-height: 30px;
           display: flex;
           align-items: center;
           padding: 0 20px;
-          &:hover{
+
+          &:hover {
             background: #ccc;
           }
-          .file-name{
+
+          .file-name {
             width: 200px;
             overflow: hidden;
             text-overflow: ellipsis;
             white-space: nowrap;
             margin-right: 20px;
           }
-          .file-icon{
+
+          .file-icon {
             display: flex;
             justify-content: flex-start;
             align-items: center;
             height: 30px;
+            margin-left: 10px;
+            font-size: 16px;
             cursor: pointer;
-            &:hover{
+
+            &:hover {
               color: #00a0f4;
             }
           }
         }
       }
-      .cardImage{
+
+      .cardImage {
         display: block;
         width: 80px;
         height: 80px;
         border-radius: 5px;
       }
+
       :deep(.el-descriptions__title) {
         padding-left: 20px;
         font-size: 16px;
       }
     }
   }
-  .image-box{
+
+  .image-box {
     display: flex;
     align-content: center;
     justify-content: center;
-    .image-view{
+
+    .image-view {
       width: 300px;
       height: 200px;
     }
   }
+
   :deep(.el-table th.el-table__cell) {
     background-color: #F7F7F9;
   }
 }
+
+:deep(.vue-office-docx-main) {
+  height: 600px;
+  overflow-y: auto;
+}
+
+:deep(.docx-wrapper) {
+  background: white;
+}
 </style>

+ 1 - 0
src/views/payCredit/generanView.vue

@@ -66,6 +66,7 @@
         >
             <el-table-column prop="name" label="业务员姓名"></el-table-column>
             <el-table-column prop="mobile" label="业务员手机号"></el-table-column>
+            <el-table-column prop="workNumber" label="业务员工号"></el-table-column>
             <el-table-column prop="attrType" label="业务员类型">
                 <template #default="scope">
                     {{ scope.row.attrType == '1'?'前线人员':scope.row.attrType == '2'?'后线人员':scope.row.attrType == '3'?'合伙人':scope.row.attrType == '4'?'工作室管理员':scope.row.attrType == '5'?'团队':scope.row.attrType == '6'?'个代':scope.row.attrType == '7'?'电销':scope.row.attrType == '8'?'渠道':'' }}

Разлика између датотеке није приказан због своје велике величине
+ 454 - 547
src/views/payCredit/index.vue


+ 1 - 1
src/views/payCredit/myTask.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="myTask">
         <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
-            <el-tab-pane :label="`领取(${total1})`" name="first">
+            <el-tab-pane :label="`领取(${total1})`" name="first">
                 <el-form v-model="firstForm" label-width="100">
                     <el-row :gutter="20">
                         <el-col :span="8">

+ 6 - 5
src/views/personnel/memberManagement.vue

@@ -86,7 +86,7 @@
               <el-dropdown-item v-on:click="changeDept(scope.operationData)">变更机构</el-dropdown-item>
               <el-dropdown-item v-on:click="resign(scope.operationData)">操作离职</el-dropdown-item>
               <el-dropdown-item v-on:click="transfer(scope.operationData)">资源转移</el-dropdown-item>
-              <el-dropdown-item v-on:click="delUser(scope)">删除</el-dropdown-item>
+              <el-dropdown-item v-on:click="delUser(scope.operationData)">删除</el-dropdown-item>
             </template>
           </el-dropdown>
         </template>
@@ -332,7 +332,6 @@ const columns = [
   {
     prop: "status", label: "状态",
     formatter: (row: any) => {
-      console.log(row)
       let comType = "";
       statusList.value.forEach((item: any) => {
         if (item.value == row.status) {
@@ -435,6 +434,7 @@ const editorInstitution = (item: any) => {
 
 };
 const del = (item: any) => {
+  console.log(item)
   // ElPopconfirm('是否确认')
   ElMessageBox({
     title: '提示',
@@ -450,8 +450,10 @@ const del = (item: any) => {
           id: item.id,
         })
         .then((res) => {
-          ElMessage.success("操作成功");
-          getInstitutionList(); //机构列表
+          if (res.code == 200) {
+            ElMessage.success("操作成功");
+            getInstitutionList(); //机构列表
+          }
         });
     }
   })
@@ -574,7 +576,6 @@ function delUser(item: any) {
             api.userApi
               .userDelete({
                 ids: [operationForm.value.id],
-
               })
               .then((res: any) => {
                 if (res.code == 200) {

+ 212 - 219
src/views/personnel/modules/addOperation.vue

@@ -34,16 +34,16 @@
                     placeholder="请填写登录密码"></el-input>
                 </el-form-item>
               </el-col>
-              <el-col :span="12">
-                <el-form-item prop="isAddSalesman" label="同时添加为业务员" v-if="!route.query.id">
+              <el-col :span="12" v-if="!route.query.id">
+                <el-form-item prop="isAddSalesman" label="同时添加为业务员">
                   <el-select v-model="operationForm.isAddSalesman">
                     <el-option label="是" value="1" key="1"></el-option>
                     <el-option label="否" value="0" key="0"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
-              <el-col :span="12 " v-if="operationForm.isAddSalesman == '1'">
-                <el-form-item prop="typeAttr" label="业务员类型" >
+              <el-col :span="12" v-if="operationForm.isAddSalesman == '1'">
+                <el-form-item prop="typeAttr" label="业务员类型">
                   <el-select v-model="operationForm.typeAttr" placeholder="请选择业务员类型" @change="typeAttrChange">
                     <el-option key="1" value="6" label="个代"></el-option>
                     <el-option key="2" value="8" label="渠道"></el-option>
@@ -59,13 +59,13 @@
                   </el-select>
                 </el-form-item>
               </el-col>
-              <el-col :span="12" >
+              <el-col :span="12">
                 <el-form-item prop="deptId" label="所属机构">
                   <!-- <el-select v-model="operationForm.deptId" placeholder="请选择所属机构">
                           <el-option key="1" value="机构1"></el-option>
                         </el-select> -->
-                  <el-cascader  clearable style="width: 100%"
-                    v-model="operationForm.deptId" :options="tableData" :props="tableProps" @change="deptChange" />
+                  <el-cascader clearable style="width: 100%" v-model="operationForm.deptId" :options="tableData"
+                    :props="tableProps" @change="deptChange" />
                 </el-form-item>
               </el-col>
               <el-col :span="12">
@@ -275,19 +275,19 @@
           <template #default>
             <el-form-item prop="" label="身份证(人像面)" label-width="150" label-position="left">
               <el-upload :auto-upload="false" v-if="!IDCardFront" action="#" :show-file-list="false"
-                accept=".png, .jpg, .jpeg" @change="uploadImage($event, 1)">
+                accept=".png, .jpg, .jpeg" @change="uploadImage($event, 'sfz1')">
                 <el-button link type="primary" icon="Upload">上传</el-button>
               </el-upload>
               <div class="fileInfo" v-else>
                 <div class="file-box">
                   <div class="btn-top">
-                    <img class="image-close" @click="deleteImage(1)" src="@/assets/images/close.png" />
+                    <img class="image-close" @click="deleteImage('sfz1')" src="@/assets/images/close.png" />
                     <!--                    <el-icon class="btn-icon"><Delete /></el-icon>-->
                   </div>
                   <img class="file-img" :src="IDCardFront" />
                   <div class="btn-bottom">
                     <el-upload class="width-50" :show-file-list="false" :auto-upload="false" accept=".png, .jpg, .jpeg"
-                      @change="uploadImage($event, 1)"
+                      @change="uploadImage($event, 'sfz1')"
                       style="display: flex; align-items: center; justify-content: center; color: white">
                       <el-icon>
                         <Upload />
@@ -295,7 +295,7 @@
                     </el-upload>
                     <div class="width-50"
                       style="display: flex; align-items: center; justify-content: center; color: white; cursor:pointer;"
-                      @click="downloadImage(1)">
+                      @click="downloadImage('sfz1')">
                       <el-icon>
                         <Download />
                       </el-icon>下载资料
@@ -324,19 +324,19 @@
             </el-form-item>
             <el-form-item prop="" label="身份证(国徽面)" label-width="150" label-position="left">
               <el-upload :auto-upload="false" v-if="!IDCardBack" action="#" :show-file-list="false"
-                accept=".png, .jpg, .jpeg" @change="uploadImage($event, 2)">
+                accept=".png, .jpg, .jpeg" @change="uploadImage($event, 'sfz2')">
                 <el-button link type="primary" icon="Upload">上传</el-button>
               </el-upload>
               <div class="fileInfo" v-else>
                 <div class="file-box">
                   <div class="btn-top">
-                    <img class="image-close" @click="deleteImage(2)" src="@/assets/images/close.png" />
+                    <img class="image-close" @click="deleteImage('sfz2')" src="@/assets/images/close.png" />
                     <!--                    <el-icon class="btn-icon"><Delete /></el-icon>-->
                   </div>
                   <img class="file-img" :src="IDCardBack" />
                   <div class="btn-bottom">
                     <el-upload class="width-50" :show-file-list="false" :auto-upload="false" accept=".png, .jpg, .jpeg"
-                      @change="uploadImage($event, 2)"
+                      @change="uploadImage($event, 'sfz2')"
                       style="display: flex; align-items: center; justify-content: center; color: white">
                       <el-icon>
                         <Upload />
@@ -344,48 +344,30 @@
                     </el-upload>
                     <div class="width-50"
                       style="display: flex; align-items: center; justify-content: center; color: white; cursor:pointer;"
-                      @click="downloadImage(2)">
+                      @click="downloadImage('sfz2')">
                       <el-icon>
                         <Download />
                       </el-icon>下载资料
                     </div>
                   </div>
                 </div>
-                <!--                <div class="fileName">{{ IDCardBackName }}</div>
-                <div class="fileBtn">
-                  <el-upload
-                    :auto-upload="false"
-                    action="#"
-                    :show-file-list="false"
-                    accept=".png, .jpg, .jpeg"
-                    @change="uploadImage($event, 2)"
-                    style="display: flex; align-items: center"
-                  >
-                    <el-icon class="btn-icon"><Upload /></el-icon>
-                  </el-upload>
-                  <el-icon class="btn-icon" @click="imageView(2)"
-                    ><View
-                  /></el-icon>
-                  <el-icon class="btn-icon" @click="downloadImage(2)"><Download /></el-icon>
-                  <el-icon class="btn-icon" @click="deleteImage(2)"><Delete /></el-icon>
-                </div>-->
               </div>
             </el-form-item>
-            <el-form-item prop="" label="银行卡" label-width="150" label-position="left">
-              <el-upload :auto-upload="false" v-if="!bankSize" action="#" :show-file-list="false"
-                accept=".png, .jpg, .jpeg" @change="uploadImage($event, 3)">
+            <el-form-item prop="" label="展业资格证" label-width="150" label-position="left">
+              <el-upload :auto-upload="false" v-if="!businessLicense" action="#" :show-file-list="false"
+                accept=".png, .jpg, .jpeg" @change="uploadImage($event, 'qualification')">
                 <el-button link type="primary" icon="Upload">上传</el-button>
               </el-upload>
               <div class="fileInfo" v-else>
                 <div class="file-box">
                   <div class="btn-top">
-                    <img class="image-close" @click="deleteImage(3)" src="@/assets/images/close.png" />
+                    <img class="image-close" @click="deleteImage('qualification')" src="@/assets/images/close.png" />
                     <!--                    <el-icon class="btn-icon"><Delete /></el-icon>-->
                   </div>
-                  <img class="file-img" :src="bankSize" />
+                  <img class="file-img" :src="businessLicense" />
                   <div class="btn-bottom">
                     <el-upload class="width-50" :show-file-list="false" :auto-upload="false" accept=".png, .jpg, .jpeg"
-                      @change="uploadImage($event, 3)"
+                      @change="uploadImage($event, 'qualification')"
                       style="display: flex; align-items: center; justify-content: center; color: white">
                       <el-icon>
                         <Upload />
@@ -393,36 +375,18 @@
                     </el-upload>
                     <div class="width-50"
                       style="display: flex; align-items: center; justify-content: center; color: white; cursor:pointer;"
-                      @click="downloadImage(3)">
+                      @click="downloadImage('qualification')">
                       <el-icon>
                         <Download />
                       </el-icon>下载资料
                     </div>
                   </div>
                 </div>
-                <!--                <div class="fileName">{{ bankName }}</div>
-                <div class="fileBtn">
-                  <el-upload
-                    :auto-upload="false"
-                    action="#"
-                    :show-file-list="false"
-                    accept=".png, .jpg, .jpeg"
-                    @change="uploadImage($event, 3)"
-                    style="display: flex; align-items: center"
-                  >
-                    <el-icon class="btn-icon"><Upload /></el-icon>
-                  </el-upload>
-                  <el-icon class="btn-icon" @click="imageView(3)"
-                    ><View
-                  /></el-icon>
-                  <el-icon class="btn-icon" @click="downloadImage(3)"><Download /></el-icon>
-                  <el-icon class="btn-icon" @click="deleteImage(3)"><Delete /></el-icon>
-                </div>-->
               </div>
             </el-form-item>
             <el-form-item prop="" label="劳动合同" label-width="150" label-position="left">
               <el-upload :auto-upload="false" v-if="!contract" action="#" :show-file-list="false"
-                accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 4)">
+                accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 'contract')">
                 <el-button link type="primary" icon="Upload">上传</el-button>
               </el-upload>
               <div class="fileInfo" v-else>
@@ -431,19 +395,19 @@
                 <div class="fileName">{{ contractName }}</div>
                 <div class="fileBtn">
                   <el-upload :auto-upload="false" action="#" :show-file-list="false"
-                    accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 4)"
+                    accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 'contract')"
                     style="display: flex; align-items: center">
                     <el-icon class="btn-icon">
                       <Upload />
                     </el-icon>
                   </el-upload>
-                  <el-icon class="btn-icon" @click="imageView(4)">
+                  <el-icon class="btn-icon" @click="imageView('contract')">
                     <View />
                   </el-icon>
-                  <el-icon class="btn-icon" @click="downloadImage(4)">
+                  <el-icon class="btn-icon" @click="downloadImage('contract')">
                     <Download />
                   </el-icon>
-                  <el-icon class="btn-icon" @click="deleteImage(4)">
+                  <el-icon class="btn-icon" @click="deleteImage('contract')">
                     <Delete />
                   </el-icon>
                 </div>
@@ -451,7 +415,7 @@
             </el-form-item>
             <el-form-item prop="" label="应聘表" label-width="150" label-position="left">
               <el-upload :auto-upload="false" v-if="!applicant" action="#" :show-file-list="false"
-                accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 5)">
+                accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 'applicant')">
                 <el-button link type="primary" icon="Upload">上传</el-button>
               </el-upload>
               <div class="fileInfo" v-else>
@@ -460,19 +424,19 @@
                 <div class="fileName">{{ applicantName }}</div>
                 <div class="fileBtn">
                   <el-upload :auto-upload="false" action="#" :show-file-list="false"
-                    accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 5)"
+                    accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 'applicant')"
                     style="display: flex; align-items: center">
                     <el-icon class="btn-icon">
                       <Upload />
                     </el-icon>
                   </el-upload>
-                  <el-icon class="btn-icon" @click="imageView(5)">
+                  <el-icon class="btn-icon" @click="imageView('applicant')">
                     <View />
                   </el-icon>
-                  <el-icon class="btn-icon" @click="downloadImage(5)">
+                  <el-icon class="btn-icon" @click="downloadImage('applicant')">
                     <Download />
                   </el-icon>
-                  <el-icon class="btn-icon" @click="deleteImage(5)">
+                  <el-icon class="btn-icon" @click="deleteImage('applicant')">
                     <Delete />
                   </el-icon>
                 </div>
@@ -480,7 +444,7 @@
             </el-form-item>
             <el-form-item prop="" label="定薪表" label-width="150" label-position="left">
               <el-upload :auto-upload="false" v-if="!decidePay" action="#" :show-file-list="false"
-                accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 6)">
+                accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 'salaryTable')">
                 <el-button link type="primary" icon="Upload">上传</el-button>
               </el-upload>
               <div class="fileInfo" v-else>
@@ -489,19 +453,19 @@
                 <div class="fileName">{{ decidePayName }}</div>
                 <div class="fileBtn">
                   <el-upload :auto-upload="false" action="#" :show-file-list="false"
-                    accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 6)"
+                    accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 'salaryTable')"
                     style="display: flex; align-items: center">
                     <el-icon class="btn-icon">
                       <Upload />
                     </el-icon>
                   </el-upload>
-                  <el-icon class="btn-icon" @click="imageView(6)">
+                  <el-icon class="btn-icon" @click="imageView('salaryTable')">
                     <View />
                   </el-icon>
-                  <el-icon class="btn-icon" @click="downloadImage(6)">
+                  <el-icon class="btn-icon" @click="downloadImage('salaryTable')">
                     <Download />
                   </el-icon>
-                  <el-icon class="btn-icon" @click="deleteImage(6)">
+                  <el-icon class="btn-icon" @click="deleteImage('salaryTable')">
                     <Delete />
                   </el-icon>
                 </div>
@@ -509,7 +473,7 @@
             </el-form-item>
             <el-form-item prop="" label="离职表" label-width="150" label-position="left">
               <el-upload :auto-upload="false" v-if="!dimission" action="#" :show-file-list="false"
-                accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 7)">
+                accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 'leaveTable')">
                 <el-button link type="primary" icon="Upload">上传</el-button>
               </el-upload>
               <div class="fileInfo" v-else>
@@ -518,19 +482,19 @@
                 <div class="fileName">{{ dimissionName }}</div>
                 <div class="fileBtn">
                   <el-upload :auto-upload="false" action="#" :show-file-list="false"
-                    accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 7)"
+                    accept=".png, .jpg, .jpeg, .pdf, .doc, .docx" @change="uploadImage($event, 'leaveTable')"
                     style="display: flex; align-items: center">
                     <el-icon class="btn-icon">
                       <Upload />
                     </el-icon>
                   </el-upload>
-                  <el-icon class="btn-icon" @click="imageView(7)">
+                  <el-icon class="btn-icon" @click="imageView('leaveTable')">
                     <View />
                   </el-icon>
-                  <el-icon class="btn-icon" @click="downloadImage(7)">
+                  <el-icon class="btn-icon" @click="downloadImage('leaveTable')">
                     <Download />
                   </el-icon>
-                  <el-icon class="btn-icon" @click="deleteImage(7)">
+                  <el-icon class="btn-icon" @click="deleteImage('leaveTable')">
                     <Delete />
                   </el-icon>
                 </div>
@@ -568,6 +532,7 @@ import image from "@/assets/images/image.png";
 import pdf from "@/assets/images/pdf.png";
 import word from "@/assets/images/word.png";
 import VueOfficeDocx from "@vue-office/docx";
+import { el } from "element-plus/es/locale/index.mjs";
 
 interface dictType {
   value: string;
@@ -608,70 +573,48 @@ onMounted(async () => {
         id: route.query.id || "",
       })
       .then((res: any) => {
-        // console.log(res);
-        if (res.code === 200) {
+        if (res.code == 200) {
+          console.log(res.data)
           operationForm.value = res.data;
-          console.log(operationForm.value)
           if (operationForm.value.typeAttr != 6) {
             initTeamData(operationForm.value.typeAttr === '5' ? '1' : operationForm.value.typeAttr === '8' ? '2' : operationForm.value.typeAttr === '7' ? '3' : '')
           }
-          let formData = res.data
-          if (formData.fileList) {
-            let sfz1 = formData.fileList.find(item => item.fileType == 'sfz1')
-            let sfz2 = formData.fileList.find(item => item.fileType == 'sfz2')
-            let qualification = formData.fileList.find(item => item.fileType == 'bankCard')
-            let contractImg = formData.fileList.find(item => item.fileType == 'contract')
-            let applicantImg = formData.fileList.find(item => item.fileType == 'applicant')
-            let salaryTable = formData.fileList.find(item => item.fileType == 'salary')
-            let leaveTable = formData.fileList.find(item => item.fileType == 'leave')
-            if (sfz1) {
-              operationForm.value.sfz1 = sfz1.id
-              IDCardFrontName.value = sfz1.fileName
-              IDCardFront.value = sfz1.fileUrl
-              sfz1.value = sfz1.id
+          res.data.fileList.map((item: any) => {
+            switch (item.fileType) {
+              case "sfz1":
+                IDCardFrontName.value = item.fileName;
+                IDCardFront.value = item.fileUrl;
+                break;
+              case "sfz2":
+                IDCardBackName.value = item.fileName;
+                IDCardBack.value = item.fileUrl;
+                break;
+              case "qualification":
+                businessLicenseName.value = item.fileName;
+                businessLicense.value = item.fileUrl;
+                break;
+              case "contract":
+                contractName.value = item.fileName;
+                contract.value = item.fileUrl;
+                break;
+              case "applicant":
+                applicantName.value = item.fileName;
+                applicant.value = item.fileUrl;
+                break
+              case "salaryTable":
+                decidePayName.value = item.fileName;
+                decidePay.value = item.fileUrl;
+                break;
+              case "leaveTable":
+                dimissionName.value = item.fileName;
+                dimission.value = item.fileUrl;
+                break;
             }
-            if (sfz2) {
-              operationForm.value.sfz2 = sfz2.id
-              IDCardBackName.value = sfz2.fileName
-              IDCardBack.value = sfz2.fileUrl
-              sfz2.value = sfz2.id
-
-            }
-            if (qualification) {
-              operationForm.value.bankCard = qualification.id
-              bankName.value = qualification.fileName
-              bankSize.value = qualification.fileUrl
-              bankCard.value = qualification.id
-            }
-            if (contractImg) {
-              operationForm.value.contract = contractImg.id
-              contractName.value = contractImg.fileName
-              contract.value = contractImg.fileUrl
-              contractId.value = contractImg.id
-
-
-            }
-            if (applicantImg) {
-              operationForm.value.applicant = applicantImg.id
-              applicantName.value = applicantImg.fileName
-              applicant.value = applicantImg.fileUrl
-              applicantId.value = applicantImg.id
-
-            }
-            if (salaryTable) {
-              operationForm.value.salaryTable = salaryTable.id
-              decidePayName.value = salaryTable.fileName
-              decidePay.value = salaryTable.fileUrl
-              salaryTable.value = salaryTable.id
-
-            }
-            if (leaveTable) {
-              operationForm.value.leaveTable = leaveTable.id
-              dimissionName.value = leaveTable.fileName
-              dimission.value = leaveTable.fileUrl
-              leaveTable.value = leaveTable.id;
-            }
-          }
+          })
+          fileListId.value = res.data.fileList.map((item: any) => ({
+            fileId: item.fileId,
+            fileType: item.fileType
+          }))
           if (res.data.address == null) {
             operationForm.value.address = []
           }
@@ -868,35 +811,29 @@ const institutionList = () => {
     }
   })
 }
-
+let fileListId = ref<{ fileId: string, fileType: string }[]>([]); // 上传文件id
 // 身份证人像面
 let IDCardFrontName = ref("");
 let IDCardFront = ref("");
-let sfz1 = ref("");
 // 身份证国徽面
 let IDCardBackName = ref("");
 let IDCardBack = ref("");
-let sfz2 = ref("");
-// 银行卡
-let bankName = ref("");
-let bankSize = ref("");
-let bankCard = ref("");
+// 展业资格证
+let businessLicenseName = ref("");
+let businessLicense = ref("");
 // 劳务合同
 let contractName = ref("");
 let contract = ref("");
-let contractId = ref("");
 // 应聘表
 let applicantName = ref("");
 let applicant = ref("");
-let applicantId = ref("");
 // 定薪表
 let decidePayName = ref("");
 let decidePay = ref("");
-let salaryTable = ref('')
 // 离职表
 let dimissionName = ref("");
 let dimission = ref("");
-let leaveTable = ref("");
+
 // 图片预览地址
 let imageShow = ref(false);
 let imageUrl = ref("");
@@ -931,55 +868,124 @@ function deptChange(e: any) {
 //数组去重
 
 // 上传图片
-const uploadImage = (file, type) => {
+const uploadImage = (file: any, type: string) => {
   let files = file.raw;
-  let url = window.URL.createObjectURL(files); //转临时路径
   const params = new FormData(); // 声明formData数据类型
   params.append("file", files);
-  console.log(files)
-
-  // params.append("multipartFile", files);
-  // params.append("type", "image");
   api.areaApi.fileUpload(params).then((res: any) => {
     if (res.code === 200) {
       switch (type) {
-        case 1:
+        case "sfz1":
           IDCardFrontName.value = res.data.fileName;
           IDCardFront.value = res.data.downloadUrl;
-          sfz1.value = res.data.id
+          if (fileListId.value.some(v => v.fileType == type)) {
+            fileListId.value.map(val => {
+              if (val.fileType == type) {
+                val.fileId = res.data.id;
+              }
+            })
+          } else {
+            fileListId.value.push({
+              fileId: res.data.id,
+              fileType: type
+            })
+          }
           break;
-        case 2:
+        case "sfz2":
           IDCardBackName.value = res.data.fileName;
           IDCardBack.value = res.data.downloadUrl;
-          sfz2.value = res.data.id
+          if (fileListId.value.some(v => v.fileType == type)) {
+            fileListId.value.map(val => {
+              if (val.fileType == type) {
+                val.fileId = res.data.id;
+              }
+            })
+          } else {
+            fileListId.value.push({
+              fileId: res.data.id,
+              fileType: type
+            })
+          }
           break;
-        case 3:
-          bankName.value = res.data.fileName;
-          bankSize.value = res.data.downloadUrl;
-          bankCard.value = res.data.id
+        case "qualification":
+          businessLicenseName.value = res.data.fileName;
+          businessLicense.value = res.data.downloadUrl;
+          if (fileListId.value.some(v => v.fileType == type)) {
+            fileListId.value.map(val => {
+              if (val.fileType == type) {
+                val.fileId = res.data.id;
+              }
+            })
+          } else {
+            fileListId.value.push({
+              fileId: res.data.id,
+              fileType: type
+            })
+          }
           break;
-        case 4:
+        case "contract":
           contractName.value = res.data.fileName;
           contract.value = res.data.downloadUrl;
-          contractId.value = res.data.id
-
+          if (fileListId.value.some(v => v.fileType == type)) {
+            fileListId.value.map(val => {
+              if (val.fileType == type) {
+                val.fileId = res.data.id;
+              }
+            })
+          } else {
+            fileListId.value.push({
+              fileId: res.data.id,
+              fileType: type
+            })
+          }
           break;
-        case 5:
+        case "applicant":
           applicantName.value = res.data.fileName;
           applicant.value = res.data.downloadUrl;
-          applicantId.value = res.data.id
-
+          if (fileListId.value.some(v => v.fileType == type)) {
+            fileListId.value.map(val => {
+              if (val.fileType == type) {
+                val.fileId = res.data.id;
+              }
+            })
+          } else {
+            fileListId.value.push({
+              fileId: res.data.id,
+              fileType: type
+            })
+          }
           break;
-        case 6:
+        case "salaryTable":
           decidePayName.value = res.data.fileName;
           decidePay.value = res.data.downloadUrl;
-          salaryTable.value = res.data.id
-
+          if (fileListId.value.some(v => v.fileType == type)) {
+            fileListId.value.map(val => {
+              if (val.fileType == type) {
+                val.fileId = res.data.id;
+              }
+            })
+          } else {
+            fileListId.value.push({
+              fileId: res.data.id,
+              fileType: type
+            })
+          }
           break;
-        case 7:
+        case "leaveTable":
           dimissionName.value = res.data.fileName;
           dimission.value = res.data.downloadUrl;
-          leaveTable.value = res.data.id;
+          if (fileListId.value.some(v => v.fileType == type)) {
+            fileListId.value.map(val => {
+              if (val.fileType == type) {
+                val.fileId = res.data.id;
+              }
+            })
+          } else {
+            fileListId.value.push({
+              fileId: res.data.id,
+              fileType: type
+            })
+          }
           break;
       }
     }
@@ -1018,59 +1024,59 @@ const download = (url, name) => {
   // image.src = url
 }
 
-const downloadImage = (type) => {
+const downloadImage = (type: string) => {
   switch (type) {
-    case 1:
+    case "sfz1":
       download(IDCardFront.value, IDCardFrontName.value)
       break;
-    case 2:
+    case "sfz2":
       download(IDCardBack.value, IDCardBackName.value)
       break;
-    case 3:
-      download(bankSize.value, bankName.value)
+    case "qualification":
+      download(businessLicense.value, businessLicenseName.value)
       break;
-    case 4:
+    case "contract":
       download(contract.value, contractName.value)
       break;
-    case 5:
+    case "applicant":
       download(applicant.value, applicantName.value)
       break;
-    case 6:
+    case "salaryTable":
       download(decidePay.value, decidePayName.value)
       break;
-    case 7:
+    case "leaveTable":
       download(dimission.value, dimissionName.value)
       break;
   }
 }
 // 图片删除
-const deleteImage = (type) => {
+const deleteImage = (type: string) => {
   switch (type) {
-    case 1:
+    case "sfz1":
       IDCardFront.value = ''
       IDCardFrontName.value = ''
       break;
-    case 2:
+    case "sfz2":
       IDCardBack.value = ''
       IDCardBackName.value = ''
       break;
-    case 3:
-      bankSize.value = ''
-      bankName.value = ''
+    case "qualification":
+      businessLicense.value = ''
+      businessLicenseName.value = ''
       break;
-    case 4:
+    case "contract":
       contract.value = ''
       contractName.value = ''
       break;
-    case 5:
+    case "applicant":
       applicant.value = ''
       applicantName.value = ''
       break;
-    case 6:
+    case "salaryTable":
       decidePay.value = ''
       decidePayName.value = ''
       break;
-    case 7:
+    case "leaveTable":
       dimission.value = ''
       dimissionName.value = ''
       break;
@@ -1087,21 +1093,21 @@ const filePreview = (file) => {
   })
 }
 
-const imageView = (type) => {
+const imageView = (type: string) => {
   switch (type) {
-    case 1:
+    case "sfz1":
       imageShow.value = true;
       imageUrl.value = IDCardFront.value;
       break;
-    case 2:
+    case "sfz2":
       imageShow.value = true;
       imageUrl.value = IDCardBack.value;
       break;
-    case 3:
+    case "qualification":
       imageShow.value = true;
-      imageUrl.value = bankSize.value;
+      imageUrl.value = businessLicense.value;
       break;
-    case 4:
+    case "contract":
       imageUrl.value = contract.value;
       nextTick(() => {
         // loadPdf(contract.value)
@@ -1117,7 +1123,7 @@ const imageView = (type) => {
         }
       })
       break;
-    case 5:
+    case "applicant":
       imageUrl.value = applicant.value;
       nextTick(() => {
         // loadPdf(applicant.value)
@@ -1131,7 +1137,7 @@ const imageView = (type) => {
         }
       })
       break;
-    case 6:
+    case "salaryTable":
       imageUrl.value = decidePay.value;
       nextTick(() => {
         // loadPdf(decidePay.value)
@@ -1145,7 +1151,7 @@ const imageView = (type) => {
         }
       })
       break;
-    case 7:
+    case "leaveTable":
       imageUrl.value = dimission.value;
       nextTick(() => {
         // loadPdf(dimission.value)
@@ -1167,6 +1173,7 @@ const onSubmit = async (OperationFormRef: FormInstance, type: number) => {
     emits("closeDialog", false);
     return;
   }
+  // return
   await OperationFormRef.validate((valid) => {
     if (valid) {
       if (!route.query.id) {
@@ -1176,15 +1183,8 @@ const onSubmit = async (OperationFormRef: FormInstance, type: number) => {
           city: operationForm.value.address?.length ? operationForm.value.address[1] : '',
           district: operationForm.value.address?.length ? operationForm.value.address[2] : '',
           deptId: operationForm.value.deptId,
-          typeAttr: operationForm.value.isAddSalesman=='1'?operationForm.value.typeAttr:2,
-          sfz1: sfz1.value,
-          sfz2: sfz2.value,
-          bankCard:bankCard.value,
-          contract: contractId.value,
-          applicant: applicantId.value,
-          salaryTable: salaryTable.value,
-          leaveTable: leaveTable.value,
-
+          typeAttr: operationForm.value.isAddSalesman == '1' ? operationForm.value.typeAttr : 2,
+          fileList: fileListId.value
         }).then((res: any) => {
           // console.log(123, res);
           if (res.code === 200) {
@@ -1199,16 +1199,9 @@ const onSubmit = async (OperationFormRef: FormInstance, type: number) => {
           city: operationForm.value.address?.length ? operationForm.value.address[1] : '',
           district: operationForm.value.address?.length ? operationForm.value.address[2] : '',
           deptId: operationForm.value.deptId,
-          typeAttr: operationForm.value.isAddSalesman=='1'?operationForm.value.typeAttr:2,
-          sfz1: sfz1.value,
-          sfz2: sfz2.value,
-          bankCard: bankCard.value,
-          contract: contractId.value,
-          applicant: applicantId.value,
-          salaryTable: salaryTable.value,
-          leaveTable: leaveTable.value,
+          typeAttr: operationForm.value.isAddSalesman == '1' ? operationForm.value.typeAttr : 2,
+          fileList: fileListId.value,
           id: operationForm.value.id
-
         }).then((res: any) => {
           // console.log(123, res);
           if (res.code === 200) {

+ 1 - 1
src/views/personnel/modules/editInstitution.vue

@@ -179,7 +179,7 @@ const rules = reactive<FormRules<RuleForm>>({
 const memberList = ref([]);
 const getAllMemberList = () => {
   // pageInfo.pageNum=item.pageNum
-  api.userApi.AllMemberList({}).then((res: any) => {
+  api.userApi.AllMemberList({deptId: route.query.id,}).then((res: any) => {
     if (res.code === 200) memberList.value = res.data;
   });
   // pageInfo.pageSize=item.pageSize

+ 174 - 145
src/views/personnel/modules/memberMessage.vue

@@ -309,92 +309,92 @@
             <el-descriptions-item>
               <template #default>
                 <el-form-item prop="" label="身份证(人像面)" label-width="150" label-position="left" v-if="IDCardFront">
-                  <div class="fileInfo" >
+                  <div class="fileInfo">
                     <div class="fileName">{{ IDCardFrontName }}</div>
                     <div class="fileBtn">
-                      <el-icon class="btn-icon" @click="imageView(1)">
+                      <el-icon class="btn-icon" @click="imageView('sfz1')">
                         <View />
                       </el-icon>
-                      <el-icon class="btn-icon">
+                      <el-icon class="btn-icon" @click="downloadImage('sfz1')">
                         <Download />
                       </el-icon>
                     </div>
                   </div>
                 </el-form-item>
                 <el-form-item prop="" label="身份证(国徽面)" label-width="150" label-position="left" v-if="IDCardBack">
-                  <div class="fileInfo" >
+                  <div class="fileInfo">
                     <div class="fileName">{{ IDCardBackName }}</div>
                     <div class="fileBtn">
-                      <el-icon class="btn-icon" @click="imageView(2)">
+                      <el-icon class="btn-icon" @click="imageView('sfz2')">
                         <View />
                       </el-icon>
-                      <el-icon class="btn-icon">
+                      <el-icon class="btn-icon" @click="downloadImage('sfz2')">
                         <Download />
                       </el-icon>
                     </div>
                   </div>
                 </el-form-item>
-                <el-form-item prop="" label="银行卡" label-width="150" label-position="left" v-if="bankSize">
-                  <div class="fileInfo" >
-                    <div class="fileName">{{ bankName }}</div>
+                <el-form-item prop="" label="展业资格证" label-width="150" label-position="left" >
+                  <div class="fileInfo">
+                    <div class="fileName">{{ businessLicenseName }}</div>
                     <div class="fileBtn">
 
-                      <el-icon class="btn-icon" @click="imageView(3)">
+                      <el-icon class="btn-icon" @click="imageView('qualification')">
                         <View />
                       </el-icon>
-                      <el-icon class="btn-icon">
+                      <el-icon class="btn-icon" @click="downloadImage('qualification')">
                         <Download />
                       </el-icon>
                     </div>
                   </div>
                 </el-form-item>
                 <el-form-item prop="" label="劳动合同" label-width="150" label-position="left" v-if="contract">
-                  <div class="fileInfo" >
+                  <div class="fileInfo">
                     <div class="fileName">{{ contractName }}</div>
                     <div class="fileBtn">
-                      <el-icon class="btn-icon" @click="imageView(4)">
+                      <el-icon class="btn-icon" @click="imageView('contract')">
                         <View />
                       </el-icon>
-                      <el-icon class="btn-icon">
+                      <el-icon class="btn-icon" @click="downloadImage('contract')">
                         <Download />
                       </el-icon>
                     </div>
                   </div>
                 </el-form-item>
                 <el-form-item prop="" label="应聘表" label-width="150" label-position="left" v-if="applicant">
-                  <div class="fileInfo" >
+                  <div class="fileInfo">
                     <div class="fileName">{{ applicantName }}</div>
                     <div class="fileBtn">
-                      <el-icon class="btn-icon" @click="imageView(5)">
+                      <el-icon class="btn-icon" @click="imageView('applicant')">
                         <View />
                       </el-icon>
-                      <el-icon class="btn-icon">
+                      <el-icon class="btn-icon" @click="downloadImage('applicant')">
                         <Download />
                       </el-icon>
                     </div>
                   </div>
                 </el-form-item>
                 <el-form-item prop="" label="定薪表" label-width="150" label-position="left" v-if="decidePay">
-                  <div class="fileInfo" >
+                  <div class="fileInfo">
                     <div class="fileName">{{ decidePayName }}</div>
                     <div class="fileBtn">
-                      <el-icon class="btn-icon" @click="imageView(6)">
+                      <el-icon class="btn-icon" @click="imageView('salaryTable')">
                         <View />
                       </el-icon>
-                      <el-icon class="btn-icon">
+                      <el-icon class="btn-icon" @click="downloadImage('salaryTable')">
                         <Download />
                       </el-icon>
                     </div>
                   </div>
                 </el-form-item>
                 <el-form-item prop="" label="离职表" label-width="150" label-position="left" v-if="dimission">
-                  <div class="fileInfo" >
+                  <div class="fileInfo">
                     <div class="fileName">{{ dimissionName }}</div>
                     <div class="fileBtn">
-                      <el-icon class="btn-icon" @click="imageView(7)">
+                      <el-icon class="btn-icon" @click="imageView('leaveTable')">
                         <View />
                       </el-icon>
-                      <el-icon class="btn-icon">
+                      <el-icon class="btn-icon" @click="downloadImage('leaveTable')">
                         <Download />
                       </el-icon>
                     </div>
@@ -492,6 +492,9 @@
         </div>
       </template>
     </el-dialog>
+    <el-dialog title="文件预览" v-model="fileShow">
+      <vue-office-docx :src="fileUrl" style="height: 600px; margin: 0; padding: 0"></vue-office-docx>
+    </el-dialog>
   </div>
 </template>
 
@@ -507,6 +510,8 @@ import { useRoute } from "vue-router";
 import pinyin from "js-pinyin";
 import { useRouter } from "vue-router";
 import setDept from "@/components/DialogSetDeptLeader/index.vue";
+import VueOfficeDocx from "@vue-office/docx";
+
 interface dictType {
   value: string;
   id: string;
@@ -551,53 +556,39 @@ onMounted(async () => {
     .then((res: any) => {
       if (res.code === 200) {
         operationForm.value = res.data;
-        let formData = res.data
         operationForm.value.roleNames = operationForm.value.roleNames.join(',')
-        if (formData.fileList) {
-          let sfz1 = formData.fileList.find(item => item.fileType == 'sfz1')
-          let sfz2 = formData.fileList.find(item => item.fileType == 'sfz2')
-
-          let qualification = formData.fileList.find(item => item.fileType == 'bankCard')
-          let contractImg = formData.fileList.find(item => item.fileType == 'contract')
-          let applicantImg = formData.fileList.find(item => item.fileType == 'applicant')
-          let salaryTable = formData.fileList.find(item => item.fileType == 'salary')
-          let leaveTable = formData.fileList.find(item => item.fileType == 'leave')
-          if (sfz1) {
-            operationForm.value.sfz1 = sfz1.id
-            IDCardFrontName.value = sfz1.fileName
-            IDCardFront.value = sfz1.fileUrl
-          }
-          if (sfz2) {
-            operationForm.value.sfz2 = sfz2.id
-            IDCardBackName.value = sfz2.fileName
-            IDCardBack.value = sfz2.fileUrl
-          }
-          if (qualification) {
-            operationForm.value.qualification = qualification.id
-            bankName.value = qualification.fileName
-            bankSize.value = qualification.fileUrl
-          }
-          if (contractImg) {
-            operationForm.value.contract = contractImg.id
-            contractName.value = contractImg.fileName
-            contract.value = contractImg.fileUrl
-          }
-          if (applicantImg) {
-            operationForm.value.applicant = applicantImg.id
-            applicantName.value = applicantImg.fileName
-            applicant.value = applicantImg.fileUrl
-          }
-          if (salaryTable) {
-            operationForm.value.salaryTable = salaryTable.id
-            decidePayName.value = salaryTable.fileName
-            decidePay.value = salaryTable.fileUrl
-          }
-          if (leaveTable) {
-            operationForm.value.leaveTable = leaveTable.id
-            dimissionName.value = leaveTable.fileName
-            dimission.value = leaveTable.fileUrl
-          }
-        }
+        res.data.fileList.map((item: any) => {
+            switch (item.fileType) {
+              case "sfz1":
+                IDCardFrontName.value = item.fileName;
+                IDCardFront.value = item.fileUrl;
+                break;
+              case "sfz2":
+                IDCardBackName.value = item.fileName;
+                IDCardBack.value = item.fileUrl;
+                break;
+              case "qualification":
+                businessLicenseName.value = item.fileName;
+                businessLicense.value = item.fileUrl;
+                break;
+              case "contract":
+                contractName.value = item.fileName;
+                contract.value = item.fileUrl;
+                break;
+              case "applicant":
+                applicantName.value = item.fileName;
+                applicant.value = item.fileUrl;
+                break
+              case "salaryTable":
+                decidePayName.value = item.fileName;
+                decidePay.value = item.fileUrl;
+                break;
+              case "leaveTable":
+                dimissionName.value = item.fileName;
+                dimission.value = item.fileUrl;
+                break;
+            }
+          })
       }
     });
 });
@@ -709,35 +700,34 @@ const operationRules = ref<FormRules>({
 // 身份证人像面
 let IDCardFrontName = ref("");
 let IDCardFront = ref("");
-let sfz1 = ref("");
 // 身份证国徽面
 let IDCardBackName = ref("");
 let IDCardBack = ref("");
-let sfz2 = ref("");
-// 银行卡
-let bankName = ref("");
-let bankSize = ref("");
-let bankCard = ref("");
+// 展业资格证
+let businessLicenseName = ref("");
+let businessLicense = ref("");
 // 劳务合同
 let contractName = ref("");
 let contract = ref("");
-let contractId = ref("");
 // 应聘表
 let applicantName = ref("");
 let applicant = ref("");
-let applicantId = ref("");
 // 定薪表
 let decidePayName = ref("");
 let decidePay = ref("");
-let salaryTable = ref("");
 // 离职表
 let dimissionName = ref("");
 let dimission = ref("");
-let leaveTable = ref("");
 // 图片预览地址
 let imageShow = ref(false);
 let imageUrl = ref("");
-
+let fileShow = ref(false)
+let fileUrl = ref('')
+const filePreview = (file) => {
+  nextTick(() => {
+    fileUrl.value = file
+  })
+}
 //机构列表
 type tableType = {
   id: string;
@@ -771,93 +761,124 @@ function editMember(e: any) {
 
 //数组去重
 
-// 上传图片
-const uploadImage = (file: any, type: number) => {
-  let files = file.raw;
-  console.log(files)
-  let url = window.URL.createObjectURL(files); //转临时路径
-  const params = new FormData(); // 声明formData数据类型
-  params.append("file", files);
-
-  // params.append("multipartFile", files);
-  // params.append("type", "image");
-  api.areaApi.fileUpload(params).then((res: any) => {
-
-    if (res.code === 200) {
-      switch (type) {
-        case 1:
-          IDCardFrontName.value = res.data.fileName;
-          IDCardFront.value = res.data.downloadUrl;
-          sfz1.value = res.data.id;
-          break;
-        case 2:
-          IDCardBackName.value = res.data.fileName;
-          IDCardBack.value = res.data.downloadUrl;
-          sfz2.value = res.data.id;
-          break;
-        case 3:
-          bankName.value = res.data.fileName;
-          bankSize.value = res.data.downloadUrl;
-          bankCard.value = res.data.id;
-          break;
-        case 4:
-          contractName.value = res.data.fileName;
-          contract.value = res.data.downloadUrl;
-          contractId.value = res.data.id;
 
-          break;
-        case 5:
-          applicantName.value = res.data.fileName;
-          applicant.value = res.data.downloadUrl;
-          applicantId.value = res.data.id;
-
-          break;
-        case 6:
-          decidePayName.value = res.data.fileName;
-          decidePay.value = res.data.downloadUrl;
-          salaryTable.value = res.data.id;
-
-          break;
-        case 7:
-          dimissionName.value = res.data.fileName;
-          dimission.value = res.data.downloadUrl;
-          leaveTable.value = res.data.id;
-          break;
-      }
-    }
-  });
-};
 
 // 人事档案
 let recordShow = ref(true);
 
-const imageView = (type: number) => {
-  imageShow.value = true;
+const imageView = (type: string) => {
   switch (type) {
-    case 1:
+    case "sfz1":
+      imageShow.value = true;
       imageUrl.value = IDCardFront.value;
       break;
-    case 2:
+    case "sfz2":
+      imageShow.value = true;
       imageUrl.value = IDCardBack.value;
       break;
-    case 3:
-      imageUrl.value = bankSize.value;
+    case "qualification":
+      imageShow.value = true;
+      imageUrl.value = businessLicense.value;
       break;
-    case 4:
+    case "contract":
       imageUrl.value = contract.value;
+      nextTick(() => {
+        // loadPdf(contract.value)
+        if (contract.value.includes('.pdf')) {
+          window.open(contract.value, '_blank')
+        } else if (contract.value.includes('.doc') || contract.value.includes('.docx')) {
+          fileShow.value = true
+          nextTick(() => {
+            filePreview(contract.value)
+          })
+        } else if (contract.value.includes('.jpg') || contract.value.includes('.jpeg') || contract.value.includes('.png')) {
+          imageShow.value = true
+        }
+      })
       break;
-    case 5:
+    case "applicant":
       imageUrl.value = applicant.value;
+      nextTick(() => {
+        // loadPdf(applicant.value)
+        if (applicant.value.includes('.pdf')) {
+          window.open(applicant.value, '_blank')
+        } else if (applicant.value.includes('.doc') || applicant.value.includes('.docx')) {
+          fileShow.value = true
+          filePreview(applicant.value)
+        } else if (applicant.value.includes('.jpg') || applicant.value.includes('.jpeg') || applicant.value.includes('.png')) {
+          imageShow.value = true
+        }
+      })
       break;
-    case 6:
+    case "salaryTable":
       imageUrl.value = decidePay.value;
+      nextTick(() => {
+        // loadPdf(decidePay.value)
+        if (decidePay.value.includes('.pdf')) {
+          window.open(decidePay.value, '_blank')
+        } else if (decidePay.value.includes('.doc') || decidePay.value.includes('.docx')) {
+          fileShow.value = true
+          filePreview(decidePay.value)
+        } else if (decidePay.value.includes('.jpg') || decidePay.value.includes('.jpeg') || decidePay.value.includes('.png')) {
+          imageShow.value = true
+        }
+      })
       break;
-    case 7:
+    case "leaveTable":
       imageUrl.value = dimission.value;
+      nextTick(() => {
+        // loadPdf(dimission.value)
+        if (dimission.value.includes('.pdf')) {
+          window.open(dimission.value, '_blank')
+        } else if (dimission.value.includes('.doc') || dimission.value.includes('.docx')) {
+          fileShow.value = true
+          filePreview(dimission.value)
+        } else if (dimission.value.includes('.jpg') || dimission.value.includes('.jpeg') || dimission.value.includes('.png')) {
+          imageShow.value = true
+        }
+      })
       break;
   }
 };
+const downloadImage = (type: string) => {
+  switch (type) {
+    case "sfz1":
+      download(IDCardFront.value, IDCardFrontName.value)
+      break;
+    case "sfz2":
+      download(IDCardBack.value, IDCardBackName.value)
+      break;
+    case "qualification":
+      download(businessLicense.value, businessLicenseName.value)
+      break;
+    case "contract":
+      download(contract.value, contractName.value)
+      break;
+    case "applicant":
+      download(applicant.value, applicantName.value)
+      break;
+    case "salaryTable":
+      download(decidePay.value, decidePayName.value)
+      break;
+    case "leaveTable":
+      download(dimission.value, dimissionName.value)
+      break;
+  }
+}
+// 图片下载
+const download = (url, name) => {
+  let a_link = document.createElement('a')
+  fetch(url).then((res) => res.blob())
+    .then((blob) => {
+      // 将链接地址字符内容转变成blob地址
+      a_link.href = URL.createObjectURL(blob)
+      console.log(a_link.href)
+      a_link.download = name //下载的文件的名字
+      document.body.appendChild(a_link)
+      a_link.click()
+    })
 
+}
 const onSubmit = async (OperationFormRef: FormInstance, type: number) => {
   if (!OperationFormRef) {
     emits("closeDialog", false);
@@ -1186,4 +1207,12 @@ function delUser() {
   padding-right: 8px;
   font-size: 14px;
 }
+:deep(.vue-office-docx-main) {
+  height: 600px;
+  overflow-y: auto;
+}
+
+:deep(.docx-wrapper) {
+  background: white;
+}
 </style>

+ 13 - 0
src/views/platform/index.vue

@@ -28,6 +28,19 @@
                 <el-input v-model="receivableForm.orderNo" placeholder="请输入" clearable></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="8">
+              <el-form-item label="业务来源">
+                <el-input v-model="receivableForm.businessSource" placeholder="请输入" clearable></el-input>
+              </el-form-item>
+            </el-col> <el-col :span="8">
+              <el-form-item label="结算状态">
+                <el-input v-model="receivableForm.settlementStatus" placeholder="请输入" clearable></el-input>
+              </el-form-item>
+            </el-col> <el-col :span="8">
+              <el-form-item label="增加类型">
+                <el-input v-model="receivableForm.addType" placeholder="请输入" clearable></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="8">
               <el-form-item label="出单协议">
                 <el-select v-model="receivableForm.agreementId" placeholder="请选择" clearable>

+ 4 - 4
src/views/quoteConfig/project/modules/projectAdd.vue

@@ -225,7 +225,7 @@ import detail from '../../../../layouts/components/JYXDetail/index.vue'
 import ruleSelect from '../../../../layouts/components/ruleSelect/index.vue'
 import Detail from "@/views/representative/detail.vue";
 // 导入Vue 3组合式API
-import { ref, onMounted, nextTick } from 'vue'
+import { ref, onMounted, onBeforeMount, nextTick } from 'vue'
 
 // 路由实例
 const myRouter = useRouter()
@@ -319,7 +319,7 @@ let isEdit = ref(false)
 let projectAddFrom = ref({
   ruleAttrs: [], // 规则属性
   schemeType: 1, // 方案类型:1-基础方案,2-自选方案
-  productId: '', // 险种类型
+  productId: '0330', // 险种类型
   schemeList: [{
     schemeName: '', // 方案名称
     description: '', // 方案描述
@@ -486,7 +486,7 @@ let insuranceTypeList = ref([])
  * 初始化险种数据
  */
 const initInsurance = () => {
-  api.projectApi.getBusinessInsurance(projectAddFrom.value.productId).then(res => {
+  api.projectApi.getBusinessInsurance(projectAddFrom.value.productId || '0330').then(res => {
     if(res.code == 200) {
       insuranceTypeList.value = res.data
 
@@ -892,7 +892,7 @@ const save = async (ProjectAddRef: FormInstance | undefined) => {
 /**
  * 组件挂载时执行
  */
-onMounted(() => {
+ onBeforeMount(() => {
   // 初始化险种类型
   initType()
   // 初始化保险公司列表

Неке датотеке нису приказане због велике количине промена