huangbin 4 лет назад
Родитель
Сommit
3b72a10750

+ 5 - 5
src/services/go/ermcp/qhj/index.ts

@@ -24,7 +24,7 @@ import {
     QueryAccountInOutApplyReq,
     QueryContractLogReq,
     QueryContractLogRsp,
-    QueryContractReq,
+
 
 
     QueryPayOrderReq,
@@ -146,14 +146,14 @@ export function queryParentAreaList(): Promise<QhjParentAreaList[]> {
 }
 
 /**
- * -- 铂金宝 - 查询所属机构列表
+ * -- 铂金宝 - 查询提货商品
  * 查询客户资料 /Qhj/QueryPickGoods
- * @param req
+ * @param req 状态(可多选,逗号隔开) - 1:正常 2:停用 3:注销
  */
-export function queryPickGoods(status?: 1 | 2 | 3): Promise<QhjPickGoods[]> {
+export function queryPickGoods(status?: string): Promise<QhjPickGoods[]> {
     const param = status ? { status } : {}
     return commonSearch_go('/Qhj/QueryPickGoods', param).catch((err) => {
-        throw new Error(`查询所属机构列表: ${err}`);
+        throw new Error(`查询提货商品: ${err}`);
     });
 }
 

+ 12 - 4
src/views/platinum/platinum_pick_query/list/tab/index.vue

@@ -51,14 +51,15 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
+import { defineComponent, initData, getTableColumns, getTableEvent, contextMenu, BtnList, _getBtnList, queryTableList } from '@/common/export/table';
 import Filter from '../../compoments/filter/index.vue';
-import { queryTableList, handleTableList } from './setup';
+import { handleTableList } from './setup';
 import ControlModal from './compoments/controlModal/index.vue';
 import { QhjTradeGoodsPickup } from '@/services/go/ermcp/qhj/interface';
 import { getPickUpStateName, getTakeStateName } from '@/common/constants/enumsName';
 import { TableEventCB, BtnList as BtnListType } from '@/common/setup/table/interface';
 import { ref } from 'vue';
+import { queryTradeGoodsPickup } from '@/services/go/ermcp/qhj';
 
 export default defineComponent({
     name: 'platinum_pick_query_tab',
@@ -78,13 +79,20 @@ export default defineComponent({
         const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<QhjTradeGoodsPickup>(event);
 
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList();
+        const { loading, tableList, queryTable } = queryTableList<QhjTradeGoodsPickup>();
+
         // 1:备货中  完成备货
         // 2:待取货(自提) 确认取货
         // 4:待收货(邮寄) 上传物流信息、确认收货
         initData(() => {
             // 获取列表数据
-            queryTable();
+            queryTable(queryTradeGoodsPickup).then((res) => {
+                tableList.value = res.map((el) => {
+                    console.log(el.takeorderid);
+
+                    return { ...el, key: String(el.takeorderid) };
+                });
+            });
             // 注册表头信息 过滤
             registerColumn('table_pcweb_qhj_pickup_query', ['reqtime', 'pickupgoodsname', 'takeorderstatus', 'goodsname']);
         });

+ 0 - 17
src/views/platinum/platinum_pick_query/list/tab/setup.ts

@@ -1,22 +1,5 @@
 import { BtnList } from '@/common/components/buttonList/interface';
-import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { queryTradeGoodsPickup } from '@/services/go/ermcp/qhj';
 import { QhjTradeGoodsPickup } from '@/services/go/ermcp/qhj/interface';
-import { ref } from 'vue';
-
-export function queryTableList() {
-    // 加载状态
-    const loading = ref<boolean>(false);
-    // 表格数据
-    const tableList = ref<QhjTradeGoodsPickup[]>([]);
-    function queryTable() {
-        queryResultLoadingAndInfo(queryTradeGoodsPickup, loading)
-            .then(res => {
-                tableList.value = res
-            })
-    }
-    return { loading, tableList, queryTable }
-}
 
 export function handleTableList(btnList: BtnList[], record: QhjTradeGoodsPickup): BtnList[] {
     // 1:备货中  完成备货