소스 검색

修改 出入金申请列表

huangbin 4 년 전
부모
커밋
3e9f1b6587

+ 87 - 0
src/common/constants/enumsName.ts

@@ -1381,4 +1381,91 @@ export function getSignStatus(signstatus: number) {
             break
     }
     return result
+}
+
+/**
+ * 出入金申请状态
+ * @param applystatus
+ * @returns
+ */
+export function getAccountInOutApplyStatus(applystatus: number) {
+    let result = '--'
+    switch (applystatus) {
+        case 1:
+            result = '待审核'
+            break
+        case 2:
+            result = '待复审 '
+            break
+        case 3:
+            result = '签约中'
+            break
+        case 4:
+            result = '已签约'
+            break
+        case 5:
+            result = '交易解冻中'
+            break
+        case 6:
+            result = '交易解冻扣款中'
+            break
+        case 7:
+            result = '交易入金中'
+            break
+        case 8:
+            result = '交易冻结/解冻/扣款中'
+            break
+        case 9:
+            result = '银行出金中 '
+            break
+        case 10:
+            result = '银行入金中'
+            break
+        case 11:
+            result = '成功'
+            break
+        case 12:
+            result = '失败'
+            break
+        case 13:
+            result = '银行审核中'
+            break
+        case 14:
+            result = '账户服务入金失败'
+            break
+        case 15:
+            result = '账户服务解冻失败'
+            break
+        case 16:
+            result = '账户服务解冻扣款失败'
+            break
+        case 17:
+            result = '账户服务出金失败 '
+            break
+        case 18:
+            result = '复审通过 '
+            break
+        case 19:
+            result = '复审拒绝 '
+            break
+        case 20:
+            result = '提交审核,账户冻结中 '
+            break
+        case 21:
+            result = '审核拒绝,账户解冻中 '
+            break
+        case 22:
+            result = '待审核,账户服务解冻回滚中 '
+            break
+        case 23:
+            result = '待复审,账户服务解冻回滚中 '
+            break
+        case 24:
+            result = '审核通过,账户冻结金额检查中'
+            break
+        case 25:
+            result = '复审通过,账户冻结金额检查中'
+            break
+    }
+    return result
 }

+ 1 - 0
src/common/setup/upload/index.ts

