| | |
| | | </div> |
| | | <template #footer> |
| | | <template v-if="detailDemandStatus === '1' && !requesterProvider"> |
| | | <el-button color="#F2F3F5" @click="rejectTheApplication">拒绝申请</el-button> |
| | | <el-button class="" color="#4C34FF" @click="approvedByTheReview">审核通过</el-button> |
| | | <el-button color="#F2F3F5" :loading="submitting" :disabled="submitting" @click="rejectTheApplication">拒绝申请</el-button> |
| | | <el-button class="" color="#4C34FF" :loading="submitting" :disabled="submitting" @click="approvedByTheReview">审核通过</el-button> |
| | | </template> |
| | | <template v-if="detailDemandStatus === '2'"> |
| | | <el-button class="" color="#4C34FF" @click="downloadAllFiles">全部下载</el-button> |
| | |
| | | const fileList = ref([]) // 上传文件列表 |
| | | const uploadedFiles = ref([]) // 已上传文件列表 |
| | | const responseData = ref(null) |
| | | const submitting = ref(false) // 提交中状态 |
| | | // 自定义上传请求函数 |
| | | const handleHttpRequest = async (options) => { |
| | | try { |
| | |
| | | // 从 uploadedFiles.value 中提取所有 attachId |
| | | const id = uploadedFiles.value.map(file => file.attachId) |
| | | |
| | | submitting.value = true |
| | | gdSupplyDemandAuditRejectApi({ attachIds: id, auditOpinion: reason, demandId: demandId.value }) |
| | | .then(() => { |
| | | ElMessage.success('拒绝申请成功') |
| | |
| | | ElMessage.error('拒绝申请失败,请重试') |
| | | emit('success') |
| | | }) |
| | | .finally(() => { |
| | | submitting.value = false |
| | | }) |
| | | } |
| | | // 审核通过 |
| | | const approvedByTheReview = () => { |
| | |
| | | } |
| | | // 从 uploadedFiles.value 中提取所有 attachId |
| | | const id = uploadedFiles.value.map(file => file.attachId) |
| | | gdSupplyDemandAuditPassApi({ attachIds: id, demandId: demandId.value }).then(() => { |
| | | submitting.value = true |
| | | gdSupplyDemandAuditPassApi({ attachIds: id, demandId: demandId.value }) |
| | | .then(() => { |
| | | ElMessage.success('审核通过成功') |
| | | visible.value = false |
| | | emit('success') |
| | | }) |
| | | .finally(() => { |
| | | submitting.value = false |
| | | }) |
| | | } |
| | | |
| | | defineExpose({ open }) |