ソースを参照

fix:调整出单数据交互

wuguojie 1 年間 前
コミット
78d4665326

+ 1 - 1
src/api/modules/additional.ts

@@ -15,7 +15,7 @@ const additionalApi = (axiosInstance: ApiInstance) => ({
   idCard: (data: any) => axiosInstance.post('/order/identify/idCard', data), // 身份证识别
   businessLicense: (data: any) => axiosInstance.post('/order/identify/businessLicense', data), // 营业执照识别
   vinSearch:(data: string) => axiosInstance.get(`/order/carModel/vinSearch?frameNo=${data}`), // 根据车辆识别码查询车辆信息
-  licenseSearch:(data: string) => axiosInstance.get(`/order/carModel/vinSearch?frameNo=${data}`), // 根据车牌查询车辆信息
+  licenseSearch:(data: any) => axiosInstance.post(`/order/carModel/modelsQuery`, data), // 根据车牌查询车辆信息
   saveOrders: (data: any) => axiosInstance.post('/supplementOrder/saveOrders', data), // 暂存/提交
   pageList: (data: any) => axiosInstance.post('/supplementOrder/pageList', data), // 订单列表
   deleteById: (data: string) => axiosInstance.get(`/supplementOrder/deleteById?id=${data}`), // 订单删除

+ 5 - 1
src/api/modules/insurancePolicy.ts

@@ -8,7 +8,11 @@ const insurancePolicyApi = (axiosInstance: ApiInstance) => ({
       system_code: localStorage.getItem('login_system')
     }
   }), // 获取保司
-  getSchemeResult: (data: any) => axiosInstance.get(`scheme/getSchemeResult?companyId=${data.companyId}&&productId=${data.productId}`)
+  getSchemeResult: (data: any) => axiosInstance.get(`scheme/getSchemeResult?companyId=${data.companyId}&&productId=${data.productId}`), // 获取保司下的险种和驾意险
+  imagesUpload: (data: any) => axiosInstance.post('/unify/order/imagesUpload', data), // 上传影像保存
+  underwriting: (data: any) => axiosInstance.post('/unify/order/underwriting', data), // 核保
+  imageSave: (data: any) => axiosInstance.post('/unify/order/imageSave', data), // 本地影像存储
+  queryList: (data: any) => axiosInstance.post('supplementOrder/queryList', data), // 订单
 })
 
 export default insurancePolicyApi

ファイルの差分が大きいため隠しています
+ 386 - 127
src/views/insurancePolicy/index.vue


+ 488 - 0
src/views/insurancePolicy/modules/imageTypeSelect.vue

