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 @@ /> - + - +