| | |
| | | <div> |
| | | <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 6" size="small" |
| | | @click="downLoad">导出</el-button> |
| | | <el-button v-if="tabIndex === 1" size="small" type="primary" @click="openAddIns">添加检验项</el-button> |
| | | <el-button size="small" type="primary" @click="openPrint">标签打印</el-button> |
| | | <el-button v-if="checkPermi(['add:insOrder'])" size="small" type="primary" @click="playOrder(1)">下单</el-button> |
| | | </div> |
| | |
| | | <!--标签打印弹框--> |
| | | <print-dialog v-if="printDialog" ref="printDialog" :printDialog="printDialog" |
| | | @closePrintDialog="closePrintDialog"></print-dialog> |
| | | <!--添加遗漏检验项弹框--> |
| | | <add-inspection-dia v-if="addInspectionDia" ref="addInspectionDia"></add-inspection-dia> |
| | | <!--修改样品型号弹框--> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="dialogVisible" title="修改样品型号" width="80%"> |
| | |
| | | import vueQr from 'vue-qr' |
| | | import PrintJS from 'print-js' |
| | | import PrintDialog from "@/views/business/productOrder/components/printDialog.vue"; |
| | | import AddInspectionDia from "@/views/business/productOrder/components/addInspectionDia.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | checkUpdate, delInsOrder, getSampleByOrderId, |
| | |
| | | name: 'ProductOrder', |
| | | components: { |
| | | limsTable, |
| | | AddInspectionDia, |
| | | PrintDialog, |
| | | vueQr |
| | | }, |
| | |
| | | linkMethod: "changeEntrustCode", |
| | | }, |
| | | { label: '委托单位', prop: 'company' }, |
| | | { |
| | | label: "样品名称", |
| | | prop: "sampleName", |
| | | width: "160px", |
| | | dataType: "link", |
| | | linkMethod: "selectAllByOne", |
| | | }, |
| | | { |
| | | label: "样品型号", |
| | | prop: "sampleModel", |
| | | width: "160px", |
| | | dataType: "link", |
| | | linkMethod: "editSampleModel", |
| | | }, |
| | | { label: '样品数量', prop: 'sampleNum' }, |
| | | { label: '检测依据', prop: 'sample' }, |
| | | { label: '样品名称', prop: 'sampleView' }, |
| | | // { |
| | | // label: "样品名称", |
| | | // prop: "sampleName", |
| | | // width: "160px", |
| | | // dataType: "link", |
| | | // linkMethod: "selectAllByOne", |
| | | // }, |
| | | // { |
| | | // label: "样品型号", |
| | | // prop: "sampleModel", |
| | | // width: "160px", |
| | | // dataType: "link", |
| | | // linkMethod: "editSampleModel", |
| | | // }, |
| | | { label: '样品数量', prop: 'testQuantity' }, |
| | | { label: '检验人', prop: 'testingName' }, |
| | | { |
| | | dataType: 'tag', |
| | | label: '紧急程度', |
| | | prop: 'type', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return '普通' |
| | | } else if (params == 1) { |
| | | return '优先' |
| | | } else { |
| | | return '紧急' |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'success' |
| | | } else if (params == 1) { |
| | | return 'warning' |
| | | } else { |
| | | return 'danger' |
| | | } |
| | | } |
| | | }, |
| | | { label: '备注', prop: 'remark' }, |
| | | { label: '检验进度%', prop: 'insProgress' }, |
| | | { label: '约定时间', prop: 'appointed' }, |
| | | { |
| | | dataType: 'tag', |
| | | label: '检验结果', |
| | | prop: 'insResult', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return '合格' |
| | | } else if (params == 0) { |
| | | return '不合格' |
| | | } else if (params == 3) { |
| | | return '不判定' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success' |
| | | } else if (params == 0) { |
| | | return 'danger' |
| | | } else if (params == 3) { |
| | | return '' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { label: '下单时间', prop: 'createTime' }, |
| | | { label: '下发时间', prop: 'sendTime' }, |
| | | { label: '退回理由', prop: 'tell' }, |
| | |
| | | fixed: 'right', |
| | | label: '操作', |
| | | operation: [ |
| | | { |
| | | name: '查看详情', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.selectAllByOne(row); |
| | | } |
| | | }, |
| | | { |
| | | name: '数据查看', |
| | | type: 'text', |
| | |
| | | qrData: [], |
| | | multipleSelection: [], |
| | | printDialog: false, |
| | | addInspectionDia: false, |
| | | dialogVisible: false, |
| | | submitListLoad: false, |
| | | sampleList: [] |
| | |
| | | targetStyles: ["*"], // 使用dom的所有样式,很重要 |
| | | font_size: '0.20cm', |
| | | }); |
| | | }, |
| | | // 打开添加检验项弹框 |
| | | openAddIns() { |
| | | if (this.multipleSelection.length === 0) { |
| | | this.$message.warning('请选择需要添加检验项的数据') |
| | | return |
| | | } |
| | | if (this.multipleSelection.length > 1) { |
| | | this.$message.warning('只能选择一条数据') |
| | | return |
| | | } |
| | | this.addInspectionDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.addInspectionDia.getDataList(this.multipleSelection[0]) |
| | | }) |
| | | }, |
| | | // 导出记录 |
| | | downLoad() { |