Sfoglia il codice sorgente

fix: 保司排序,bug修改

wuguojie 9 mesi fa
parent
commit
84f3b97e6b

+ 1 - 1
.env.development

@@ -5,7 +5,7 @@ VITE_APP_TITLE = 租户平台
 # 接口请求地址,会设置到 axios 的 baseURL 参数上
 # VITE_APP_API_BASEURL = https://test.baoxianzhanggui.com/web-api #默认地址
 # VITE_APP_API_BASEURL = http://192.168.0.253:8001  #田智
-# VITE_APP_API_BASEURL = http://192.168.0.55:8001  #董鑫
+# VITE_APP_API_BASEURL = http://192.168.0.19:8001  #董鑫
 VITE_APP_API_BASEURL = http://192.168.0.106:8001  #屈晨
 # VITE_APP_API_BASEURL = http://192.168.0.59:8001  #徐强
 

+ 20 - 1
package-lock.json

@@ -44,7 +44,8 @@
         "vue": "^3.5.13",
         "vue-cropper": "^1.1.4",
         "vue-m-message": "^4.0.2",
-        "vue-router": "^4.5.0"
+        "vue-router": "^4.5.0",
+        "vuedraggable": "^4.1.0"
       },
       "devDependencies": {
         "@antfu/eslint-config": "3.11.2",
@@ -17779,6 +17780,12 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/sortablejs": {
+      "version": "1.14.0",
+      "resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz",
+      "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==",
+      "license": "MIT"
+    },
     "node_modules/source-map": {
       "version": "0.6.1",
       "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
@@ -21961,6 +21968,18 @@
         "typescript": ">=5.0.0"
       }
     },
+    "node_modules/vuedraggable": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz",
+      "integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==",
+      "license": "MIT",
+      "dependencies": {
+        "sortablejs": "1.14.0"
+      },
+      "peerDependencies": {
+        "vue": "^3.0.1"
+      }
+    },
     "node_modules/wcwidth": {
       "version": "1.0.1",
       "resolved": "https://registry.npmmirror.com/wcwidth/-/wcwidth-1.0.1.tgz",

+ 2 - 1
package.json

@@ -58,7 +58,8 @@
     "vue": "^3.5.13",
     "vue-cropper": "^1.1.4",
     "vue-m-message": "^4.0.2",
-    "vue-router": "^4.5.0"
+    "vue-router": "^4.5.0",
+    "vuedraggable": "^4.1.0"
   },
   "devDependencies": {
     "@antfu/eslint-config": "3.11.2",

+ 2 - 1
src/api/index.ts

@@ -20,6 +20,7 @@ import advertisementApi from "@/api/modules/advertisement.ts"
 import representativeApi from "@/api/modules/representative.ts";
 import contentApi from "@/api/modules/content.ts";
 import agreementApi  from "@/api/modules/agreement";
+import companySortApi from "@/api/modules/companySort.ts"
 
 import financeApi from '@/api/modules/finance.ts'
 import invoiceRecordApi from '@/api/modules/invoiceRecord.ts'
@@ -146,6 +147,6 @@ const api = {
   wechatApi:wechatApi(axiosInstance),
   saleApi: saleApi(axiosInstance),
   dispatchApi: dispatchApi(axiosInstance),
-
+  companySortApi: companySortApi(axiosInstance),
 }
 export default api

+ 8 - 0
src/api/modules/companySort.ts

@@ -0,0 +1,8 @@
+import { ApiInstance } from '../type'
+
+const companySortApi = (axiosInstance: ApiInstance) => ({
+    getCompanySort: () => axiosInstance.get('/esmInsCompany/getCompanySort'),
+    updateCompanySort: (data: any) => axiosInstance.post('/esmInsCompany/updateCompanySort', data)
+})
+
+export default companySortApi

+ 2 - 1
src/api/modules/invoiceRecord.ts

@@ -1,7 +1,8 @@
 import { ApiInstance } from '../type'
 
 const invoiceRecordApi = (axiosInstance: ApiInstance) => ({
-    invoiceRecord: (data: any) => axiosInstance.post('/receivable/invoiceRecord', data)
+    invoiceRecord: (data: any) => axiosInstance.post('/receivable/invoiceRecord', data),
+    getOrderStatus: (data: any) => axiosInstance.post('/unify/order/getOrderStatus', data)
 })
 
 export default invoiceRecordApi

+ 9 - 1
src/router/modules/quoteConfig.ts

@@ -107,12 +107,20 @@ const routes: RouteRecordRaw = {
     },
     {
       path: 'dispatchIndex',
-      name: 'dispatchIndex',
+      name: 'DispatchIndex',
       component: () => import('@/views/quoteConfig/dispatch/index.vue'),
       meta: {
         title: '协议调度',
       },
     },
+    {
+      path: 'companySort',
+      name: 'CompanySort',
+      component: () => import('@/views/quoteConfig/companySort/index.vue'),
+      meta: {
+        title: '保司排序',
+      },
+    },
   ],
 }
 

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