@@ -119,6 +119,7 @@ export function handlePreviewImg() {
     * 预览图片
     */
     async function previewImg(file: FileItem | string) {
+        debugger
         if (typeof file === 'string') {
             if (file && file !== '--') {
                 // 处理服务的脏数据,时而反而JSON格式,时而返回string格式,

+ 9 - 3
src/views/account-manager/account-manager-agency/account-manager-agency-sub/add.vue

@@ -154,9 +154,15 @@ export default defineComponent({
                     OpenBankAccId: selectdBank.bankid, // 银行卡行号
                 };
                 const msg: [string, string] = ['新增成功', '新增失败:'];
-                requestResultLoadingAndInfo(requestBankSign, param, loading, msg).then(() => {
-                    cancel(true);
-                });
+                requestResultLoadingAndInfo(requestBankSign, param, loading, msg)
+                    .then(() => {
+                        cancel(true);
+                    })
+                    .catch((err) => {
+                        if (err === '您的申请已提交,请稍后查询结果!') {
+                            cancel(true);
+                        }
+                    });
             });
         }
         return {

+ 56 - 24
src/views/account-manager/account-manager-agency/account-manager-agency-sub/index.vue

@@ -45,10 +45,16 @@
                class="topTable"
                :pagination="false"
                rowKey="key"
-               :data-source="[]"
+               :data-source="detailList"
                :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
-        <template #stepvalue="{ text }">
-          <span>{{ text ? (text * 100).toFixed(0) : text }}</span>
+        <template #updatetime="{ text }">
+          <span>{{ formatTime(text) }}</span>
+        </template>
+        <template #certificatephotourl="{ text }">
+          <a @click="previewImg(text)">{{text ? text === '--' ? text : '查看附件' : '--'}}</a>
+        </template>
+        <template #applystatus="{ text }">
+          <span>{{ getAccountInOutApplyStatus(text) }}</span>
         </template>
       </a-table>
     </Description>
@@ -56,30 +62,34 @@
                v-if="componentId"
                :selectedRow="selectedRow"
                @cancel="closeComponent"></component>
+    <a-modal :visible="previewVisible"
+             :footer="null"
+             @cancel="cancelImg">
+      <img alt="预览附件"
+           style="width: 100%"
+           :src="previewImage" />
+    </a-modal>
   </section>
 </template>
 
 <script lang="ts">
-import { queryTableList, defineComponent, BtnList, defineAsyncComponent } from '@/common/export/commonTable';
-import { queryQueryPermancePlanTmp } from '@/services/go/wrtrade';
-import { QueryPermancePlanTmpReq, QueryPermancePlanTmpRsp } from '@/services/go/wrtrade/interface';
-import { handleComposeTable_detail } from '@/common/setup/table/compose';
-import { ComposeTableDetailParam } from '@/common/setup/table/interface';
-import { formatTime } from '@/common/methods';
-import { expandIcon } from '@/common/setup/table/clolumn';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { getColumns } from './setup';
-import { getUsrId } from '@/services/bus/user';
-import { getButtonList, getOrderBtnList } from '@/common/setup/table/button';
-import { handleModalComponent } from '@/common/setup/asyncComponent';
 import Description from '@/common/components/description/index.vue';
-import { ref, Ref } from 'vue';
-import { queryBankCustomerSign, queryCusBankInfo } from '@/services/socket/bank';
-import { CusBankInfoRsp } from '@/services/socket/bank/interface';
-import { getSignStatus } from '@/common/constants/enumsName';
 import { TabList } from '@/common/components/description/interface';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { getAccountInOutApplyStatus, getSignStatus } from '@/common/constants/enumsName';
+import { BtnList, defineAsyncComponent, defineComponent, queryTableList } from '@/common/export/commonTable';
+import { formatTime } from '@/common/methods';
+import { handleModalComponent } from '@/common/setup/asyncComponent';
+import { getButtonList } from '@/common/setup/table/button';
+import { expandIcon } from '@/common/setup/table/clolumn';
+import { handleComposeTable_detail } from '@/common/setup/table/compose';
+import { ComposeTableDetailParam } from '@/common/setup/table/interface';
+import { handlePreviewImg } from '@/common/setup/upload';
 import { QueryAccountInOutApply, queryBankAccountSign } from '@/services/go/ermcp/qhj';
-import { QueryAccountInOutApplyRsq, QueryBankAccountSignQsp } from '@/services/go/ermcp/qhj/interface';
+import { QueryAccountInOutApplyRsp, QueryAccountInOutApplyRsq, QueryBankAccountSignQsp } from '@/services/go/ermcp/qhj/interface';
+import { QueryPermancePlanTmpRsp } from '@/services/go/wrtrade/interface';
+import { ref, watch } from 'vue';
+import { getColumns } from './setup';
 
 const addCode = 'account-manager-agency-sub-add';
 const updateCode = 'account-manager-agency-sub-modiy';
@@ -105,34 +115,46 @@ export default defineComponent({
     setup() {
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<QueryBankAccountSignQsp>();
+        const flag = ref(false);
         const loadData = () => {
             queryTable(queryBankAccountSign).then((res) => {
+                flag.value = true;
                 const set = new Set([2, 3, 4]);
                 tableList.value = res.filter((e) => set.has(e.signstatus));
             });
         };
-
+        // 预览附件
+        const { previewVisible, previewImage, cancelImg, previewImg } = handlePreviewImg();
         // 表头
         const { columns, applyInColumns, applyOutCloums } = getColumns();
         const detailList = ref<QueryAccountInOutApplyRsq[]>([]);
+        const allDetailList = ref<QueryAccountInOutApplyRsp[]>([]);
+        const fn = (type: 1 | 2) => allDetailList.value.filter((e) => e.executetype === type);
+        // 出入金申请列表
         function queryDetail() {
-            QueryAccountInOutApply({}).then((res) => {
-                console.log('jjjjjjjjjjjjj', res);
+            const { queryTable } = queryTableList<QueryAccountInOutApplyRsp>();
+            queryTable(QueryAccountInOutApply, {}).then((res) => {
+                allDetailList.value = res;
+                changeTab(0, tabList.value[0]);
             });
         }
-        queryDetail();
+
         // 明细表头
         const detailColumns = ref(applyInColumns);
         // 切换明细
         function changeTab(index: number, current: TabList) {
             const { code, lable } = current;
+            // executetype: number;//申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金
             if (code === 'account-manager-agency-sub-apply-in') {
                 // 充值申请
                 detailColumns.value = applyInColumns;
+                detailList.value = fn(1);
             } else if (code === 'account-manager-agency-sub-apply-out') {
                 // 提现申请
                 detailColumns.value = applyOutCloums;
+                detailList.value = fn(2);
             } else {
+                detailList.value = [];
                 console.error(`${lable}没有配置对应的code: ${code},`);
                 return;
             }
@@ -151,6 +173,10 @@ export default defineComponent({
             Rowclick, // 表格事件
             tabList,
         } = handleComposeTable_detail<QueryPermancePlanTmpRsp>(param);
+        watch(flag, () => {
+            visible.value = true;
+            queryDetail();
+        });
 
         return {
             loading,
@@ -171,6 +197,12 @@ export default defineComponent({
             getSignStatus,
             changeTab,
             addCode,
+            detailList,
+            getAccountInOutApplyStatus,
+            previewVisible,
+            previewImage,
+            cancelImg,
+            previewImg,
         };
     },
 });

+ 7 - 7
src/views/account-manager/account-manager-agency/account-manager-agency-sub/setup.ts

@@ -12,16 +12,16 @@ export function getColumns() {
     ]
     // 充值申请 表头
     const applyInColumns = [
-        { title: '充值金额', key: 'bankname', dataIndex: 'bankname', align: 'center', width: 200 },
-        { title: '凭证', key: 'bankaccountno', dataIndex: 'bankaccountno', align: 'center', width: 200, slots: { customRender: 'bankaccountno' } },
-        { title: '申请时间', key: 'bankaccountno', dataIndex: 'bankaccountno', align: 'center', width: 200, slots: { customRender: 'bankaccountno' } },
-        { title: '状态', key: 'bankaccountno', dataIndex: 'bankaccountno', align: 'center', width: 200, slots: { customRender: 'bankaccountno' } },
+        { title: '充值金额', key: 'amount', dataIndex: 'amount', align: 'center', width: 200 },
+        { title: '凭证', key: 'certificatephotourl', dataIndex: 'certificatephotourl', align: 'center', width: 200, slots: { customRender: 'certificatephotourl' } },
+        { title: '申请时间', key: 'updatetime', dataIndex: 'updatetime', align: 'center', width: 200, slots: { customRender: 'bankaccountno' } },
+        { title: '状态', key: 'applystatus', dataIndex: 'applystatus', align: 'center', width: 200, slots: { customRender: 'applystatus' } },
     ]
     // 提现申请 表头
     const applyOutCloums = [
-        { title: '提现金额', key: 'bankname', dataIndex: 'bankname', align: 'center', width: 200 },
-        { title: '申请时间', key: 'bankaccountno', dataIndex: 'bankaccountno', align: 'center', width: 200, slots: { customRender: 'bankaccountno' } },
-        { title: '状态', key: 'bankaccountno', dataIndex: 'bankaccountno', align: 'center', width: 200, slots: { customRender: 'bankaccountno' } },
+        { title: '提现金额', key: 'amount', dataIndex: 'amount', align: 'center', width: 200 },
+        { title: '申请时间', key: 'updatetime', dataIndex: 'updatetime', align: 'center', width: 200, slots: { customRender: 'updatetime' } },
+        { title: '状态', key: 'applystatus', dataIndex: 'applystatus', align: 'center', width: 200, slots: { customRender: 'applystatus' } },
     ]
     return { columns, applyInColumns, applyOutCloums }
 }