From 115c30ea40b209e64c300d928f5a97e03203aac1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 6 Feb 2024 23:28:48 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ERP=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E7=9A=84=E5=AE=A1=E6=89=B9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/erp/stock/in/index.ts | 20 ++++- src/views/erp/stock/in/StockInForm.vue | 10 ++- .../stock/in/components/StockInItemForm.vue | 24 +++--- src/views/erp/stock/in/index.vue | 76 +++++++++++++++++-- 4 files changed, 107 insertions(+), 23 deletions(-) diff --git a/src/api/erp/stock/in/index.ts b/src/api/erp/stock/in/index.ts index 3c91ab6f..148b64f2 100644 --- a/src/api/erp/stock/in/index.ts +++ b/src/api/erp/stock/in/index.ts @@ -34,9 +34,25 @@ export const StockInApi = { return await request.put({ url: `/erp/stock-in/update`, data }) }, + // 更新其它入库单的状态 + updateStockInStatus: async (id: number, status: number) => { + return await request.put({ + url: `/erp/stock-in/update-status`, + params: { + id, + status + } + }) + }, + // 删除其它入库单 - deleteStockIn: async (id: number) => { - return await request.delete({ url: `/erp/stock-in/delete?id=` + id }) + deleteStockIn: async (ids: number[]) => { + return await request.delete({ + url: `/erp/stock-in/delete`, + params: { + ids: ids.join(',') + } + }) }, // 导出其它入库单 Excel diff --git a/src/views/erp/stock/in/StockInForm.vue b/src/views/erp/stock/in/StockInForm.vue index fc11ea25..38b9ec96 100644 --- a/src/views/erp/stock/in/StockInForm.vue +++ b/src/views/erp/stock/in/StockInForm.vue @@ -6,6 +6,7 @@ :rules="formRules" label-width="100px" v-loading="formLoading" + :disabled="disabled" > @@ -63,12 +64,14 @@ - + @@ -87,7 +90,7 @@ const message = useMessage() // 消息弹窗 const dialogVisible = ref(false) // 弹窗的是否展示 const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 -const formType = ref('') // 表单的类型:create - 新增;update - 修改 +const formType = ref('') // 表单的类型:create - 新增;update - 修改;detail - 详情 const formData = ref({ id: undefined, no: undefined, @@ -101,6 +104,7 @@ const formRules = reactive({ no: [{ required: true, message: '入库单号不能为空', trigger: 'blur' }], inTime: [{ required: true, message: '入库时间不能为空', trigger: 'blur' }] }) +const disabled = computed(() => formType.value === 'detail') const formRef = ref() // 表单 Ref const supplierList = ref([]) // 供应商列表 diff --git a/src/views/erp/stock/in/components/StockInItemForm.vue b/src/views/erp/stock/in/components/StockInItemForm.vue index 8b67d547..74095ca1 100644 --- a/src/views/erp/stock/in/components/StockInItemForm.vue +++ b/src/views/erp/stock/in/components/StockInItemForm.vue @@ -6,6 +6,7 @@ v-loading="formLoading" label-width="0px" :inline-message="true" + :disabled="disabled" > @@ -120,18 +121,18 @@ - + + 添加入库产品 diff --git a/src/views/erp/stock/in/index.vue b/src/views/erp/stock/in/index.vue index cbfe0d81..91a66f23 100644 --- a/src/views/erp/stock/in/index.vue +++ b/src/views/erp/stock/in/index.vue @@ -127,13 +127,29 @@ > 导出 + + 删除 + - + + @@ -146,14 +162,21 @@ /> - + - +