From 629232a2436049b0254e3e685b4bc6aff1b8b6b8 Mon Sep 17 00:00:00 2001 From: yangchunlong <292345300@qq.com> Date: Wed, 24 Sep 2025 17:27:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(api):=20=F0=9F=9A=80=20=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E5=8D=95=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/warehousing.ts | 10 ++++ src/components/ProTable/index.vue | 2 +- src/hooks/useTable.ts | 10 ++++ .../warehousing/constant/list/button.ts | 2 +- .../warehousing/constant/list/search.ts | 34 +++++++----- .../warehousing/constant/list/table.ts | 54 ++++++++++++------- .../subscribe/warehousing/index.vue | 28 ++++++++-- .../subscribe/warehousing/init/btnClick.ts | 14 ++++- 8 files changed, 115 insertions(+), 39 deletions(-) create mode 100644 src/api/modules/warehousing.ts diff --git a/src/api/modules/warehousing.ts b/src/api/modules/warehousing.ts new file mode 100644 index 0000000..69fd3a7 --- /dev/null +++ b/src/api/modules/warehousing.ts @@ -0,0 +1,10 @@ +import http from "@/api"; + +//订阅入庫單列表 /admapi/subscribe /admapi/subscribe/wrr +export const getSubscribeWrrListApi = (params: any) => { + return http.get(`subscribe/wrr`, params); +}; +//订阅入库单刷新 +export const getSubscribeResetListApi = (params: any) => { + return http.get(`subscribe/wrr/reload`, params); +}; diff --git a/src/components/ProTable/index.vue b/src/components/ProTable/index.vue index d4b808c..d5ddcf7 100644 --- a/src/components/ProTable/index.vue +++ b/src/components/ProTable/index.vue @@ -135,7 +135,7 @@ const props = withDefaults(defineProps(), { toolButton: true, // rowKey: `id${index}`, // searchCol: () => ({ xs: 1, sm: 2, md: 2, lg: 3, xl: 4 }), - sizes: [1, 2, 3, 4] + sizes: [50, 100, 150, 200] }); // 是否显示搜索模块 diff --git a/src/hooks/useTable.ts b/src/hooks/useTable.ts index 3296b23..2748196 100644 --- a/src/hooks/useTable.ts +++ b/src/hooks/useTable.ts @@ -30,6 +30,7 @@ export const useTable = ( console.log("分页参数更新:", newVal); } }); + //订阅列表数据处理 const initSubscribeData = () => { if (routeName === "foundationSubscribeList") { @@ -53,6 +54,15 @@ export const useTable = ( } } } + if (routeName === "foundationSubscribeWarehousing") { + if (Array.isArray(state.totalParam?.org_number) && state.totalParam?.org_number?.length) { + state.totalParam.org_number = state.totalParam.org_number.join(","); + } + if (state.totalParam?.subscriber_name) { + // let names: any = ""; + state.totalParam.subscriber_name = state.totalParam?.subscriber_name.replace(/[,,]/g, ","); + } + } }; //删除临时参数和空值参数 const deleteParams = () => { diff --git a/src/views/foundation/subscribe/warehousing/constant/list/button.ts b/src/views/foundation/subscribe/warehousing/constant/list/button.ts index fed972a..02bdc81 100644 --- a/src/views/foundation/subscribe/warehousing/constant/list/button.ts +++ b/src/views/foundation/subscribe/warehousing/constant/list/button.ts @@ -10,6 +10,6 @@ export const BUTTON = [ { text: "刷新", permission: "foundationSubscribeWarehousingBtnRefresh", - type: "del" + type: "reset" } ]; diff --git a/src/views/foundation/subscribe/warehousing/constant/list/search.ts b/src/views/foundation/subscribe/warehousing/constant/list/search.ts index aaf8179..664e16e 100644 --- a/src/views/foundation/subscribe/warehousing/constant/list/search.ts +++ b/src/views/foundation/subscribe/warehousing/constant/list/search.ts @@ -17,33 +17,42 @@ interface FormItem { } export const FORM_DATA: FormItem[] = [ { - prop: "securityNumbers", + prop: "bill_no", placeholder: "请输入单据编号", type: "input", label: "单据编号: " }, { - prop: "securityNumbers", + prop: "src_bill_no", placeholder: "请输入来源单号", type: "input", label: "来源单号: " }, { - prop: "securityNumbers", + prop: "order_no", placeholder: "请输入订单单号", type: "input", label: "订单单号: " }, { - prop: "securityNumbers", + prop: "notif_ret_status", placeholder: "请选择推送结果", type: "select", label: "推送结果: ", - options: [] + options: [ + { + value: 1, + label: "成功" + }, + { + value: -1, + label: "失败" + } + ] }, { - prop: "securityNumbers", + prop: "material", placeholder: "请输入物料名称/编码/规格型号", type: "input", label: "物料编码: " @@ -56,14 +65,14 @@ export const FORM_DATA: FormItem[] = [ options: [] }, { - prop: "securityNumbers", + prop: "warehouse_number", placeholder: "请选择仓库", type: "select", label: "仓库: ", options: [] }, { - prop: "securityNumbers", + prop: "sub_warehouse", placeholder: "请输入子仓库", type: "input", label: "子仓库: " @@ -75,12 +84,12 @@ export const FORM_DATA: FormItem[] = [ options: [], startPlaceholder: "入库开始日期", endPlaceholder: "入库结束日期", - startDate: "createBeginDate", - endDate: "createEndDate", + startDate: "storage_time", + // endDate: "createEndDate", label: "入库日期: " }, { - prop: "lotNumbers", + prop: "subscriber_name", placeholder: "请输入订阅人", type: "input", label: "订阅人: " @@ -90,5 +99,6 @@ export const FORM_DATA: FormItem[] = [ export const RULE_FORM = { page: 1, size: 50, - org_number: ["101"] + org_number: ["101"], + subscriber_name: "" }; diff --git a/src/views/foundation/subscribe/warehousing/constant/list/table.ts b/src/views/foundation/subscribe/warehousing/constant/list/table.ts index 505b769..1a288b6 100644 --- a/src/views/foundation/subscribe/warehousing/constant/list/table.ts +++ b/src/views/foundation/subscribe/warehousing/constant/list/table.ts @@ -4,92 +4,110 @@ export const COLUMNS = [ align: "left", fixed: true, label: "单据编码", - prop: "securityNumber" + prop: "bill_no", + width: 140 }, { align: "left", label: "来源单号", - prop: "id" + prop: "src_bill_no", + width: 140 }, { align: "left", label: "订单单号", - prop: "specifications" + prop: "order_no", + width: 140 }, { align: "left", label: "客户名称", - prop: "createTime" + prop: "customer_name", + width: 140 }, { align: "left", label: "入库组织", - prop: "downLoadNumber" + prop: "warehousing_org_name", + width: 200 }, { align: "left", label: "单据类型", - prop: "downLoadTime" + prop: "bill_type_name", + width: 140 }, { align: "left", label: "规格型号", - prop: "downLoadTime" + prop: "specification", + width: 140 }, { align: "left", label: "物料编码", - prop: "downLoadTime" + prop: "material_number", + width: 140 }, { align: "left", label: "物料名称", - prop: "downLoadTime" + prop: "material_name", + width: 140 }, { align: "left", label: "出厂价", - prop: "downLoadTime" + prop: "factory_price", + width: 140 }, { align: "left", label: "入库仓库", - prop: "downLoadTime" + prop: "warehouse_name", + width: 140 }, { align: "left", label: "入库子仓库", - prop: "downLoadTime" + prop: "sub_warehouse_name", + width: 140 }, { align: "left", label: "入库数量", - prop: "downLoadTime" + prop: "real_qty", + width: 140 }, { align: "left", label: "订单明细备注", - prop: "downLoadTime" + prop: "remark", + width: 200 }, { align: "left", label: "单位", - prop: "downLoadTime" + prop: "unit_name", + width: 120 }, { align: "left", label: "入库时间", - prop: "downLoadTime" + prop: "storage_time", + width: 160 }, { align: "left", label: "创建时间", - prop: "downLoadTime" + prop: "created_at", + width: 160 }, { align: "left", label: "推送结果", - prop: "downLoadTime" + prop: "notif_ret_text", + width: 120 } ]; diff --git a/src/views/foundation/subscribe/warehousing/index.vue b/src/views/foundation/subscribe/warehousing/index.vue index 5219245..50ac7ed 100644 --- a/src/views/foundation/subscribe/warehousing/index.vue +++ b/src/views/foundation/subscribe/warehousing/index.vue @@ -1,4 +1,4 @@ - +