| | |
| | | <template> |
| | | <!-- 发放回收记录 --> |
| | | <div class="distribution-collection-record" style="height: 100%;"> |
| | | <div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">文件编号:</div> |
| | | <div class="search_input"><el-input v-model="queryParams.documentCode" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"> |
| | | <el-form-item label="文件编号" prop="documentCode"> |
| | | <el-input v-model="queryParams.documentCode" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="文件名称" prop="laboratoryNumber"> |
| | | <el-input v-model="queryParams.name" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="mini" @click="refreshTable">查询</el-button> |
| | | <el-button size="mini" @click="refresh">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">文件名称:</div> |
| | | <div class="search_input"><el-input v-model="queryParams.name" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button> |
| | | </div> |
| | | <div class="btns" style="padding-left: 30px;"> |
| | | <el-button v-if="addPower" size="small" type="primary" |
| | | @click="addDialogVisible = true, addInfo = {}, radio = '发放'">添加发放记录</el-button> |
| | | <div> |
| | | <el-button v-if="addPower" size="small" type="primary" icon="el-icon-plus" |
| | | @click="addDialogVisible = true, addInfo = {}, radio = '发放', file = null">添加发放记录</el-button> |
| | | <el-button v-if="outPower" :loading="outLoading" size="small" type="primary" @click="handleOut">导出</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :title="'添加' + radio + '记录'" :visible.sync="addDialogVisible" top="10vh" width="800px"> |
| | | <el-row> |
| | | <el-row v-if="addDialogVisible"> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>申请编号:</div> |
| | |
| | | <div class="search_thing"> |
| | | <div class="search_label">上传附件:</div> |
| | | <div class="search_input"><el-upload :auto-upload="false" :multiple="false" :on-change="handleChangeUpload" |
| | | accept='.pdf,.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;"> |
| | | accept='.pdf,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;"> |
| | | <el-button size="small" type="primary">上传附件</el-button> |
| | | </el-upload></div> |
| | | </div> |
| | |
| | | prop: "version", |
| | | }, |
| | | { label: "文件状态", prop: "documentState" }, |
| | | { label: "发放编号", prop: "issueUserName" }, |
| | | { label: "发放人", prop: "department" }, |
| | | { label: "发放编号", prop: "issueCode" }, |
| | | { label: "发放人", prop: "issueUserName" }, |
| | | { label: "发放日期", prop: "issueDate" }, |
| | | { label: "回收人", prop: "recycleUserName" }, |
| | | { label: "回收日期", prop: "recycleDate" }, |
| | |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | disabFun: (row, index) => { |
| | | disabled: (row, index) => { |
| | | return row.documentState == '通过' |
| | | } |
| | | }, |
| | |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | disabFun: (row, index) => { |
| | | disabled: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, |
| | |
| | | clickFun: (row) => { |
| | | this.handleCheck(row); |
| | | }, |
| | | disabFun: (row, index) => { |
| | | disabled: (row, index) => { |
| | | return row.receiveUser != this.userId || row.documentState == '通过' |
| | | } |
| | | }, |
| | |
| | | this.selectEnumByCategory() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let out = false |
| | | let del = false |
| | | let add = false |
| | | // let check = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'exportManageDocumentIssueRecycle') { |
| | | out = true |
| | | } |
| | | if (power[i].menuMethod == 'addManageDocumentIssueRecycle') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageDocumentIssueRecycle') { |
| | | del = true |
| | | } |
| | | // if (power[i].menuMethod == 'checkManageDocumentControlled') { |
| | | // check = true |
| | | // } |
| | | } |
| | | // if (!check) { |
| | | // this.componentData.do.splice(2, 1) |
| | | // } |
| | | if (!del) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | |
| | | exportManageDocumentIssueRecycle(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '发放回收记录.xlsx') |
| | | //将Blob 对象转换成字符串 |
| | | // let reader = new FileReader(); |
| | | // reader.readAsText(blob, 'utf-8'); |
| | | // reader.onload = () => { |
| | | // try { |
| | | // let result = JSON.parse(reader.result); |
| | | // if (result.message) { |
| | | // this.$message.error(result.message); |
| | | // } else { |
| | | // const url = URL.createObjectURL(blob); |
| | | // const link = document.createElement('a'); |
| | | // link.href = url; |
| | | // link.download = '发放回收记录.xlsx'; |
| | | // link.click(); |
| | | // this.$message.success('导出成功') |
| | | // } |
| | | // } catch (err) { |
| | | // console.log(err); |
| | | // const url = URL.createObjectURL(blob); |
| | | // const link = document.createElement('a'); |
| | | // link.href = url; |
| | | // link.download = '发放回收记录.xlsx'; |
| | | // link.click(); |
| | | // this.$message.success('导出成功') |
| | | // } |
| | | // } |
| | | this.$download.saveAs(blob, '发放回收记录.xlsx'); |
| | | }) |
| | | }, |
| | | changeFileList(e) { |
| | |
| | | handleUpdate(row) { |
| | | this.addInfo = this.HaveJson(row) |
| | | this.radio = '回收' |
| | | this.file = null |
| | | this.addDialogVisible = true |
| | | }, |
| | | // 审核 |
| | |
| | | }) |
| | | .then(() => { |
| | | delManageDocumentIssueRecycle({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("删除成功"); |
| | | this.refresh(); |
| | | }); |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | height: 46px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search_thing { |
| | |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 5px; |
| | | } |
| | | </style> |