From 56686dc243e5cdf7ea2ad4d382e4e0144d0f59d5 Mon Sep 17 00:00:00 2001 From: Amjacks <1932302177@qq.com> Date: Fri, 21 Mar 2025 08:52:08 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat=20=E5=BA=93=E4=BD=8D=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/basics/storage/index.ts | 33 +++ .../flatWarehouse/wareHouseLocation/index.vue | 201 ++++++++++++++++-- 2 files changed, 221 insertions(+), 13 deletions(-) diff --git a/src/api/basics/storage/index.ts b/src/api/basics/storage/index.ts index fd235bb..4c3c68f 100644 --- a/src/api/basics/storage/index.ts +++ b/src/api/basics/storage/index.ts @@ -31,3 +31,36 @@ export function deleteStorage(data: any) { data: data, }); } + +/** + * 货位新增 + * */ +export function createStorage(data: any) { + return request({ + url: '/api/api/storage/addStorage', + method: 'post', + data: data, + }); +} + +/** + * 货位编辑 + * */ +export function editStorage(data: any) { + return request({ + url: '/api/api/storage/editStorage', + method: 'post', + data: data, + }); +} + +/** + * 货位删除 + * */ +export function delStorage(data: any) { + return request({ + url: '/api/api/storage/delStorage', + method: 'post', + data: data, + }); +} \ No newline at end of file diff --git a/src/views/basics/flatWarehouse/wareHouseLocation/index.vue b/src/views/basics/flatWarehouse/wareHouseLocation/index.vue index 18e026d..8b3b0ea 100644 --- a/src/views/basics/flatWarehouse/wareHouseLocation/index.vue +++ b/src/views/basics/flatWarehouse/wareHouseLocation/index.vue @@ -20,20 +20,20 @@ clearable /> --> - + - + - + @@ -54,6 +54,12 @@
+ + + + + 创建 + + + + +
+ + + + + + + + + + + + + +/** + * 新增货位 dialog + */ +function handleAdd() { + selectItem.value = undefined; + dialog.value = { + title: "新增货位", + visible: true, + type: 'add' + }; +} + +/** + * 编辑货位 dialog + */ +function handleUpdate(row: any) { + state.dialog = { + title: "编辑货位", + visible: true, + type: 'edit' + }; + state.selectItem = row; +} + +// 删除确认 +function delConfirm(row: any) { + ElMessageBox.confirm('确认删除?', + '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + distinguishCancelAndClose: true, + type: 'warning', + }).then(() => { + handleDelete(row); + }) + .catch(() => { }); +} + +function dialogOpend() { + formDataRef.value.resetFields(); + state.formData.STORAGENAME = '' + state.formData.DESCRIPTION = '' + if (state.selectItem && state.dialog.type === 'edit') { + state.formData = { + STORAGENAME: state.selectItem.STORAGENAME, + DESCRIPTION: state.selectItem.DESCRIPTION + }; + } +} +// ERP工厂查询 +function ERPFactoryQuery() { + getORG({ orgNo: null }) + .then((res: any) => { + state.ERPFactoryList = res.resultObj + }) + .catch(() => {}) +} +/** + * 取消关闭弹窗 + */ +function cancel() { + state.dialog.visible = false; +} +/** + * 保存 + */ +function submitForm() { + formDataRef.value.validate((isValid: boolean) => { + if (isValid) { + if (state.selectItem) { + // 编辑 + let params = { + ...state.formData, + SITENAME: 'SDK' + }; + editStorage(params).then((res: any) => { + if (res.code === "0") { + proxy.$ElMessage.success("修改成功"); + cancel(); + handleQuery(); + } else { + proxy.$ElMessage.error(res.message); + } + }) + } else { + createStorage(state.formData).then((res: any) => { + if (res.code === "0") { + proxy.$ElMessage.success("新增成功"); + cancel(); + handleQuery(); + } else { + proxy.$ElMessage.error(res.message); + } + }) + } + } + }); +} +/** + * 删除 + * */ +function handleDelete(row: any) { + const params = { + STORAGENAME: row.STORAGENAME, + SITENAME: 'SDK', + }; + delStorage(params).then((res: any) => { + if (res.code === "0") { + proxy.$ElMessage.success("删除成功"); + handleQuery(); + } else { + proxy.$ElMessage.console.error("删除失败"); + } + }); +} + From 4b94c31f91e1761234c46d37147cb53462b7116e Mon Sep 17 00:00:00 2001 From: Amjacks <1932302177@qq.com> Date: Fri, 21 Mar 2025 14:55:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat=20=E6=89=93=E5=8D=B0=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/label/index.ts | 11 +++++ .../flatWarehouse/wareHouseLocation/index.vue | 40 +++++++++++++++++-- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/src/api/label/index.ts b/src/api/label/index.ts index 223680c..d196073 100644 --- a/src/api/label/index.ts +++ b/src/api/label/index.ts @@ -120,4 +120,15 @@ export function checkMaterialPack(data: any) { method: 'post', data: data, }); +} + +/** + * 打印标签 + * */ +export function printStorage(data: any) { + return request({ + url: '/api/api/label/storagePrint', + method: 'post', + data: data, + }); } \ No newline at end of file diff --git a/src/views/basics/flatWarehouse/wareHouseLocation/index.vue b/src/views/basics/flatWarehouse/wareHouseLocation/index.vue index 8b3b0ea..8e74718 100644 --- a/src/views/basics/flatWarehouse/wareHouseLocation/index.vue +++ b/src/views/basics/flatWarehouse/wareHouseLocation/index.vue @@ -93,6 +93,25 @@ + +
+ + + + + + + + + + + + 打印 + + + + +
@@ -119,12 +138,14 @@ export default {