| | |
| | | </el-row> |
| | | </div> |
| | | <!-- 申请中--> |
| | | <div v-if="detailDemandStatus === '1'"> |
| | | <div v-if="detailDemandStatus === '1' && !requesterProvider"> |
| | | <div class="detail-title">数据上传</div> |
| | | <div class="upload-container"> |
| | | <el-upload |
| | |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <template v-if="detailDemandStatus === '1'"> |
| | | <el-button class="save-btn" color="#4C34FF" @click="rejectTheApplication">拒绝申请</el-button> |
| | | <el-button color="#F2F3F5" @click="approvedByTheReview">审核通过</el-button> |
| | | <template v-if="detailDemandStatus === '1' && !requesterProvider"> |
| | | <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="save-btn" color="#4C34FF" @click="downloadAllFiles">全部下载</el-button> |
| | | <el-button class="" color="#4C34FF" @click="downloadAllFiles">全部下载</el-button> |
| | | </template> |
| | | <template v-if="detailDemandStatus === '3'"> |
| | | <el-button class="save-btn" color="#4C34FF" @click="visible =false">关闭</el-button> |
| | | <el-button class="" color="#4C34FF" @click="visible =false">关闭</el-button> |
| | | </template> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | import { ElMessage } from 'element-plus' |
| | | import reasonForRejectionDialog from '@/views/orderView/orderDataManage/supplyAdd/reasonForRejectionDialog.vue' |
| | | import AuditRecord from '@/views/orderView/orderDataManage/supplyAdd/auditRecord.vue' // 导入新组件 |
| | | |
| | | import { useStore } from 'vuex' |
| | | const store = useStore() |
| | | const requesterProvider = computed(() => store.state.user.userInfo?.role_id === '2014158512610869250') |
| | | const emit = defineEmits(['success']) |
| | | const dictObj = inject('dictObj') |
| | | const deptTree = inject('deptTree') |
| | |
| | | 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(() => { |
| | | ElMessage.success('审核通过成功') |
| | | visible.value = false |
| | | emit('success') |
| | | }) |
| | | submitting.value = true |
| | | gdSupplyDemandAuditPassApi({ attachIds: id, demandId: demandId.value }) |
| | | .then(() => { |
| | | ElMessage.success('审核通过成功') |
| | | visible.value = false |
| | | emit('success') |
| | | }) |
| | | .finally(() => { |
| | | submitting.value = false |
| | | }) |
| | | } |
| | | |
| | | defineExpose({ open }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .detail-container { |
| | | padding: 20px; |
| | | display: flex; |
| | | gap: 30px; |
| | | align-items: stretch; |
| | | } |
| | | |
| | | /* 左侧步骤条 */ |
| | | .detail-left { |
| | | width: 25%; |
| | | width: 35%; |
| | | padding-right: 20px; |
| | | border-right: 1px solid #e8e8e8; |
| | | } |
| | | |
| | | /* 右侧表单 */ |
| | | .detail-right { |
| | | width: 75%; |
| | | width: 65%; |
| | | .reject-reason { |
| | | margin-bottom: 20px; |
| | | background: #f2f3f5; |