| | |
| | | <p><span class="required-span">* </span>被监督人:</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <!-- <el-select v-if="currentStep === 0" v-model="form.supervisedUserId" clearable--> |
| | | <!-- filterable--> |
| | | <!-- placeholder="请选择" size="small">--> |
| | | <!-- <el-option v-for="(item,i) in supervisedUserList" :key="i" :label="item.label" :value="item.value">--> |
| | | <!-- </el-option>--> |
| | | <!-- </el-select>--> |
| | | <span class="td-info1"> {{ form.supervisedUserName }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeProcessingDia">取 消</el-button> |
| | | <el-button v-if="currentStep !== 2" :loading="editLoad" type="primary" @click="handleEdit">提 交</el-button> |
| | | <el-button v-if="currentStep === 0 && userId == supervisedUserId" :loading="editLoad" type="primary" @click="handleEdit">提 交</el-button> |
| | | <el-button v-if="currentStep === 1 && userId == approverUserId" :loading="editLoad" @click="handleEdit(0)">不通过</el-button> |
| | | <el-button v-if="currentStep === 1 && userId == approverUserId" :loading="editLoad" type="primary" @click="handleEdit(1)">通 |
| | | 过</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | getSuperviseDetailAccording |
| | | } from "@/api/cnas/process/ensureResults/qualitySupervise"; |
| | | import {selectUserCondition} from "@/api/business/inspectionTask"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | name: 'processingSheet', |
| | |
| | | editLoad: false, |
| | | personList: [], |
| | | supervisedUserList: [], |
| | | supervisedUserId: '', |
| | | approverUserId: '' |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | // 方法集合 |
| | | methods: { |
| | | openDia (row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.form.superviseDetailsId = row.superviseDetailsId |
| | | this.supervisedUserId = row.supervisedUserId |
| | | this.searchInfo(row) |
| | | this.form.approveId = row.approveId |
| | | this.getAuthorizedPerson() // 获取人员列表 |
| | | // this.getSupervisedUserList() // 获取当前部门人员 |
| | | }, |
| | | // 查询监控计划详情实施信息 |
| | | searchInfo (row) { |
| | | this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId |
| | | getSuperviseDetailAccording({superviseDetailsId: row.superviseDetailsId}).then(res => { |
| | | getSuperviseDetailAccording({superviseDetailsId: this.form.superviseDetailsId}).then(res => { |
| | | this.form.supervisedUserId = res.data.supervisedUserId |
| | | this.form.supervisedUserName = res.data.supervisedUserName |
| | | if (res.data.superviseDetailsAccordingId === null) { |
| | | this.currentStep = 0 |
| | | } else { |
| | | this.form = res.data |
| | | if (res.data.isFinish === 0) { |
| | | if (res.data.approverUserId) { |
| | | this.currentStep = 1 |
| | | } |
| | | } else { |
| | | if (res.data.approverUserId) { |
| | | // 是否结束0:未结束, 1:已结束 |
| | | if (res.data.isFinish != 1) { |
| | | this.currentStep = 1 |
| | | } else if (res.data.isFinish == 1) { |
| | | this.currentStep = 2 |
| | | } |
| | | } else { |
| | | this.currentStep = 0 |
| | | } |
| | | this.form = res.data |
| | | this.form.superviseDetailsId = row.superviseDetailsId |
| | | this.approverUserId = res.data.approverUserId |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // 提交 |
| | | handleEdit () { |
| | | handleEdit (isFinish) { |
| | | if (this.currentStep === 0) { |
| | | if (this.form.findWay === null) { |
| | | this.$message.warning('请选择不符合工作发现途径') |
| | |
| | | this.$message.warning('请选择是否需要采取纠正措施') |
| | | return |
| | | } |
| | | if (!this.form.approverUserId) { |
| | | this.$message.warning('请选择批准人') |
| | | return |
| | | } |
| | | } |
| | | this.editLoad = true |
| | | this.form.flowType = this.currentStep |
| | |
| | | this.editLoad = false |
| | | }) |
| | | } else { |
| | | this.form.isFinish = isFinish |
| | | approverEquipSuperviseDetailAccording(this.form).then(res => { |
| | | this.editLoad = false |
| | | this.$message.success('批准成功') |
| | |
| | | this.personList = data; |
| | | }); |
| | | }, |
| | | // getSupervisedUserList () { |
| | | // this.$axios.get(this.$api.user.selectDepartmentLimsUserList).then(res => { |
| | | // let data = [] |
| | | // res.data.forEach(a => { |
| | | // data.push({ |
| | | // label: a.name, |
| | | // value: a.id |
| | | // }) |
| | | // }) |
| | | // this.supervisedUserList = data |
| | | // }) |
| | | // }, |
| | | } |
| | | }; |
| | | </script> |