上传
This commit is contained in:
@@ -99,6 +99,8 @@ import * as WarehouseApi from '@/api/mall/warehouse'
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const emit = defineEmits(['success'])
|
||||
|
||||
const props = defineProps({
|
||||
opts: {
|
||||
type: Object,
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<el-col :span="24" :offset="0">
|
||||
<el-form-item label="审核" prop="isPass">
|
||||
<el-radio-group v-model="form.isPass">
|
||||
<el-radio :label="2">通过</el-radio>
|
||||
<el-radio :label="3">驳回</el-radio>
|
||||
<el-radio :label="true">通过</el-radio>
|
||||
<el-radio :label="false">驳回</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -23,13 +23,15 @@
|
||||
<template #footer>
|
||||
<span>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">保 存</el-button>
|
||||
<el-button :disabled="formLoading" type="primary" @click="handleSave">保 存</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup name="DialogAuditPurchase">
|
||||
import { auditPurchase } from '@/api/mall/purchase'
|
||||
const message = useMessage() // 消息弹窗
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
|
||||
const form = ref({})
|
||||
@@ -65,7 +67,7 @@ const open = (val, flag) => {
|
||||
]
|
||||
schema.value = [...schema.value, ...arr]
|
||||
} else {
|
||||
form.value.isPass = 2
|
||||
form.value.isPass = true
|
||||
form.value.auditRemark = ''
|
||||
}
|
||||
}
|
||||
@@ -119,8 +121,19 @@ const resetSchema = () => {
|
||||
]
|
||||
}
|
||||
|
||||
function handleSave() {
|
||||
console.log('保存')
|
||||
const formLoading = ref(false)
|
||||
const emit = defineEmits(['getList'])
|
||||
async function handleSave() {
|
||||
try {
|
||||
formLoading.value = true
|
||||
await auditPurchase(form.value)
|
||||
message.success('审核完成')
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('getList')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user