Przeglądaj źródła

订单审核、应收付款数据导出

@dongkboy 3 miesięcy temu
rodzic
commit
5382b18ca7

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

@@ -82,6 +82,12 @@ const financeApi = (axiosInstance: ApiInstance) => ({
     accountEdit: (data: any) => axiosInstance.post('/account/accountEdit', data), // 编辑
     accountEdit: (data: any) => axiosInstance.post('/account/accountEdit', data), // 编辑
     accountGet: (data: string) => axiosInstance.get(`/account/accountGet?id=${data}`), // 详情
     accountGet: (data: string) => axiosInstance.get(`/account/accountGet?id=${data}`), // 详情
     accountDelete: (data: string) => axiosInstance.delete(`/account/accountDelete?id=${data}`), // 删除
     accountDelete: (data: string) => axiosInstance.delete(`/account/accountDelete?id=${data}`), // 删除
+
+    // 应付账款-数据导出
+    exportPayableExcel: (data: any) => axiosInstance.post('/amountAuditing/exportAuditList', data),
+    //订单审核-数据导出
+    exportOrderExcel: (data: any) => axiosInstance.post('/feeAudit/exportAuditList', data),
+
 })
 })
 
 
 export default financeApi
 export default financeApi

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

@@ -70,6 +70,7 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
+              <el-button plain @click="handleExport('0')">数据导出</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <span class="icon_s">
               <span class="icon_s">
@@ -89,14 +90,14 @@
           <el-table-column prop="orderType" label="订单类型" width="120">
           <el-table-column prop="orderType" label="订单类型" width="120">
             <template #default="scope">
             <template #default="scope">
               {{ scope.row.orderType == '1' ? '车险录入' : scope.row.orderType == '2' ? '代客录单' : scope.row.orderType ==
               {{ scope.row.orderType == '1' ? '车险录入' : scope.row.orderType == '2' ? '代客录单' : scope.row.orderType ==
-                '3' ?'外部订单':'--' }}
+                '3' ? '外部订单' : '--' }}
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="name" label="业务员信息" width="120"></el-table-column>
           <el-table-column prop="name" label="业务员信息" width="120"></el-table-column>
           <el-table-column prop="attrType" label="业务员类型" width="120">
           <el-table-column prop="attrType" label="业务员类型" width="120">
             <template #default="scope">
             <template #default="scope">
               {{ scope.row.attrType == '5' ? '团队' : scope.row.attrType == '6' ? '个代' : scope.row.attrType ==
               {{ scope.row.attrType == '5' ? '团队' : scope.row.attrType == '6' ? '个代' : scope.row.attrType ==
-                '7' ? '渠道' : scope.row.attrType == '8' ?'电销组':'--' }}
+                '7' ? '渠道' : scope.row.attrType == '8' ? '电销组' : '--' }}
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="signingTime" label="签单时间" width="120"></el-table-column>
           <el-table-column prop="signingTime" label="签单时间" width="120"></el-table-column>
@@ -194,6 +195,7 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
+              <el-button plain @click="handleExport('1')">数据导出</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <span class="icon_s">
               <span class="icon_s">
@@ -213,14 +215,14 @@
           <el-table-column prop="orderType" label="订单类型" width="120">
           <el-table-column prop="orderType" label="订单类型" width="120">
             <template #default="scope">
             <template #default="scope">
               {{ scope.row.orderType == '1' ? '车险录入' : scope.row.orderType == '2' ? '代客录单' : scope.row.orderType ==
               {{ scope.row.orderType == '1' ? '车险录入' : scope.row.orderType == '2' ? '代客录单' : scope.row.orderType ==
-                '3' ?'外部订单':'--' }}
+                '3' ? '外部订单' : '--' }}
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="name" label="业务员信息" width="120"></el-table-column>
           <el-table-column prop="name" label="业务员信息" width="120"></el-table-column>
           <el-table-column prop="attrType" label="业务员类型" width="120">
           <el-table-column prop="attrType" label="业务员类型" width="120">
             <template #default="scope">
             <template #default="scope">
               {{ scope.row.attrType == '5' ? '团队' : scope.row.attrType == '6' ? '个代' : scope.row.attrType ==
               {{ scope.row.attrType == '5' ? '团队' : scope.row.attrType == '6' ? '个代' : scope.row.attrType ==
-                '7' ? '渠道' : scope.row.attrType == '8' ?'电销组':'--' }}
+                '7' ? '渠道' : scope.row.attrType == '8' ? '电销组' : '--' }}
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="signingTime" label="签单时间" width="120"></el-table-column>
           <el-table-column prop="signingTime" label="签单时间" width="120"></el-table-column>
