| | |
| | | <template> |
| | | <!-- 文件变更申请 --> |
| | | <div class="file-change-request" style="height: 100%;"> |
| | | <div class="file-change-request"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">申请文件编号:</div> |
| | |
| | | :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :title="title" :visible.sync="addDialogVisible" top="0vh" width="950px"> |
| | | <div v-loading="diaLoading"> |
| | | <el-row> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | |
| | | </el-select></div> |
| | | </div> |
| | | </el-col> |
| | | <!-- <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">审核人:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="addInfo.version" disabled></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">作废人:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="addInfo.version" disabled></el-input></div> |
| | | </div> |
| | | </el-col> --> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">提交时间:</div> |
| | |
| | | size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <!-- <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">作废时间:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="addInfo.version" disabled></el-input></div> |
| | | </div> |
| | | </el-col> --> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">文件状态:</div> |
| | |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <!-- <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">文件说明:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="addInfo.instructions" type="textarea" |
| | | :rows="2" disabled></el-input></div> |
| | | </div> |
| | | </el-col> --> |
| | | <el-col :span="24"> |
| | | <h4 class="title">文件变更申请</h4> |
| | | </el-col> |
| | |
| | | <UpPdfStamp v-if="title == '审核' && addDialogVisible" ref="UpPdfStamp" :isUpFile="false" @uploadPDF="uploadPDF"> |
| | | </UpPdfStamp> |
| | | </el-row> |
| | | </div> |
| | | <span v-if="title != '审核'" slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">取 消</el-button> |
| | | <el-button :loading="addLoading" type="primary" @click="handleAdd">确 定</el-button> |
| | |
| | | noCheckLoading: false, |
| | | checkLoading: false, |
| | | addDialogVisible: false, |
| | | diaLoading: false, |
| | | addInfo: {}, |
| | | addPower: false, |
| | | outPower: false, |
| | |
| | | let alterBeforeCode = this.addInfo.alterBeforeCode |
| | | this.getCurrentFile(alterBeforeCode) |
| | | this.addDialogVisible = true |
| | | this.diaLoading = true |
| | | checkManageDocumentAlterPdf({ id: row.id }).then(res => { |
| | | // |
| | | this.diaLoading = false |
| | | const blob = new Blob([res]); |
| | | const file = new File([blob], row.name, { type: 'application/pdf' }) |
| | | this.$refs.UpPdfStamp.lookFile(file) |
| | | this.currentInfo = row |
| | | }).catch(err => { |
| | | this.diaLoading = false |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | // 审核保存 |
| | | async uploadPDF(pdfBlob) { |
| | | uploadPDF(pdfBlob) { |
| | | const file = new File([pdfBlob], this.fileName, { type: 'application/pdf' }) |
| | | console.log('file---', file) |
| | | const formData = new FormData(); |
| | | formData.append('file', pdfBlob, this.fileName + '.pdf'); // 文件字段 |
| | | formData.append('file', file, this.fileName + '.pdf'); // 文件字段 |
| | | formData.append('id', this.currentInfo.id); // 文件名字段 |
| | | formData.append('state', this.type); // 文件名字段 |
| | | |
| | | let res = await checkManageDocumentAlter(formData) |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code == 200) { |
| | | checkManageDocumentAlter(formData).then(res => { |
| | | this.$message({ message: '操作成功', type: 'success' }); |
| | | this.addDialogVisible = false; |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | this.refreshTable() |
| | | return true |
| | | } else { |
| | | this.$message({ message: '操作失败', type: 'error' }); |
| | | }).catch(err => { |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | // 提交审核 |
| | | handleCheckSub(type) { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>> .el-dialog__body { |
| | | max-height: 75vh; |
| | | overflow-y: auto; |
| | | } |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |