|
|
@@ -1,78 +1,50 @@
|
|
|
<template>
|
|
|
<!-- 签约账号管理 -->
|
|
|
- <section>
|
|
|
- <a-table :columns="columns"
|
|
|
- class="srcollYTable expandLeftTable"
|
|
|
- :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
|
|
|
- :pagination="false"
|
|
|
- :loading="loading"
|
|
|
- :expandedRowKeys="expandedRowKeys"
|
|
|
- :customRow="Rowclick"
|
|
|
- :expandIcon="expandIcon"
|
|
|
- :expandIconAsCell="false"
|
|
|
- rowKey="key"
|
|
|
- :data-source="tableList">
|
|
|
+ <mtp-table-scroll>
|
|
|
+ <template #default="{ scroll }">
|
|
|
+ <a-table :columns="columns" class="srcollYTable" :scroll="scroll" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" rowKey="key" :data-source="tableList">
|
|
|
|
|
|
- <template #handle="{ record }">
|
|
|
- <BtnList :btnList="tableBtns"
|
|
|
- v-if="record.signstatus === 4"
|
|
|
- :record="record"
|
|
|
- class="btn-list-sticky"
|
|
|
- @click="openComponent" />
|
|
|
- </template>
|
|
|
- <!-- 签约状态 -->
|
|
|
- <template #signstatus="{ text }">
|
|
|
-
|
|
|
- <span>{{ getSignStatus(text) }}</span>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
- <div v-if="tableList.length === 0">
|
|
|
- <span class="add-bank"
|
|
|
- @click="componentId = addCode">
|
|
|
- <svg class="icon svg-icon add-svg"
|
|
|
- aria-hidden="true">
|
|
|
- <use xlink:href="#icon-tianjiayinhangka"></use>
|
|
|
- </svg>
|
|
|
- 添加签约银行
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <!-- 明细 -->
|
|
|
- <Description v-if="visible"
|
|
|
- @changeTab="changeTab"
|
|
|
- @close="closeDrawer"
|
|
|
- :tabList="tabList">
|
|
|
- <a-table :columns="detailColumns"
|
|
|
- class="topTable"
|
|
|
- :pagination="false"
|
|
|
- rowKey="key"
|
|
|
- :data-source="detailList"
|
|
|
- :scroll="{ x: '100%', y: 'calc(100% - 36px)' }">
|
|
|
- <template #updatetime="{ text }">
|
|
|
- <span>{{ formatTime(text) }}</span>
|
|
|
- </template>
|
|
|
- <template #certificatephotourl="{ text, record }">
|
|
|
- <a @click="previewImg(text)">{{handleUrl(text, record)}}</a>
|
|
|
+ <template #handle="{ record }">
|
|
|
+ <BtnList :btnList="tableBtns" v-if="record.signstatus === 4" :record="record" class="btn-list-sticky" @click="openComponent" />
|
|
|
</template>
|
|
|
- <template #applystatus="{ text }">
|
|
|
- <span>{{ getAccountInOutApplyStatus(text) }}</span>
|
|
|
+ <!-- 签约状态 -->
|
|
|
+ <template #signstatus="{ text }">
|
|
|
+
|
|
|
+ <span>{{ getSignStatus(text) }}</span>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
- </Description>
|
|
|
- <component :is="componentId"
|
|
|
- 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>
|
|
|
+ <div v-if="tableList.length === 0">
|
|
|
+ <span class="add-bank" @click="componentId = addCode">
|
|
|
+ <svg class="icon svg-icon add-svg" aria-hidden="true">
|
|
|
+ <use xlink:href="#icon-tianjiayinhangka"></use>
|
|
|
+ </svg>
|
|
|
+ 添加签约银行
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </mtp-table-scroll>
|
|
|
+ <!-- 明细 -->
|
|
|
+ <Description v-if="visible" @changeTab="changeTab" @close="closeDrawer" :tabList="tabList">
|
|
|
+ <a-table :columns="detailColumns" class="topTable" :pagination="false" rowKey="key" :data-source="detailList" :scroll="{ x: '100%', y: 'calc(100% - 36px)' }">
|
|
|
+ <template #updatetime="{ text }">
|
|
|
+ <span>{{ formatTime(text) }}</span>
|
|
|
+ </template>
|
|
|
+ <template #certificatephotourl="{ text, record }">
|
|
|
+ <a @click="previewImg(text)">{{handleUrl(text, record)}}</a>
|
|
|
+ </template>
|
|
|
+ <template #applystatus="{ text }">
|
|
|
+ <span>{{ getAccountInOutApplyStatus(text) }}</span>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ </Description>
|
|
|
+ <component :is="componentId" 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>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
+import MtpTableScroll from '@/common/components/tableScroll/index.vue';
|
|
|
import Description from '@/common/components/description/index.vue';
|
|
|
import { TabList } from '@/common/components/description/interface';
|
|
|
import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
@@ -98,137 +70,138 @@ const updateCode = 'account_manager_agency_sub_modiy';
|
|
|
const deleteCode = 'account_manager_agency_sub_delete';
|
|
|
|
|
|
const useButton = () => {
|
|
|
- // 表格操作按钮列表
|
|
|
- const btnList = getButtonList(EnumRouterName.account_manager_agency_sub, false);
|
|
|
- // 过滤新增按钮
|
|
|
- const tableBtns = btnList.filter((e) => e.code !== addCode);
|
|
|
- return { tableBtns };
|
|
|
+ // 表格操作按钮列表
|
|
|
+ const btnList = getButtonList(EnumRouterName.account_manager_agency_sub, false);
|
|
|
+ // 过滤新增按钮
|
|
|
+ const tableBtns = btnList.filter((e) => e.code !== addCode);
|
|
|
+ return { tableBtns };
|
|
|
};
|
|
|
|
|
|
export default defineComponent({
|
|
|
- name: EnumRouterName.account_manager_agency_sub,
|
|
|
- components: {
|
|
|
- BtnList,
|
|
|
- Description,
|
|
|
- [addCode]: defineAsyncComponent(() => import('./add.vue')),
|
|
|
- [updateCode]: defineAsyncComponent(() => import('./modiy.vue')),
|
|
|
- [deleteCode]: defineAsyncComponent(() => import('./delete.vue')),
|
|
|
- },
|
|
|
- setup() {
|
|
|
- // 表格列表数据
|
|
|
- const { loading, tableList, queryTable } = queryTableList<QueryBankAccountSignQsp>();
|
|
|
- const flag = ref(false);
|
|
|
- const loadData = () => {
|
|
|
- queryTable(queryBankAccountSign).then((res) => {
|
|
|
- const set = new Set([2, 3, 4]);
|
|
|
- tableList.value = res.filter((e) => set.has(e.signstatus));
|
|
|
- if (tableList.value.length) {
|
|
|
- flag.value = true;
|
|
|
- }
|
|
|
- });
|
|
|
- };
|
|
|
- // 预览附件
|
|
|
- const { previewVisible, previewImage, cancelImg, previewImg } = handlePreviewImg();
|
|
|
- function handleUrl(value: string, record: QueryBankAccountSignQsp) {
|
|
|
- let result = '--';
|
|
|
- if (value && value !== '--') {
|
|
|
- result = '查看附件';
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
- // 表头
|
|
|
- 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);
|
|
|
- let cacheIndex = 0;
|
|
|
- // 出入金申请列表
|
|
|
- function queryDetail() {
|
|
|
- const { queryTable } = queryTableList<QueryAccountInOutApplyRsp>();
|
|
|
- queryTable(QueryAccountInOutApply, {}).then((res) => {
|
|
|
- allDetailList.value = sortTime<QueryAccountInOutApplyRsp>(res, 'updatetime', false);
|
|
|
- changeTab(cacheIndex, tabList.value[cacheIndex]);
|
|
|
- });
|
|
|
+ name: EnumRouterName.account_manager_agency_sub,
|
|
|
+ components: {
|
|
|
+ MtpTableScroll,
|
|
|
+ BtnList,
|
|
|
+ Description,
|
|
|
+ [addCode]: defineAsyncComponent(() => import('./add.vue')),
|
|
|
+ [updateCode]: defineAsyncComponent(() => import('./modiy.vue')),
|
|
|
+ [deleteCode]: defineAsyncComponent(() => import('./delete.vue')),
|
|
|
+ },
|
|
|
+ setup() {
|
|
|
+ // 表格列表数据
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<QueryBankAccountSignQsp>();
|
|
|
+ const flag = ref(false);
|
|
|
+ const loadData = () => {
|
|
|
+ queryTable(queryBankAccountSign).then((res) => {
|
|
|
+ const set = new Set([2, 3, 4]);
|
|
|
+ tableList.value = res.filter((e) => set.has(e.signstatus));
|
|
|
+ if (tableList.value.length) {
|
|
|
+ flag.value = true;
|
|
|
}
|
|
|
+ });
|
|
|
+ };
|
|
|
+ // 预览附件
|
|
|
+ const { previewVisible, previewImage, cancelImg, previewImg } = handlePreviewImg();
|
|
|
+ function handleUrl(value: string, record: QueryBankAccountSignQsp) {
|
|
|
+ let result = '--';
|
|
|
+ if (value && value !== '--') {
|
|
|
+ result = '查看附件';
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ // 表头
|
|
|
+ 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);
|
|
|
+ let cacheIndex = 0;
|
|
|
+ // 出入金申请列表
|
|
|
+ function queryDetail() {
|
|
|
+ const { queryTable } = queryTableList<QueryAccountInOutApplyRsp>();
|
|
|
+ queryTable(QueryAccountInOutApply, {}).then((res) => {
|
|
|
+ allDetailList.value = sortTime<QueryAccountInOutApplyRsp>(res, 'updatetime', false);
|
|
|
+ changeTab(cacheIndex, tabList.value[cacheIndex]);
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- // 明细表头
|
|
|
- const detailColumns = ref(applyInColumns);
|
|
|
+ // 明细表头
|
|
|
+ const detailColumns = ref(applyInColumns);
|
|
|
|
|
|
- // 切换明细
|
|
|
- function changeTab(index: number, current: TabList) {
|
|
|
- if (!current) return;
|
|
|
- cacheIndex = index;
|
|
|
- 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(2);
|
|
|
- } else if (code === 'account_manager_agency_sub_apply_out') {
|
|
|
- // 提现申请
|
|
|
- detailColumns.value = applyOutCloums;
|
|
|
- detailList.value = fn(1);
|
|
|
- } else {
|
|
|
- detailList.value = [];
|
|
|
- console.error(`${lable}没有配置对应的code: ${code},`);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
+ // 切换明细
|
|
|
+ function changeTab(index: number, current: TabList) {
|
|
|
+ if (!current) return;
|
|
|
+ cacheIndex = index;
|
|
|
+ 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(2);
|
|
|
+ } else if (code === 'account_manager_agency_sub_apply_out') {
|
|
|
+ // 提现申请
|
|
|
+ detailColumns.value = applyOutCloums;
|
|
|
+ detailList.value = fn(1);
|
|
|
+ } else {
|
|
|
+ detailList.value = [];
|
|
|
+ console.error(`${lable}没有配置对应的code: ${code},`);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- const param: ComposeTableDetailParam = {
|
|
|
- queryFn: loadData, // 查询表格数据
|
|
|
- tableFilterKey: [], // 表格过滤字段
|
|
|
- menuType: EnumRouterName.account_manager_agency_sub, // 当前tab页对应的code
|
|
|
- };
|
|
|
- const {
|
|
|
- visible,
|
|
|
- closeDrawer, // 控制 drawer 组件是否显示
|
|
|
- expandedRowKeys,
|
|
|
- selectedRow,
|
|
|
- Rowclick, // 表格事件
|
|
|
- tabList,
|
|
|
- } = handleComposeTable_detail<QueryPermancePlanTmpRsp>(param);
|
|
|
- watch(flag, () => {
|
|
|
- visible.value = true;
|
|
|
- queryDetail();
|
|
|
- });
|
|
|
- watchEffect(() => {
|
|
|
- if (visible.value) {
|
|
|
- changeTab(cacheIndex, tabList.value[cacheIndex]);
|
|
|
- }
|
|
|
- });
|
|
|
- // 出入金申请,重新加载数据
|
|
|
- Bus.$on('applyInOrOut', () => {
|
|
|
- queryDetail();
|
|
|
- });
|
|
|
- return {
|
|
|
- loading,
|
|
|
- tableList,
|
|
|
- ...useButton(),
|
|
|
- columns,
|
|
|
- ...handleModalComponent(loadData, selectedRow),
|
|
|
+ const param: ComposeTableDetailParam = {
|
|
|
+ queryFn: loadData, // 查询表格数据
|
|
|
+ tableFilterKey: [], // 表格过滤字段
|
|
|
+ menuType: EnumRouterName.account_manager_agency_sub, // 当前tab页对应的code
|
|
|
+ };
|
|
|
+ const {
|
|
|
+ visible,
|
|
|
+ closeDrawer, // 控制 drawer 组件是否显示
|
|
|
+ expandedRowKeys,
|
|
|
+ selectedRow,
|
|
|
+ Rowclick, // 表格事件
|
|
|
+ tabList,
|
|
|
+ } = handleComposeTable_detail<QueryPermancePlanTmpRsp>(param);
|
|
|
+ watch(flag, () => {
|
|
|
+ visible.value = true;
|
|
|
+ queryDetail();
|
|
|
+ });
|
|
|
+ watchEffect(() => {
|
|
|
+ if (visible.value) {
|
|
|
+ changeTab(cacheIndex, tabList.value[cacheIndex]);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 出入金申请,重新加载数据
|
|
|
+ Bus.$on('applyInOrOut', () => {
|
|
|
+ queryDetail();
|
|
|
+ });
|
|
|
+ return {
|
|
|
+ loading,
|
|
|
+ tableList,
|
|
|
+ ...useButton(),
|
|
|
+ columns,
|
|
|
+ ...handleModalComponent(loadData, selectedRow),
|
|
|
|
|
|
- visible,
|
|
|
- closeDrawer, // 控制 drawer 组件是否显示
|
|
|
- expandedRowKeys,
|
|
|
- selectedRow,
|
|
|
- Rowclick, // 表格事件
|
|
|
- tabList,
|
|
|
- detailColumns,
|
|
|
- formatTime,
|
|
|
- expandIcon,
|
|
|
- getSignStatus,
|
|
|
- changeTab,
|
|
|
- addCode,
|
|
|
- detailList,
|
|
|
- getAccountInOutApplyStatus,
|
|
|
- previewVisible,
|
|
|
- previewImage,
|
|
|
- cancelImg,
|
|
|
- previewImg,
|
|
|
- handleUrl,
|
|
|
- };
|
|
|
- },
|
|
|
+ visible,
|
|
|
+ closeDrawer, // 控制 drawer 组件是否显示
|
|
|
+ expandedRowKeys,
|
|
|
+ selectedRow,
|
|
|
+ Rowclick, // 表格事件
|
|
|
+ tabList,
|
|
|
+ detailColumns,
|
|
|
+ formatTime,
|
|
|
+ expandIcon,
|
|
|
+ getSignStatus,
|
|
|
+ changeTab,
|
|
|
+ addCode,
|
|
|
+ detailList,
|
|
|
+ getAccountInOutApplyStatus,
|
|
|
+ previewVisible,
|
|
|
+ previewImage,
|
|
|
+ cancelImg,
|
|
|
+ previewImg,
|
|
|
+ handleUrl,
|
|
|
+ };
|
|
|
+ },
|
|
|
});
|
|
|
</script>
|
|
|
|