From 86f68a5cdf22c415f4896b46fe685b59de66544d Mon Sep 17 00:00:00 2001 From: wwz <1144797966@qq.com> Date: Tue, 8 Apr 2025 17:41:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=BF=9B=E9=94=80=E5=AD=98=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/product/libraryrecords.ts | 68 +++++++++---------- src/views/inventory/consumables/index.vue | 4 +- .../libraryrecords/config/content.ts | 19 +++++- .../inventory/libraryrecords/config/search.ts | 2 +- src/views/inventory/libraryrecords/index.vue | 25 ++++--- .../components/consumableList.vue | 35 +++++----- src/views/inventory/operation_in/index.vue | 18 +++-- 7 files changed, 96 insertions(+), 75 deletions(-) diff --git a/src/api/product/libraryrecords.ts b/src/api/product/libraryrecords.ts index fda0371..cb3516f 100644 --- a/src/api/product/libraryrecords.ts +++ b/src/api/product/libraryrecords.ts @@ -11,41 +11,41 @@ const Api = { params, }); }, - /** 全部*/ - getAllList(params: any) { - return request({ - url: `${baseURL}/list`, - method: "get", - params, - }); - }, - get(id: string | number) { - return request({ - url: `${baseURL}/` + id, - method: "get", - }); - }, - add(data: any) { - return request({ - url: `${baseURL}`, - method: "post", - data, - }); - }, - edit(data: any) { - return request({ - url: `${baseURL}`, - method: "put", - data, - }); - }, + // /** 全部*/ + // getAllList(params: any) { + // return request({ + // url: `${baseURL}/list`, + // method: "get", + // params, + // }); + // }, + // get(id: string | number) { + // return request({ + // url: `${baseURL}/` + id, + // method: "get", + // }); + // }, + // add(data: any) { + // return request({ + // url: `${baseURL}`, + // method: "post", + // data, + // }); + // }, + // edit(data: any) { + // return request({ + // url: `${baseURL}`, + // method: "put", + // data, + // }); + // }, - delete(id: string | number) { - return request({ - url: `${baseURL}/` + id, - method: "delete", - }); - }, + // delete(id: string | number) { + // return request({ + // url: `${baseURL}/` + id, + // method: "delete", + // }); + // }, }; export default Api; diff --git a/src/views/inventory/consumables/index.vue b/src/views/inventory/consumables/index.vue index 8c242c5..b241cf1 100644 --- a/src/views/inventory/consumables/index.vue +++ b/src/views/inventory/consumables/index.vue @@ -168,7 +168,7 @@ const refAddHaocaiTakin = ref(); function refAddHaocaiTakinShow(item: any, type: string) { console.log(item); if (type === "manual-in") { - router.push({ path: "/inventory/libraryrecords", query: { type: type, conId: item.id } }); + router.push({ path: "/inventory/libraryrecords", query: { inOutType: type, conId: item.id } }); return; } if (type === "delete") { @@ -222,7 +222,7 @@ function handleToolbarClick(name: string) { return; } if (name == "damage-out" || name == "manual-out" || name == "manual-in") { - router.push({ path: "/inventory/libraryrecords", query: { type: name } }); + router.push({ path: "/inventory/libraryrecords", query: { inOutType: name } }); return; } } diff --git a/src/views/inventory/libraryrecords/config/content.ts b/src/views/inventory/libraryrecords/config/content.ts index 631a6d1..0421146 100644 --- a/src/views/inventory/libraryrecords/config/content.ts +++ b/src/views/inventory/libraryrecords/config/content.ts @@ -1,6 +1,5 @@ import Api from "@/api/product/libraryrecords"; import type { IContentConfig } from "@/components/CURD/types"; -import { log } from "console"; const contentConfig: IContentConfig = { pageName: "sys:user", @@ -15,7 +14,6 @@ const contentConfig: IContentConfig = { pageSizes: [10, 20, 30, 50], }, indexAction: function (params) { - console.log("params", params); return Api.getList(params); }, deleteAction: function (id) { @@ -56,6 +54,23 @@ const contentConfig: IContentConfig = { align: "center", prop: "unitName", }, + { + label: "所属商品", + align: "center", + prop: "unitName", + }, + { + label: "供应商", + align: "center", + prop: "unitName", + }, + { + label: "变动原因", + align: "center", + prop: "inOutItem", + template: "custom", + slotName: "inOutItem", + }, { label: "变动前的库存", align: "center", diff --git a/src/views/inventory/libraryrecords/config/search.ts b/src/views/inventory/libraryrecords/config/search.ts index c7ee7d0..1951152 100644 --- a/src/views/inventory/libraryrecords/config/search.ts +++ b/src/views/inventory/libraryrecords/config/search.ts @@ -36,7 +36,6 @@ const searchConfig: ISearchConfig = { width: "200px", }, }, - initialValue: "", options: [ { label: "入库记录", @@ -51,6 +50,7 @@ const searchConfig: ISearchConfig = { value: "damage-out", }, ], + initialValue: "", }, ], }; diff --git a/src/views/inventory/libraryrecords/index.vue b/src/views/inventory/libraryrecords/index.vue index a0e1b28..d394354 100644 --- a/src/views/inventory/libraryrecords/index.vue +++ b/src/views/inventory/libraryrecords/index.vue @@ -19,6 +19,14 @@ @operat-click="handleOperatClick" @filter-change="handleFilterChange" > +