Просмотр исходного кода

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

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

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

@@ -93,7 +93,8 @@ const financeApi = (axiosInstance: ApiInstance) => ({
     // 应付账款-概览
     getPayableStatistics: (data: any) => axiosInstance.post('userAccount/getPayableStatistics', data), // 总数
     userAccountList: (data: any) => axiosInstance.post('/userAccount/accountList', data), // 列表
-
+  // 应付概览-数据导出
+    exportPayableStatisticsExcel: (data: any) => axiosInstance.post('/amountAuditing/exportYwyIORecs', data),
     // 基础管理-账户管理
     cardList: (data: any) => axiosInstance.post('/accountCard/cardList', data), // 账户列表
     cardGet: (data: string) => axiosInstance.get(`/accountCard/cardGet?id=${data}`), // 账户详情

+ 1 - 0
src/layouts/components/DrivingType/index.vue

@@ -18,6 +18,7 @@
             <span>{{ item.productName }}</span>
           </div>-->
           <el-tree
+            style="height: 300px; overflow: auto;flex: 0 0  auto;"
             ref="treeRef"
             :data="JYXList"
             :props="defaultProps"

+ 55 - 4
src/views/payCredit/generanView.vue

@@ -23,8 +23,8 @@
         </el-col>
         <el-col :span="8">
           <el-form-item label="统计日期">
-            <el-date-picker v-model="form.createTime" clearable type="daterange" range-separator="至" start-placeholder="开始时间"
-              end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
+            <el-date-picker v-model="form.createTime" clearable type="daterange" range-separator="至"
+              start-placeholder="开始时间" end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
           </el-form-item>
         </el-col>
         <el-col :span="8"></el-col>
@@ -70,6 +70,13 @@
       <el-table-column prop="sumAmount" label="应付总计"></el-table-column>
       <el-table-column prop="sumAmountPaid" label="已付金额"></el-table-column>
       <el-table-column prop="sumAmountUnpaid" label="未付金额"></el-table-column>
+      <el-table-column label="操作" width="150" fixed="right">
+        <template #default="scope">
+          <div class="flex a-c ">
+            <el-button type="primary" link @click="handleExport(scope.row)">导出收支明细</el-button>
+          </div>
+        </template>
+      </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]"
@@ -77,11 +84,29 @@
         @current-change="handleCurrentChange"></el-pagination>
     </div>
   </PageMain>
+  <el-dialog v-model="exportDialogVisible" title="导出收支明细" width="500">
+    <el-form  label-width="100">
+      <el-form-item label="导出日期">
+        <el-date-picker v-model="exportTime" clearable type="daterange" range-separator="至"
+          start-placeholder="开始时间" end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button @click="exportDialogVisible = false">取消</el-button>
+        <el-button type="primary" @click="handleExportConfirm">
+          确认导出
+        </el-button>
+      </div>
+    </template>
+  </el-dialog>
 </template>
 
 <script setup lang="ts">
 import api from '@/api'
-
+import { ElMessage } from 'element-plus'
+let exportDialogVisible = ref(false)// 导出收支明细弹窗
+const  exportTime = ref([])
 let form = ref({
   salesman: '',
   attrType: '',
@@ -143,7 +168,33 @@ const initData = () => {
     }
   })
 }
-
+const userId = ref('')
+const handleExport = (row: any) => {
+  userId.value = row.userId
+  exportDialogVisible.value = true
+}
+const handleExportConfirm = () => {
+  if (exportTime.value.length == 0) {
+    ElMessage.warning('请选择导出日期')
+    return
+  }
+  api.financeApi.exportPayableStatisticsExcel({
+    ywyUserId: userId.value,
+    beginDate: exportTime.value?.[0],
+    endDate: exportTime.value?.[1]
+  }).then((res: any) => {
+    if (res.code == 200) {
+      ElMessage.success('导出成功')
+      exportDialogVisible.value = false
+      const link = document.createElement('a');
+      link.href = res.msg;
+      link.download = '';
+      // 触发下载
+      document.body.appendChild(link);
+      link.click();
+    }
+  })
+}
 onMounted(() => {
   initData();
 })

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

@@ -389,7 +389,7 @@ const handleAccountCancel = () => {
 const handleAccountSubmit = () => {
   payAccountShow.value = false
   drawForm.value.accountName = selectItem.value.bankCardNum
-  drawForm.value.accountId = selectItem.value.accountId
+  drawForm.value.accountId = selectItem.value.id
 }
 const handleCancelVerifyAmount = () => {
   drawForm.value = {
@@ -405,7 +405,7 @@ const handleVerifyAmount = () => {
     id: drawForm.value.id,
     voucherId: drawForm.value.voucherId,
     picId: drawForm.value.picId,
-    accountId: drawForm.value.accountId,
+    cardId: drawForm.value.accountId,
   }).then((res: any) => {
     if (res.code == 200) {
       ElMessage({

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

@@ -167,7 +167,7 @@
       </div>
 
       <!-- 驾意险选择弹窗 -->
-      <el-dialog :close-on-click-modal="false" v-model="drivingShow" title="选择驾意险" width="700">
+      <el-dialog :close-on-click-modal="false" v-model="drivingShow" title="选择驾意险" width="900">
         <driving ref="DrivingTypeRef" @close="handleDrivingClose"></driving>
       </el-dialog>