| | |
| | | <el-option v-for="(a, i) in queryStatusList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="下单类别" prop="typeSource"> |
| | | <el-select v-model="entity.typeSource" clearable size="small" @change="refreshTable()"> |
| | | <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="报告类型" prop="reportType">--> |
| | | <!-- <el-select v-model="entity.reportType" clearable size="small" @change="refreshTable()">--> |
| | | <!-- <el-option v-for="item in reportTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="下单类别" prop="typeSource">--> |
| | | <!-- <el-select v-model="entity.typeSource" clearable size="small" @change="refreshTable()">--> |
| | | <!-- <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="物料属性" prop="materialProp">--> |
| | | <!-- <el-select clearable size="small" v-model="entity.materialProp" style="width: 100%">--> |
| | | <!-- <el-option v-for="dict in dict.type.material_prop_type" :key="dict.value" :label="dict.label"--> |
| | | <!-- :value="dict.value">--> |
| | | <!-- </el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="检验类别" prop="orderType"> |
| | | <el-select v-model="entity.orderType" clearable size="small" @change="refreshTable()"> |
| | | <el-option v-for="(a, i) in orderTypeList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="mini" @click="refresh()">重置</el-button> |
| | | <el-button size="mini" type="primary" @click="refreshTable()">查询</el-button> |
| | | <el-button :loading="outLoading" size="mini" type="primary" @click="handleDowns">批量下载</el-button> |
| | | <el-button size="mini" @click="refresh()">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div style="text-align: right;margin-bottom: 10px"> |
| | | <el-button :loading="outLoading" size="mini" type="primary" @click="handleDowns">批量下载</el-button> |
| | | <el-button :loading="outExportLoading" size="mini" type="primary" @click="handleExport">报表导出</el-button> |
| | | </div> |
| | | <div> |
| | | <lims-table :tableData="valueTableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | |
| | | <el-button link type="text" size="small">更多</el-button> |
| | | </template> |
| | | <div> |
| | | <el-button style="margin-left: 10px" type="text" size="small" @click="download(scope.row)">下载</el-button> |
| | | <el-button style="margin-left: 10px" type="text" size="small" |
| | | :disabled="!scope.row.url && !scope.row.urlS" @click="download(scope.row)">下载</el-button> |
| | | <el-button type="text" size="small" @click="viewInspectInfo(scope.row)">原始记录</el-button> |
| | | <el-button type="text" size="small" @click="handleFileLook(scope.row)">附件上传</el-button> |
| | | </div> |
| | |
| | | <el-button size="small" style="height: 38px" type="primary">附件上传</el-button> |
| | | </el-upload> |
| | | </div> |
| | | <lims-table :tableData="tableDataFile" :column="columnFile" height="500px" |
| | | <lims-table :tableData="tableDataFile" :column="columnFile" height="600px" |
| | | key="tableDataFile" :tableLoading="tableLoadingFile"></lims-table> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | // import ShowInfo from "../do/b1-material-ins-order/showInfo.vue"; |
| | | import { |
| | | downAll, |
| | | downloadReport, |
| | | examineReport, |
| | | pageInsReport, |
| | | ratifyReport, |
| | | sendBackTask, |
| | | upReportUrl, |
| | | writeReport |
| | | writeReport, |
| | | reportAllExport |
| | | } from "@/api/business/insReport"; |
| | | import { mapGetters } from "vuex"; |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | |
| | | export default { |
| | | name: 'ReportPreparation', |
| | | components: { limsTable, onlyoffice }, |
| | | dicts: ['material_prop_type'], |
| | | data() { |
| | | return { |
| | | entity: { |
| | | queryStatus: null, |
| | | code: null, |
| | | typeSource: null, |
| | | orderType: null, |
| | | materialProp: null, |
| | | reportType: null |
| | | }, |
| | | page: { |
| | | current: 1, |
| | |
| | | option: null, |
| | | mutiList: [], |
| | | outLoading: false, |
| | | outExportLoading: false, |
| | | inLoading: false, |
| | | addApproverDia: false, // 指定审批人员弹框 |
| | | approver: '', // 审批人员 |
| | |
| | | verifyUser: null, // 审核人员 |
| | | loadingVerify: false, // 审核人员 |
| | | typeSourceList: [ |
| | | { label: '成品下单', value: 0 }, |
| | | { label: '委托下单', value: -1 }, |
| | | { label: '外购下单', value: 0 }, |
| | | { label: '原材料下单', value: 1 }, |
| | | ], |
| | | orderTypeList: [ |
| | | { label: '委托试验', value: 'Customer-ordered test' }, |
| | | { label: '抽检', value: '抽检' }, |
| | | { label: '进厂检验', value: '进厂检验' }, |
| | | { label: '季度检验', value: 'Quarterly inspection' }, |
| | | // { label: '进厂检验', value: '进厂检验' }, |
| | | // { label: '季度检验', value: 'Quarterly inspection' }, |
| | | ], |
| | | reportTypeList: [ |
| | | { label: '检测报告', value: 0 }, |
| | | { label: '检验报告', value: 1 }, |
| | | ], |
| | | showInfoDialog: false, // 产业链信息查看 |
| | | isReport: 1, |
| | |
| | | dataType: "link", |
| | | linkMethod: "selectAllByOne", |
| | | }, |
| | | { |
| | | label: "下单类别", |
| | | prop: "typeSource", |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "成品下单"; |
| | | } else { |
| | | return "原材料下单"; |
| | | } |
| | | }, |
| | | }, |
| | | // { |
| | | // label: '报告类型', |
| | | // prop: 'reportType', |
| | | // width: '100px', |
| | | // dataType: 'tag', |
| | | // formatData: (params) => params === 0 ? '检测报告' : '检验报告', |
| | | // formatType: (params) => params === 0 ? 'warning' : 'success', |
| | | // }, |
| | | // { |
| | | // label: "下单类别", |
| | | // prop: "typeSource", |
| | | // width: "100px", |
| | | // dataType: "tag", |
| | | // formatData: (params) => { |
| | | // if (params == 0) { |
| | | // return "外购下单"; |
| | | // } else if(params==1) { |
| | | // return "原材料下单"; |
| | | // }else{ |
| | | // return "委托下单"; |
| | | // } |
| | | // }, |
| | | // }, |
| | | // { |
| | | // label: '物料属性', |
| | | // prop: 'materialProp', |
| | | // formatData: (params) => { |
| | | // if (!params) return null |
| | | // |
| | | // for (let i = 0; i < this.dict.type.material_prop_type.length; i++) { |
| | | // const item = this.dict.type.material_prop_type[i] |
| | | // if (item.value == params) { |
| | | // return item.label |
| | | // } |
| | | // } |
| | | // return null |
| | | // } |
| | | // }, |
| | | { |
| | | label: "检验类型", |
| | | prop: "orderType", |
| | |
| | | // 查询附件查看列表回调 |
| | | getFileList() { |
| | | this.tableLoadingFile = true |
| | | getFileList({ insOrderId: this.filesLookInfo.insOrderId }).then(res => { |
| | | getFileList({ insOrderId: this.filesLookInfo.insOrderId,current: -1, size: -1 }).then(res => { |
| | | this.tableLoadingFile = false |
| | | if (res.code === 200) { |
| | | this.tableDataFile = res.data.records |
| | |
| | | }) |
| | | |
| | | }, |
| | | // 报表导出 |
| | | handleExport() { |
| | | this.outExportLoading = true |
| | | reportAllExport({ |
| | | ...this.entity |
| | | }).then(res => { |
| | | this.outExportLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, "报告报表导出.xlsx"); |
| | | }) |
| | | }, |
| | | beforeUpload(file) { |
| | | const isZip = file.type === 'application/zip' || file.name.endsWith('.zip'); |
| | | if (!isZip) { |
| | |
| | | case 0: |
| | | // 原材料 |
| | | this.$router.push({ |
| | | path: "/materialOrder/customsInspection", query: { |
| | | path: "/materialOrder/customsInspectionView", query: { |
| | | customsInspection: row, |
| | | active: this.activeFace, |
| | | currentId: row.insOrderId, |
| | |
| | | case null: |
| | | // 成品 |
| | | this.$router.push({ |
| | | path: "/productOrder/add", query: { |
| | | path: "/productOrder/addView", query: { |
| | | examine: this.examine, |
| | | active: this.activeFace, |
| | | currentId: row.insOrderId |
| | |
| | | case 1: |
| | | // 铜材 |
| | | this.$router.push({ |
| | | path: "/materialOrder/copperOrder", query: { |
| | | path: "/materialOrder/CopperView", query: { |
| | | active: this.activeFace, |
| | | currentId: row.insOrderId |
| | | } |
| | |
| | | } |
| | | }, |
| | | download(row) { |
| | | let url = row.urlS ? row.urlS : row.url; |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + url; |
| | | link.target = '_blank'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | downloadReport(row.id).then(res => { |
| | | if (res.type && res.type.includes('application/json')) { |
| | | const reader = new FileReader() |
| | | reader.onload = () => { |
| | | try { |
| | | this.$message.error(JSON.parse(reader.result).msg || '报告下载失败') |
| | | } catch (e) { |
| | | this.$message.error('报告下载失败') |
| | | } |
| | | } |
| | | reader.readAsText(res) |
| | | return |
| | | } |
| | | const reportUrl = row.urlS || row.url || '' |
| | | const filename = decodeURIComponent(reportUrl.substring(reportUrl.lastIndexOf('/') + 1)) || `${row.code}.docx` |
| | | this.$download.saveAs(res, filename) |
| | | }).catch(() => { |
| | | this.$message.error('报告下载失败') |
| | | }) |
| | | }, |
| | | // 还原操作 |
| | | handleRestore(row) { |
| | |
| | | }, |
| | | // 获取人员列表 |
| | | getAuthorizedPerson() { |
| | | selectUserCondition({ type: 0 }).then((res) => { |
| | | selectUserCondition({ type: 1 }).then((res) => { |
| | | let data = []; |
| | | res.data.forEach((a) => { |
| | | data.push({ |