| | |
| | | <template> |
| | | <!--质量监控-实施流程页面--> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="实施" |
| | | width="60%" @close="closeCarryOutDia"> |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeCarryOutDia">取 消</el-button> |
| | | <el-button v-if="currentStep !== 2" :loading="editLoad" type="primary" @click="handleEdit">提 交</el-button> |
| | | <el-button v-if="currentStep === 0" :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> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | getQualityMonitorRatify |
| | | } from "@/api/cnas/process/ensureResults/qualityMonitor"; |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | name: 'carryOutDialog', |
| | |
| | | personList: [], |
| | | editLoad: false, |
| | | isCarryOut: false, // 是否为实施 |
| | | ratifyUserId: '' |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | // 方法集合 |
| | | methods: { |
| | |
| | | searchInfo(row) { |
| | | getQualityMonitorRatify({ qualityMonitorDetailsId: row.qualityMonitorDetailsId }).then(res => { |
| | | // 有detailsRatifyId则说明提交过实施信息 |
| | | if (res.data.detailsRatifyId) { |
| | | if (res.data.ratifyUserId) { |
| | | // 是否结束0:未结束, 1:已结束 |
| | | if (res.data.isFinish == 0) { |
| | | if (res.data.isFinish != 1) { |
| | | this.currentStep = 1 |
| | | } else if (res.data.isFinish == 1) { |
| | | this.currentStep = 2 |
| | |
| | | this.currentStep = 0 |
| | | } |
| | | this.form = res.data |
| | | this.ratifyUserId = res.data.ratifyUserId |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // 提交 |
| | | handleEdit() { |
| | | if (!this.form.ratifyUserId) { |
| | | this.$message.warning('请选择批准人') |
| | | return |
| | | } |
| | | handleEdit(isFinish) { |
| | | this.editLoad = true |
| | | if (this.currentStep == 0) { |
| | | this.addInfo() |
| | | } else { |
| | | this.editInfo() |
| | | this.editInfo(isFinish) |
| | | } |
| | | }, |
| | | // 提交实施 |
| | |
| | | }) |
| | | }, |
| | | // 提交批准 |
| | | editInfo() { |
| | | editInfo(isFinish) { |
| | | this.form.isFinish = isFinish |
| | | addQualityMonitorRatifyOpinion(this.form).then(res => { |
| | | this.editLoad = false |
| | | this.$message.success('操作成功') |