zh 2 роки тому
батько
коміт
fa10c5e0b3

+ 11 - 1
src/api/finance/receivable_list.js

@@ -1,11 +1,21 @@
 import request, { postBlob, handleImport, getBlob } from '@/utils/request'
 export function getFinanceOtherReceListV2(params) {
   return request({
-    url: `/finance/standing/book/list/v2?moduleId=${params.moduleId}`,
+    url: `/finance/other/rece/list/v2?moduleId=${params.moduleId}`,
     method: 'post',
     data: params
   })
 }
+
+//政策列表V2-导出
+export function exportFinanceOtherReceListV2(data, name) {
+  return postBlob({
+    url: '/finance/other/rece/listExport/v2',
+    method: 'post',
+    data,
+    name
+  })
+}
 // 其他应收单-新增
 export function getFinanceOtherReceAdd(data) {
   return request({

+ 1 - 2
src/views/finance/components/receivable_list-add.vue

@@ -496,8 +496,7 @@ export default {
         const res = await getFinanceOtherReceList({ pageSize: 1, pageNum: 1 })
         await getFinanceOtherReceApply({ id: res.data.records[0].id })
         this.$message.success('提审成功')
-        this.$emit('updateList')
-        this.$parent.showPage = 1
+        this.goBack()
         this.resetFn()
       }
     },

+ 36 - 47
src/views/finance/receivable_list.vue

@@ -6,6 +6,9 @@
     :operation="operation()"
     :optionsEvensGroup="optionsEvensGroup"
     :columnParsing="columnParsing"
+    :tableAttributes="tableAttributes"
+    :tableEvents="tableEvents"
+    :replaceOrNotMap="false"
   >
     <Popu v-if="showPage !== 1">
       <ReceivableListAdd v-if="showPage == 2" @close="handleClose" />
@@ -25,6 +28,7 @@ import { getCustomerList } from '@/api/finance/wallet'
 import {
   getFinanceOtherReceList,
   getFinanceOtherReceListV2,
+  exportFinanceOtherReceListV2,
   getFinanceOtherReceDelete,
   getFinanceOtherReceDetail,
   getFinanceOtherReceApply,
@@ -86,7 +90,7 @@ export default {
                   return
                 }
                 let ids = this.recordSelected.map(v => {
-                  return v.id
+                  return v.itemId
                 })
                 let params = { ids: ids.toString() }
                 await getFinanceOtherReceDelete(params)
@@ -141,7 +145,7 @@ export default {
       return getFinanceOtherReceListV2(...p)
     },
     // 列表导出函数
-    exportList: () => {},
+    exportList: exportFinanceOtherReceListV2,
     // 表格列解析渲染数据更改
     columnParsing(item, defaultData) {
       return defaultData
@@ -154,52 +158,37 @@ export default {
       return (h, { row, index, column }) => {
         return (
           <div class="operation-btns">
-            {this.$checkBtnRole('print', this.$route.meta.roles)?
-              <el-button
-                  type="text"
-                  class="textColor"
-                  onClick={()=>this.toPrint(row, 2)}
-                >打印
-                </el-button
-                >:null
+            {this.$checkBtnRole('print', this.$route.meta.roles) ? (
+              <el-button type="text" class="textColor" onClick={() => this.toPrint(row, 2)}>
+                打印
+              </el-button>
+            ) : null}
+            {row.examineStatus == 'WAIT' ||
+            (row.examineStatus == 'FAIL' && this.$checkBtnRole('examine', this.$route.meta.roles)) ? (
+              <el-button type="text" onClick={() => this.approvalFn(row.id)}>
+                审批
+              </el-button>
+            ) : null}
+            {row.examineStatus == 'SAVE' ? (
+              <el-button type="text" onClick={() => this.bringFn(row.id)}>
+                提审
+              </el-button>
+            ) : null}
+            {row.examineStatus == 'OK' || row.examineStatus == 'FAIL' ? (
+              <el-button type="text" onClick={() => this.unApprovalFn(row.id)}>
+                弃审
+              </el-button>
+            ) : null}
+            {row.examineStatus == 'SAVE' ? (
+              <el-button type="text" onClick={() => this.detailFn(row.id, 'edit')}>
+                编辑
+              </el-button>
+            ) : null}
+            {
+              <el-button type="text" onClick={() => this.detailFn(row.id, 'detail')}>
+                详情
+              </el-button>
             }
-              {
-               row.examineStatus == 'WAIT' || row.examineStatus == 'FAIL' &&
-                    this.$checkBtnRole('examine', this.$route.meta.roles)?
-                    <el-button
-                  type="text"
-                  onClick={()=>this.approvalFn(row.id)}
-                >审批
-                </el-button
-                >:null
-              }
-                {
-                 row.examineStatus == 'SAVE' ?
-                 <el-button type="text"  onClick={()=>this.bringFn(row.id)}
-                >提审
-                </el-button
-                >:null
-                }
-              {
-                row.examineStatus == 'OK' || row.examineStatus == 'FAIL'?
-                <el-button
-                  type="text"
-                  onClick={()=>this.unApprovalFn(row.id)}
-                >弃审
-                </el-button
-                >:null
-              }
-                {
-                  row.examineStatus == 'SAVE'?
-                  <el-button type="text" onClick={()=>this.detailFn(row.id, 'edit')}
-                >编辑
-                </el-button
-                >:null
-                }
-                {
-                  <el-button type="text" onClick={()=>this.detailFn(row.id, 'detail')}>详情</el-button>
-
-                }
           </div>
         )
       }