|
|
|
|
@ -397,6 +397,7 @@ const submitFormRef = ref()
|
|
|
|
|
const submitFormData = reactive({
|
|
|
|
|
id: '',
|
|
|
|
|
auditUserId: '',
|
|
|
|
|
status: '',
|
|
|
|
|
remark: ''
|
|
|
|
|
})
|
|
|
|
|
const submitFormRules = computed(() => isAuditDisabled.value ? {} : {
|
|
|
|
|
@ -485,6 +486,7 @@ const handleDelete = async (ids: number[]) => {
|
|
|
|
|
const openSubmitDialog = (row: StockOutVO) => {
|
|
|
|
|
submitFormData.id = String(row.id)
|
|
|
|
|
submitFormData.auditUserId = ''
|
|
|
|
|
submitFormData.status = String(row.status)
|
|
|
|
|
submitFormData.remark = ''
|
|
|
|
|
submitDialogVisible.value = true
|
|
|
|
|
nextTick(() => submitFormRef.value?.clearValidate?.())
|
|
|
|
|
@ -503,8 +505,17 @@ const handleSubmitStockOut = async () => {
|
|
|
|
|
if (!isAuditDisabled.value) {
|
|
|
|
|
data.auditUserId = submitFormData.auditUserId
|
|
|
|
|
}
|
|
|
|
|
await StockOutApi.submitStockOut(data as { id: string; auditUserId: string; remark?: string })
|
|
|
|
|
message.success(t('ErpStock.Out.submitSuccess'))
|
|
|
|
|
if (isAuditDisabled.value && submitFormData.status === '1') {
|
|
|
|
|
await StockOutApi.auditStockOut({
|
|
|
|
|
id: submitFormData.id,
|
|
|
|
|
status: '20',
|
|
|
|
|
remark: submitFormData.remark
|
|
|
|
|
})
|
|
|
|
|
message.success(t('ErpStock.Out.auditApproveSuccess'))
|
|
|
|
|
} else {
|
|
|
|
|
await StockOutApi.submitStockOut(data as { id: string; auditUserId: string; remark?: string })
|
|
|
|
|
message.success(t('ErpStock.Out.submitSuccess'))
|
|
|
|
|
}
|
|
|
|
|
submitDialogVisible.value = false
|
|
|
|
|
await getList()
|
|
|
|
|
} finally {
|
|
|
|
|
|