From 0b81b8355e49edfa0d0b8b804980d32aa6f4e0c0 Mon Sep 17 00:00:00 2001 From: wwz <1144797966@qq.com> Date: Wed, 9 Apr 2025 16:26:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=95=B0=E6=8D=AE=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/notifications/index.ts | 4 +- src/api/product/libraryrecords.ts | 68 +++++++++---------- src/views/inventory/consumables/index.vue | 4 +- .../libraryrecords/config/content.ts | 5 +- .../inventory/libraryrecords/config/search.ts | 4 +- src/views/inventory/libraryrecords/index.vue | 40 ++++------- src/views/inventory/operation_in/index.vue | 6 +- src/views/notifications/config/content.ts | 22 +++--- src/views/notifications/index.vue | 64 +++++++++-------- 9 files changed, 108 insertions(+), 109 deletions(-) diff --git a/src/api/notifications/index.ts b/src/api/notifications/index.ts index f8e9601..823c684 100644 --- a/src/api/notifications/index.ts +++ b/src/api/notifications/index.ts @@ -34,7 +34,7 @@ const Api = { }, edit(data: any) { return request({ - url: `${baseURL}`, + url: `${baseURL}/read`, method: "put", data, }); @@ -42,7 +42,7 @@ const Api = { delete(id: string | number) { return request({ - url: `${baseURL}/` + id, + url: `${baseURL}/syncNotice/` + id, method: "delete", }); }, diff --git a/src/api/product/libraryrecords.ts b/src/api/product/libraryrecords.ts index cb3516f..fda0371 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 b241cf1..edcde80 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: { inOutType: type, conId: item.id } }); + router.push({ path: "/inventory/libraryrecords", query: { inOutItem: 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: { inOutType: name } }); + router.push({ path: "/inventory/libraryrecords", query: { inOutItem: name } }); return; } } diff --git a/src/views/inventory/libraryrecords/config/content.ts b/src/views/inventory/libraryrecords/config/content.ts index 0421146..2f4043b 100644 --- a/src/views/inventory/libraryrecords/config/content.ts +++ b/src/views/inventory/libraryrecords/config/content.ts @@ -67,9 +67,8 @@ const contentConfig: IContentConfig = { { label: "变动原因", align: "center", - prop: "inOutItem", - template: "custom", - slotName: "inOutItem", + templet: "custom", + slotName: "conUnit", }, { label: "变动前的库存", diff --git a/src/views/inventory/libraryrecords/config/search.ts b/src/views/inventory/libraryrecords/config/search.ts index 1951152..cab852b 100644 --- a/src/views/inventory/libraryrecords/config/search.ts +++ b/src/views/inventory/libraryrecords/config/search.ts @@ -6,7 +6,7 @@ const searchConfig: ISearchConfig = { { type: "select", label: "类型", - prop: "inOutItem", + prop: "inOutType", attrs: { placeholder: "请选择", clearable: true, @@ -28,7 +28,7 @@ const searchConfig: ISearchConfig = { { type: "select", label: "名目", - prop: "inOutType", + prop: "inOutItem", attrs: { placeholder: "请选择", clearable: true, diff --git a/src/views/inventory/libraryrecords/index.vue b/src/views/inventory/libraryrecords/index.vue index d394354..5696f0e 100644 --- a/src/views/inventory/libraryrecords/index.vue +++ b/src/views/inventory/libraryrecords/index.vue @@ -19,29 +19,13 @@ @operat-click="handleOperatClick" @filter-change="handleFilterChange" > - - - -