祁鹏飞 3 месяцев назад
Родитель
Сommit
ee509c42b5

+ 2 - 0
src/api/modules/finance.ts

@@ -114,6 +114,8 @@ const financeApi = (axiosInstance: ApiInstance) => ({
 
     // 平台应收结算
     platformSettlement: (data: any) => axiosInstance.post('/receivable/platformSettlement', data),
+    // 平台应收联系人查询
+    queryReceivableContact: (data: any) => axiosInstance.post('/receivable/queryReceivableContact', data),
     // 查应收金额
     getPlatformSettlementReceivableAmount: (data: any) => axiosInstance.post('/receivable/getPlatformSettlementReceivableAmount', data),
 })

+ 4 - 0
src/views/payCredit/myTask.vue

@@ -119,6 +119,10 @@
           <el-table-column prop="bankName" label="银行"></el-table-column>
           <el-table-column prop="accountName" label="姓名"></el-table-column>
           <el-table-column prop="bankName" label="开户行"></el-table-column>
+          <el-table-column prop="withdrawalRequester" label="提现人"></el-table-column>
+          <el-table-column prop="withdrawalRequestTime" label="提现时间"></el-table-column>
+          <el-table-column prop="auditingTime" label="审核时间"></el-table-column>
+          <el-table-column prop="voucherId" label="凭证号"></el-table-column>
         </el-table>
         <div class="pagination">
           <el-pagination v-model:current-page="pages" v-model:page-size="size" :page-sizes="[10, 20, 30, 40]"

+ 19 - 11
src/views/platform/index.vue

@@ -157,6 +157,7 @@
           <el-table-column prop="typeAttrName" label="业务来源" width="120"></el-table-column>
           <el-table-column prop="orderNo" label="订单号" width="150"></el-table-column>
           <el-table-column prop="companyName" label="保险公司" width="120"></el-table-column>
+          <el-table-column prop="contactPerson" label="对接人" width="100"></el-table-column>
           <el-table-column prop="deptName" label="出单机构" width="120"></el-table-column>
           <el-table-column prop="agreementName" label="出单协议" width="150"></el-table-column>
           <el-table-column prop="orderType" label="订单类型" width="100"></el-table-column>
@@ -200,7 +201,6 @@
           <el-table-column prop="jqStartDate" label="交强险起保日期" width="150"></el-table-column>
           <el-table-column prop="syStartDate" label="商业险起保日期" width="150"></el-table-column>
           <el-table-column prop="createTime" label="创建时间" width="150"></el-table-column>
-          <el-table-column prop="dockingPerson" label="对接人" width="100"></el-table-column>
           <el-table-column label="操作" width="180" fixed="right">
             <template #default="scope">
               <el-button link type="primary"
@@ -464,7 +464,7 @@
     </el-dialog>
     <el-dialog v-model="invoiceShow" width="600" title="提示">
       <el-radio-group v-model="invoiceRadio">
-        <el-radio :value="item.id" v-for="(item, index) in options">{{ item.name }}</el-radio>
+        <el-radio :value="item.contactPersonPhone" v-for="(item, index) in options">{{ item.contactPerson }}</el-radio>
       </el-radio-group>
       <template #footer>
         <el-button class="border-[#0083FF] color-[#0083FF]" plain @click="invoiceShow = false">取消</el-button>
@@ -611,9 +611,9 @@ const reset = () => {
 }
 
 let ReceiveDataRef1 = ref()
-let ReceiveDataRef2 = ref()
 // 选中的数据
 let selectedList = ref([])
+let allData = ref([])
 // 全选的类型
 let selectType = ref('')
 // 外部全选是否勾选
