Procházet zdrojové kódy

定投计划查询

huangbin před 4 roky
rodič
revize
9407ccd9cf

+ 9 - 7
src/services/go/ermcp/qhj/index.ts

@@ -14,9 +14,7 @@ import {
     QueryAccountInOutApplyReq,
     QueryContractReq,
     QueryCustomerInfoReq,
-    QueryReckonPriceLogReq,
-    QueryRStrategyReq,
-    QueryRSTriggerLogReq
+    QueryReckonPriceLogReq
 } from "@/services/go/ermcp/qhj/interface";
 
 /**
@@ -58,8 +56,10 @@ export function queryReckonPriceLog(req: QueryReckonPriceLogReq): Promise<QhjRec
  * 查询定投记录(定投管理/详情/定投记录) /Qhj/QueryRSTriggerLog
  * @param req
  */
-export function queryRSTriggerLog(req: QueryRSTriggerLogReq): Promise<QhjRSTriggerLog[]> {
-    return commonSearch_go('/Qhj/QueryRSTriggerLog', req).catch((err) => {
+export function queryRSTriggerLog(status?: 1 | 2 | 3): Promise<QhjRSTriggerLog[]> {
+    const userid = getUsrId();
+    const param = status ? { userid, status } : { userid }
+    return commonSearch_go('/Qhj/QueryRSTriggerLog', param).catch((err) => {
         throw new Error(`查询定投记录: ${err.message}`);
     });
 }
@@ -69,8 +69,10 @@ export function queryRSTriggerLog(req: QueryRSTriggerLogReq): Promise<QhjRSTrigg
  *  查询定投设置(我的定投/历史定投[状态=已终止]) /Qhj/set feedback off
  * @param req
  */
-export function queryRStrategy(req: QueryRStrategyReq): Promise<QhjRStrategy[]> {
-    return commonSearch_go('/Qhj/QueryRStrategy', req).catch((err) => {
+export function queryRStrategy(status?: 1 | 2 | 3): Promise<QhjRStrategy[]> {
+    const userid = getUsrId();
+    const param = status ? { userid, status } : { userid }
+    return commonSearch_go('/Qhj/QueryRStrategy', param).catch((err) => {
         throw new Error(`查询定投设置: ${err.message}`);
     });
 }

+ 1 - 1
src/services/go/ermcp/qhj/interface.ts

@@ -159,7 +159,7 @@ export interface QhjReckonPriceLog {
  */
 export interface QueryRSTriggerLogReq {
     userid: number  //  用户ID
-    status: string  //  策略状态(可多选,逗号隔开) - 1:正常 2:暂停 3:终止
+    status?: string  //  策略状态(可多选,逗号隔开) - 1:正常 2:暂停 3:终止
 }
 
 /**

+ 2 - 3
src/views/platinum/platinum_fixed_investment_query/list/flow/index.vue

@@ -39,13 +39,12 @@ export default defineComponent({
         // 表格操作按钮列表
         const [firstBtn] = _getBtnList('platinum_fixed_investment_flow_query', false).value;
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList('in');
+        const { loading, tableList, queryTable } = queryTableList();
         initData(() => {
             // 获取列表数据
             queryTable();
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_warehouse', ['warehousetype', 'warehousename', 'address']);
-            // registerColumn('table_pcweb_qhj_withdrawal_review', ['warehousetype', 'warehousename', 'address']);
+            registerColumn('table_pcweb_qhj_fixed_investment_flow_query', ['warehousetype', 'warehousename', 'address']);
         });
 
         // 查询

+ 9 - 42
src/views/platinum/platinum_fixed_investment_query/list/flow/setup.ts

@@ -1,51 +1,18 @@
-import { QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
-import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface';
-import { message } from 'ant-design-vue';
+import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { queryRSTriggerLog } from '@/services/go/ermcp/qhj';
+import { QhjRSTriggerLog } from '@/services/go/ermcp/qhj/interface';
 import { ref } from 'vue';
 
-
-
-/**
- * 获取表格列表数据
- * @param type 
- * @returns 
- */
-export function queryTableList(type: string) {
+export function queryTableList() {
     // 加载状态
     const loading = ref<boolean>(false);
     // 表格数据
-    const tableList = ref<ErmcpWareHouseInfo[]>([]);
+    const tableList = ref<QhjRSTriggerLog[]>([]);
     function queryTable() {
-        QueryWareHouse('1')
-            .then((res) => {
-                tableList.value = res.map((e, i) => {
-                    return { ...e, key: String(i) };
-                });
-                loading.value = false;
-                console.log('查询列表', tableList);
+        queryResultLoadingAndInfo(queryRSTriggerLog, loading)
+            .then(res => {
+                tableList.value = res
             })
-            .catch((err) => {
-                message.error(err);
-                loading.value = false;
-            });
     }
     return { loading, tableList, queryTable }
-}
-
-// export function queryTableList(type: 'in' | 'out') {
-//     // 加载状态
-//     const loading = ref<boolean>(false);
-//     // 表格数据
-//     const tableList = ref<QhjAccountOutInApply[]>([]);
-//     function queryTable() {
-//         queryResultLoadingAndInfo(queryAccountInOutApply, loading)
-//             .then(res => {
-//                 //申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金
-//                 const arr = type === 'in' ? [1, 3, 5, 7] : [2, 4, 6, 8]
-//                 tableList.value = res.filter((e: QhjAccountOutInApply) => arr.includes(e.executetype)).map((e: QhjAccountOutInApply, i: number) => {
-//                     return { ...e, key: String(i) };
-//                 });
-//             })
-//     }
-//     return { loading, tableList, queryTable }
-// }
+}

+ 2 - 3
src/views/platinum/platinum_fixed_investment_query/list/plan/index.vue

@@ -39,13 +39,12 @@ export default defineComponent({
         // 表格操作按钮列表
         const [firstBtn] = _getBtnList('platinum_fixed_investment_plan_query', false).value;
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList('in');
+        const { loading, tableList, queryTable } = queryTableList();
         initData(() => {
             // 获取列表数据
             queryTable();
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_warehouse', ['warehousetype', 'warehousename', 'address']);
-            // registerColumn('table_pcweb_qhj_withdrawal_review', ['warehousetype', 'warehousename', 'address']);
+            registerColumn('table_pcweb_qhj_fixed_investment_plan_query', ['warehousetype', 'warehousename', 'address']);
         });
 
         // 查询

+ 9 - 42
src/views/platinum/platinum_fixed_investment_query/list/plan/setup.ts

@@ -1,51 +1,18 @@
-import { QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
-import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface';
-import { message } from 'ant-design-vue';
+import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { queryRStrategy } from '@/services/go/ermcp/qhj';
+import { QhjRStrategy } from '@/services/go/ermcp/qhj/interface';
 import { ref } from 'vue';
 
-
-
-/**
- * 获取表格列表数据
- * @param type 
- * @returns 
- */
-export function queryTableList(type: string) {
+export function queryTableList() {
     // 加载状态
     const loading = ref<boolean>(false);
     // 表格数据
-    const tableList = ref<ErmcpWareHouseInfo[]>([]);
+    const tableList = ref<QhjRStrategy[]>([]);
     function queryTable() {
-        QueryWareHouse('1')
-            .then((res) => {
-                tableList.value = res.map((e, i) => {
-                    return { ...e, key: String(i) };
-                });
-                loading.value = false;
-                console.log('查询列表', tableList);
+        queryResultLoadingAndInfo(queryRStrategy, loading)
+            .then(res => {
+                tableList.value = res
             })
-            .catch((err) => {
-                message.error(err);
-                loading.value = false;
-            });
     }
     return { loading, tableList, queryTable }
-}
-
-// export function queryTableList(type: 'in' | 'out') {
-//     // 加载状态
-//     const loading = ref<boolean>(false);
-//     // 表格数据
-//     const tableList = ref<QhjAccountOutInApply[]>([]);
-//     function queryTable() {
-//         queryResultLoadingAndInfo(queryAccountInOutApply, loading)
-//             .then(res => {
-//                 //申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金
-//                 const arr = type === 'in' ? [1, 3, 5, 7] : [2, 4, 6, 8]
-//                 tableList.value = res.filter((e: QhjAccountOutInApply) => arr.includes(e.executetype)).map((e: QhjAccountOutInApply, i: number) => {
-//                     return { ...e, key: String(i) };
-//                 });
-//             })
-//     }
-//     return { loading, tableList, queryTable }
-// }
+}