@@ -319,6 +321,7 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
+              <el-button plain @click="handleExport('2')">数据导出</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <span class="icon_s">
               <span class="icon_s">
@@ -338,14 +341,14 @@
           <el-table-column prop="orderType" label="订单类型" width="120">
           <el-table-column prop="orderType" label="订单类型" width="120">
             <template #default="scope">
             <template #default="scope">
               {{ scope.row.orderType == '1' ? '车险录入' : scope.row.orderType == '2' ? '代客录单' : scope.row.orderType ==
               {{ scope.row.orderType == '1' ? '车险录入' : scope.row.orderType == '2' ? '代客录单' : scope.row.orderType ==
-                '3' ?'外部订单':'--' }}
+                '3' ? '外部订单' : '--' }}
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="name" label="业务员信息" width="120"></el-table-column>
           <el-table-column prop="name" label="业务员信息" width="120"></el-table-column>
           <el-table-column prop="attrType" label="业务员类型" width="120">
           <el-table-column prop="attrType" label="业务员类型" width="120">
             <template #default="scope">
             <template #default="scope">
               {{ scope.row.attrType == '5' ? '团队' : scope.row.attrType == '6' ? '个代' : scope.row.attrType ==
               {{ scope.row.attrType == '5' ? '团队' : scope.row.attrType == '6' ? '个代' : scope.row.attrType ==
-                '7' ? '渠道' : scope.row.attrType == '8' ?'电销组':'--' }}
+                '7' ? '渠道' : scope.row.attrType == '8' ? '电销组' : '--' }}
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="signingTime" label="签单时间" width="120"></el-table-column>
           <el-table-column prop="signingTime" label="签单时间" width="120"></el-table-column>
@@ -448,6 +451,7 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
+              <el-button plain @click="handleExport('3')">数据导出</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <span class="icon_s">
               <span class="icon_s">
@@ -467,14 +471,14 @@
           <el-table-column prop="orderType" label="订单类型" width="120">
           <el-table-column prop="orderType" label="订单类型" width="120">
             <template #default="scope">
             <template #default="scope">
               {{ scope.row.orderType == '1' ? '车险录入' : scope.row.orderType == '2' ? '代客录单' : scope.row.orderType ==
               {{ scope.row.orderType == '1' ? '车险录入' : scope.row.orderType == '2' ? '代客录单' : scope.row.orderType ==
-                '3' ?'外部订单':'--' }}
+                '3' ? '外部订单' : '--' }}
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="name" label="业务员信息" width="120"></el-table-column>
           <el-table-column prop="name" label="业务员信息" width="120"></el-table-column>
           <el-table-column prop="attrType" label="业务员类型" width="120">
           <el-table-column prop="attrType" label="业务员类型" width="120">
             <template #default="scope">
             <template #default="scope">
               {{ scope.row.attrType == '5' ? '团队' : scope.row.attrType == '6' ? '个代' : scope.row.attrType ==
               {{ scope.row.attrType == '5' ? '团队' : scope.row.attrType == '6' ? '个代' : scope.row.attrType ==
-                '7' ? '渠道' : scope.row.attrType == '8' ?'电销组':'--' }}
+                '7' ? '渠道' : scope.row.attrType == '8' ? '电销组' : '--' }}
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="signingTime" label="签单时间" width="120"></el-table-column>
           <el-table-column prop="signingTime" label="签单时间" width="120"></el-table-column>
@@ -696,7 +700,41 @@ const handleUpdateToQuestionOrder = (scope) => {
     }
     }
   })
   })
 }
 }
-
+// 数据导出// 数据导出
+const handleExport = (type: any) => {
+  let obj = null;
+  obj = {
+    pages: pages.value,
+    size: size.value,
+    receiveUser: localStorage.getItem('userName'),
+    licenseNo: firstForm.value?.licenseNo,
+    attrType: firstForm.value?.attrType,
+    salesman: firstForm.value?.salesman,
+    orderType: firstForm.value?.orderType,
+    companyId: firstForm.value?.companyId,
+    deptId: firstForm.value?.deptId,
+    insurName: firstForm.value?.insurName,
+    quotationTimeStart: firstForm.value?.quotationTime?.[0],
+    quotationTimeEnd: firstForm.value?.quotationTime?.[1],
+    signingTimeStart: firstForm.value?.signingTime?.[0],
+    signingTimeEnd: firstForm.value?.insurName?.[1],
+    isProblem: type == '3' ? 1 : 0
+  }
+  if (type !== '3') {
+    obj.auditStatus = type
+  }
+  api.financeApi.exportOrderExcel(obj).then((res: any) => {
+    if (res.code == 200) {
+      const link = document.createElement('a');
+      link.href = res.msg;
+      link.download = '';
+      // 触发下载
+      document.body.appendChild(link);
+      link.click();
+      document.body.removeChild(link);
+    }
+  })
+}
 onMounted(() => {
 onMounted(() => {
   initList('0');
   initList('0');
   initList('1');
   initList('1');

+ 18 - 1
src/views/finance/autoAudit.vue

@@ -1,5 +1,6 @@
 <template>
 <template>
   <PageMain class="vh100">
   <PageMain class="vh100">
+    <el-button plain @click="handleExport">数据导出</el-button>
     <el-table :data="firstData" style="width: 100%; margin-top: 20px;">
     <el-table :data="firstData" style="width: 100%; margin-top: 20px;">
       <el-table-column prop="orderNo" label="订单号" width="120"></el-table-column>
       <el-table-column prop="orderNo" label="订单号" width="120"></el-table-column>
       <el-table-column prop="companyName" label="保险公司" width="120"></el-table-column>
       <el-table-column prop="companyName" label="保险公司" width="120"></el-table-column>
@@ -56,7 +57,23 @@ const initData = () => {
     }
     }
   })
   })
 }
 }
