| | |
| | | downAll: "/insReport/downAll", //报告批量下载 |
| | | upAll: "/insReport/upAll", //报告批量上传 |
| | | isReport: "/insReport/isReport", //是否生成总报告 |
| | | getInsOrderStateCount: "/insReport/getInsOrderStateCount", //查询检验报告记录 |
| | | } |
| | | |
| | | const warehouse = { |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .noShow{ |
| | | opacity: 0; |
| | | } |
| | | </style> |
| | | <style> |
| | | .inspection .el-form-item__label { |
| | |
| | | <template> |
| | | <div v-loading="loading" class="inspection"> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;" >检验单详情 |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;" :class="{noShow:noBack}">检验单详情 |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">样品切换</el-button> |
| | |
| | | v-if="state>1&&!isLook">继续试验</el-button> |
| | | <el-button size="small" @click="upInsReview(0)" v-if="state>1&&!isLook" type="danger">再次试验</el-button> |
| | | <el-button size="small" @click="upInsReview(2)" v-if="state>1&&!isLook">结束试验</el-button> |
| | | <el-button size="small" @click="$emit('goback')">返回</el-button> |
| | | <el-button size="small" @click="$emit('goback')" v-if="!noBack">返回</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="search" v-show="!isLook"> |
| | |
| | | :delUrl="$api.insOrderPlan.delfile" |
| | | :key="upIndex" style="height: 100%;margin-top: 16px;"/> |
| | | </div> |
| | | <el-drawer title="样品切换" :visible.sync="sampleVisible" :size="500"> |
| | | <el-drawer title="样品切换" :visible.sync="sampleVisible" :size="500" :modal="!noBack"> |
| | | <el-table class="el-table" ref="productTable" :data="sampleProduct" height="100%" tooltip-effect="dark" border |
| | | highlight-current-row @row-click="handleChangeSample" :row-class-name="tableRowClassName" |
| | | :current-row-key="currentKey" :row-key="record=>record.index" v-if="sampleVisible"> |
| | |
| | | import CircuitParameters1 from './circuit-parameters1.vue' |
| | | import CircuitParameters2 from './circuit-parameters2.vue' |
| | | export default { |
| | | props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1'], |
| | | props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1','noBack'], |
| | | components: { |
| | | ValueTable, |
| | | Circuit, |
| | |
| | | :url="$api.insOrder.selectInsOrderParameter" :componentData="componentData" |
| | | :upIndex="upIndex" /> |
| | | </div> |
| | | <el-dialog |
| | | title="生成报告" |
| | | :visible.sync="dialogVisible" |
| | | width="30%" |
| | | :append-to-body="true" |
| | | :modal="!dialogVisible0" |
| | | > |
| | | <span>请选择委托编号为 {{currentInfo.entrustCode}} 要生成的数据</span> |
| | | <el-card class="box-card" style="margin-top: 16px;" v-for="(item,index) in historyList" :key="index"> |
| | | <div slot="header" style="display: flex;justify-content: space-between;"> |
| | | <span>{{ item.laboratory }}</span> |
| | | <!-- <el-checkbox v-model="item.checked"></el-checkbox> --> |
| | | </div> |
| | | <el-radio-group v-model="item.numValue" ref="radio"> |
| | | <el-radio :label="m.value" v-for="(m,i) in item.arr" :key="i"><el-link type="primary" @click="lookDetail(item,m.value)">{{ m.label }}</el-link></el-radio> |
| | | </el-radio-group> |
| | | </el-card> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="loading0" @click="handleNoCreate">不生成</el-button> |
| | | <el-button type="primary" @click="handleCreate" :loading="loading1">生 成</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="检验详情" |
| | | :visible.sync="dialogVisible0" |
| | | width="100%" :fullscreen="true" :modal="false" :append-to-body="true"> |
| | | <Inspection v-if="dialogVisible0" |
| | | :orderId="currentInfo.id" |
| | | :inspectorList="currentItem.inspectorList" |
| | | :sonLaboratory="currentItem.laboratory" |
| | | :state="2" |
| | | :orderStateId="currentItem.orderStateId" |
| | | :version="currentItem.version" |
| | | :isLook="true" |
| | | :num1="currentItem.num1" |
| | | :noBack="true"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../../tool/value-table.vue' |
| | | import Inspection from '../b1-inspect-order-plan/Inspection.vue' |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | | Inspection, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | needSort: ['createTime', 'sendTime', 'type', 'appointed'] |
| | | }, |
| | | upIndex: 0, |
| | | entityCopy: {} |
| | | entityCopy: {}, |
| | | dialogVisible:false, |
| | | historyList:[], |
| | | currentInfo:{}, |
| | | currentItem:{}, |
| | | loading0:false, |
| | | loading1:false, |
| | | dialogVisible0:false |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | this.refreshTable() |
| | | }, |
| | | handleCreateReport(row){ |
| | | this.$confirm(`是否生成此委托单 ${row.entrustCode} 的总报告?`, "提示", { |
| | | confirmButtonText: "生成", |
| | | cancelButtonText: "不生成", |
| | | type: "success", |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | instance.confirmButtonLoading = true; |
| | | this.$axios.post(this.$api.insReport.isReport, { |
| | | id:row.id, |
| | | state:1 |
| | | }).then(res => { |
| | | instance.confirmButtonLoading = false; |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success("已生成") |
| | | this.refreshTable() |
| | | done(); |
| | | }).catch(err => { |
| | | console.log(err) |
| | | instance.confirmButtonLoading = false; |
| | | this.currentInfo = row |
| | | this.$axios.get(this.$api.insReport.getInsOrderStateCount+'?id='+row.id).then(res => { |
| | | this.historyList = res.data |
| | | this.historyList.forEach(item => { |
| | | item.arr = [] |
| | | this.$set(item,'numValue',1) |
| | | // item.checked = false; |
| | | if(item.num>0){ |
| | | for(var i=0;i<item.num;i++){ |
| | | item.arr.push({ |
| | | label:'记录'+(i+1), |
| | | value:i+1 |
| | | }) |
| | | } else if(action === 'cancel'){ |
| | | instance.cancelButtonLoading = true; |
| | | this.$axios.post(this.$api.insReport.isReport, { |
| | | id:row.id, |
| | | state:0 |
| | | }).then(res => { |
| | | instance.cancelButtonLoading = false; |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message.success("已取消生成") |
| | | }).catch(err => { |
| | | instance.cancelButtonLoading = false; |
| | | console.log(err) |
| | | }) |
| | | }else{ |
| | | done(); |
| | | } |
| | | } |
| | | }).then(() => { |
| | | |
| | | }).catch((e) => { |
| | | console.log(e) |
| | | }) |
| | | }) |
| | | this.dialogVisible = true |
| | | }) |
| | | }, |
| | | // 生成报告 |
| | | handleCreate(){ |
| | | this.loading1 = true |
| | | this.$axios.post(this.$api.insReport.isReport, { |
| | | id:this.currentInfo.id, |
| | | state:1, |
| | | insReportDto1s:this.historyList.map(item => { |
| | | return{ |
| | | laboratory:item.laboratory, |
| | | num:item.numValue |
| | | } |
| | | }) |
| | | },{ |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }}).then(res => { |
| | | this.loading1 = false |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success("已生成") |
| | | this.refreshTable() |
| | | this.dialogVisible = false |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | // 不生成 |
| | | handleNoCreate(){ |
| | | this.loading0 = true |
| | | this.$axios.post(this.$api.insReport.isReport, { |
| | | id:this.currentInfo.id, |
| | | state:0 |
| | | },{ |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }}).then(res => { |
| | | this.loading0 = false; |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.refreshTable() |
| | | this.$message.success("已取消生成") |
| | | this.dialogVisible = false |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | // 查看检验详情 |
| | | lookDetail(row,value){ |
| | | this.dialogVisible0 = true |
| | | let inspectorList = [] |
| | | if(row.userName){ |
| | | inspectorList = row.userName.split(',') |
| | | } |
| | | this.currentItem = { |
| | | num1:value, |
| | | inspectorList:inspectorList, |
| | | ...row |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | height: 100%; |
| | | padding: 20px; |
| | | } |
| | | >>>.el-card__header,>>>.el-card__body{ |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | </style> |