huangbin 4 yıl önce
ebeveyn
işleme
13d46bd05a

+ 16 - 4
src/views/platinum/platinum_recharge_withdrawal_review/list/recharge/index.vue

@@ -2,7 +2,7 @@
   <!-- 充值审核 -->
   <div class="platinum_recharge_review_tab">
     <Filter @search="search" />
-    <contextMenu :contextMenuList="firstBtn">
+    <contextMenu :contextMenuList="getBtnListAction()">
       <a-table :columns="columns"
                class="topTable hiddenFirstCol"
                :pagination="false"
@@ -12,7 +12,7 @@
                :data-source="tableList">
         <!-- 额外的展开行 -->
         <template #expandedRowRender="{ record }">
-          <BtnList :btnList="firstBtn"
+          <BtnList :btnList="getBtnListAction()"
                    @onClick="btnClick(record)" />
         </template>
         <!-- 账户类型 -->
@@ -32,10 +32,11 @@
 <script lang="ts">
 import { defineComponent, initData, getTableColumns, getTableEvent, contextMenu, BtnList, queryTableList, _getBtnList } from '@/common/export/table';
 import { queryAccountInOutApply } from '@/services/go/ermcp/qhj';
-import { QhjAccountOutInApply, QueryAccountInOutApplyReq } from '@/services/go/ermcp/qhj/interface';
+import { QhjAccountOutInApply } from '@/services/go/ermcp/qhj/interface';
 import Filter from '../../compoments/filter/index.vue';
 import ControlModal from './compoments/controlModal/index.vue';
-import { handleTableStatus } from '../../setup';
+import { handleTableStatus, inOrOutStatus } from '../../setup';
+import { BtnList as BtnListType } from '@/common/components/buttonList/interface';
 
 export default defineComponent({
     name: 'platinum_recharge_review_tab',
@@ -51,6 +52,16 @@ export default defineComponent({
         const { loading, tableList, queryTable } = queryTableList();
         // 状态
         const { tableStatus, getTableListStatus, search } = handleTableStatus(queryTable);
+        function getBtnListAction(): BtnListType[] {
+            const arr: string[] = ['详情'];
+            switch (tableStatus.value) {
+                case inOrOutStatus.wait:
+                    arr.push('确认收款');
+                    arr.push('审核拒绝');
+                    break;
+            }
+            return firstBtn.filter((e: BtnListType) => arr.includes(e.lable));
+        }
         function getTableList() {
             queryTable(queryAccountInOutApply, { querytype: 2, applystatus: tableStatus.value });
         }
@@ -63,6 +74,7 @@ export default defineComponent({
 
         return {
             getTableList,
+            getBtnListAction,
             getTableListStatus,
             columns,
             search,

+ 20 - 7
src/views/platinum/platinum_recharge_withdrawal_review/list/withdrawal/index.vue

@@ -2,7 +2,7 @@
   <!-- 提现审核 -->
   <div class="platinum_withdrawal_review_tab">
     <Filter @search="search" />
-    <contextMenu :contextMenuList="firstBtn">
+    <contextMenu :contextMenuList="getBtnListAction()">
       <a-table :columns="columns"
                class="topTable hiddenFirstCol"
                :pagination="false"
@@ -12,7 +12,7 @@
                :data-source="tableList">
         <!-- 额外的展开行 -->
         <template #expandedRowRender="{ record }">
-          <BtnList :btnList="firstBtn"
+          <BtnList :btnList="getBtnListAction()"
                    @onClick="btnClick(record)" />
         </template>
         <!-- 账户类型 -->
@@ -32,10 +32,11 @@
 <script lang="ts">
 import { defineComponent, initData, getTableColumns, getTableEvent, contextMenu, BtnList, queryTableList, _getBtnList } from '@/common/export/table';
 import { queryAccountInOutApply } from '@/services/go/ermcp/qhj';
-import { QhjAccountOutInApply, QueryAccountInOutApplyReq } from '@/services/go/ermcp/qhj/interface';
+import { QhjAccountOutInApply } from '@/services/go/ermcp/qhj/interface';
 import Filter from '../../compoments/filter/index.vue';
 import ControlModal from './compoments/controlModal/index.vue';
-import { handleTableStatus } from '../../setup';
+import { handleTableStatus, inOrOutStatus } from '../../setup';
+import { BtnList as BtnListType } from '@/common/components/buttonList/interface';
 
 export default defineComponent({
     name: 'platinum_withdrawal_review_tab',
@@ -43,14 +44,26 @@ export default defineComponent({
     setup() {
         // 表头数据
         const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<QhjAccountOutInApply>({});
+
         // 表格操作按钮列表
         const [firstBtn] = _getBtnList('platinum_withdrawal_review_tab', true).value;
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<QhjAccountOutInApply>({});
         // 状态
         const { tableStatus, getTableListStatus, search } = handleTableStatus(queryTable);
+        function getBtnListAction(): BtnListType[] {
+            const arr: string[] = ['详情'];
+            switch (tableStatus.value) {
+                case inOrOutStatus.wait:
+                    arr.push('确认提现');
+                    arr.push('审核拒绝');
+                    break;
+            }
+            return firstBtn.filter((e: BtnListType) => arr.includes(e.lable));
+        }
+
         function getTableList() {
             queryTable(queryAccountInOutApply, { querytype: 1, applystatus: tableStatus.value });
         }
@@ -63,6 +76,7 @@ export default defineComponent({
 
         return {
             getTableListStatus,
+            getBtnListAction,
             getTableList,
             search,
             columns,
@@ -70,7 +84,6 @@ export default defineComponent({
             expandedRowKeys,
             selectedRow,
             Rowclick,
-            firstBtn,
             loading,
             tableList,
             queryTable,

+ 2 - 5
src/views/platinum/platinum_recharge_withdrawal_review/setup.ts

@@ -1,5 +1,5 @@
-import { queryAccountInOutApply } from "@/services/go/ermcp/qhj"
-import { ref } from "vue"
+import { queryAccountInOutApply } from "@/services/go/ermcp/qhj";
+import { ref } from "vue";
 
 // 铂金宝 充值和提现审核状态
 export enum inOrOutStatus {
@@ -37,8 +37,6 @@ export function handleTableStatus(queryTable: Function) {
         return getApplyStatus(tableStatus.value)
     }
     function search(value: any) {
-        console.log(value);
-
         const { accountcode, applystatus, reqtime } = value;
         // 申请起始日期
         const begindate = reqtime.length > 1 ? reqtime[0] : '';
@@ -56,4 +54,3 @@ export function handleTableStatus(queryTable: Function) {
     return { tableStatus, getApplyStatus, getTableListStatus, search }
 }
 
-