Explorar el Código

单据查询 待付单

huangbin hace 4 años
padre
commit
1aa84be288

+ 0 - 2
src/services/go/ermcp/qhj/index.ts

@@ -197,8 +197,6 @@ export function queryTradeOrderDetail(req: QueryTradeOrderDetailReq): Promise<Qh
  * @param req
  */
 export function queryTradePayOrder(req: QueryTradePayOrderReq): Promise<QhjMgrTradePayOrder[]> {
-    const userid = getUsrId()
-    req.userid = userid
     return commonSearch_go('/QhjMgr/QueryTradePayOrder', req).catch((err) => {
         throw new Error(`查询持仓汇总: ${err}`);
     });

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

@@ -497,7 +497,7 @@ export interface QhjMgrTradeOrderDetailRsp {
  * 查询委托明细
  */
 export interface QueryTradePayOrderReq {
-    userid?: number              // 用户ID
+    userid: number              // 用户ID
     payflag?: string             // 付款标识(逗号隔开,如1,2) - 1:未支付 2:已支付 3:已过期 4:已撤销 5:结算过期 6:预售终止
     userinfotype?: number       // 用户类型 1-个人 2-企业
     trademode?: number          // 交易模式

+ 4 - 41
src/views/platinum/platinum_document_query/list/order/compoments/filter/index.vue → src/views/platinum/platinum_document_query/compoments/filter/index.vue

@@ -20,47 +20,21 @@
 <script lang="ts">
 import FilterOption from '@/common/components/filter/index.vue';
 import { defineComponent, ref } from 'vue';
-import { handleFilter, handleTimeFilter, InputList, SelectList } from '@/common/setup/filter';
+import { handleFilter, InputList } from '@/common/setup/filter';
 import { initData } from '@/common/methods';
-import { getGoodsList } from '@/services/bus/goods';
 import { Moment } from 'moment';
 import { getRangeTime } from '@/utils/time';
-import { queryTableList } from '@/common/setup/table';
-import { QhjParentAreaList } from '@/services/go/ermcp/qhj/interface';
-import { queryParentAreaList } from '@/services/go/ermcp/qhj';
+import { handleSelectOption } from '../../setup';
 
 export default defineComponent({
     name: 'filter-platinum_pick_query',
     components: { FilterOption },
     setup(props, context) {
         const date = ref<Moment[]>([]);
-        const select = ref<SelectList[]>([
-            {
-                value: undefined,
-                key: 'userinfotype',
-                placeholder: '账号类型',
-                list: [
-                    { value: 1, lable: '个人' },
-                    { value: 2, lable: '企业' },
-                ],
-            },
-            {
-                value: undefined,
-                key: 'goodsid',
-                placeholder: '选择商品',
-                list: [],
-            },
-            {
-                value: undefined,
-                key: 'userid',
-                placeholder: '请选择子机构',
-                list: [],
-            },
-        ]);
+        const { select, getSelectList } = handleSelectOption();
         const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'filtername' }];
         // 是否包含子级 1-包含
         const includesub = ref<boolean>(false);
-
         const param = {
             search(result: any) {
                 result.includesub = includesub.value ? 1 : 0;
@@ -74,20 +48,9 @@ export default defineComponent({
                 date.value = [];
             },
         };
-
         const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, param);
-        const { queryTable } = queryTableList<QhjParentAreaList>();
         initData(() => {
-            // 商品列表
-            select.value[1].list = getGoodsList().map((e) => {
-                return { value: e.goodsid, lable: e.goodsname };
-            });
-            // 机构列表
-            queryTable(queryParentAreaList).then((res) => {
-                select.value[2].list = res.map((e) => {
-                    return { value: e.userid, lable: e.accountname };
-                });
-            });
+            getSelectList();
         });
         return {
             includesub,

+ 1 - 5
src/views/platinum/platinum_document_query/list/order/index.vue

@@ -25,7 +25,7 @@
 import { defineComponent, initData, getTableColumns, getTableEvent, contextMenu, BtnList, _getBtnList, queryTableList } from '@/common/export/table';
 import { queryTradeOrderDetail } from '@/services/go/ermcp/qhj';
 import { QueryTradeOrderDetailRsp } from '@/services/go/ermcp/order/interface';
-import Filter from './compoments/filter/index.vue';
+import Filter from '../../compoments/filter/index.vue';
 import { QueryTradeOrderDetailReq } from '@/services/go/ermcp/qhj/interface';
 import { getUserId } from '@/services/bus/account';
 
@@ -42,8 +42,6 @@ export default defineComponent({
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList();
         function search(value: any) {
-            console.log('value', value);
-
             const { includesub, goodsid, filtername, userid, ordertime, userinfotype } = value;
             const len = ordertime.length;
             const param: QueryTradeOrderDetailReq = {
@@ -55,8 +53,6 @@ export default defineComponent({
                 goodsid: goodsid[0],
                 includesub,
             };
-            console.log(param);
-
             queryTable(queryTradeOrderDetail, param);
         }
         initData(() => {

+ 4 - 39
src/views/platinum/platinum_document_query/list/position/compoments/filter/index.vue

@@ -15,40 +15,15 @@
 <script lang="ts">
 import FilterOption from '@/common/components/filter/index.vue';
 import { defineComponent, ref } from 'vue';
-import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
+import { handleFilter, InputList } from '@/common/setup/filter';
 import { initData } from '@/common/methods';
-import { getGoodsList } from '@/services/bus/goods';
-import { queryTableList } from '@/common/setup/table';
-import { QhjParentAreaList } from '@/services/go/ermcp/qhj/interface';
-import { queryParentAreaList } from '@/services/go/ermcp/qhj';
+import { handleSelectOption } from '../../../../setup';
 
 export default defineComponent({
     name: 'filter-platinum_pick_query',
     components: { FilterOption },
     setup(props, context) {
-        const select = ref<SelectList[]>([
-            {
-                value: undefined,
-                key: 'userinfotype',
-                placeholder: '账号类型',
-                list: [
-                    { value: 1, lable: '个人' },
-                    { value: 2, lable: '企业' },
-                ],
-            },
-            {
-                value: undefined,
-                key: 'goodsid',
-                placeholder: '选择商品',
-                list: [],
-            },
-            {
-                value: undefined,
-                key: 'userid',
-                placeholder: '请选择子机构',
-                list: [],
-            },
-        ]);
+        const { select, getSelectList } = handleSelectOption();
         const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'filtername' }];
         // 是否包含子级 1-包含
         const includesub = ref<boolean>(false);
@@ -62,18 +37,8 @@ export default defineComponent({
             },
         };
         const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, param);
-        const { queryTable } = queryTableList<QhjParentAreaList>();
         initData(() => {
-            // 商品列表
-            select.value[1].list = getGoodsList().map((e) => {
-                return { value: e.goodsid, lable: e.goodsname };
-            });
-            // 机构列表
-            queryTable(queryParentAreaList).then((res) => {
-                select.value[2].list = res.map((e) => {
-                    return { value: e.userid, lable: e.accountname };
-                });
-            });
+            getSelectList();
         });
         return {
             includesub,

+ 0 - 79
src/views/platinum/platinum_document_query/list/success/compoments/filter/index.vue

@@ -1,79 +0,0 @@
-<template>
-  <!-- 过滤 -->
-  <div class="filterTable">
-    <a-range-picker v-model:value="date"
-                    class="commonPicker"
-                    style="width: 200px"
-                    :show-time="{hideDisabledOptions: true}"
-                    format="YYYY-MM-DD" />
-    <FilterOption :selectList="selectList"
-                  :inputList="inputList"
-                  :fixedBtnList="fixedBtnList" />
-    <slot></slot>
-  </div>
-</template>
-
-<script lang="ts">
-import FilterOption from '@/common/components/filter/index.vue';
-import { defineComponent, ref } from 'vue';
-import { handleFilter, handleTimeFilter, InputList, SelectList } from '@/common/setup/filter';
-import { initData } from '@/common/methods';
-import { getGoodsList } from '@/services/bus/goods';
-import { Moment } from 'moment';
-
-export default defineComponent({
-    name: 'filter-platinum_pick_query',
-    components: { FilterOption },
-    setup(props, context) {
-        const date = ref<Moment[]>([]);
-        const select = ref<SelectList[]>([
-            {
-                value: undefined,
-                key: 'contracttype1',
-                placeholder: '账号类型',
-                list: [
-                    { value: 1, lable: '个人' },
-                    { value: 2, lable: '企业' },
-                ],
-            },
-            {
-                value: undefined,
-                key: 'goodsid',
-                placeholder: '选择商品',
-                list: [],
-            },
-        ]);
-        const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'accountid' }];
-        // 范围时间内过滤
-        const { getFilterRangeTime } = handleTimeFilter('tradetime');
-
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, getFilterRangeTime(date));
-        initData(() => {
-            select.value[1].list = getGoodsList().map((e) => {
-                return { value: e.goodsid, lable: e.goodsname };
-            });
-        });
-        return {
-            date,
-            selectList,
-            inputList,
-            fixedBtnList,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.filterTable {
-    .commonPicker.ant-calendar-picker {
-        display: inline-flex;
-        padding-top: 9px;
-        padding-bottom: 6px;
-        margin-right: 10px;
-        .ant-input {
-            border: 0;
-            background: @m-grey9;
-        }
-    }
-}
-</style>;

+ 1 - 1
src/views/platinum/platinum_document_query/list/success/index.vue

@@ -24,7 +24,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 Filter from './compoments/filter/index.vue';
+import Filter from '../../compoments/filter/index.vue';
 import { queryTableList } from './setup';
 // import ControlModal from './compoments/controlModal/index.vue';
 

+ 0 - 79
src/views/platinum/platinum_document_query/list/waiting/compoments/filter/index.vue

@@ -1,79 +0,0 @@
-<template>
-  <!-- 过滤 -->
-  <div class="filterTable">
-    <a-range-picker v-model:value="date"
-                    class="commonPicker"
-                    style="width: 200px"
-                    :show-time="{hideDisabledOptions: true}"
-                    format="YYYY-MM-DD" />
-    <FilterOption :selectList="selectList"
-                  :inputList="inputList"
-                  :fixedBtnList="fixedBtnList" />
-    <slot></slot>
-  </div>
-</template>
-
-<script lang="ts">
-import FilterOption from '@/common/components/filter/index.vue';
-import { defineComponent, ref } from 'vue';
-import { handleFilter, handleTimeFilter, InputList, SelectList } from '@/common/setup/filter';
-import { initData } from '@/common/methods';
-import { getGoodsList } from '@/services/bus/goods';
-import { Moment } from 'moment';
-
-export default defineComponent({
-    name: 'filter-platinum_pick_query',
-    components: { FilterOption },
-    setup(props, context) {
-        const date = ref<Moment[]>([]);
-        const select = ref<SelectList[]>([
-            {
-                value: undefined,
-                key: 'contracttype1',
-                placeholder: '账号类型',
-                list: [
-                    { value: 1, lable: '个人' },
-                    { value: 2, lable: '企业' },
-                ],
-            },
-            {
-                value: undefined,
-                key: 'goodsid',
-                placeholder: '选择商品',
-                list: [],
-            },
-        ]);
-        const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'buyaccountid' }];
-        // 范围时间内过滤
-        const { getFilterRangeTime } = handleTimeFilter('paylimitedtime');
-
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, getFilterRangeTime(date));
-        initData(() => {
-            select.value[1].list = getGoodsList().map((e) => {
-                return { value: e.goodsid, lable: e.goodsname };
-            });
-        });
-        return {
-            date,
-            selectList,
-            inputList,
-            fixedBtnList,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.filterTable {
-    .commonPicker.ant-calendar-picker {
-        display: inline-flex;
-        padding-top: 9px;
-        padding-bottom: 6px;
-        margin-right: 10px;
-        .ant-input {
-            border: 0;
-            background: @m-grey9;
-        }
-    }
-}
-</style>;

+ 22 - 7
src/views/platinum/platinum_document_query/list/waiting/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 单据查询 待付单-->
   <div class="platinum_document_query_waiting">
-    <Filter @search="updateColumn" />
+    <Filter @search="search" />
     <contextMenu :contextMenuList="firstBtn">
       <a-table :columns="columns"
                class="topTable hiddenFirstCol"
@@ -23,9 +23,10 @@
 
 <script lang="ts">
 import { defineComponent, initData, getTableColumns, getTableEvent, queryTableList, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
+import { getUserId } from '@/services/bus/account';
 import { queryTradePayOrder } from '@/services/go/ermcp/qhj';
-import { QhjPayOrder } from '@/services/go/ermcp/qhj/interface';
-import Filter from './compoments/filter/index.vue';
+import { QhjPayOrder, QueryTradePayOrderReq } from '@/services/go/ermcp/qhj/interface';
+import Filter from '../../compoments/filter/index.vue';
 // import ControlModal from './compoments/controlModal/index.vue';
 
 export default defineComponent({
@@ -33,23 +34,37 @@ export default defineComponent({
     components: { Filter, contextMenu, BtnList },
     setup() {
         // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
+        const { columns, registerColumn } = getTableColumns();
         // 表格事件
         const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<QhjPayOrder>({});
         // 表格操作按钮列表
         const [firstBtn] = _getBtnList('platinum_document_query_waiting', false).value;
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList();
+        function search(value: any) {
+            const { includesub, goodsid, filtername, userid, ordertime, userinfotype } = value;
+            const len = ordertime.length;
+            const param: QueryTradePayOrderReq = {
+                userid: userid[0] ? userid[0] : getUserId(),
+                userinfotype: userinfotype[0] ? userinfotype[0] : 0,
+                filtername: filtername[0],
+                begindate: len > 1 ? ordertime[0] : '',
+                enddate: len > 1 ? ordertime[len - 1] : '',
+                goodsid: goodsid[0],
+                includesub,
+            };
+            queryTable(queryTradePayOrder, param);
+        }
         initData(() => {
             // 获取列表数据
-            queryTable(queryTradePayOrder, {});
+            queryTable(queryTradePayOrder, { userid: getUserId() });
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_qhj_pay_bill', ['goodsid', 'ordertime', 'operatorid']);
+            registerColumn('table_pcweb_qhj_pay_bill', []);
         });
 
         return {
+            search,
             columns,
-            updateColumn,
             expandedRowKeys,
             selectedRow,
             Rowclick,

+ 50 - 0
src/views/platinum/platinum_document_query/setup.ts

@@ -0,0 +1,50 @@
+import { SelectList } from "@/common/setup/filter";
+import { queryTableList } from "@/common/setup/table";
+import { getGoodsList } from '@/services/bus/goods';
+import { queryParentAreaList } from "@/services/go/ermcp/qhj";
+import { QhjParentAreaList } from "@/services/go/ermcp/qhj/interface";
+import { ref } from "vue";
+
+/**
+ * 获取单据 select 过滤数据
+ * @returns 
+ */
+export function handleSelectOption() {
+    const select = ref<SelectList[]>([
+        {
+            value: undefined,
+            key: 'userinfotype',
+            placeholder: '账号类型',
+            list: [
+                { value: 1, lable: '个人' },
+                { value: 2, lable: '企业' },
+            ],
+        },
+        {
+            value: undefined,
+            key: 'goodsid',
+            placeholder: '选择商品',
+            list: [],
+        },
+        {
+            value: undefined,
+            key: 'userid',
+            placeholder: '请选择子机构',
+            list: [],
+        },
+    ]);
+    const { queryTable } = queryTableList<QhjParentAreaList>();
+    function getSelectList() {
+        // 商品列表
+        select.value[1].list = getGoodsList().map((e) => {
+            return { value: e.goodsid, lable: e.goodsname };
+        });
+        // 机构列表
+        queryTable(queryParentAreaList).then((res) => {
+            select.value[2].list = res.map((e) => {
+                return { value: e.userid, lable: e.accountname };
+            });
+        });
+    }
+    return { select, getSelectList }
+}