From 5864db37d8dd9e82f88bd0c7b426bce134337f1b Mon Sep 17 00:00:00 2001 From: WUSIJIAN <13825895+wsj0228@user.noreply.gitee.com> Date: Thu, 29 Jan 2026 11:20:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=93=E5=BA=93=E5=92=8C?= =?UTF-8?q?=E5=BA=93=E5=8C=BA=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD,?= =?UTF-8?q?=E5=B0=86=E7=8A=B6=E6=80=81=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=BB=8Enumber=E6=94=B9=E4=B8=BAstring,=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E8=A1=A8=E5=8D=95=E4=B8=AD=E7=9A=84=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E9=80=89=E6=8B=A9=E9=A1=B9,=E5=9C=A8=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2=E5=B0=86=E7=8A=B6=E6=80=81=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E6=94=B9=E4=B8=BA=E5=BC=80=E5=85=B3=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=9B=B4=E6=8E=A5=E5=88=87=E6=8D=A2=E7=8A=B6?= =?UTF-8?q?=E6=80=81,=E6=96=B0=E5=A2=9EupdateWarehouseStatus=E5=92=8Cupdat?= =?UTF-8?q?eZoneStatus=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BA=8E=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E6=9B=B4=E6=96=B0=E7=8A=B6=E6=80=81,=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E5=9C=A8=E6=93=8D=E4=BD=9C=E5=88=97=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=8C=89=E9=92=AE=E5=B9=B6=E9=9B=86=E6=88=90?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E5=AF=B9=E8=AF=9D=E6=A1=86?= =?UTF-8?q?=E7=BB=84=E4=BB=B6,=E5=9C=A8=E5=88=97=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E5=88=97?= =?UTF-8?q?,=E4=BC=98=E5=8C=96=E6=9F=A5=E8=AF=A2=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=B0=86name=E6=94=B9=E4=B8=BAkeyword=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=AD=97=E6=AE=B5=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/assets/location/index.ts | 77 +++++ src/api/assets/warehouse/index.ts | 15 +- src/api/assets/zone/index.ts | 11 +- .../location/component/editLocation.vue | 221 ++++++++++++++ src/views/assets/location/index.vue | 273 ++++++++++++++++++ .../warehouse/component/editWarehouse.vue | 16 +- src/views/assets/warehouse/index.vue | 54 +++- src/views/assets/zone/component/editZone.vue | 12 - src/views/assets/zone/index.vue | 54 +++- 9 files changed, 683 insertions(+), 50 deletions(-) create mode 100644 src/api/assets/location/index.ts create mode 100644 src/views/assets/location/component/editLocation.vue create mode 100644 src/views/assets/location/index.vue diff --git a/src/api/assets/location/index.ts b/src/api/assets/location/index.ts new file mode 100644 index 0000000..49c8840 --- /dev/null +++ b/src/api/assets/location/index.ts @@ -0,0 +1,77 @@ +import { newService } from '/@/utils/request'; + +// 库位查询参数 +export interface LocationQueryParams { + keyword?: string; + warehouseId?: string; + zoneId?: string; + status?: string; + pageNum?: number; + pageSize?: number; +} + +// 库位数据接口 +export interface LocationData { + id?: string; + locationName: string; + locationCode?: string; + locationType?: string; + warehouseId?: string; + zoneId: string; + maxCapacity?: number; + remark?: string; +} + +// 获取库位列表 +export function listLocations(params?: LocationQueryParams) { + return newService({ + url: '/assets/location/listLocations', + method: 'get', + params, + }); +} + +// 获取库位详情 +export function getLocation(id: string) { + return newService({ + url: '/assets/location/getLocation', + method: 'get', + params: { id }, + }); +} + +// 创建库位 +export function createLocation(data: LocationData) { + return newService({ + url: '/assets/location/createLocation', + method: 'post', + data, + }); +} + +// 更新库位 +export function updateLocation(data: LocationData) { + return newService({ + url: '/assets/location/updateLocation', + method: 'put', + data, + }); +} + +// 删除库位 +export function deleteLocation(id: string) { + return newService({ + url: '/assets/location/deleteLocation', + method: 'delete', + params: { id }, + }); +} + +// 更新库位状态 +export function updateLocationStatus(data: { id: string[]; status: string }) { + return newService({ + url: '/assets/location/updateLocationStatus', + method: 'put', + data, + }); +} diff --git a/src/api/assets/warehouse/index.ts b/src/api/assets/warehouse/index.ts index 34f58bf..361a1ec 100644 --- a/src/api/assets/warehouse/index.ts +++ b/src/api/assets/warehouse/index.ts @@ -2,8 +2,8 @@ import { newService } from '/@/utils/request'; // 仓库查询参数 export interface WarehouseQueryParams { - name?: string; - status?: number; + keyword?: string; + status?: string; pageNum?: number; pageSize?: number; } @@ -16,7 +16,7 @@ export interface WarehouseData { address?: string; contactPerson?: string; contactPhone?: string; - status?: number; + status?: string; remark?: string; } @@ -64,3 +64,12 @@ export function deleteWarehouse(id: string) { params: { id }, }); } + +// 更新仓库状态 +export function updateWarehouseStatus(data: { id: string[]; status: string }) { + return newService({ + url: '/assets/warehouse/updateWarehouseStatus', + method: 'put', + data, + }); +} diff --git a/src/api/assets/zone/index.ts b/src/api/assets/zone/index.ts index d7416de..b7f5c7f 100644 --- a/src/api/assets/zone/index.ts +++ b/src/api/assets/zone/index.ts @@ -17,7 +17,7 @@ export interface ZoneData { zoneType?: string; warehouseId: string; capacity?: number; - status?: number; + status?: string; remark?: string; } @@ -65,3 +65,12 @@ export function deleteZone(id: string) { params: { id }, }); } + +// 更新库区状态 +export function updateZoneStatus(data: { id: string[]; status: string }) { + return newService({ + url: '/assets/zone/updateZoneStatus', + method: 'put', + data, + }); +} diff --git a/src/views/assets/location/component/editLocation.vue b/src/views/assets/location/component/editLocation.vue new file mode 100644 index 0000000..8679bfc --- /dev/null +++ b/src/views/assets/location/component/editLocation.vue @@ -0,0 +1,221 @@ + + + + + + + diff --git a/src/views/assets/location/index.vue b/src/views/assets/location/index.vue new file mode 100644 index 0000000..7c91642 --- /dev/null +++ b/src/views/assets/location/index.vue @@ -0,0 +1,273 @@ + + + + + + + diff --git a/src/views/assets/warehouse/component/editWarehouse.vue b/src/views/assets/warehouse/component/editWarehouse.vue index 8fdfcbb..be9c040 100644 --- a/src/views/assets/warehouse/component/editWarehouse.vue +++ b/src/views/assets/warehouse/component/editWarehouse.vue @@ -38,17 +38,7 @@ - - - - - 启用 - 禁用 - - - - - + @@ -96,7 +86,6 @@ const ruleForm = reactive({ address: '', contactPerson: '', contactPhone: '', - status: 1, remark: '', }); @@ -113,7 +102,6 @@ const resetForm = () => { ruleForm.address = ''; ruleForm.contactPerson = ''; ruleForm.contactPhone = ''; - ruleForm.status = 1; ruleForm.remark = ''; }; @@ -132,7 +120,6 @@ const openDialog = async (row?: any) => { ruleForm.address = data.address || ''; ruleForm.contactPerson = data.contactPerson || ''; ruleForm.contactPhone = data.contactPhone || ''; - ruleForm.status = (data.status === '1' || data.status === 1 || data.status === true) ? 1 : 0; ruleForm.remark = data.remark || ''; } catch (error) { console.error('获取仓库详情失败:', error); @@ -164,7 +151,6 @@ const onSubmit = async () => { address: ruleForm.address, contactPerson: ruleForm.contactPerson, contactPhone: ruleForm.contactPhone, - status: ruleForm.status, remark: ruleForm.remark, }; diff --git a/src/views/assets/warehouse/index.vue b/src/views/assets/warehouse/index.vue index 31007cd..84f69b0 100644 --- a/src/views/assets/warehouse/index.vue +++ b/src/views/assets/warehouse/index.vue @@ -9,8 +9,8 @@ - - + + @@ -36,17 +36,23 @@ - + - + + @@ -66,6 +72,7 @@ + @@ -78,8 +85,9 @@ export default {