Browse Source

定投价查询

huangbin 4 years ago
parent
commit
dda0a82c99

+ 2 - 1
src/services/bus/goods.ts

@@ -1,5 +1,6 @@
 import APP from '@/services';
+import { Goods } from '../go/ermcp/goodsInfo/interface';
 
-export function getGoodsList() {
+export function getGoodsList(): Goods[] {
     return APP.get('Goods')
 }

+ 15 - 14
src/services/go/ermcp/goodsInfo/interface.ts

@@ -304,18 +304,19 @@ export interface MenuList extends MenuItem {
 }
 
 
-export interface ErmcpMiddleGoodsChangeLog{
-    aftervalue      :number;//变更后
-    applyid :number;//操作人
-    applyname       :string;//操作人名称
-    applysrc        :number;//操作来源 - 1:管理端 2:终端
-    beforevalue     :number;//变更前
-    changelogtype   :number;//变更流水类型 - 1:套保比率变更
-    handlestatus    :number;//处理状态
-    logdatetime     :string;//流水日期
-    logid   :number;//流水ID
-    logremark       :string;//流水备注
-    middlegoodsid   :number;//套保品种ID
-    tradedate       :string;//交易日(yyyyMMdd)
-    updatetime      :string;//更新时间
+export interface ErmcpMiddleGoodsChangeLog {
+    aftervalue: number;//变更后
+    applyid: number;//操作人
+    applyname: string;//操作人名称
+    applysrc: number;//操作来源 - 1:管理端 2:终端
+    beforevalue: number;//变更前
+    changelogtype: number;//变更流水类型 - 1:套保比率变更
+    handlestatus: number;//处理状态
+    logdatetime: string;//流水日期
+    logid: number;//流水ID
+    logremark: string;//流水备注
+    middlegoodsid: number;//套保品种ID
+    tradedate: string;//交易日(yyyyMMdd)
+    updatetime: string;//更新时间
 }
+

+ 2 - 2
src/views/platinum/platinum_customer_info/compoments/add/index.vue

@@ -8,10 +8,10 @@
            :maskClosable="false"
            width="890px">
     <template #footer>
-      <a-button key="submit"
+      <!-- <a-button key="submit"
                 class="cancelBtn"
                 @click="submit(1)">保存草稿
-      </a-button>
+      </a-button> -->
       <a-button key="submit"
                 type="primary"
                 :loading="loading"

+ 26 - 8
src/views/platinum/platinum_fixed_investment_price_query/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,25 +17,42 @@ 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-platinum_pick_query',
     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: [],
             },
         ];
+        const slotParam: SlotParam = {
+            search(result: any) {
+                const time = date.value;
+                if (time) {
+                    result.tradedate = formatTime(time, 'd');
+                }
+            },
+            reset() {
+                date.value = undefined;
+            },
+        };
+
         const input: InputList[] = [];
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
+        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 - 4
src/views/platinum/platinum_fixed_investment_price_query/list/tab/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 定投价查询 -->
   <div class="platinum_fixed_investment_price_query_tab">
-    <Filter />
+    <Filter @search="search" />
     <contextMenu :contextMenuList="firstBtn">
       <a-table :columns="columns"
                class="topTable hiddenFirstCol"
@@ -18,7 +18,7 @@
 
 <script lang="ts">
 import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
-import { ErmcpWareHouseInfo } from '@/views/information/warehouse-info/list';
+import { QhjReckonPriceLog } from '@/services/go/ermcp/qhj/interface';
 import Filter from '../../compoments/filter/index.vue';
 import { queryTableList } from './setup';
 // import ControlModal from './compoments/controlModal/index.vue';
@@ -30,7 +30,7 @@ export default defineComponent({
         // 表头数据
         const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
         // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpWareHouseInfo>({});
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<QhjReckonPriceLog>({});
         // 表格操作按钮列表
         const [firstBtn] = _getBtnList('platinum_fixed_investment_price_query_tab', false).value;
         // 表格列表数据
@@ -55,10 +55,10 @@ export default defineComponent({
             expandedRowKeys,
             selectedRow,
             Rowclick,
+            search,
             firstBtn,
             loading,
             tableList,
-            search,
             queryTable,
             btnClick,
         };