ERP:增加入库单的审批功能

This commit is contained in:
YunaiV
2024-02-06 23:28:48 +08:00
parent 5bdf0fc0ff
commit 115c30ea40
4 changed files with 107 additions and 23 deletions

View File

@ -6,6 +6,7 @@
:rules="formRules"
label-width="100px"
v-loading="formLoading"
:disabled="disabled"
>
<el-row :gutter="20">
<!-- TODO 芋艿待接入 -->
@ -63,12 +64,14 @@
<ContentWrap>
<el-tabs v-model="subTabsName" class="-mt-15px -mb-10px">
<el-tab-pane label="入库产品清单" name="stockInItem">
<StockInItemForm ref="stockInItemFormRef" :items="formData.items" />
<StockInItemForm ref="stockInItemFormRef" :items="formData.items" :disabled="disabled" />
</el-tab-pane>
</el-tabs>
</ContentWrap>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="submitForm" type="primary" :disabled="formLoading" v-if="!disabled">
</el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
@ -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<SupplierVO[]>([]) // 供应商列表