-
+// 数据导出// 数据导出
+const handleExport = () => {
+  api.financeApi.exportOrderExcel({
+    auditType: 2,
+    auditStatus: 1
+  }).then((res: any) => {
+    if (res.code == 200) {
+      const link = document.createElement('a');
+      link.href = res.msg;
+      link.download = '';
+      // 触发下载
+      document.body.appendChild(link);
+      link.click();
+      document.body.removeChild(link);
+    }
+  })
+}
 const handleToDetail = (scope) => {
 const handleToDetail = (scope) => {
   myRouter.push({
   myRouter.push({
     path: '/finance/auditOrderDetail',
     path: '/finance/auditOrderDetail',

+ 26 - 3
src/views/finance/index.vue

@@ -70,6 +70,7 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
+              <el-button plain @click="handleExport('0')">数据导出</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <span class="icon_s">
               <span class="icon_s">
@@ -81,7 +82,8 @@
             </el-col>
             </el-col>
           </el-row>
           </el-row>
         </el-form>
         </el-form>
-        <el-table :data="firstData" :height="isTrue?'calc(100% - 244px)':'calc(100% - 194px)'" style="width: 100%; margin-top: 20px;">
+        <el-table :data="firstData" :height="isTrue ? 'calc(100% - 244px)' : 'calc(100% - 194px)'"
+          style="width: 100%; margin-top: 20px;">
           <el-table-column prop="orderNo" label="订单号" width="120"></el-table-column>
           <el-table-column prop="orderNo" label="订单号" width="120"></el-table-column>
           <el-table-column prop="companyName" label="保险公司" width="120"></el-table-column>
           <el-table-column prop="companyName" label="保险公司" width="120"></el-table-column>
           <el-table-column prop="licenseNo" label="车牌号" width="120"></el-table-column>
           <el-table-column prop="licenseNo" label="车牌号" width="120"></el-table-column>
@@ -186,6 +188,7 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
+              <el-button plain @click="handleExport('1')">数据导出</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <span class="icon_s">
               <span class="icon_s">
@@ -197,7 +200,8 @@
             </el-col>
             </el-col>
           </el-row>
           </el-row>
         </el-form>
         </el-form>
-        <el-table :data="secondData" :height="isTrue?'calc(100% - 246px)':'calc(100% - 196px)'" style="width: 100%; margin-top: 20px;">
+        <el-table :data="secondData" :height="isTrue ? 'calc(100% - 246px)' : 'calc(100% - 196px)'"
+          style="width: 100%; margin-top: 20px;">
           <el-table-column prop="orderNo" label="订单号" width="120"></el-table-column>
           <el-table-column prop="orderNo" label="订单号" width="120"></el-table-column>
           <el-table-column prop="companyName" label="保险公司" width="120"></el-table-column>
           <el-table-column prop="companyName" label="保险公司" width="120"></el-table-column>
           <el-table-column prop="licenseNo" label="车牌号" width="120"></el-table-column>
           <el-table-column prop="licenseNo" label="车牌号" width="120"></el-table-column>
@@ -303,6 +307,7 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
+              <el-button plain @click="handleExport('2')">数据导出</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <span class="icon_s">
               <span class="icon_s">
@@ -314,7 +319,8 @@
             </el-col>
             </el-col>
           </el-row>
           </el-row>
         </el-form>
         </el-form>
-        <el-table :data="thirdData" :height="isTrue?'calc(100% - 246px)':'calc(100% - 196px)'" style="width: 100%; margin-top: 20px;">
+        <el-table :data="thirdData" :height="isTrue ? 'calc(100% - 246px)' : 'calc(100% - 196px)'"
+          style="width: 100%; margin-top: 20px;">
           <el-table-column prop="orderNo" label="订单号" width="120"></el-table-column>
           <el-table-column prop="orderNo" label="订单号" width="120"></el-table-column>
           <el-table-column prop="companyName" label="保险公司" width="120"></el-table-column>
           <el-table-column prop="companyName" label="保险公司" width="120"></el-table-column>
           <el-table-column prop="licenseNo" label="车牌号" width="120"></el-table-column>
           <el-table-column prop="licenseNo" label="车牌号" width="120"></el-table-column>
@@ -575,6 +581,23 @@ const viewDetail = (row) => {
     }
     }
   })
   })
 }
 }
