parent
a94e55b533
commit
e26a40fe0e
|
|
@ -224,7 +224,14 @@ const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
const dialogTitle = computed(() => {
|
||||||
|
const titles = {
|
||||||
|
create: '添加出货检验单',
|
||||||
|
update: '修改出货检验单',
|
||||||
|
detail: '查看出货检验单信息'
|
||||||
|
}
|
||||||
|
return titles[formType.value] || formType.value
|
||||||
|
}) // 弹窗标题,根据 formType 自动显示
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const activeTab = ref('line') // 当前激活的标签页
|
const activeTab = ref('line') // 当前激活的标签页
|
||||||
|
|
@ -280,7 +287,6 @@ const generateCode = () => {
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
dialogTitle.value = t('action.' + type)
|
|
||||||
formType.value = type
|
formType.value = type
|
||||||
activeTab.value = 'line'
|
activeTab.value = 'line'
|
||||||
resetForm()
|
resetForm()
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@ const formRules = reactive({
|
||||||
})
|
})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
|
// TODO @AI:formType 还是使用 stock,而不是 shelving;
|
||||||
const isUpdate = computed(() => ['create', 'update'].includes(formType.value)) // 是否为编辑模式
|
const isUpdate = computed(() => ['create', 'update'].includes(formType.value)) // 是否为编辑模式
|
||||||
const isStock = computed(() => formType.value === 'shelving') // 是否为上架模式
|
const isStock = computed(() => formType.value === 'shelving') // 是否为上架模式
|
||||||
const isHeaderReadonly = computed(() => ['shelving', 'detail'].includes(formType.value)) // 是否只读
|
const isHeaderReadonly = computed(() => ['shelving', 'detail'].includes(formType.value)) // 是否只读
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,7 @@ const handleNoticeLineChange = (line: any) => {
|
||||||
/** 打开表单弹窗 */
|
/** 打开表单弹窗 */
|
||||||
const openForm = async (type: string, id?: number) => {
|
const openForm = async (type: string, id?: number) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
dialogTitle.value = t('action.' + type)
|
dialogTitle.value = type === 'create' ? '添加物料入库单行' : '修改物料入库单行'
|
||||||
lineFormType.value = type
|
lineFormType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
if (id) {
|
if (id) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue