|
|
|
|
@ -169,12 +169,14 @@ import { dateFormatter, getNowDateTime } from '@/utils/formatTime'
|
|
|
|
|
import { StockOutApi, StockOutApproveRecordVO, StockOutVO } from '@/api/erp/stock/out'
|
|
|
|
|
import StockOutItemForm from './components/StockOutItemForm.vue'
|
|
|
|
|
import { getSimpleUserList, type UserVO } from '@/api/system/user'
|
|
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
|
|
|
|
|
|
|
/** ERP 其它入库单 表单 */
|
|
|
|
|
defineOptions({ name: 'StockOutForm' })
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
|
|
const message = useMessage()
|
|
|
|
|
const userStore = useUserStore()
|
|
|
|
|
|
|
|
|
|
const dialogTitle = ref('') // 弹窗的标题
|
|
|
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
|
|
|
@ -259,6 +261,11 @@ const normalizeUserId = (value: any) => {
|
|
|
|
|
if (value === undefined || value === null || value === '') return undefined
|
|
|
|
|
return String(value)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const getCurrentStockUserId = () => {
|
|
|
|
|
const userId = userStore.getUser?.id
|
|
|
|
|
return userId ? String(userId) : undefined
|
|
|
|
|
}
|
|
|
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
|
|
|
|
|
|
|
|
const handleOutTypeChange = () => {
|
|
|
|
|
@ -303,7 +310,7 @@ const resetForm = () => {
|
|
|
|
|
items: [],
|
|
|
|
|
isCode: true,
|
|
|
|
|
no: undefined,
|
|
|
|
|
stockUserId: undefined,
|
|
|
|
|
stockUserId: getCurrentStockUserId(),
|
|
|
|
|
status: undefined
|
|
|
|
|
}
|
|
|
|
|
auditRecordList.value = []
|
|
|
|
|
|