| | |
| | | <template> |
| | | <el-dialog class="gd-dialog" v-model="visible" :title="'查看申请'" @closed="visible = false" destroy-on-close> |
| | | <el-dialog class="gd-dialog" v-model="visible" :title="'查看'" @closed="visible = false" destroy-on-close> |
| | | <div class="detail-container"> |
| | | <!-- 左侧审批记录 --> |
| | | <div class="detail-left"> |
| | |
| | | <div class="detail-right"> |
| | | <!-- 拒绝申请--> |
| | | <div class="reject-reason-container" v-if="detailDemandStatus === '3'"> |
| | | <div class="label">拒绝原因</div> |
| | | <div class="detail-title">拒绝原因</div> |
| | | <div class="reject-reason"> |
| | | {{reasonForRejection}} |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="label">需求详情</div> |
| | | <div class="detail-title">需求详情</div> |
| | | <div class="requirementsDetailsBox"> |
| | | <div class="detail-table"> |
| | | <div class="detail-row"> |
| | |
| | | </div> |
| | | <!-- 申请中--> |
| | | <div v-if="detailDemandStatus === '1'"> |
| | | <div class="label">数据上传</div> |
| | | <div class="detail-title">数据上传</div> |
| | | <div class="upload-container"> |
| | | <el-upload |
| | | :http-request="handleHttpRequest" |
| | |
| | | <el-button type="primary">选择文件</el-button> |
| | | </template> |
| | | <template #tip> |
| | | <div class="el-upload__tip">请上传压缩文件 (.zip/.rar/.7z/.tar/.gz)</div> |
| | | <div class="el-upload__tip">支持上传 (.zip/.rar/.7z/.tar/.gz)格式文件</div> |
| | | </template> |
| | | </el-upload> |
| | | |
| | | <!-- 已上传文件列表 --> |
| | | <!-- <div v-if="uploadedFiles.length > 0" class="uploaded-files">--> |
| | | <!-- <h4>已上传文件:</h4>--> |
| | | <!-- <div v-for="(file, index) in uploadedFiles" :key="index" class="file-item">--> |
| | | <!-- <span>{{ file.originalName }}</span>--> |
| | | <!-- <el-button type="text" @click="viewFile(file)" style="margin-left: 10px">查看</el-button>--> |
| | | <!-- <el-button type="text" @click="downloadFile(file)" style="margin-left: 5px">下载</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | <div v-if="detailDemandStatus === '2'"> |
| | | <div class="label">数据详情</div> |
| | | <el-table :data="tableData" border style="width: 100%"> |
| | | <div class="detail-title">数据详情</div> |
| | | <el-table :data="tableData" style="width: 100%"> |
| | | <el-table-column prop="fileOriginalName" label="文件名称" /> |
| | | <el-table-column prop="fileSize" label="文件大小" /> |
| | | <el-table-column fixed="right" label="操作" min-width="100"> |
| | |
| | | }) |
| | | |
| | | ElMessage.success('文件上传成功!') |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 上传失败处理函数 |
| | |
| | | |
| | | // 拒绝申请 |
| | | const rejectTheApplication = () => { |
| | | if (!responseData.value) { |
| | | if (uploadedFiles.value.length === 0) { |
| | | return ElMessage.warning('请上传数据') |
| | | } |
| | | // 打开拒绝申请弹框 |
| | |
| | | |
| | | // 处理拒绝申请确认 |
| | | const handleRejectionConfirm = reason => { |
| | | const id = [responseData.value.attachId] |
| | | // 从 uploadedFiles.value 中提取所有 attachId |
| | | const id = uploadedFiles.value.map(file => file.attachId) |
| | | |
| | | gdSupplyDemandAuditRejectApi({ attachIds: id, auditOpinion: reason, demandId: demandId.value }) |
| | | .then(() => { |
| | | ElMessage.success('拒绝申请成功') |
| | |
| | | } |
| | | // 审核通过 |
| | | const approvedByTheReview = () => { |
| | | if (!responseData.value) { |
| | | if (uploadedFiles.value.length === 0) { |
| | | return ElMessage.warning('请上传数据') |
| | | } |
| | | const id = [responseData.value.attachId] |
| | | // 从 uploadedFiles.value 中提取所有 attachId |
| | | const id = uploadedFiles.value.map(file => file.attachId) |
| | | gdSupplyDemandAuditPassApi({ attachIds: id, demandId: demandId.value }).then(() => { |
| | | ElMessage.success('审核通过成功') |
| | | visible.value = false |