| | |
| | | <el-button |
| | | class="save-btn" |
| | | color="#4C34FF" |
| | | |
| | | |
| | | |
| | | @click="rejectTheApplication" |
| | | > |
| | |
| | | |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <!-- 拒绝申请弹框 --> |
| | | <reasonForRejectionDialog |
| | | v-if="rejectionDialogVisible" |
| | | v-model="rejectionDialogVisible" |
| | | @confirm="handleRejectionConfirm" |
| | | /> |
| | | </template> |
| | | |
| | | <script setup> |
| | |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | import { gdSupplyDemandDetailApi, putFileAttachApi,gdSupplyDemandAuditPassApi,gdSupplyDemandAuditRejectApi } from '@/views/orderView/orderDataManage/supplyAdd/supplyAddApi' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import reasonForRejectionDialog from './reasonForRejectionDialog.vue' |
| | | |
| | | const dictObj = inject('dictObj') |
| | | const deptTree = inject('deptTree') |
| | | |
| | | const demandId = ref('') |
| | | const visible = defineModel() // 弹框显隐 |
| | | const formData = ref({}) // 表单数据 |
| | | const uploadRef = ref() // 上传组件引用 |
| | |
| | | const uploadedFiles = ref([]) // 已上传文件列表 |
| | | const uploadLoading = ref(false) // 上传加载状态 |
| | | const responseData = ref([]) |
| | | // 拒绝申请弹框控制 |
| | | const rejectionDialogVisible = ref(false) // 拒绝申请弹框显隐 |
| | | // 步骤条数据 |
| | | const steps = ref([ |
| | | { title: '需求申请', person: '张三', time: '2025-03-31 12:23:30' }, |
| | |
| | | async function open({ row }) { |
| | | if (row?.id) { |
| | | await loadDetail(row.id) |
| | | // 可以在这里加载已上传的文件列表 |
| | | // loadUploadedFiles(row.id) |
| | | demandId.value = row.id |
| | | console.log('row.id',demandId.value); |
| | | |
| | | } |
| | | visible.value = true |
| | | } |
| | |
| | | if(responseData.value.length === 0){ |
| | | return ElMessage.warning('请上传数据') |
| | | } |
| | | // 打开拒绝申请弹框 |
| | | rejectionDialogVisible.value = true |
| | | } |
| | | |
| | | // 处理拒绝申请确认 |
| | | const handleRejectionConfirm = (reason) => { |
| | | const id = [responseData.value.attachId] |
| | | console.log('responseData.value',responseData.value) |
| | | gdSupplyDemandAuditRejectApi({ attachIds:id }).then(() => { |
| | | console.log('demandId.value',demandId.value); |
| | | |
| | | gdSupplyDemandAuditRejectApi({ attachIds: id, auditOpinion: reason ,demandId:'2013137230848598018'}).then(() => { |
| | | ElMessage.success('拒绝申请成功') |
| | | visible.value = false |
| | | }).catch(error => { |
| | | console.error('拒绝申请失败:', error) |
| | | ElMessage.error('拒绝申请失败,请重试') |
| | | }) |
| | | } |
| | | // 审核通过 |