@@ -247,13 +247,16 @@
             </el-col>
             <el-col :span="6">
               <el-form-item prop="identifyValidEndDate1" label="有效期止期">
-                <el-date-picker
-                  v-model="insurancePolicyForm.identifyValidEndDate1"
-                  type="date"
-                  placeholder="请选择"
-                  value-format="YYYY-MM-DD"
-                  style="width: 100%"
-                />
+                <div style="display: flex; align-items: center; justify-content: flex-start; width: 100%">
+                    <el-date-picker
+                            v-model="insurancePolicyForm.identifyValidEndDate1"
+                            type="date"
+                            placeholder="请选择"
+                            value-format="YYYY-MM-DD"
+                            style="width: calc(100% - 64px)"
+                    />
+                    <el-button type="primary" @click="longTime">长期</el-button>
+                </div>
               </el-form-item>
             </el-col>
             <el-col :span="6">
@@ -1647,7 +1650,7 @@ let insurancePolicyRules = ref<FormRules>({
     { required: true, trigger: 'change', message: '请选择车辆类型' },
   ],
   energyTypeCode: [
-    { required: true, trigger: 'change', message: '请选择车辆是否上牌' },
+    { required: true, trigger: 'change', message: '请选择能源种类' },
   ],
   registerDate: [
     { required: true, trigger: 'change', message: '请选择注册日期' },
@@ -1871,6 +1874,10 @@ const getQuoteNumber = () => {
   }
 }
 
+const longTime = () => {
+    insurancePolicyForm.value.identifyValidEndDate1 = '9999-12-31'
+}
+
 // 是否同车主/同投保人
 let btns = ref({
   owner1Show: true,

+ 19 - 2
src/views/insurancePolicy/order.vue

@@ -96,8 +96,8 @@
           <el-button link type="primary" v-if="scope.row.orderStatus != '7'&&scope.row.orderStatus != '8'" @click="toEdit(scope.row)">编辑</el-button>
           <el-button link type="primary" v-if="scope.row.orderStatus === '7' || scope.row.orderStatus === '1'">提交核保</el-button>
           <el-button link type="primary" v-if="scope.row.orderStatus === '3'">取消核保</el-button>
-          <el-button link type="primary" v-if="scope.row.orderStatus === '7' || scope.row.orderStatus === '1' || scope.row.orderStatus === '4'">更新订单</el-button>
-          <el-button link type="primary" v-if="scope.row.orderStatus === '3'">同步订单</el-button>
+          <el-button link type="primary" v-if="scope.row.orderStatus === '7' || scope.row.orderStatus === '1' || scope.row.orderStatus === '4'" @click="updateOrderStatus(scope.row.orderNo)">更新订单</el-button>
+          <el-button link type="primary" v-if="scope.row.orderStatus === '3'" @click="updateOrderStatus(scope.row.orderNo)">同步订单</el-button>
           <el-button link type="primary" v-if="scope.row.orderStatus === '6'">计算保费</el-button>
           <el-button link type="primary" v-if="scope.row.orderStatus === '8'">重新报价</el-button>
           <el-button link type="primary" v-if="scope.row.orderStatus === '5'">下载电子保单</el-button>
@@ -245,6 +245,23 @@ const toEdit = (row: any) => {
     })
 }
 
+const updateOrderStatus = (orderNo) => {
+  api.insurancePolicyApi.getOrderStatus({ order: { ordersNo: orderNo } }).then((res: any) => {
+    if(res.code == 200) {
+        ElMessage({
+            message: res.msg,
+            type: 'success'
+        })
+        initData()
+    } else {
+        ElMessage({
+            message: res.msg,
+            type: 'warning'
+        })
+    }
+  })
+}
+
 // 支付码
 let payCodeShow = ref(false)
 let payCodeUrl = ref('')

+ 5 - 4
src/views/operationManagement/operationDetail.vue

@@ -96,15 +96,16 @@
                         {{ scope.row.auditStatus == '0'?'未审核':scope.row.auditStatus == '1'?'审核通过':scope.row.auditStatus == '2'?'审核驳回':''}}
                       </template>
                     </el-table-column>
-                    <el-table-column prop="" label="身份证件照">
+                    <el-table-column prop="" label="身份证件照">
                       <template #default="scope">
 <!--                        <img class="cardImage" :src="dataDetail?.fileList.length>0?dataDetail?.fileList?.[0].fileUrl:''">-->
-                          {{ dataDetail?.fileList.length>0?`${dataDetail?.fileList?.length}张`: '' }}
+                          {{ dataDetail?.fileList.length>0?`${dataDetail?.fileList?.length}张`: '暂无' }}
                       </template>
                     </el-table-column>
-                    <el-table-column prop="cardFile" label="银行卡照">
+                    <el-table-column prop="cardFile" label="银行卡照">
                       <template #default="scope">
-                        <img class="cardImage" :src="scope.row.cardFile">
+<!--                        <img class="cardImage" :src="scope.row.cardFile">-->
+                          {{ scope.row.cardFileUrl?`1张`: '暂无' }}
                       </template>
                     </el-table-column>
                     <el-table-column label="操作">

+ 1 - 1
src/views/quoteConfig/agreement/agreementAdd.vue

@@ -76,7 +76,7 @@
             <span class="strong">其他信息</span>
           </ElCol>
           <ElCol :md="24" :lg="6">
-            <el-form-item label="协议归属" prop="deptId">
+            <el-form-item label="所属机构权限" prop="deptId">
               <el-cascader v-model="agreementFrom.deptId" style="width: 100%;" filterable clearable
                 :options="deptOptions" :props="parentIdprops" :show-all-levels="false" @change="deptIdChange" />
             </el-form-item>

+ 128 - 0
src/views/quoteConfig/companySort/index.vue

@@ -0,0 +1,128 @@
+<template>
+    <div class="sort">
+        <div class="tips">
+            <div class="tips-item">
+                <el-icon class="my-icon"><WarningFilled /></el-icon>
+                <p class="title">保险公司排序</p>
+            </div>
+            <div class="tips-item">
+                <el-icon class="special"><WarningFilled /></el-icon>
+                <p class="info">调整保险公司的排序,App报价,PC报价出单,补录订单的保险公司会按照左到右的顺序依次排序。拖动保险公司图标可调整顺序。</p>
+            </div>
+        </div>
+        <div class="list">
+            <draggable v-model="list" item-key="id" @end="draggableEnd">
+                <template #item="{ element }">
+                    <div class="draggable-item">
+                        <img :src="element.logo" />
+                        <div class="name" :title="element.nameSimple">{{ element.nameSimple }}</div>
+                    </div>
+                </template>
+            </draggable>
+        </div>
+    </div>
+</template>
+
+<script setup lang="ts">
+import draggable from 'vuedraggable'
+import api from "@/api";
+import {ElMessage} from "element-plus";
+
+let list = ref([])
+
+const draggableEnd = (e) => {
+    console.log(123123123, e)
+    console.log('list', list.value)
+    api.companySortApi.updateCompanySort(list.value).then((res: any) => {
+        if(res.code == 200) {
+            ElMessage({
+                message: res.msg,
+                type: 'success'
+            })
+        } else {
+            ElMessage({
+                message: res.msg,
+                type: 'warning'
+            })
+        }
+    })
+}
+
+const initData = () => {
+    api.companySortApi.getCompanySort().then((res: any) => {
+        if(res.code == 200) {
+            list.value = res.data
+        } else {
+            ElMessage({
+                message: res.msg,
+                type: 'warning'
+            })
+        }
+    })
+}
+
+onMounted(() => {
+    initData();
+})
+
+</script>
+
+<style scoped lang="scss">
+    .sort{
+        width: 100%;
+        height: 100%;
+        background: white;
+        padding: 20px;
+        .tips{
+            border: 1px solid #0083FF;
+            border-radius: 5px;
+            padding: 5px 10px;
+            background: #E5F3FF;
+            margin-bottom: 20px;
+            p{
+                margin: 0;
+            }
+            .tips-item{
+                display: flex;
+                align-items: center;
+                justify-content: flex-start;
+                margin-bottom: 10px;
+                .my-icon{
+                    color: #0083FF;
+                    margin-right: 10px;
+                }
+                .special{
+                    color: #E5F3FF;
+                    margin-right: 16px;
+                }
+                &:first-child{
+                    font-size: 18px;
+                }
+                &:last-child{
+                    font-size: 14px;
+                }
+            }
+        }
+        .draggable-item{
+            display: inline-block;
+            text-align: center;
+            cursor: pointer;
+            margin-right: 10px;
+            background: #f2f2f2;
+            border-radius: 3px;
+            padding: 8px 10px;
+            img{
+                display: block;
+                width: 80px;
+                height: 80px;
+                margin-bottom: 10px;
+            }
+            .name{
+                width: 80px;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+            }
+        }
+    }
+</style>

+ 3 - 3
src/views/quoteConfig/insuranceCompanyAccount/modules/insuranceAccountAdd.vue

@@ -172,7 +172,7 @@ const getPtlInsAttribution = (id, apiType, formRef) => {
       if(res.code == 200) {
         if(res.data.fields&&res.data.fields.length>0) {
           fielsOption.value = res.data.fields
-          res.data.fields.forEach(item => {
+          res.data.fields.filter(item => item.field !== 'comName')?.forEach(item => {
             insuranceAccountRules.value[item.field] = [
               { required: true, trigger: "blur", message: `请填写${item.label}` }
             ]
@@ -199,7 +199,7 @@ const companyChange = (e) => {
         if(res.code == 200) {
           if(res.data.fields&&res.data.fields.length>0) {
             fielsOption.value = res.data.fields
-            res.data.fields.forEach(item => {
+              res.data.fields.filter(item => item.field !== 'comName').forEach(item => {
               insuranceAccountRules.value[item.field] = [
                 { required: true, trigger: "blur", message: `请填写${item.label}` }
               ]
@@ -227,7 +227,7 @@ const apiTypeChange = (e) => {
         if(res.code == 200) {
           if(res.data.fields&&res.data.fields.length>0) {
             fielsOption.value = res.data.fields
-            res.data.fields.forEach(item => {
+              res.data.fields.filter(item => item.field !== 'comName').forEach(item => {
               insuranceAccountRules.value[item.field] = [
                 { required: true, trigger: "blur", message: `请填写${item.label}` }
               ]