| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form :inline="true" :model="currentOtherForm" class="form-inline template-panel__conclusion--divided" |
| | | size="small" label-width="84px"> |
| | | <el-form-item label="检验结论:"> |
| | | <el-radio-group v-model="currentOtherForm.insResult" :disabled="state != 2" |
| | | @change="m => subOtherForm(m, 'insResult')"> |
| | | <el-radio :label="1">合格</el-radio> |
| | | <el-radio :label="0">不合格</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <!-- 常规检验原始记录 --> |
| | | <div id="tableBox" v-loading="tableLoading" class="center-box"> |
| | |
| | | humidity: null, |
| | | detectionTime: null, |
| | | detectionPlace: null, |
| | | deviceIds: [] |
| | | deviceIds: [], |
| | | insResult: null |
| | | } |
| | | } |
| | | }, |
| | |
| | | humidity: item.humidity != null ? item.humidity : null, |
| | | detectionTime: item.detectionTime != null ? item.detectionTime : null, |
| | | detectionPlace: item.detectionPlace != null ? item.detectionPlace : null, |
| | | deviceIds: Array.isArray(item.deviceIds) ? [...item.deviceIds] : [] |
| | | deviceIds: Array.isArray(item.deviceIds) ? [...item.deviceIds] : [], |
| | | insResult: item.insResult != null ? item.insResult : null |
| | | }) |
| | | }) |
| | | if (this.typeSource == '1') { |
| | |
| | | }, |
| | | // 新聚直接绑定模板的单据,设备按模板选择 |
| | | isDirectTemplateOrder() { |
| | | return this.sonLaboratory === '新聚' && this.currentSample && |
| | | (this.currentSample.insProduct || []).some(product => product.templateRowIndex != null) |
| | | return this.sonLaboratory === '新聚' && |
| | | Array.isArray(this.insOrder.templateConditions) && |
| | | this.insOrder.templateConditions.length > 0 |
| | | }, |
| | | loadDeviceOptions() { |
| | | search({ status: 0 }).then(res => { |
| | |
| | | upInsReview(e) { |
| | | if (e == 1) { |
| | | // 通过 |
| | | const insResults = this.tableLists.map( |
| | | item => (this.otherForm[item.templateId] || {}).insResult |
| | | ) |
| | | const missingIndex = insResults.findIndex(result => result !== 0 && result !== 1) |
| | | if (this.isDirectTemplateOrder() && missingIndex > -1) { |
| | | this.$message.error(`请选择「${this.tableLists[missingIndex].templateName}」的检验结论`) |
| | | return |
| | | } |
| | | this.reviewLoading = true; |
| | | verifyPlan({ |
| | | orderId: this.orderId, |
| | | type: 1, |
| | | laboratory: this.sonLaboratory, |
| | | tell: null, |
| | | userId: this.checkUser |
| | | userId: this.checkUser, |
| | | insResult: this.isDirectTemplateOrder() |
| | | ? (insResults.every(result => result === 1) ? 1 : 0) |
| | | : this.insOrder.insResult |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功") |
| | |
| | | humidity: null, |
| | | detectionTime: null, |
| | | detectionPlace: null, |
| | | deviceIds: [] |
| | | deviceIds: [], |
| | | insResult: null |
| | | }) |
| | | } |
| | | }, |
| | |
| | | color: #606266; |
| | | } |
| | | |
| | | .template-panel__conclusion--divided { |
| | | border-top: 1px dashed #e4e7ed; |
| | | padding-top: 12px; |
| | | } |
| | | |
| | | .center { |
| | | width: calc(100% - 40px); |
| | | /* max-height: 580px; */ |