@@ -624,12 +624,11 @@ const selectAll = (type: boolean) => {
     if (selectType.value) {
       receiveData.value.forEach((item) => {
         ReceiveDataRef1.value!.toggleRowSelection(item, true)
-        ReceiveDataRef2.value!.toggleRowSelection(item, true)
       })
       if (selectType.value == 'cur') {
         selectedList.value = receiveData.value
       } else {
-        selectedList.value = []
+        selectedList.value = allData.value
       }
     }
   } else {
@@ -649,7 +648,7 @@ const selectTypeChange = (type) => {
   if (type == 'cur') {
     selectedList.value = receiveData.value
   } else if (type == 'all') {
-    selectedList.value = []
+    selectedList.value = allData.value
   }
 }
 
@@ -793,11 +792,12 @@ let batchShow = ref(false)
 let invoiceShow = ref(false)
 let invoiceRadio = ref(null)
 const handleInvoiceSubmit = () => {
+  const arr=selectedList.value.map(v=>({id:v.id,orderNo:v.orderNo}))
   myRouter.push({
     name: 'Platformticket',
     query: {
-      companyId: invoiceRadio.value,
-      selectedList: JSON.stringify(selectedList.value),
+      contactPersonPhone: invoiceRadio.value,
+      selectedList: JSON.stringify(arr),
       invoiceType: "5"
     }
   })
@@ -967,8 +967,16 @@ const getPlatFormReceivableList = () => {
     pageSize: size.value
   }).then((res: any) => {
     if (res.code == 200) {
-      receiveData.value = res.data.records
-      total1.value = res.data.total
+      receiveData.value = res.data.insPlyIncomePage.records
+      allData.value = res.data.insPlyIncomeOrders
+      total1.value = res.data.insPlyIncomePage.total
+      receiveData.value.forEach(element => {
+        if (selectedList.value.find(v => v.id === element.id)) {
+          nextTick(() => {
+            ReceiveDataRef1.value!.toggleRowSelection(element, true)
+          })
+        }
+      });
     }
   })
 }
@@ -1054,7 +1062,7 @@ const batchSettle = () => {
     })
     return
   }