@@ -0,0 +1,488 @@
+<template>
+  <div class="insuranceSelect">
+    <div class="insuranceList">
+      <div class="insuranceLeft">
+        <div class="insuranceItem" v-for="(item, index) in list" @click="handleType(item, index)">
+          <span class="checkIcon" v-if="item.children.length === 0" :class="{ 'active': item.checked }">
+            <el-icon><Select /></el-icon>
+          </span>
+          <span>{{ item.label }}</span>
+        </div>
+      </div>
+      <el-divider direction="vertical" style="height: 100%;"></el-divider>
+      <div class="insuranceRight" v-show="choiceItem.value === item.value" v-for="(item, index) in list">
+        <p class="insuranceItem" v-for="sub in item.children" @click="handleSubType(item, sub, index)">
+          <span class="checkIcon" :class="{ 'active': sub.checked }">
+            <el-icon><Select /></el-icon>
+          </span>
+          <span>{{ sub.label }}</span>
+        </p>
+      </div>
+    </div>
+    <div class="footer" >
+      <el-button plain @click="handleCancel">取消</el-button>
+      <el-button type="primary" @click="handleConfirm">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import api from '@/api'
+import { ElMessage } from "element-plus";
+
+// emits
+const emits = defineEmits(['close'])
+
+let list = ref([
+  {
+    label: '车辆信息',
+    value: '1',
+    checked: false,
+    children: [
+      {
+        label: '行驶证主页',
+        checked: false,
+        imageType: 'C01',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        value: '1-1'
+      },
+      {
+        label: '行驶证副页',
+        imageType: 'D01',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '1-2'
+      },
+      {
+        label: '机动车辆登记证书',
+        imageType: 'TAR05',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '1-3'
+      },
+      {
+        label: '新车合格证',
+        imageType: 'XC00',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '1-4'
+      },
+      {
+        label: '购车发票',
+        imageType: 'GC00',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '1-5'
+      },
+    ]
+  },
+  {
+    label: '车主信息',
+    value: '2',
+    checked: false,
+    children: [
+      {
+        label: '车主身份证(正面)',
+        imageType: 'C02',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '2-1'
+      },{
+        label: '车主身份证(反面)',
+        imageType: 'D02',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '2-2'
+      },{
+        label: '车主营业执照',
+        imageType: 'Y02',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '2-3'
+      }
+    ]
+  },
+  {
+    label: '投保人信息',
+    value: '3',
+    checked: false,
+    children: [
+      {
+        label: '投保人身份证(正面)',
+        imageType: 'C03',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '3-1'
+      },{
+        label: '投保人身份证(反面)',
+        imageType: 'D03',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '3-2'
+      },{
+        label: '投保人营业执照',
+        imageType: 'Y03',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '3-3'
+      }
+    ]
+  },
+  {
+    label: '被保人信息',
+    value: '4',
+    checked: false,
+    children: [
+      {
+        label: '被保人身份证(正面)',
+        imageType: 'C04',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '4-1'
+      },{
+        label: '被保人身份证(反面)',
+        imageType: 'D04',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '4-2'
+      },{
+        label: '被保人营业执照',
+        imageType: 'Y04',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '4-3'
+      }
+    ]
+  },
+  {
+    label: '关系证明',
+    value: '5',
+    checked: false,
+    children: [
+      {
+        label: '关系证明',
+        imageType: 'GX00',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '5-1'
+      }
+    ]
+  },
+  {
+    label: '验车照',
+    value: '6',
+    checked: false,
+    children: [
+      {
+        label: '验车照(车架)',
+        imageType: 'C0500',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '6-1'
+      },
+      {
+        label: '验车照(后左)',
+        imageType: 'C0501',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '6-2'
+      },
+      {
+        label: '验车照(后右)',
+        imageType: 'C0502',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '6-3'
+      },
+      {
+        label: '验车照(前左)',
+        imageType: 'C0503',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '6-4'
+      },
+      {
+        label: '验车照(前右)',
+        imageType: 'C0504',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '6-5'
+      },
+      {
+        label: '验车照(正前)',
+        imageType: 'C0506',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '6-6'
+      },
+      {
+        label: '验车照(正后)',
+        imageType: 'C0507',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '6-7'
+      },
+      {
+        label: '验车照(人车合影)',
+        imageType: 'C0505',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '6-8'
+      },
+      {
+        label: '验车照(地标合影)',
+        imageType: 'C0508',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '6-9'
+      },
+      {
+        label: '验车照(工作台)',
+        imageType: 'C0509',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '6-10'
+      },
+      {
+        label: '验车照(天窗)',
+        imageType: 'C0510',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '6-11'
+      },
+    ]
+  },
+  {
+    label: '上年商业险保单',
+    value: '7',
+    checked: false,
+    children: [
+      {
+        label: '上年商业险保单',
+        imageType: 'LAST_INSURANCE_POLICY',
+        fileName: '',
+        fileUrl: '',
+        imageId: '',
+        checked: false,
+        value: '7-1'
+      }
+    ]
+  }
+])
+
+// 方案类型
+let insuranceType = ref(null)
+
+// 当前选择的险种
+let choiceItem = ref({})
+// 初始化险种数据
+let insuranceTypeList = ref([])
+let typeList = ref([])
+// 选中的数据
+let selectedList = ref([])
+const handleType = (item, index) => {
+  choiceItem.value = item
+}
+// 投保金额选择
+const handleSubType =( item, sub, index) => {
+  sub.checked = !sub.checked
+  item.checked = true
+  let arr = []
+  list.value.forEach(a => {
+    a.children?.forEach(b => {
+      if(b.checked) {
+        arr.push(b)
+      }
+    })
+  })
+  selectedList.value = arr
+}
+
+// 取消
+const handleCancel = () => {
+  emits('close', {
+    list: []
+  })
+}
+// 保存
+const handleConfirm = () => {
+  emits('close', {
+    list: selectedList.value
+  })
+}
+
+// 修改数据
+const initEditData = (data, type) => {
+  insuranceType.value = type
+  api.projectApi.getBusinessInsurance().then((res: any) => {
+    if(res.code == 200) {
+      if(res.data&&res.data.length>0) {
+        // choiceItem.value = res.data[0]
+        choiceItem.value = list.value[0]
+        res.data.forEach(item => {
+          item.checked = false
+          item.options.forEach(sub => {
+            sub.checked = false
+          })
+        })
+        typeList.value = JSON.parse(JSON.stringify(res.data))
+        if(data && data.length > 0) {
+          data.forEach(item => {
+            item.checked = true
+            item.options.forEach(sub => {
+              if(item.optionId === sub.id) {
+                sub.checked = true
+              }
+            })
+          })
+          insuranceTypeList.value = res.data.map(a => {
+            let obj = data.find(b => b.insuranceId === a.insuranceId)
+            return obj || a
+          })
+        } else {
+          insuranceTypeList.value = res.data
+        }
+      }
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+
+defineExpose({
+  initEditData
+})
+</script>
+
+<style scoped lang="scss">
+.insuranceSelect{
+  height: 300px;
+  .insuranceList{
+    height: calc(100% - 40px);
+    overflow: hidden;
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 10px;
+    .insuranceLeft, .insuranceRight{
+      height: 100%;
+      overflow-y: auto;
+    }
+    .insuranceLeft{
+      width: 49%;
+      .insuranceItem{
+        cursor: pointer;
+        display: flex;
+        align-items: center;
+        margin: 10px 0;
+        span{
+          margin-left: 10px;
+        }
+        .checkIcon{
+          width: 14px;
+          height: 14px;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          border: 1px solid #ccc;
+          border-radius: 2px;
+          font-size: 10px;
+          color: #fff;
+        }
+        .active{
+          color: #fff;
+          background: #3994FB;
+          border-color: #3994FB;
+        }
+      }
+    }
+    .insuranceRight{
+      width: 49%;
+      .insuranceItem{
+        cursor: pointer;
+        display: flex;
+        align-items: center;
+        margin: 10px 0;
+        span{
+          margin-left: 10px;
+        }
+        .checkIcon{
+          width: 14px;
+          height: 14px;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          border: 1px solid #ccc;
+          border-radius: 2px;
+          font-size: 10px;
+          color: #fff;
+        }
+        .active{
+          color: #fff;
+          background: #3994FB;
+          border-color: #3994FB;
+        }
+      }
+    }
+  }
+  .footer{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+}
+</style>

+ 115 - 4
src/views/insurancePolicy/modules/recognition.vue

@@ -127,7 +127,7 @@
               </div>
             </div>
           </el-upload>
-          <el-upload v-else :auto-upload="false" :show-file-list="false" @change="uploadImage($event, 'xszf')">
+          <el-upload v-else :auto-upload="false" :show-file-list="false" @change="uploadImage($event, 'sfzf')">
             <div class="upload-box">
               <img class="upload-image" :src="sfzFront"/>
             </div>
@@ -143,7 +143,7 @@
               </div>
             </div>
           </el-upload>
-          <el-upload v-else :auto-upload="false" :show-file-list="false" @change="uploadImage($event, 'xszb')">
+          <el-upload v-else :auto-upload="false" :show-file-list="false" @change="uploadImage($event, 'sfzb')">
             <div class="upload-box">
               <img class="upload-image" :src="sfzBack"/>
             </div>
@@ -504,29 +504,40 @@ import { ElMessage } from 'element-plus'
 const emit = defineEmits(['close'])
 
 let xszFront = ref('')
+let xszFrontResult = ref(null)
 let xszFrontFile = ref(null)
 let xszBack = ref('')
+let xszBackResult = ref(null)
 let xszBackFile = ref(null)
 
 let sfzFront = ref('')
+let sfzFrontResult = ref(null)
 let sfzFrontFile = ref(null)
 let sfzBack = ref('')
+let sfzBackResult = ref(null)
 let sfzBackFile = ref(null)
 let yyzzFront = ref('')
+let yyzzFrontResult = ref(null)
 let yyzzFrontFile = ref(null)
 
 let tbrFront = ref('')
+let tbrFrontResult = ref(null)
 let tbrFrontFile = ref(null)
 let tbrBack = ref('')
+let tbrBackResult = ref(null)
 let tbrBackFile = ref(null)
 let tbryyzzFront = ref('')
+let tbryyzzFrontResult = ref(null)
 let tbryyzzFrontFile = ref(null)
 
 let bbrFront = ref('')
+let bbrFrontResult = ref(null)
 let bbrFrontFile = ref(null)
 let bbrBack = ref('')
+let bbrBackResult = ref(null)
 let bbrBackFile = ref(null)
 let bbryyzzFront = ref('')
+let bbryyzzFrontResult = ref(null)
 let bbryyzzFrontFile = ref(null)
 
 let carForm = ref({})
@@ -584,6 +595,7 @@ const uploadImage = async (file, type) => {
     let result: any = {...data}
     switch (type) {
       case 'xszf':
+        xszFrontResult.value = result
         xszFront.value = result.downloadUrl
         xszFrontFile.value = files
         if(xszFront.value&&xszBack.value) {
@@ -632,6 +644,7 @@ const uploadImage = async (file, type) => {
         }
         break;
       case 'xszb':
+        xszBackResult.value = result
         xszBack.value = result.downloadUrl
         xszBackFile.value = files
         if(xszFront.value&&xszBack.value) {
@@ -680,6 +693,7 @@ const uploadImage = async (file, type) => {
         }
         break;
       case 'sfzf':
+        sfzFrontResult.value = result
         sfzFront.value = result.downloadUrl
         sfzFrontFile.value = files
         if(sfzFrontFile.value&&sfzBackFile.value) {
@@ -718,6 +732,7 @@ const uploadImage = async (file, type) => {
         }
         break;
       case 'sfzb':
+        sfzBackResult.value = result
         sfzBack.value = result.downloadUrl
         sfzBackFile.value = files
         if(sfzFrontFile.value&&sfzBackFile.value) {
@@ -756,6 +771,7 @@ const uploadImage = async (file, type) => {
         }
         break;
       case 'yyzz':
+        yyzzFrontResult.value = result
         yyzzFront.value = result.downloadUrl
         yyzzFrontFile.value = files
         if(yyzzFront.value) {
@@ -775,6 +791,7 @@ const uploadImage = async (file, type) => {
           })
         }
       case 'tbrf':
+        tbrFrontResult.value = result
         tbrFront.value = result.downloadUrl
         tbrFrontFile.value = files
         if(tbrFrontFile.value&&tbrBackFile.value) {
@@ -813,6 +830,7 @@ const uploadImage = async (file, type) => {
         }
         break;
       case 'tbrb':
+        tbrBackResult.value = result
         tbrBack.value = result.downloadUrl
         tbrBackFile.value = files
         if(tbrFrontFile.value&&tbrBackFile.value) {
@@ -851,6 +869,7 @@ const uploadImage = async (file, type) => {
         }
         break;
       case 'tbryyzz':
+        tbryyzzFrontResult.value = result
         tbryyzzFront.value = result.downloadUrl
         tbryyzzFrontFile.value = files
         if(tbryyzzFront.value) {
@@ -870,6 +889,7 @@ const uploadImage = async (file, type) => {
           })
         }
       case 'bbrf':
+        bbrFrontResult.value = result
         bbrFront.value = result.downloadUrl
         bbrFrontFile.value = files
         if(bbrFrontFile.value&&bbrBackFile.value) {
@@ -908,6 +928,7 @@ const uploadImage = async (file, type) => {
         }
         break;
       case 'bbrb':
+        bbrBackResult.value = result
         bbrBack.value = result.downloadUrl
         bbrBackFile.value = files
         if(bbrFrontFile.value&&bbrBackFile.value) {
@@ -946,6 +967,7 @@ const uploadImage = async (file, type) => {
         }
         break;
       case 'bbryyzz':
+        bbryyzzFrontResult.value = result
         bbryyzzFront.value = result.downloadUrl
         bbryyzzFrontFile.value = files
         if(tbryyzzFront.value) {
@@ -991,9 +1013,98 @@ const handleConfirm = () => {
     ower2Form: {
       ...ower2Form.value,
       identifyType: btn.value.owner2Show === '被保人身份证'?'01':btn.value.owner2Show === '被保人营业执照'?'02':''
-    }
+    },
+    imageVoList: [
+      {
+        imageCode: 'C01',
+        imageBase64List: [
+          {
+            imageId: xszFrontResult.value?.id
+          }
+        ]
+      },
+      {
+        imageCode: 'D01',
+        imageBase64List: [
+          {
+            imageId: xszBackResult.value?.id
+          }
+        ]
+      },
+      {
+        imageCode: 'C02',
+        imageBase64List: [
+          {
+            imageId: sfzFrontResult.value?.id
+          }
+        ]
+      },
+      {
+        imageCode: 'D02',
+        imageBase64List: [
+          {
+            imageId: sfzBackResult.value?.id
+          }
+        ]
+      },
+      {
+        imageCode: 'Y02',
+        imageBase64List: [
+          {
+            imageId: yyzzFrontResult.value?.id
+          }
+        ]
+      },
+      {
+        imageCode: 'C03',
+        imageBase64List: [
+          {
+            imageId: tbrFrontResult.value?.id
+          }
+        ]
+      },
+      {
+        imageCode: 'D03',
+        imageBase64List: [
+          {
+            imageId: tbrBackResult.value?.id
+          }
+        ]
+      },
+      {
+        imageCode: 'Y03',
+        imageBase64List: [
+          {
+            imageId: tbryyzzFrontResult.value?.id
+          }
+        ]
+      },
+      {
+        imageCode: 'C04',
+        imageBase64List: [
+          {
+            imageId: bbrFrontResult.value?.id
+          }
+        ]
+      },
+      {
+        imageCode: 'D04',
+        imageBase64List: [
+          {
+            imageId: bbrBackResult.value?.id
+          }
+        ]
+      },
+      {
+        imageCode: 'Y04',
+        imageBase64List: [
+          {
+            imageId: bbryyzzFrontResult.value?.id
+          }
+        ]
+      },
+    ]
   }
-  console.log(123123123, data)
   emit('close', data)
 }
 

+ 122 - 39
src/views/insurancePolicy/modules/underwriting.vue

@@ -2,7 +2,12 @@
   <div class="underwriting">
     <div class="title">
       <span class="text">影像信息</span>
-      <el-button plain type="primary" icon="Plus" size="small">添加影响资料</el-button>
+      <el-popover :visible="imageTypeShow" placement="bottom-start" :width="600" trigger="click">
+        <template #reference>
+          <el-button plain type="primary" icon="Plus" size="small" @click="addImages">添加影像资料</el-button>
+        </template>
+        <imageTypeSelect ref="ImageTypeSelect" @close="handleImageTypeSelect"></imageTypeSelect>
+      </el-popover>
     </div>
     <div class="images">
       <el-row :gutter="20">
@@ -11,7 +16,7 @@
             <div class="upload-box">
               <div class="icon-box">
                 <el-icon style="font-size: 20px"><Camera /></el-icon>
-                <p>{{ item.text }}</p>
+                <p>{{ item.label }}</p>
               </div>
             </div>
           </el-upload>
@@ -61,46 +66,28 @@
 <script setup lang="ts">
 import api from '@/api'
 import { ElMessage } from 'element-plus'
+import imageTypeSelect from './imageTypeSelect.vue'
 
+const ImageTypeSelect = ref()
 const emit = defineEmits(['close'])
 
-let images = ref([
-  {
-    text: '111',
-    fileName: '',
-    fileUrl: '',
-    imageType: '',
-    imageId: ''
-  },
-  {
-    text: '111',
-    fileName: '',
-    fileUrl: '',
-    imageType: '',
-    imageId: ''
-  },
-  {
-    text: '111',
-    fileName: '',
-    fileUrl: '',
-    imageType: '',
-    imageId: ''
-  },
-  {
-    text: '111',
-    fileName: '',
-    fileUrl: '',
-    imageType: '',
-    imageId: ''
-  },
-  {
-    text: '111',
-    fileName: '',
-    fileUrl: '',
-    imageType: '',
-    imageId: ''
-  },
-])
+let images = ref([])
+
+// 添加影像资料
+let imageTypeShow = ref(false)
+const addImages = () => {
+  imageTypeShow.value = true
+  nextTick(() => {
+    ImageTypeSelect.value.initEditData()
+  })
+}
+const handleImageTypeSelect = (data) => {
+  imageTypeShow.value = false
+  if(data&&data.list?.length>0) {
+    images.value = data.list
+    console.log(12312312321, data.list)
+  }
+}
 
 // 图片删除
 const deleteImage = (item) => {
@@ -166,12 +153,39 @@ let tableData = ref([
 // 提交核保
 const handleSubmit = (bool) => {
   if(bool) {
+    api.insurancePolicyApi.underwriting({
+      order: {
+        ordersNo: ordersNo.value
+      }
+    }).then((res: any) => {
+      if(res.code === 200) {
+        ElMessage({
+          message: res.msg,
+          type: 'success'
+        })
+      } else {
+        ElMessage({
+          message: res.msg,
+          type: 'warning'
+        })
+      }
+    })
     emit('close', false)
   } else {
     emit('close', false)
   }
 }
 
+//数据交互
+let ordersNo = ref('')
+const initEdit = (data) => {
+  console.log(123, data)
+  ordersNo.value = data.ordersNo
+}
+
+defineExpose({
+  initEdit
+})
 
 </script>
 
@@ -209,6 +223,75 @@ const handleSubmit = (bool) => {
       }
     }
   }
+  .fileInfo{
+    display: flex;
+    align-items: center;
+    justify-content: flex-start;
+    //padding: 2px 20px;
+    border-radius: 5px;
+    margin: 0 10px;
+    //&:hover{
+    //  background: #ccc;
+    //}
+    .fileName{
+      width: 200px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+    .fileBtn{
+      display: flex;
+      align-items: center;
+      .btn-icon{
+        margin: 0 10px;
+        font-size: 16px;
+        cursor: pointer;
+        &:hover{
+          color: #00a0f4;
+        }
+      }
+    }
+
+    .file-box{
+      position: relative;
+      .btn-top{
+        width: 100%;
+        display: flex;
+        align-items: center;
+        justify-content: flex-end;
+        position: absolute;
+        top: 0;
+        left: 0;
+        .image-close{
+          display: block;
+          width: 12px;
+          height: 12px;
+        }
+      }
+      .file-img{
+        display: block;
+        width: 208px;
+        height: 130px;
+        border-radius: 5px;
+      }
+      .btn-bottom{
+        position: absolute;
+        left: 0;
+        bottom: 0;
+        z-index: 1000;
+        display: flex;
+        align-items: center;
+        height: 24px;
+        width: 100%;
+        background: url("@/assets/images/btn-bg.png") no-repeat;
+        background-size: 100% 100%;
+        .width-50{
+          width: 50%;
+        }
+      }
+    }
+
+  }
   .footer{
     display: flex;
     align-items: center;

+ 61 - 17
src/views/insurancePolicy/order.vue

@@ -9,25 +9,26 @@
         </el-col>
         <el-col :span="8">
           <el-form-item label="车牌号">
-            <el-input placeholder="输入车牌号查找" v-model="orderForm.carNo"></el-input>
+            <el-input placeholder="输入车牌号查找" v-model="orderForm.licenseNo"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="8">
           <el-form-item label="报价时间">
             <el-date-picker
               v-model="orderForm.range"
-              type="daterange"
+              type="datetimerange"
               range-separator="至"
               start-placeholder="开始时间"
               end-placeholder="结束时间"
+              value-format="YYYY-MM-DD HH:mm:ss"
             />
           </el-form-item>
         </el-col>
         <el-col :span="8"></el-col>
         <el-col :span="8"></el-col>
         <el-col :span="8" style="display: flex; justify-content: flex-end">
-          <el-button plain>取消</el-button>
-          <el-button type="primary">搜索</el-button>
+          <el-button plain @click="handleCancel">取消</el-button>
+          <el-button type="primary" @click="handleSearch">搜索</el-button>
         </el-col>
       </el-row>
     </el-form>
@@ -36,14 +37,18 @@
       style="margin-top: 24px; width: 100%"
       height="640"
     >
-      <el-table-column label="订单号" prop="a" width="200"></el-table-column>
-      <el-table-column label="保险公司" prop="b" width="200"></el-table-column>
-      <el-table-column label="车牌号" prop="c" width="200"></el-table-column>
-      <el-table-column label="车架号" prop="d" width="200"></el-table-column>
-      <el-table-column label="状态" prop="e" width="200"></el-table-column>
-      <el-table-column label="报价时间" prop="f" width="200"></el-table-column>
-      <el-table-column label="险种" prop="g" width="200"></el-table-column>
-      <el-table-column label="保费计算" prop="h" width="200"></el-table-column>
+      <el-table-column label="订单号" prop="orderNo" width="200"></el-table-column>
+      <el-table-column label="保险公司" prop="companyName" width="200"></el-table-column>
+      <el-table-column label="车牌号" prop="licenseNo" width="200"></el-table-column>
+      <el-table-column label="车架号" prop="vinNo" width="200"></el-table-column>
+      <el-table-column label="状态" prop="orderStatus" width="200">
+        <template #default="scope">
+          {{ scope.row.orderStatus === '0'?'订单已提交':scope.row.orderStatus === '1'?'待核保':scope.row.orderStatus === '2'?'核保中':scope.row.orderStatus === '3'?'人工处理':scope.row.orderStatus === '4'?'待缴费':scope.row.orderStatus === '5'?'已承保':scope.row.orderStatus === '6'?'报价失败':scope.row.orderStatus === '7'?'核保失败':scope.row.orderStatus === '8'?'订单关闭':'' }}
+        </template>
+      </el-table-column>
+      <el-table-column label="报价时间" prop="createTime" width="200"></el-table-column>
+      <el-table-column label="险种" prop="productName" width="200"></el-table-column>
+      <el-table-column label="保费计算" prop="sumPremium" width="200"></el-table-column>
       <el-table-column label="业务员信息" prop="i" width="200"></el-table-column>
       <el-table-column label="业务员类型" prop="j" width="200"></el-table-column>
       <el-table-column label="出单机构" prop="k" width="200"></el-table-column>
@@ -58,10 +63,10 @@
         <template #default="scope">
           <el-button link type="primary">详情</el-button>
           <el-button link type="primary">上传影像</el-button>
-          <el-button link type="primary">重新核保</el-button>
-          <el-button link type="primary">核保</el-button>
+          <el-button link type="primary" v-if="scope.row.orderStatus === '7'">重新核保</el-button>
+          <el-button link type="primary" v-if="scope.row.orderStatus === '1'">核保</el-button>
           <el-button link type="primary">分享</el-button>
-          <el-button link type="primary" @click="payCode(scope)">支付码</el-button>
+          <el-button link type="primary" v-if="scope.row.orderStatus === '4'" @click="payCode(scope)">支付码</el-button>
           <el-button link type="danger">删除订单</el-button>
         </template>
       </el-table-column>
@@ -93,12 +98,15 @@
 </template>
 
 <script setup lang="ts">
+import api from '@/api'
+import {ElMessage} from "element-plus";
+
 let orderForm = ref({
   orderNo: '',
-  carNo: '',
+  licenseNo: '',
   range: []
 })
-let tableData = ref([{},{},{},{},{},{},{},{},{},{}])
+let tableData = ref([])
 // 分页
 let pages = ref(1)
 let size = ref(10)
@@ -112,7 +120,38 @@ const handleCurrentChange = (page) => {
   initData()
 }
 const initData = () => {
+  api.insurancePolicyApi.queryList({
+    orderNo: orderForm.value.orderNo,
+    licenseNo: orderForm.value.licenseNo,
+    startDate: orderForm.value.range?.[0],
+    endDate: orderForm.value.range?.[1],
+    pages: pages.value,
+    size: size.value
+  }).then((res: any) => {
+    if(res.code == 200) {
+      tableData.value = res.data.records
+      total.value = res.data.total
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
 
+const handleSearch = () => {
+  pages.value = 1
+  size.value = 10
+  initData()
+}
+const handleCancel = () => {
+  pages.value = 1
+  size.value = 10
+  orderForm.value.orderNo = ''
+  orderForm.value.licenseNo = ''
+  orderForm.value.range = []
+  initData()
 }
 
 // 支付码
@@ -120,6 +159,11 @@ let payCodeShow = ref(false)
 const payCode = (scope) => {
   payCodeShow.value = true
 }
+
+onMounted(() => {
+  initData()
+})
+
 </script>
 
 <style scoped lang="scss">

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません