| | |
| | | export function saveUnqualifiedContext(query) { |
| | | return request({ |
| | | url: '/insOrderPlan/saveUnqualifiedContext', |
| | | method: 'delete', |
| | | params: query |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | |
| | | </el-radio-group> |
| | | </div> |
| | | <div style="display: flex;align-items: center;"> |
| | | <span v-if="typeSource == '1'"> 复测次数:</span> |
| | | <el-select v-if="typeSource == '1'" v-model="retestTag" placeholder="请选择" size="small" |
| | | <span> 复测次数:</span> |
| | | <el-select v-model="retestTag" placeholder="请选择" size="small" |
| | | @change="m => handleChangeCableTag(currentSample.id, 4, 'cableTag', m)"> |
| | | <el-option v-for="item in unPassNumList" :key="item.retestTag" :label="item.retestTag" |
| | | :value="item.retestTag"> |
| | |
| | | verifyPlan |
| | | } from "@/api/business/inspectionTask"; |
| | | import { getUserNow, saveUnqualifiedContext } from "@/api/business/rawMaterialOrder"; |
| | | import InspectionWorker from '@/workers/InspectionWorker.worker'; |
| | | import DataWorker from '@/workers/DataWorker.worker'; |
| | | export default { |
| | | props: ['sonLaboratory', 'orderId', 'state', 'inspectorList', 'typeSource', 'unPassCheck', 'rawMaterialTag'], |
| | | props: ['sonLaboratory', 'orderId', 'state', 'inspectorList', 'typeSource', 'unPassCheck', 'rawMaterialTag','cableTag', 'repetitionTag'], |
| | | components: { |
| | | AddUnPass, |
| | | UnPassDialog |
| | |
| | | getDataTypeId: '', |
| | | getDataType: null, |
| | | unPassDialog: false, // 不合格处理弹框 |
| | | retestTag: '', // 复测次数 |
| | | retestTag: '1', // 复测次数 |
| | | addCheck: false, // 指定审核人员弹框 |
| | | checkUser: '', |
| | | type: '', |
| | |
| | | } |
| | | } |
| | | }) |
| | | await this.determineWhetherToCollectData()//是否需要数采 |
| | | // await this.determineWhetherToCollectData()//是否需要数采 |
| | | if (this.currentSample.index == undefined) this.currentSample['index'] = 1 |
| | | let bushing = this.currentSample.bushing |
| | | this.getTableLists();//处理模板列表信息 |
| | |
| | | this.stopWorker(); // 确保之前的 Worker 已停止 |
| | | } |
| | | // 创建 Worker 实例 |
| | | this.worker = new Worker('/static/js/worker.js'); |
| | | this.worker = new InspectionWorker(); |
| | | if (this.worker0) { |
| | | this.stopWorker(); // 确保之前的 Worker 已停止 |
| | | } |
| | | // 创建 Worker 实例 |
| | | this.worker0 = new Worker('/static/js/worker0.js'); |
| | | this.worker0 = new DataWorker(); |
| | | }, |
| | | // 停止多线程 |
| | | stopWorker() { |
| | |
| | | laboratory: this.sonLaboratory, |
| | | retestTag: this.retestTag, |
| | | rawMaterialTag: this.rawMaterialTag, |
| | | repetitionTag: this.repetitionTag, |
| | | cableTag: this.cableTag, |
| | | } |
| | | let res = getInsProductUnqualifiedRetest(params) |
| | | let res = await getInsProductUnqualifiedRetest(params) |
| | | console.log('res---', res) |
| | | if (res.code === 200 && res.data.length > 0) { |
| | | this.tableLoading = false; |
| | | this.scrollInit() |
| | |
| | | } |
| | | }) |
| | | // 以下是样式处理逻辑 |
| | | set = Array.sort(set) |
| | | // set = Array.sort(set) |
| | | set = [...set] |
| | | set.forEach(b => { |
| | | let arr = [] |
| | | a.template.forEach(c => { |
| | |
| | | }, 200) |
| | | }, |
| | | // 是否需要数采 |
| | | async determineWhetherToCollectData() { |
| | | let res = determineWhetherToCollectData({ managementNumber: '' }) |
| | | this.isGet = res.data |
| | | }, |
| | | // async determineWhetherToCollectData() { |
| | | // let res = determineWhetherToCollectData({ managementNumber: '' }) |
| | | // this.isGet = res.data |
| | | // }, |
| | | // 根据后端传参更新页面数据 param => this.tableList[0].insProductResult |
| | | getCurrentInsProduct(pId) { |
| | | if (!this.tableList[0].insProductResult) { |
| | |
| | | @resetForm="resetForm"></UnPassDialog> |
| | | <!-- 不合格复测弹框--> |
| | | <InspectionWord v-if="unPassCheck" :inspectorList="inspectorList" :orderId="orderId" |
| | | :cableTag="temCableTag" :repetitionTag="repetitionTag" |
| | | :rawMaterialTag="rawMaterialTag" :sonLaboratory="sonLaboratory" :state="state" :typeSource="typeSource" |
| | | :unPassCheck="unPassCheck" @closeUnPassCheckDialog="closeUnPassCheckDialog" @refreshView="refreshView" /> |
| | | <!-- 进货验证弹框--> |
| | |
| | | id: this.currentSample.id, |
| | | type: this.type, |
| | | laboratory: this.sonLaboratory, |
| | | cableTag: "", |
| | | cableTag: this.temCableTag, |
| | | rawMaterialTag: this.rawMaterialTag, |
| | | repetitionTag: this.repetitionTag, |
| | | }; |
| | | this.$nextTick(() => { |
| | | this.$refs.addUnPassDialog.getInsOrder(info); |
| | |
| | | v-loading="tableLoading" @selection-change="selectProduct" style="margin-bottom: 10px;" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border @select-all="handleAll"> |
| | | <el-table-column type="selection" width="65"></el-table-column> |
| | | <el-table-column prop="inspectionItemClass" label="检验项分类" min-width="140" |
| | | show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="isBinding" label="类型" min-width="140" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.isBinding" clearable size="small"> |
| | | <el-option :value="1" label="绑定值"></el-option> |
| | | <el-option :value="0" label="不合格值"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="inspectionItemClass" label="检验项分类" min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="inspectionItem" label="检验项" min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="inspectionItemSubclass" label="检验项子项" min-width="140" |
| | | show-overflow-tooltip></el-table-column> |
| | |
| | | <el-table-column prop="ask" label="要求值" min-width="220px"></el-table-column> |
| | | <el-table-column prop="lastValue" label="检验结果" min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="insResult" label="结果判定" min-width="140" show-overflow-tooltip> |
| | | <template> |
| | | <el-tag type="danger">不合格</el-tag> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="success" v-if="scope.row.insResult === 1">合格</el-tag> |
| | | <el-tag type="danger" v-if="scope.row.insResult === 0">不合格</el-tag> |
| | | <el-tag type="info" v-if="scope.row.insResult === 3">不判定</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | |
| | | <script> |
| | | import {addUnqualifiedRetest, getInsProductUnqualified} from '@/api/business/unpass.js' |
| | | import {getInsProduct} from "@/api/business/inspectionTask"; |
| | | export default { |
| | | name: "addUnPass", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | |
| | | getInsOrder(info) { |
| | | this.tableLoading = true |
| | | try { |
| | | getInsProductUnqualified({ id: info.id, type: info.type, laboratory: info.laboratory, rawMaterialTag: info.rawMaterialTag }).then(res => { |
| | | getInsProduct({ id: info.id, type: info.type, laboratory: info.laboratory, rawMaterialTag: info.rawMaterialTag,repetitionTag: info.repetitionTag,cableTag: info.cableTag }).then(res => { |
| | | if (res.code === 200) { |
| | | this.productList = res.data |
| | | } |
| | |
| | | this.$message.warning('请选择需要复测的检验项') |
| | | return |
| | | } |
| | | // 检查是否所有选中的行都选择了 isBinding |
| | | const hasUnselectedBinding = this.productListSelected.some( |
| | | (row) => row.isBinding === null || row.isBinding === undefined |
| | | ); |
| | | |
| | | if (hasUnselectedBinding) { |
| | | this.$message.error("请确保选中的数据都选择了类型!"); |
| | | return; |
| | | } |
| | | this.$confirm('确认提交不合格复测?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | |
| | | }); |
| | | }, |
| | | handlePass() { |
| | | const ids = this.productListSelected.map(item => ({ |
| | | id: item.id, |
| | | isBinding: item.isBinding |
| | | })); |
| | | this.handlePassLoading = true |
| | | try { |
| | | addUnqualifiedRetest({ |
| | | ids: this.productIds |
| | | }).then(res => { |
| | | addUnqualifiedRetest(ids).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('提交成功') |
| | | this.$emit('resetAddUnPass') |
| | | } |
| | | this.handlePassLoading = false |
| | | }).catch(e => { |
| | | this.handlePassLoading = false |
| | | }) |
| | | } catch (e) { |
| | | this.handlePassLoading = false |