+// 数据导出// 数据导出
+const handleExport = (type: any) => {
+  api.financeApi.exportOrderExcel({
+    ...firstForm.value,
+    auditStatus: type,
+  }).then((res: any) => {
+    if (res.code == 200) {
+      const link = document.createElement('a');
+      link.href = res.msg;
+      link.download = '';
+      // 触发下载
+      document.body.appendChild(link);
+      link.click();
+      document.body.removeChild(link);
+    }
+  })
+}
 
 
 onMounted(() => {
 onMounted(() => {
   institutionList();
   institutionList();

+ 0 - 1
src/views/insurancePolicy/order.vue

@@ -494,7 +494,6 @@ const exportOrder = () => {
       isExportShow.value = false
       isExportShow.value = false
       const link = document.createElement('a');
       const link = document.createElement('a');
       link.href = res.msg;
       link.href = res.msg;
-      link.target = '_blank';
       link.download = '';
       link.download = '';
       // 触发下载
       // 触发下载
       document.body.appendChild(link);
       document.body.appendChild(link);

+ 31 - 1
src/views/payCredit/index.vue

@@ -51,6 +51,7 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
+              <el-button plain @click="handleExport">数据导出</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <el-button plain @click="handleReset">重置</el-button>
             </el-col>
             </el-col>
@@ -137,6 +138,7 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
+              <el-button plain @click="handleExport">数据导出</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <el-button plain @click="handleReset">重置</el-button>
             </el-col>
             </el-col>
@@ -232,6 +234,7 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
+              <el-button plain @click="handleExport">数据导出</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <el-button plain @click="handleReset">重置</el-button>
             </el-col>
             </el-col>
@@ -315,6 +318,7 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
             <el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
+              <el-button plain @click="handleExport">数据导出</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button type="primary" @click="handleSearch">搜索</el-button>
               <el-button plain @click="handleReset">重置</el-button>
               <el-button plain @click="handleReset">重置</el-button>
             </el-col>
             </el-col>
@@ -408,13 +412,15 @@ import { ElMessage } from "element-plus";
 
 
 let AccountRef = ref()
 let AccountRef = ref()
 let RefusePopover = ref()
 let RefusePopover = ref()
-
+const type = ref('3')
 let activeName = ref('3')
 let activeName = ref('3')
 const handleClick = (e) => {
 const handleClick = (e) => {
+  console.log(e.props.name)
   pages.value = 1
   pages.value = 1
   size.value = 10
   size.value = 10
   firstForm.value = {}
   firstForm.value = {}
   activeName.value = e.props.name
   activeName.value = e.props.name
+  type.value = e.props.name
   initData(activeName.value)
   initData(activeName.value)
 }
 }
 
 
@@ -666,6 +672,30 @@ const initAccount = () => {
     total.value = res.data.total
     total.value = res.data.total
   })
   })
 }
 }
+// 数据导出
+const handleExport=()=>{
+  api.financeApi.exportPayableExcel({
+    salesman: firstForm.value.salesman,
+    attrType: firstForm.value.attrType,
+    createTimeStart: firstForm.value.createTime?.[0],
+    createTimeEnd: firstForm.value.createTime?.[1],
+    auditingUser: firstForm.value.auditingUser,
+    auditTimeStart: firstForm.value.auditTime?.[0],
+    auditTimeEnd: firstForm.value.auditTime?.[0],
+    auditingStatus: type.value == '0' || type.value == '3' ? '0' : type.value,
+    receiveUser: type.value != '3' ? localStorage.getItem('userName') : '',
+  }).then((res: any) => {
+    if (res.code == 200) {
+      const link = document.createElement('a');
+      link.href = res.msg;
+      link.download = '';
+      // 触发下载
+      document.body.appendChild(link);
+      link.click();
+      document.body.removeChild(link);
+    }
+  })
+}
 
 
 onMounted(() => {
 onMounted(() => {
   initData('0')
   initData('0')