-  api.financeApi.getReceivableCompany({
+  api.financeApi.queryReceivableContact({
     incomeIds: selectedList.value.map((item: any) => item.id)
   }).then((res: any) => {
     if (res.code == 200) {

+ 36 - 27
src/views/platform/ticket.vue

@@ -10,7 +10,7 @@
       <div class="search-right">
         <div class="search-type" v-for="(item, index) in searchList">
           <el-select v-model="item.name" style="margin-right: 20px; width: 200px" disabled>
-            <el-option value="companyId" label="保险公司"></el-option>
+            <el-option value="contactPersonPhone" label="对接人"></el-option>
             <el-option value="signDate" label="签单时间"></el-option>
             <el-option value="ptlAgreement" label="出单协议"></el-option>
             <el-option value="orderType" label="订单类型"></el-option>
@@ -32,9 +32,10 @@
             <el-option value="不在固定范围" label="不在固定范围"></el-option>
             <el-option value="为空" label="为空"></el-option>
           </el-select>
-          <el-select class="w-350px" v-if="item.name == 'companyId'" v-model="item.search" placeholder="请选择" clearable
-            filterable :disabled="item.type == '为空'">
-            <el-option v-for="item in companyList" :key="item.id" :value="item.id" :label="item.name"></el-option>
+          <el-select class="w-350px" v-if="item.name == 'contactPersonPhone'" v-model="item.search" placeholder="请选择"
+            clearable filterable :disabled="item.type == '为空'">
+            <el-option v-for="item in options" :key="item.contactPersonPhone" :value="item.contactPersonPhone"
+              :label="item.contactPerson"></el-option>
           </el-select>
           <el-date-picker style="width: 350px" v-model="datesearch" v-if="item.name == 'signDate'"
             :type="item.type == '大于等于' || item.type == '小于等于' ? 'date' : 'daterange'" placeholder="请选择"
@@ -160,7 +161,7 @@
       </el-form-item>
       <el-form-item prop="actualReceivedAmount" label="实收金额">
         <el-input-number v-model="countForm.actualReceivedAmount" style="width: 100%;" :min="0" :precision="4"
-          controls-position="right"  @change="handleChange" />
+          controls-position="right" @change="handleChange" />
       </el-form-item>
       <el-form-item prop="paymentDifference" label="回款金额">
         <el-input v-model="countForm.paymentDifference" disabled></el-input>
@@ -212,7 +213,7 @@ let router = useRouter()
 const CountFormRef = ref<FormInstance>()
 
 const selectedList = ref([])//选中的应收单据
-const companyList = ref()//保险公司
+const options = ref()//保险公司
 const insurerContract = ref()//保险公司协议
 const multipleSearch = ref('')
 const orderTypesearch = ref('')
@@ -239,7 +240,7 @@ let imageUrl = ref([])
 
 //获取保险公司协议
 const getByCompanyId = () => {
-  api.dispatchApi.getByCompanyIdt(route.query.id).then((res: any) => {
+  api.dispatchApi.getByCompanyIdt(route.query.contactPersonPhone).then((res: any) => {
     if (res.code == 200) {
       insurerContract.value = res.data
     }
@@ -250,7 +251,7 @@ const getByCompanyId = () => {
 let logicJudge = ref('and')
 let searchList = ref([
   {
-    name: 'companyId',
+    name: 'contactPersonPhone',
     type: '等于',
     search: ''
   }, {
@@ -271,15 +272,28 @@ let searchList = ref([
     search: ''
   }
 ])
+
+// 保险公司
+const initCompany = () => {
+  api.financeApi.queryReceivableContact({
+    incomeIds: selectedList.value.map((item: any) => item.id)
+  }).then((res: any) => {
+    if (res.code == 200) {
+      options.value = res.data
+    }
+  })
+}
+
 const showTicket = ref(false)
-const companyId = ref('')
-if (route.query?.companyId) {
+const contactPersonPhone = ref('')
+if (route.query?.contactPersonPhone) {
   console.log(route.query)
   showTicket.value = true
   selectedList.value = JSON.parse(route.query.selectedList || '[]')
-  searchList.value[0].search = route.query.companyId || ''
-  companyId.value = route.query.companyId || ''
+  searchList.value[0].search = route.query.contactPersonPhone || ''
+  contactPersonPhone.value = route.query.contactPersonPhone || ''
   getByCompanyId()
+  initCompany()
 } else {
   showTicket.value = false
 }
@@ -294,7 +308,7 @@ const handleSearch = () => {
   console.log(searchList.value)
   // router
   api.financeApi.getSelectedReceivableList({
-    companyId: route.query.id,
+    contactPersonPhone: route.query.contactPersonPhone,
     orderNos: selectedList.value.map(item => item.orderNo),
     searchList: searchList.value,
     logicJudge: logicJudge.value,
@@ -421,12 +435,14 @@ const handelComfirm = (formEl: FormInstance | undefined) => {
   formEl.validate((valid) => {
     console.log(countForm.value)
     if (valid) {
+      const contactPersonObj = options.value.find(v => v.contactPersonPhone === contactPersonPhone.value)
       api.financeApi.platformSettlement({
         settlementVo: countForm.value,
         invoicingVo: {
           incomeIds: selectedList.value.map(item => item.id),
           orderNos: selectedList.value.map(item => item.orderNo),
-          companyId: companyId.value,
+          contactPersonPhone: contactPersonPhone.value,
+          contactPerson: contactPersonObj.contactPerson,
           receivablePremium: receivablePremium.value,
           invoiceType: "5"
         }
@@ -457,20 +473,13 @@ const uploadImage = async (file, fileList) => {
 }
 const initData = () => {
   // router
-  api.financeApi.getSelectedReceivableList({ orderNos: selectedList.value.map(v => v.orderNo), companyId: route.query.id }).then((res: any) => {
+  api.financeApi.getSelectedReceivableList({ orderNos: selectedList.value.map(v => v.orderNo), contactPersonPhone: route.query.contactPersonPhone }).then((res: any) => {
     if (res.code == 200) {
       tableData.value = res.data
     }
   })
 }
-// 保险公司
-const initCompany = () => {
-  api.insuranceApi.leftList('').then((res: any) => {
-    if (res.code == 200) {
-      companyList.value = res.data
-    }
-  })
-}
+
 
 const handleChange = async () => {
   const num = await calSub(receivablePremium.value, countForm.value.actualReceivedAmount)
@@ -483,15 +492,16 @@ const handleChange = async () => {
  * @param subtrahend 减数
  * @returns 差值,若接口无数据则返回 0
  */
-const calSub = async (minuend:number, subtrahend:number) => {
+const calSub = async (minuend: number, subtrahend: number) => {
   const res = await api.financeApi.calSub({ minuend, subtrahend })
   return res.data || 0
 }
 
-const openSettlement = (list,id) => {
-  companyId.value = id
+const openSettlement = (list, id) => {
+  contactPersonPhone.value = id
   selectedList.value = list
   handleSettlement()
+  initCompany()
 }
 
 defineExpose({
@@ -500,7 +510,6 @@ defineExpose({
 
 onMounted(() => {
   initData()
-  initCompany()
 })
 
 </script>

+ 1 - 1
src/views/receivable/handingFee/index.vue

@@ -602,7 +602,7 @@ const selectAll = (type: boolean) => {
       if (selectType.value == 'cur') {
         selectedList.value = receiveData.value
       } else {
-        selectedList.value = []
+        selectedList.value = allData.value
       }
     }
   } else {