| | |
| | | <p><span class="required-span">* </span>监督员:</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <el-select v-if="currentStep === 0" @change="usePersonName" v-model="form.supervisorId" placeholder="请选择" size="small" style="width: 100%"> |
| | | <el-option v-for="item in recordUserList" :key="item.userId" :label="item.userName" :value="item.userId"></el-option> |
| | | <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> |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeRecordsDia">取 消</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" :loading="editLoad" @click="handleEdit(0)">不通过</el-button> |
| | | <el-button v-if="currentStep === 1" :loading="editLoad" type="primary" @click="handleEdit(1)">通 |
| | | 过</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | searchInfo (row) { |
| | | getSuperviseDetailRecord({superviseDetailsId: row.superviseDetailsId}).then(res => { |
| | | // 有superviseDetailsRecordId说明提交过记录 |
| | | if (res.data.superviseDetailsRecordId) { |
| | | if (res.data.ratifyUserId) { |
| | | // 是否结束0:未结束, 1:已结束 |
| | | if (res.data.isFinish === 0) { |
| | | this.currentStep = 1 |
| | |
| | | }) |
| | | }, |
| | | // 提交流程 |
| | | handleEdit () { |
| | | handleEdit (isFinish) { |
| | | if (!this.form.testMember || !this.form.supervisor || !this.form.testItem || !this.form.sampleNumber |
| | | || !this.form.testDate) { |
| | | this.$message.warning('请填写完整') |
| | |
| | | if (this.currentStep === 0) { |
| | | this.addInfo() |
| | | } else { |
| | | this.editInfo() |
| | | this.editInfo(isFinish) |
| | | } |
| | | }, |
| | | // 提交记录 |
| | | addInfo () { |
| | | if (!this.form.ratifyUserId) { |
| | | this.$message.warning('请选择下一步批准人') |
| | | return |
| | | } |
| | | this.editLoad = true |
| | | addSuperviseDetailRecord(this.form).then(res => { |
| | | this.editLoad = false |
| | |
| | | }) |
| | | }, |
| | | // 提交批准 |
| | | editInfo () { |
| | | editInfo (isFinish) { |
| | | if (!this.form.ratifyOpinion) { |
| | | this.$message.warning('请填写审批意见') |
| | | return |
| | |
| | | return |
| | | } |
| | | this.editLoad = true |
| | | this.form.isFinish = isFinish |
| | | addSuperviseRecordOpinion(this.form).then(res => { |
| | | this.editLoad = false |
| | | this.$message.success('操作成功') |