| | |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" |
| | | v-model="formDia" |
| | | title="检测工作监督记录表" |
| | | title="日常监督检查记录表" |
| | | width="70%" @close="closeRecordsDia"> |
| | | <el-steps :active="currentStep" align-center finish-status="success"> |
| | | <el-step title="实施"></el-step> |
| | |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>检测人员:</p> |
| | | <p><span class="required-span">* </span>监督检测项目:</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <el-input v-if="currentStep === 0" v-model="form.testMember" |
| | | placeholder="请输入内容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.testMember }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>监督员:</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <el-select v-if="currentStep === 0" @change="usePersonName" v-model="form.supervisor" placeholder="请选择" size="small" style="width: 100%"> |
| | | <el-option v-for="item in recordUserList" :key="item.userName" :label="item.userName" :value="item.userName"></el-option> |
| | | </el-select> |
| | | <span v-else class="td-info"> {{ form.supervisor }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>检测项目:</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="currentStep === 0" v-model="form.testItem" |
| | | placeholder="请输入内容" |
| | | size="small"> |
| | |
| | | <span v-else class="td-info"> {{ form.testItem }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>样品编号:</p> |
| | | <p><span class="required-span">* </span>监督检测日期:</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="currentStep === 0" v-model="form.sampleNumber" |
| | | placeholder="请输入内容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.sampleNumber }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>检测日期:</p> |
| | | </td> |
| | | <td> |
| | | <td colspan="2"> |
| | | <el-input v-if="currentStep === 0" v-model="form.testDate" |
| | | placeholder="请输入内容" |
| | | size="small"> |
| | |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>人员:</p> |
| | | <p><span class="required-span">* </span>受监督人:</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.personnel" |
| | | placeholder="请输入内容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.personnel }}</span> |
| | | <td colspan="2"> |
| | | <el-select v-if="currentStep === 0" v-model="superviseeList" multiple filterable collapse-tags |
| | | placeholder="请选择" size="small" style="width: 100%"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" |
| | | :value="item.label"></el-option> |
| | | </el-select> |
| | | <span v-else class="td-info"> {{ form.testMember }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>监督员:</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <el-select v-if="currentStep === 0" v-model="form.supervisor" placeholder="请选择" size="small" style="width: 100%"> |
| | | <el-option v-for="item in recordUserList" :key="item.userId" :label="item.userName" :value="item.userName"></el-option> |
| | | </el-select> |
| | | <span v-else class="td-info"> {{ form.supervisor }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>仪器设备:</p> |
| | | <p>监督内容:</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.device" |
| | | placeholder="请输入内容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.device }}</span> |
| | | <template v-if="currentStep === 0"> |
| | | <div v-for="(rowItems, rowIndex) in contentRows" :key="rowIndex" style="display: flex;"> |
| | | <el-checkbox v-for="item in rowItems" :key="item" v-model="superviseContentList" |
| | | :value="item" style="flex: 1;">{{ item }}</el-checkbox> |
| | | </div> |
| | | </template> |
| | | <span v-else class="td-info"> {{ form.superviseContent }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>工作环境:</p> |
| | | <p><span class="required-span">* </span>监督记录:</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.environment" |
| | | placeholder="请输入内容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.environment }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>样品采集:</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.sampleCollection" |
| | | placeholder="请输入内容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.sampleCollection }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>样品的准备:</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.samplePreparation" |
| | | placeholder="请输入内容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.samplePreparation }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>检测方法:</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.detectionMethod" |
| | | placeholder="请输入内容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.detectionMethod }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>检测记录:</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.inspectionRecord" |
| | | placeholder="请输入内容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.inspectionRecord }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>检测报告:</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.examiningReport" |
| | | placeholder="请输入内容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.examiningReport }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>监督情况评价:</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.supervisionEvaluation" |
| | | <el-input v-if="currentStep === 0" v-model="form.superviseRecord" |
| | | :rows="4" |
| | | placeholder="请输入内容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.supervisionEvaluation }}</span> |
| | | <span v-else class="td-info"> {{ form.superviseRecord }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>不符合处理意见:</p> |
| | | <p>存在问题:</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.handlingAdvice" |
| | | :rows="4" |
| | | <el-input v-if="currentStep === 0" v-model="form.problemDesc" |
| | | :rows="3" |
| | | placeholder="不符合问题描述,无则填“无”" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.problemDesc }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>整改意见:</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.rectifyAdvice" |
| | | :rows="3" |
| | | placeholder="请输入内容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.handlingAdvice }}</span> |
| | | <span v-else class="td-info"> {{ form.rectifyAdvice }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | |
| | | </div> |
| | | <template #footer><span class="dialog-footer"> |
| | | <el-button @click="closeRecordsDia">取 消</el-button> |
| | | <el-button v-if="currentStep === 0 && userId == supervisedUserId" :loading="editLoad" type="primary" @click="handleEdit">提 交</el-button> |
| | | <el-button v-if="currentStep === 0 && canSubmitRecord" :loading="editLoad" type="primary" @click="handleEdit">提 交</el-button> |
| | | <el-button v-if="currentStep === 1 && userId == ratifyUserId" :loading="editLoad" @click="handleEdit(0)">不通过</el-button> |
| | | <el-button v-if="currentStep === 1 && userId == ratifyUserId" :loading="editLoad" type="primary" @click="handleEdit(1)">通 |
| | | 过</el-button> |
| | |
| | | superviseDetailsRecordId: '', |
| | | testMember: '', |
| | | supervisor: '', |
| | | supervisorId: '', |
| | | superviseContent: '', |
| | | superviseRecord: '', |
| | | problemDesc: '', |
| | | rectifyAdvice: '', |
| | | testItem: '', |
| | | sampleNumber: '', |
| | | testDate: '', |
| | | personnel: '', |
| | | device: '', |
| | | environment: '', |
| | | sampleCollection: '', |
| | | samplePreparation: '', |
| | | detectionMethod: '', |
| | | inspectionRecord: '', |
| | | examiningReport: '', |
| | | supervisionEvaluation: '', |
| | | handlingAdvice: '', |
| | | ratifyUserId: '', |
| | | ratifyUserName: '', |
| | | ratifyOpinion: '', |
| | | isAccording: '', |
| | | isFinish: '', |
| | | }, |
| | | currentStep: 0, |
| | | editLoad: false, |
| | |
| | | recordUserList: [], |
| | | supervisedUserId: '', |
| | | ratifyUserId: '', |
| | | superviseeList: [], |
| | | superviseContentList: [], |
| | | superviseContentItems: ['人员持证及培训', '设施及环境条件', '检测方法', '仪器设备管理', '测量溯源性', '标准物质管理', '样品制备和处置', '检测数据处理', '结果报告结果'], |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | contentRows() { |
| | | const rows = [] |
| | | for (let i = 0; i < this.superviseContentItems.length; i += 3) { |
| | | rows.push(this.superviseContentItems.slice(i, i + 3)) |
| | | } |
| | | return rows |
| | | }, |
| | | canSubmitRecord() { |
| | | if (this.userId == this.supervisedUserId) { |
| | | return true |
| | | } |
| | | return this.recordUserList.some(item => item.userId == this.userId) |
| | | }, |
| | | }, |
| | | // 方法集合 |
| | | methods: { |
| | |
| | | this.supervisedUserId = row.supervisedUserId |
| | | this.searchInfo(row) |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | usePersonName (value) { |
| | | const index = this.recordUserList.findIndex(item => item.userId === value) |
| | | if (index > -1) { |
| | | this.form.supervisor = this.recordUserList[index].userName |
| | | } |
| | | }, |
| | | // 查询监督计划详情记录流程信息 |
| | | searchInfo (row) { |
| | |
| | | this.form = res.data |
| | | this.form.superviseDetailsId = row.superviseDetailsId |
| | | this.ratifyUserId = res.data.ratifyUserId |
| | | this.superviseeList = this.form.testMember ? this.form.testMember.split('、').filter(i => i) : [] |
| | | this.superviseContentList = this.form.superviseContent ? this.form.superviseContent.split('、').filter(i => i) : [] |
| | | this.getRecordUser() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | |
| | | }, |
| | | // 提交流程 |
| | | handleEdit (isFinish) { |
| | | if (!this.form.testMember || !this.form.supervisor || !this.form.testItem || !this.form.sampleNumber |
| | | || !this.form.testDate) { |
| | | this.$message.warning('请填写完整') |
| | | return |
| | | } |
| | | if (this.currentStep === 0) { |
| | | if (!this.form.testItem || !this.form.testDate || this.superviseeList.length === 0 || !this.form.supervisor) { |
| | | this.$message.warning('请填写完整') |
| | | return |
| | | } |
| | | if (!this.form.superviseRecord) { |
| | | this.$message.warning('请填写监督记录') |
| | | return |
| | | } |
| | | this.form.testMember = this.superviseeList.join('、') |
| | | this.form.superviseContent = this.superviseContentList.join('、') |
| | | this.addInfo() |
| | | } else { |
| | | this.editInfo(isFinish) |
| | |
| | | this.$message.warning('请填写审批意见') |
| | | return |
| | | } |
| | | if (this.form.isAccording === null) { |
| | | if (this.form.isAccording !== 0 && this.form.isAccording !== 1) { |
| | | this.$message.warning('请选择是否符合') |
| | | return |
| | | } |
| | |
| | | this.$emit('closeRecordsDia') |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition({ type: 2 }).then((res) => { |
| | | // 质量监督面向全实验室, 人员列表不按部门筛选 |
| | | selectUserCondition({ type: 1 }).then((res) => { |
| | | let data = []; |
| | | res.data.forEach((a) => { |
| | | (res.data || []).forEach((a) => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id, |