Explorar el Código

定投流水查询

huangbin hace 4 años
padre
commit
ac3db1fdab

+ 23 - 7
src/views/platinum/platinum_fixed_investment_query/list/flow/compoments/filter/index.vue

@@ -20,6 +20,9 @@ import FilterOption from '@/common/components/filter/index.vue';
 import { defineComponent, ref } from 'vue';
 import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
 import { Moment } from 'moment';
+import { SlotParam } from '@/common/setup/filter/interface';
+import { formatTime, initData } from '@/common/methods';
+import { getGoodsList } from '@/services/bus/goods';
 
 export default defineComponent({
     name: 'filter-flow',
@@ -29,16 +32,29 @@ export default defineComponent({
         const select: SelectList[] = [
             {
                 value: undefined,
-                key: 'contracttype1',
+                key: 'goodsid',
                 placeholder: '选择商品',
-                list: [
-                    { value: 1, lable: '采购' },
-                    { value: -1, lable: '销售' },
-                ],
+                list: [],
             },
         ];
-        const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'account' }];
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
+        const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'accountid' }];
+        const slotParam: SlotParam = {
+            search(result: any) {
+                const time = date.value;
+                // if (time) {
+                //     result.tradedate = formatTime(time, 'd');
+                // }
+            },
+            reset() {
+                date.value = [];
+            },
+        };
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, slotParam);
+        initData(() => {
+            select[0].list = getGoodsList().map((e) => {
+                return { value: e.goodsid, lable: e.goodsname };
+            });
+        });
         return {
             date,
             selectList,

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

@@ -1,7 +1,7 @@
 <template>
   <!-- 定投流水查询 -->
   <div class="platinum_fixed_investment_flow_query">
-    <Filter />
+    <Filter @search="search" />
     <contextMenu :contextMenuList="firstBtn">
       <a-table :columns="columns"
                class="topTable hiddenFirstCol"
@@ -23,6 +23,7 @@
 
 <script lang="ts">
 import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
+import { QhjRSTriggerLog } from '@/services/go/ermcp/qhj/interface';
 import { ErmcpWareHouseInfo } from '@/views/information/warehouse-info/list';
 import Filter from './compoments/filter/index.vue';
 import { queryTableList } from './setup';
@@ -35,7 +36,7 @@ export default defineComponent({
         // 表头数据
         const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
         // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpWareHouseInfo>({});
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<QhjRSTriggerLog>({});
         // 表格操作按钮列表
         const [firstBtn] = _getBtnList('platinum_fixed_investment_flow_query', false).value;
         // 表格列表数据
@@ -44,7 +45,7 @@ export default defineComponent({
             // 获取列表数据
             queryTable();
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_qhj_fixed_investment_flow_query', ['warehousetype', 'warehousename', 'address']);
+            registerColumn('table_pcweb_qhj_fixed_investment_flow_query', ['goodsid', 'accountid']);
         });
 
         // 查询

+ 30 - 12
src/views/platinum/platinum_fixed_investment_query/list/plan/compoments/filter/index.vue

@@ -2,7 +2,8 @@
   <!-- 过滤 -->
   <div class="filterTable">
     <a-space>
-      <a-date-picker class="commonDatePicker" v-model:value="date" />
+      <a-date-picker class="commonDatePicker"
+                     v-model:value="date" />
     </a-space>
     <FilterOption :selectList="selectList"
                   :inputList="inputList"
@@ -16,34 +17,51 @@ import FilterOption from '@/common/components/filter/index.vue';
 import { defineComponent, ref } from 'vue';
 import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
 import { Moment } from 'moment';
+import { formatTime, initData } from '@/common/methods';
+import { getGoodsList } from '@/services/bus/goods';
+import { SlotParam } from '@/common/setup/filter/interface';
 
 export default defineComponent({
     name: 'filter-plan',
     components: { FilterOption },
     setup(props, context) {
-        const date = ref<Moment[]>();
+        const date = ref<Moment>();
         const select: SelectList[] = [
             {
                 value: undefined,
-                key: 'contracttype1',
+                key: 'goodsid',
                 placeholder: '选择商品',
-                list: [
-                    { value: 1, lable: '采购' },
-                    { value: -1, lable: '销售' },
-                ],
+                list: [],
             },
             {
                 value: undefined,
-                key: 'contracttype2',
+                key: 'regularlystrategystatus',
                 placeholder: '选择计划状态',
                 list: [
-                    { value: 1, lable: '采购' },
-                    { value: -1, lable: '销售' },
+                    { value: 1, lable: '正常' },
+                    { value: 2, lable: '暂停' },
+                    { value: 3, lable: '终止' },
                 ],
             },
         ];
-        const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'account' }];
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
+        const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'accountid' }];
+        const slotParam: SlotParam = {
+            search(result: any) {
+                const time = date.value;
+                if (time) {
+                    result.tradedate = formatTime(time, 'd');
+                }
+            },
+            reset() {
+                date.value = undefined;
+            },
+        };
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, slotParam);
+        initData(() => {
+            select[0].list = getGoodsList().map((e) => {
+                return { value: e.goodsid, lable: e.goodsname };
+            });
+        });
         return {
             date,
             selectList,

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

@@ -1,7 +1,7 @@
 <template>
   <!-- 定投计划查询 -->
   <div class="platinum_fixed_investment_plan_query">
-    <Filter />
+    <Filter @search="search" />
     <contextMenu :contextMenuList="firstBtn">
       <a-table :columns="columns"
                class="topTable hiddenFirstCol"
@@ -44,7 +44,7 @@ export default defineComponent({
             // 获取列表数据
             queryTable();
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_qhj_fixed_investment_plan_query', ['warehousetype', 'warehousename', 'address']);
+            registerColumn('table_pcweb_qhj_fixed_investment_plan_query', ['goodsid', 'regularlystrategystatus', 'accountid']);
         });
 
         // 查询