|
|
@@ -90,6 +90,7 @@ import { QueryAccountInOutApplyRsp, QueryAccountInOutApplyRsq, QueryBankAccountS
|
|
|
import { QueryPermancePlanTmpRsp } from '@/services/go/wrtrade/interface';
|
|
|
import { ref, watch, watchEffect } from 'vue';
|
|
|
import { getColumns } from './setup';
|
|
|
+import Bus from '@/utils/eventBus/index';
|
|
|
|
|
|
const addCode = 'account-manager-agency-sub-add';
|
|
|
const updateCode = 'account-manager-agency-sub-modiy';
|
|
|
@@ -139,19 +140,22 @@ export default defineComponent({
|
|
|
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 = res;
|
|
|
- changeTab(0, tabList.value[0]);
|
|
|
+ changeTab(cacheIndex, tabList.value[cacheIndex]);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 明细表头
|
|
|
const detailColumns = ref(applyInColumns);
|
|
|
+
|
|
|
// 切换明细
|
|
|
function changeTab(index: number, current: TabList) {
|
|
|
+ cacheIndex = index;
|
|
|
const { code, lable } = current;
|
|
|
// executetype: number;//申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金
|
|
|
if (code === 'account-manager-agency-sub-apply-in') {
|
|
|
@@ -188,9 +192,13 @@ export default defineComponent({
|
|
|
});
|
|
|
watchEffect(() => {
|
|
|
if (visible.value) {
|
|
|
- changeTab(0, tabList.value[0]);
|
|
|
+ changeTab(cacheIndex, tabList.value[cacheIndex]);
|
|
|
}
|
|
|
});
|
|
|
+ // 出入金申请,重新加载数据
|
|
|
+ Bus.$on('applyInOrOut', () => {
|
|
|
+ queryDetail();
|
|
|
+ });
|
|
|
return {
|
|
|
loading,
|
|
|
tableList,
|