¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :title="operationType === 'edit'? 'ç¼è¾' : 'æ°å¢'" |
| | | :visible.sync="formDia" |
| | | width="80%" @close="closeDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="140px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£æ¥æ" prop="superviseTime"> |
| | | <el-date-picker |
| | | v-model="form.superviseTime" |
| | | clearable |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | style="width: 100%" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£ç®ç" prop="supervisePurpose"> |
| | | <el-input v-model="form.supervisePurpose" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çæ§é¡¹ç®" prop="superviseProject"> |
| | | <el-input v-model="form.superviseProject" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="被çç£äººå" prop="supervisee"> |
| | | <el-input v-model="form.supervisee" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£åå " prop="superviseReason"> |
| | | <el-input v-model="form.superviseReason" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="夿³¨" prop="remark"> |
| | | <el-input v-model="form.remark" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button :loading="upLoad" type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'detailFormDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | props: ['superviseId'], |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | form: { |
| | | qualityMonitorDetailsId: '', |
| | | superviseTime: '', |
| | | supervisePurpose: '', |
| | | superviseProject: '', |
| | | supervisee: '', |
| | | superviseReason: '', |
| | | remark: '', |
| | | superviseDetailsId: '', |
| | | }, |
| | | rules: { |
| | | superviseTime: [{ required: true, message: '请è¾å
¥çç£æ¥æ', trigger: 'blur' }], |
| | | supervisePurpose: [{ required: true, message: '请è¾å
¥çç£ç®ç', trigger: 'blur' }], |
| | | superviseProject: [{ required: true, message: '请è¾å
¥çæ§é¡¹ç®', trigger: 'blur' }], |
| | | }, |
| | | upLoad: false, |
| | | operationType: '', |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type === 'edit') { |
| | | this.searchInfo(row) |
| | | } |
| | | }, |
| | | searchInfo (row) { |
| | | this.form = {...row} |
| | | }, |
| | | // æäº¤è¡¨å |
| | | submitForm () { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | if (this.operationType === 'add') { |
| | | this.handleAdd() |
| | | } else { |
| | | this.handleEdit() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | handleAdd () { |
| | | let entity = this.HaveJson(this.form) |
| | | entity.superviseId = this.superviseId |
| | | this.upLoad = true |
| | | this.$axios.post(this.$api.qualitySupervise.addQualitySuperviseDetail, entity, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.upLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æ°å¢æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // æäº¤ä¿®æ¹ |
| | | handleEdit () { |
| | | const entity = this.HaveJson(this.form) |
| | | this.upLoad = true |
| | | this.$axios.post(this.$api.qualitySupervise.updateQualitySuperviseDetail, entity, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.upLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeDia () { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog__body { |
| | | max-height: 720px; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="ä¸ç¬¦å工使§å¶å" |
| | | width="60%" @close="closeProcessingDia"> |
| | | <el-steps :active="currentStep" align-center finish-status="success"> |
| | | <el-step title="ä¸ç¬¦å工使
åµè®°å½" @click.native="setStep(0)"></el-step> |
| | | <el-step title="å¤çæªæ½" @click.native="setStep(1)"></el-step> |
| | | <el-step title="çº æ£æªæ½" @click.native="setStep(2)"></el-step> |
| | | <el-step title="æ¯å¦éç¥å®¢æ·å坿¢å¤å·¥ä½" @click.native="setStep(3)"></el-step> |
| | | </el-steps> |
| | | <div> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p>åçé¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.occurrenceDepartment" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.occurrenceDepartment }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>é¨é¨è´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.headDepartment" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.headDepartment }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>ä¸ç¬¦åå·¥ä½åç°éå¾ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-radio-group v-model="form.findWay" v-removeAriaHidden :disabled="showStep === 0 && currentStep !== 0"> |
| | | <el-radio :label="0">管çè¯å®¡</el-radio> |
| | | <el-radio :label="1">å
é¨å®¡æ ¸</el-radio> |
| | | <el-radio :label="2">æ£æµè¿ç¨æ§å¶</el-radio> |
| | | <el-radio :label="3">å
é¨è´¨éæ§å¶</el-radio> |
| | | <el-radio :label="4">å
é¨çç£</el-radio> |
| | | <el-radio :label="5">å¤é¨è¯å®¡</el-radio> |
| | | <el-radio :label="6">å¤é¨æè¯</el-radio> |
| | | <el-radio :label="7">å
¶ä»</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p>ä¸ç¬¦åå·¥ä½ç详ç»è®°å½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.recordDetail" |
| | | :rows="4" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.recordDetail }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p>ä¸ç¬¦åå·¥ä½ç以ååæ¡æ¬¾å·ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.recordAccording" |
| | | :rows="4" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.recordAccording }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>被çç£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-select v-if="showStep === 0 && 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 v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.supervisedUserName }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>被çç£æ¶é´ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-date-picker |
| | | v-if="showStep === 0 && currentStep === 0" |
| | | v-model="form.supervisedTime" |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | style="width: 80%" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.supervisedTime }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td v-if="currentStep === 0" class="td-title"> |
| | | <p><span class="required-span">* </span>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 0" class="td-info"> |
| | | <el-select v-model="form.actionsUserId" clearable filterable |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0 && currentStep !== 0"> |
| | | <td class="td-title"> |
| | | <p>åç°é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.foundDepartment}} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>æ¶é´ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.recordTime}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0 && currentStep !== 0"> |
| | | <td class="td-title"> |
| | | <p>è®°å½äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.recordUserName}} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>è®°å½æ¶é´ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.recordTime}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ¶é¤ä¸ç¬¦å工使éåçæªæ½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 1 && currentStep === 1" v-model="form.eliminateMeasure" |
| | | :rows="5" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 1 && currentStep !== 1" class="td-info1"> {{ form.eliminateMeasure }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td class="td-title"> |
| | | <p>å½åè´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.actionsUserName}} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>å¤çæ¶é´ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.actionsTime}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td v-if="currentStep === 1" class="td-title"> |
| | | <p><span class="required-span">* </span>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 1" class="td-info" colspan="3"> |
| | | <el-select v-model="form.correctUserId" clearable filterable |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ¯å¦éè¦éåçº æ£æªæ½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-radio-group v-model="form.isCorrect" v-removeAriaHidden :disabled="showStep === 2 && currentStep !== 2"> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p>çº æ£æªæ½å¤çåè·è¸ªï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 2 && currentStep === 2" v-model="form.correctContent" |
| | | :rows="5" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 2 && currentStep !== 2" class="td-info1"> {{ form.correctContent }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p>å½åè´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.correctUserName}} |
| | | </td> |
| | | <td v-if="showStep === 2 && currentStep !== 2" class="td-title"> |
| | | <p>å¤çæ¶é´ï¼</p> |
| | | </td> |
| | | <td v-if="showStep === 2 && currentStep !== 2" class="td-info"> |
| | | {{form.correctTime}} |
| | | </td> |
| | | <td v-if="currentStep === 2" class="td-title"> |
| | | <p><span class="required-span">* </span>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 2" class="td-info"> |
| | | <el-select v-model="form.qualityManagerUserId" clearable filterable |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3"> |
| | | <td rowspan="3"> |
| | | <p>æ¯å¦éç¥å®¢æ·å坿¢å¤å·¥ä½</p> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>éç¥å®¢æ·ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-radio-group v-model="form.notifyCustomer" v-removeAriaHidden :disabled="showStep === 3 && currentStep !== 3"> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ¢å¤å·¥ä½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-radio-group v-model="form.backToWork" v-removeAriaHidden :disabled="showStep === 3 && currentStep !== 3"> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3"> |
| | | <td class="td-title"> |
| | | <p>å½åè´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.qualityManagerUserName}} |
| | | </td> |
| | | <td v-if="showStep === 3 && currentStep !== 3" class="td-title"> |
| | | <p>å¤çæ¶é´ï¼</p> |
| | | </td> |
| | | <td v-if="showStep === 3 && currentStep !== 2" class="td-info"> |
| | | {{form.qualityManagerTime}} |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeProcessingDia">å æ¶</el-button> |
| | | <el-button v-if="currentStep !== 4" :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'processingSheet', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | currentStep: 0, |
| | | showStep: 0, |
| | | form: { |
| | | occurrenceDepartment: '', |
| | | headDepartment: '', |
| | | findWay: '', |
| | | recordDetail: '', |
| | | recordAccording: '', |
| | | supervisedUserId: '', |
| | | supervisedUserName: '', |
| | | supervisedTime: '', |
| | | actionsUserId: '', |
| | | actionsUserName: '', |
| | | eliminateMeasure: '', |
| | | correctUserId: '', |
| | | correctUserName: '', |
| | | isCorrect: '', |
| | | qualityManagerUserId: '', |
| | | correctContent: '', |
| | | superviseDetailsId: '', |
| | | superviseDetailsAccordingId: '', |
| | | flowType: '', |
| | | recordUserName: '', |
| | | recordTime: '', |
| | | foundDepartment: '', |
| | | actionsTime: '', |
| | | correctTime: '', |
| | | notifyCustomer: '', |
| | | backToWork: '', |
| | | qualityManagerUserName: '', |
| | | qualityManagerTime: '', |
| | | }, |
| | | editLoad: false, |
| | | personList: [], |
| | | supervisedUserList: [], |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia (row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.form.superviseDetailsId = row.superviseDetailsId |
| | | this.getAuthorizedPerson() // è·å人åå表 |
| | | this.getSupervisedUserList() // è·åå½åé¨é¨äººå |
| | | }, |
| | | // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | searchInfo (row) { |
| | | this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId |
| | | this.$axios.get(this.$api.qualitySupervise.getSuperviseDetailAccording + '?superviseDetailsId=' + row.superviseDetailsId).then(res => { |
| | | if (res.code === 201) return |
| | | if (res.data.superviseDetailsAccordingId === null) { |
| | | this.showStep = 0 |
| | | this.currentStep = 0 |
| | | } else { |
| | | this.form = res.data |
| | | if (res.data.isFinish === 0) { |
| | | if (res.data.actionsUserId) { |
| | | this.showStep = 1 |
| | | this.currentStep = 1 |
| | | } |
| | | if (res.data.correctUserId) { |
| | | this.showStep = 2 |
| | | this.currentStep = 2 |
| | | } |
| | | if (res.data.qualityManagerUserId) { |
| | | this.showStep = 3 |
| | | this.currentStep = 3 |
| | | } |
| | | } else { |
| | | this.currentStep = 4 |
| | | this.showStep = 3 |
| | | } |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // æäº¤ |
| | | handleEdit () { |
| | | if (this.currentStep === 0) { |
| | | if (this.form.findWay === null) { |
| | | this.$message.warning('è¯·éæ©ä¸ç¬¦åå·¥ä½åç°éå¾') |
| | | return |
| | | } |
| | | if (!this.form.supervisedUserId) { |
| | | this.$message.warning('è¯·éæ©è¢«çç£äºº') |
| | | return |
| | | } |
| | | if (!this.form.supervisedTime) { |
| | | this.$message.warning('è¯·éæ©è¢«çç£æ¶é´') |
| | | return |
| | | } |
| | | if (!this.form.actionsUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } else if (this.currentStep === 1) { |
| | | if (!this.form.supervisedUserId) { |
| | | this.$message.warning('è¯·å¡«åæ¶é¤ä¸ç¬¦å工使éåçæªæ½') |
| | | return |
| | | } |
| | | if (!this.form.correctUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } else if (this.currentStep === 2) { |
| | | if (this.form.isCorrect === null) { |
| | | this.$message.warning('è¯·éæ©æ¯å¦éè¦éåçº æ£æªæ½') |
| | | return |
| | | } |
| | | if (!this.form.qualityManagerUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } else if (this.currentStep === 3) { |
| | | if (this.form.notifyCustomer === null) { |
| | | this.$message.warning('è¯·éæ©æ¯å¦éç¥å®¢æ·') |
| | | return |
| | | } |
| | | if (this.form.backToWork === null) { |
| | | this.$message.warning('è¯·éæ©æ¯å¦æ¢å¤å·¥ä½') |
| | | return |
| | | } |
| | | } |
| | | this.editLoad = true |
| | | this.form.supervisedTime = '' |
| | | this.form.flowType = this.currentStep |
| | | delete this.form.recordTime |
| | | delete this.form.actionsTime |
| | | delete this.form.correctTime |
| | | this.$axios.post(this.$api.qualitySupervise.addSuperviseDetailAccording, this.form, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æäº¤æå') |
| | | this.closeProcessingDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeProcessingDia () { |
| | | this.formDia = false |
| | | this.$emit('closeProcessingDia') |
| | | }, |
| | | setStep (step) { |
| | | this.showStep = step |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | 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> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 10vh auto 50px !important; |
| | | } |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | .td-title { |
| | | height: 40px; |
| | | width: 170px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | .td-info { |
| | | padding: 6px; |
| | | } |
| | | .td-info1 { |
| | | display: inline-block; |
| | | width: 100%; |
| | | text-align: left; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="æ£æµå·¥ä½çç£è®°å½è¡¨" |
| | | width="70%" @close="closeRecordsDia"> |
| | | <el-steps :active="currentStep" align-center finish-status="success"> |
| | | <el-step title="宿½"></el-step> |
| | | <el-step title="æ¹å"></el-step> |
| | | </el-steps> |
| | | <div style="height: 65vh;overflow-y: auto"> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <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-input v-if="currentStep === 0" v-model="form.supervisor" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <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"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.testItem }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <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> |
| | | <el-input v-if="currentStep === 0" v-model="form.testDate" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.testDate }}</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.personnel" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.personnel }}</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.device" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.device }}</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.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" |
| | | :rows="4" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.supervisionEvaluation }}</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.handlingAdvice" |
| | | :rows="4" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.handlingAdvice }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td v-if="currentStep === 0" class="td-title"> |
| | | <p><span class="required-span">* </span>è¯·éæ©ä¸ä¸æ¥æ¹å人ï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 0" colspan="5"> |
| | | <el-select v-model="form.ratifyUserId" clearable filterable |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | <td v-if="currentStep === 1" class="td-title"> |
| | | <p>æ¹åè´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 1" class="td-info" colspan="5"> |
| | | {{form.ratifyUserName}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="currentStep === 1 || currentStep === 2"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>审æ¹ç»è®ºï¼</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <el-input v-if="currentStep === 1" |
| | | v-model="form.ratifyOpinion" |
| | | :rows="4" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="currentStep === 2" class="td-info"> {{ form.ratifyOpinion }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p v-if="currentStep === 1">è¯·éæ©æ¯å¦ç¬¦åï¼</p> |
| | | <p v-if="currentStep === 2">æ¯å¦ç¬¦åï¼</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <el-radio-group v-if="currentStep === 1" v-model="form.isAccording"> |
| | | <el-radio :label="0">ä¸ç¬¦å</el-radio> |
| | | <el-radio :label="1">符å</el-radio> |
| | | </el-radio-group> |
| | | <span v-if="currentStep === 2" class="td-info"> {{ form.isAccording === 0 ? 'ä¸ç¬¦å' : '符å' }}</span> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </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> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'recordsDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | form: { |
| | | superviseDetailsId: '', |
| | | superviseDetailsRecordId: '', |
| | | testMember: '', |
| | | supervisor: '', |
| | | testItem: '', |
| | | sampleNumber: '', |
| | | testDate: '', |
| | | personnel: '', |
| | | device: '', |
| | | environment: '', |
| | | sampleCollection: '', |
| | | samplePreparation: '', |
| | | detectionMethod: '', |
| | | inspectionRecord: '', |
| | | examiningReport: '', |
| | | supervisionEvaluation: '', |
| | | handlingAdvice: '', |
| | | ratifyUserId: '', |
| | | ratifyUserName: '', |
| | | ratifyOpinion: '', |
| | | isAccording: '', |
| | | }, |
| | | currentStep: 0, |
| | | editLoad: false, |
| | | personList: [], |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | // æ¥è¯¢çç£è®¡å详æ
è®°å½æµç¨ä¿¡æ¯ |
| | | searchInfo (row) { |
| | | this.$axios.get(this.$api.qualitySupervise.getSuperviseDetailRecord + '?superviseDetailsId=' + row.superviseDetailsId).then(res => { |
| | | if (res.code === 201) return |
| | | // æsuperviseDetailsRecordId说ææäº¤è¿è®°å½ |
| | | if (res.data.superviseDetailsRecordId) { |
| | | // æ¯å¦ç»æ0:æªç»æ, 1:å·²ç»æ |
| | | if (res.data.isFinish === 0) { |
| | | 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 |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // æäº¤æµç¨ |
| | | handleEdit () { |
| | | if (!this.form.testMember || !this.form.supervisor || !this.form.testItem || !this.form.sampleNumber |
| | | || !this.form.testDate) { |
| | | this.$message.warning('请填å宿´') |
| | | return |
| | | } |
| | | if (this.currentStep === 0) { |
| | | this.addInfo() |
| | | } else { |
| | | this.editInfo() |
| | | } |
| | | }, |
| | | // æäº¤è®°å½ |
| | | addInfo () { |
| | | if (!this.form.ratifyUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥æ¹å人') |
| | | return |
| | | } |
| | | this.editLoad = true |
| | | this.$axios.post(this.$api.qualitySupervise.addSuperviseDetailRecord, this.form, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeRecordsDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // æäº¤æ¹å |
| | | editInfo () { |
| | | if (!this.form.ratifyOpinion) { |
| | | this.$message.warning('请填åå®¡æ¹æè§') |
| | | return |
| | | } |
| | | console.log('this.form.isAccording---', this.form.isAccording); |
| | | if (this.form.isAccording === null) { |
| | | this.$message.warning('è¯·éæ©æ¯å¦ç¬¦å') |
| | | return |
| | | } |
| | | this.editLoad = true |
| | | this.$axios.post(this.$api.qualitySupervise.addSuperviseRecordOpinion, this.form, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeRecordsDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeRecordsDia () { |
| | | this.formDia = false |
| | | this.$emit('closeRecordsDia') |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 20px auto 50px !important; |
| | | } |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | .td-title { |
| | | height: 40px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | .td-info { |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | .tables td { |
| | | height: 40px; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="çº æ£æªæ½å¤çå" |
| | | width="60%" @close="closeRectifyDia"> |
| | | <el-steps :active="currentStep" align-center finish-status="success"> |
| | | <el-step title="ä¸åæ ¼æå离äºå®çæè¿°" @click.native="setStep(0)"></el-step> |
| | | <el-step title="åå åæ" @click.native="setStep(1)"></el-step> |
| | | <el-step title="çº æ£æªæ½" @click.native="setStep(2)"></el-step> |
| | | <el-step title="宿½éªè¯ç»æ" @click.native="setStep(3)"></el-step> |
| | | </el-steps> |
| | | <div style="height: 65vh;overflow-y: auto;"> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>ä¸åæ ¼æå离äºå®çæè¿°ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.raiseResult" |
| | | :rows="4" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.raiseResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td v-if="currentStep === 0" class="td-title"> |
| | | <p><span class="required-span">* </span>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 0" class="td-info" colspan="3"> |
| | | <el-select v-model="form.causeUserId" clearable filterable |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0 && currentStep !== 0"> |
| | | <td class="td-title"> |
| | | <p>æåºäººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.raiseUserName}} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>æåºé¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.raiseDepartment}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0 && currentStep !== 0"> |
| | | <td class="td-title"> |
| | | <p>æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | {{form.raiseTime}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>åå åæï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 1 && currentStep === 1" v-model="form.causeResult" |
| | | :rows="5" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 1 && currentStep !== 1" class="td-info1"> {{ form.causeResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1 && currentStep !== 1"> |
| | | <td class="td-title"> |
| | | <p>åå åæäººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.causeUserName}} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>责任é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.causeDepartment}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1 && currentStep !== 1"> |
| | | <td class="td-title"> |
| | | <p>åå åææ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | {{form.causeTime}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td v-if="currentStep === 1" class="td-title"> |
| | | <p><span class="required-span">* </span>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 1" class="td-info" colspan="3"> |
| | | <el-select v-model="form.correctUserId" clearable filterable |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>çº æ£æªæ½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 2 && currentStep === 2" v-model="form.correctResult" |
| | | :rows="5" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 2 && currentStep !== 2" class="td-info1"> {{ form.correctResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p>æåºè¦æ±é¨é¨ç¡®è®¤ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 2 && currentStep === 2" v-model="form.raiseDepartmentAffirm" |
| | | :rows="5" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 2 && currentStep !== 2" class="td-info1"> {{ form.raiseDepartmentAffirm }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2 && currentStep !== 2"> |
| | | <td class="td-title"> |
| | | <p>çº æ£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.correctUserName}} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>责任é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.correctDepartment}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2 && currentStep !== 2"> |
| | | <td class="td-title"> |
| | | <p>çº æ£æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | {{form.correctTime}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td v-if="currentStep === 2" class="td-title"> |
| | | <p><span class="required-span">* </span>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 2" class="td-info" colspan="3"> |
| | | <el-select v-model="form.validationUserId" clearable filterable |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>宿½éªè¯ç»æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 3 && currentStep === 3" v-model="form.validationResult" |
| | | :rows="5" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 3 && currentStep !== 3" class="td-info1"> {{ form.validationResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3 && currentStep !== 3"> |
| | | <td class="td-title"> |
| | | <p>éªè¯äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.validationUserName}} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>责任é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{form.validationDepartment}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3 && currentStep !== 3"> |
| | | <td class="td-title"> |
| | | <p>éªè¯æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | {{form.validationTime}} |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeRectifyDia">å æ¶</el-button> |
| | | <el-button v-if="currentStep !== 4" :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'rectifyDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | currentStep: 0, |
| | | showStep: 0, |
| | | form: { |
| | | superviseDetailsId: '', |
| | | raiseResult: '', |
| | | vdeRaiseResult: '', |
| | | causeUserId: '', |
| | | raiseUserName: '', |
| | | raiseDepartment: '', |
| | | raiseTime: '', |
| | | causeResult: '', |
| | | causeUserName: '', |
| | | causeDepartment: '', |
| | | causeTime: '', |
| | | correctUserId: '', |
| | | correctResult: '', |
| | | raiseDepartmentAffirm: '', |
| | | correctUserName: '', |
| | | correctDepartment: '', |
| | | correctTime: '', |
| | | validationUserId: '', |
| | | validationResult: '', |
| | | validationUserName: '', |
| | | validationDepartment: '', |
| | | validationTime: '', |
| | | }, |
| | | editLoad: false, |
| | | personList: [], |
| | | supervisedUserList: [], |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia (row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.form.superviseDetailsId = row.superviseDetailsId |
| | | this.getAuthorizedPerson() // è·å人åå表 |
| | | this.getSupervisedUserList() // è·åå½åé¨é¨äººå |
| | | }, |
| | | // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | searchInfo (row) { |
| | | this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId |
| | | this.$axios.get(this.$api.qualitySupervise.getSuperviseDetailCorrect + '?superviseDetailsId=' + row.superviseDetailsId).then(res => { |
| | | if (res.code === 201) return |
| | | if (res.data.superviseDetailsCorrectId === null) { |
| | | this.showStep = 0 |
| | | this.currentStep = 0 |
| | | } else { |
| | | this.form = res.data |
| | | if (res.data.isFinish === 0) { |
| | | if (res.data.causeUserId) { |
| | | this.showStep = 1 |
| | | this.currentStep = 1 |
| | | } |
| | | if (res.data.correctUserId) { |
| | | this.showStep = 2 |
| | | this.currentStep = 2 |
| | | } |
| | | if (res.data.validationUserId) { |
| | | this.showStep = 3 |
| | | this.currentStep = 3 |
| | | } |
| | | } else { |
| | | this.currentStep = 4 |
| | | this.showStep = 3 |
| | | } |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // æäº¤ |
| | | handleEdit () { |
| | | if (this.currentStep === 0) { |
| | | if (!this.form.raiseResult) { |
| | | this.$message.warning('请填åä¸åæ ¼æè¿°') |
| | | return |
| | | } |
| | | if (!this.form.causeUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } else if (this.currentStep === 1) { |
| | | if (!this.form.causeResult) { |
| | | this.$message.warning('请填ååå åæ') |
| | | return |
| | | } |
| | | if (!this.form.correctUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } else if (this.currentStep === 2) { |
| | | if (!this.form.correctResult) { |
| | | this.$message.warning('请填åçº æ£æªæ½') |
| | | return |
| | | } |
| | | if (!this.form.validationUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } else if (this.currentStep === 3) { |
| | | if (!this.form.validationResult) { |
| | | this.$message.warning('请填å宿½éªè¯ç»æ') |
| | | return |
| | | } |
| | | } |
| | | this.editLoad = true |
| | | this.form.supervisedTime = '' |
| | | this.form.flowType = this.currentStep |
| | | delete this.form.recordTime |
| | | delete this.form.actionsTime |
| | | delete this.form.correctTime |
| | | this.$axios.post(this.$api.qualitySupervise.addSuperviseDetailCorrect, this.form, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æäº¤æå') |
| | | this.closeRectifyDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeRectifyDia () { |
| | | this.formDia = false |
| | | this.$emit('closeRectifyDia') |
| | | }, |
| | | setStep (step) { |
| | | this.showStep = step |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | 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> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 10vh auto 50px !important; |
| | | } |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | .td-title { |
| | | height: 40px; |
| | | width: 170px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | .td-info { |
| | | padding: 6px; |
| | | } |
| | | .td-info1 { |
| | | display: inline-block; |
| | | width: 100%; |
| | | text-align: left; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- 7.7è´¨éçç£è®¡å--> |
| | | <div> |
| | | <div class="table-card"> |
| | | <TableCard title="年度计å表"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>计ååç§°ï¼</span> |
| | | <el-input v-model="yearForm.superviseName" class="search" placeholder="请è¾å
¥" |
| | | size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearPlanList">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="clearYear">éç½®</el-button> |
| | | </div> |
| | | <div> |
| | | <el-upload ref='upload' :action="action" |
| | | :before-upload="beforeUpload" :headers="headers" :on-error="onError" |
| | | :on-success="handleSuccessUp" :show-file-list="false" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'> |
| | | <el-button :loading="upLoading" size="small" type="primary">导å
¥</el-button> |
| | | </el-upload> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | ref="yearTable" |
| | | :column="yearColumnData" |
| | | :height="'25vh'" |
| | | :highlightCurrentRow="true" |
| | | :rowClick="rowClick" |
| | | :table-data="yearTableData" |
| | | :table-loading="yearLoading" |
| | | style="margin-top: 0.5em;padding: 0 15px;" |
| | | > |
| | | </ZTTable> |
| | | <el-divider></el-divider> |
| | | <!-- å页 --> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination :page-size="yearPage.size" :page-sizes="[10, 20, 30, 40]" |
| | | :total="yearPage.total" layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleYearCurrent" @size-change="handleYearSizeChange"> |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <div class="table-card"> |
| | | <TableCard title="年度计åæç»è¡¨"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>çç£ç®çï¼</span> |
| | | <el-input v-model="yearDetailForm.supervisePurpose" class="search" placeholder="请è¾å
¥" size="small"></el-input> |
| | | <span>çç£é¡¹ç®ï¼</span> |
| | | <el-input v-model="yearDetailForm.superviseProject" class="search" placeholder="请è¾å
¥" size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearDetailPlanList">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="clearDetail">éç½®</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="showDialog('add')">æ°å¢</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable :column="yearDetailColumnData" :height="'25vh'" :table-data="yearDetailTableData" |
| | | :table-loading="yearDetailLoading" style="margin-top: 18px; padding: 0 15px;"> |
| | | </ZTTable> |
| | | <el-divider></el-divider> |
| | | <!-- å页 --> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination :page-size="yearDetailPage.size" :page-sizes="[10, 20, 30, 40]" |
| | | :total="yearDetailPage.total" layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleYearDetailCurrent" @size-change="handleYearDetailSizeChange"> |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <!--æ°å¢ä¿®æ¹å¼¹æ¡--> |
| | | <detail-form-dialog v-if="formDia" ref="formDia" :superviseId="superviseId" @closeDia="closeDia"></detail-form-dialog> |
| | | <!--è®°å½æµç¨å¼¹æ¡--> |
| | | <records-dialog v-if="recordsDia" ref="recordsDia" :superviseId="superviseId" @closeRecordsDia="closeRecordsDia"></records-dialog> |
| | | <!--ä¸ç¬¦åå¤çæµç¨å¼¹æ¡--> |
| | | <processing-sheet v-if="processingDia" ref="processingDia" :superviseId="superviseId" @closeProcessingDia="closeProcessingDia"></processing-sheet> |
| | | <!--çº æ£å¤çæµç¨å¼¹æ¡--> |
| | | <rectify-dialog v-if="rectifyDia" ref="rectifyDia" :superviseId="superviseId" @closeProcessingDia="closeRectifyDia"></rectify-dialog> |
| | | <el-dialog :visible.sync="ratifyDialog" title="æ¹å" width="30%" @close="closeRatifyDia"> |
| | | <span> |
| | | æ¹å夿³¨ï¼ |
| | | <el-input v-model="ratifyInfo.ratifyRemark" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="ratifyLoading" @click="handleRatify(0)">䏿¹å</el-button> |
| | | <el-button :loading="ratifyLoading" type="primary" @click="handleRatify(1)">æ¹ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :visible.sync="downloadDialog" |
| | | title="导åº" |
| | | width="600px"> |
| | | <span> |
| | | <el-button plain type="primary" @click="controlDown">è®°å½å导åº</el-button> |
| | | <el-button plain type="primary" @click="processingDown">å¤çå导åº</el-button> |
| | | <el-button plain type="primary" @click="supervisoryDown">çº æ£å导åº</el-button> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="downloadDialog = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ZTTable from '../caorui/ZTTable/index.vue'; |
| | | import TableCard from '../caorui/TableCard/index.vue'; |
| | | import DetailFormDialog from '../do/a7-quality-control-plan/detailFormDialog.vue'; |
| | | import RecordsDialog from '../do/a7-quality-control-plan/recordsDialog.vue'; |
| | | import ProcessingSheet from '../do/a7-quality-control-plan/processingSheet.vue'; |
| | | import RectifyDialog from '../do/a7-quality-control-plan/rectifyDialog.vue'; |
| | | |
| | | export default { |
| | | name: 'a7-quality-control-plan', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { RectifyDialog, ProcessingSheet, RecordsDialog, DetailFormDialog, TableCard, ZTTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | yearForm: { |
| | | superviseName: '', |
| | | }, |
| | | yearPage: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | yearColumnData: [ |
| | | { |
| | | label: '计ååç§°', |
| | | prop: 'superviseName', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'ç¼å¶äºº', |
| | | prop: 'writeUserName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'ç¼å¶æ¥æ', |
| | | prop: 'writeTime', |
| | | minWidth: '160' |
| | | }, { |
| | | dataType: 'tag', |
| | | label: 'æ¹åç¶æ', |
| | | prop: 'ratifyStatus', |
| | | minWidth: '100', |
| | | formatData: (params) => { |
| | | if (params === 0) { |
| | | return '䏿¹å'; |
| | | } else if (params === 1) { |
| | | return 'æ¹å'; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params === 0) { |
| | | return 'danger'; |
| | | } else if (params === 1) { |
| | | return 'success'; |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | },{ |
| | | label: 'æ¹åå
容', |
| | | prop: 'ratifyRemark', |
| | | minWidth: '100' |
| | | },{ |
| | | label: 'æ¹å人', |
| | | prop: 'ratifyUserName', |
| | | minWidth: '100' |
| | | },{ |
| | | label: 'æ¹åæ¥æ', |
| | | prop: 'ratifyTime', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'åå»ºæ¥æ', |
| | | prop: 'createTime', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'å建人', |
| | | prop: 'createUser', |
| | | minWidth: '100' |
| | | }, { |
| | | dataType: 'action', |
| | | minWidth: '170', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.approvalPlan(row) |
| | | } |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | } |
| | | } |
| | | ] |
| | | }], |
| | | yearTableData: [], // 年表 |
| | | yearLoading: false, |
| | | yearDetailForm: { |
| | | supervisePurpose: '', |
| | | superviseProject: '' |
| | | }, |
| | | yearDetailColumnData: [ |
| | | { |
| | | label: 'çç£æ¥æ', |
| | | prop: 'superviseTime', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'çç£ç®ç', |
| | | prop: 'supervisePurpose', |
| | | minWidth: '150px', |
| | | showOverflowTooltip: true, |
| | | }, { |
| | | label: 'çæ§é¡¹ç®', |
| | | prop: 'superviseProject', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: '被çç£äººå', |
| | | prop: 'supervisee', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'çç£åå ', |
| | | prop: 'superviseReason', |
| | | minWidth: '150px' |
| | | },{ |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | minWidth: '150px' |
| | | },{ |
| | | dataType: 'action', |
| | | width: '260', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.showDialog('edit', row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'è®°å½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.records(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å¤ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.processing(row) |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.isAccording === 1 || row.isAccording === null) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'çº æ£', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.rectify(row) |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.isAccording === 1 || row.isAccording === null || row.isCorrect === null || row.isCorrect === 0) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openDownloadDia(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delYearPlanDetail(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | yearDetailTableData: [], // å¹´æç»è¡¨ |
| | | yearDetailLoading: false, |
| | | yearDetailPage: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | superviseId: '', |
| | | formDia: false, |
| | | recordsDia: false, |
| | | processingDia: false, |
| | | rectifyDia: false, |
| | | ratifyDialog: false, |
| | | ratifyLoading: false, |
| | | ratifyInfo: {}, |
| | | upLoading: false, |
| | | downloadDialog: false, |
| | | download: {}, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getYearPlanList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å¹´åº¦è®¡å表 |
| | | getYearPlanList () { |
| | | const entity = { |
| | | superviseName: this.yearForm.superviseName, |
| | | } |
| | | const page = this.yearPage |
| | | this.yearLoading = true |
| | | this.$axios.post(this.$api.qualitySupervise.pageQualitySupervise, { entity, page }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.yearLoading = false |
| | | if (res.code === 201) return |
| | | this.yearTableData = res.data.records |
| | | this.yearPage.total = res.data.total |
| | | if (this.yearTableData.length > 0) { |
| | | this.rowClick(this.yearTableData[0]) |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.yearLoading = false |
| | | }) |
| | | }, |
| | | clearYear () { |
| | | this.yearForm.superviseName = '' |
| | | this.getYearPlanList() |
| | | }, |
| | | // 导å
¥æµç¨ |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | this.upLoading = true; |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | handleSuccessUp(response) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.getYearPlanList() |
| | | } |
| | | }, |
| | | // æ¹å |
| | | approvalPlan (row) { |
| | | this.ratifyDialog = true |
| | | this.ratifyInfo = row |
| | | }, |
| | | handleRatify (ratifyStatus) { |
| | | // æ¹åç¶æ , 0 ä¸éè¿, 1éè¿ |
| | | this.ratifyInfo.ratifyStatus = ratifyStatus |
| | | this.ratifyLoading = true |
| | | this.$axios.post(this.$api.qualitySupervise.ratifyQualitySupervise, this.ratifyInfo, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.ratifyLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeRatifyDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.ratifyLoading = false |
| | | }) |
| | | }, |
| | | closeRatifyDia () { |
| | | this.ratifyDialog = false |
| | | this.ratifyInfo.ratifyRemark = '' |
| | | this.getYearPlanList() |
| | | }, |
| | | // å¯¼åº |
| | | handleDown (row) { |
| | | this.$axios.get(this.$api.qualitySupervise.exportQualitySupervise + '?superviseId=' + row.superviseId,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.superviseName + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | // å é¤è¿åº¦è®¡å表 |
| | | delPlan (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.yearLoading = true |
| | | this.$axios.get(this.$api.qualitySupervise.delQualitySupervise + '?superviseId=' + row.superviseId).then(res => { |
| | | this.yearLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.getYearPlanList() |
| | | }).catch(err => { |
| | | this.yearLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // 年度计åè¡¨æ ¼ï¼ç¹å»è¡æ°æ®åå·æ°è¯¦æ
|
| | | rowClick(row) { |
| | | this.superviseId = row.superviseId |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // è·å年度æç»è¡¨ |
| | | getYearDetailPlanList () { |
| | | const entity = { |
| | | superviseId: this.superviseId, |
| | | supervisePurpose: this.yearDetailForm.supervisePurpose, |
| | | superviseProject: this.yearDetailForm.superviseProject, |
| | | } |
| | | const page = this.yearDetailPage |
| | | this.yearDetailLoading = true |
| | | this.$axios.post(this.$api.qualitySupervise.pageQualitySuperviseDetail, { entity, page }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.yearDetailLoading = false |
| | | if (res.code === 201) return |
| | | this.yearDetailTableData = res.data.records |
| | | this.yearDetailPage.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.yearDetailLoading = false |
| | | }) |
| | | }, |
| | | // éç½®æç»è¡¨ |
| | | clearDetail () { |
| | | this.yearDetailForm = { |
| | | supervisePurpose: '', |
| | | superviseProject: '' |
| | | } |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æå¼å¹´åº¦æç»æ°å¢ãä¿®æ¹å¼¹æ¡ |
| | | showDialog (type, row) { |
| | | this.formDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeDia () { |
| | | this.formDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // è®°å½æµç¨ |
| | | records (row) { |
| | | this.recordsDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.recordsDia.openDia(row) |
| | | }) |
| | | }, |
| | | closeRecordsDia () { |
| | | this.recordsDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // ä¸ç¬¦åæµç¨å¼¹æ¡ |
| | | processing (row) { |
| | | this.processingDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.processingDia.openDia(row) |
| | | }) |
| | | }, |
| | | closeProcessingDia () { |
| | | this.processingDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // çº æ£æµç¨å¼¹æ¡ |
| | | rectify (row) { |
| | | this.rectifyDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.rectifyDia.openDia(row) |
| | | }) |
| | | }, |
| | | closeRectifyDia () { |
| | | this.rectifyDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æå¼å¯¼åºå¼¹æ¡ |
| | | openDownloadDia (row) { |
| | | this.downloadDialog = true |
| | | this.download = row |
| | | }, |
| | | // 导åºè®°å½ |
| | | controlDown () { |
| | | this.$axios.get( this.$api.qualitySupervise.exportSuperviseDetailRecord+ '?superviseDetailsId=' + this.download.superviseDetailsId,{responseType: "blob"}).then(res => { |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'è®°å½å¯¼åº' + '.docx'; |
| | | link.click(); |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // å¤çåå¯¼åº |
| | | processingDown () { |
| | | this.$axios.get( this.$api.qualitySupervise.superviseDetailAccordingExport+ '?superviseDetailsId=' + this.download.superviseDetailsId,{responseType: "blob"}).then(res => { |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'ä¸ç¬¦å项导åº' + '.docx'; |
| | | link.click(); |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // çº æ£åå¯¼åº |
| | | supervisoryDown () { |
| | | this.$axios.get(this.$api.qualitySupervise.exportSuperviseDetaillCorrect + '?superviseDetailsCorrectId=' + this.download.superviseDetailsCorrectId,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'çç£çº æ£æªæ½' + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | // å é¤å¹´åº¦è¯¦æ
å表 |
| | | delYearPlanDetail (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.yearDetailLoading = true |
| | | this.$axios.get(this.$api.qualitySupervise.delQualitySuperviseDetail + '?superviseDetailsId=' + row.superviseDetailsId).then(res => { |
| | | this.yearDetailLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.getYearDetailPlanList() |
| | | }).catch(err => { |
| | | this.yearDetailLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }) |
| | | }, |
| | | // 年计åå页 |
| | | handleYearCurrent(page) { |
| | | this.yearPage.current = page |
| | | this.getYearPlanList() |
| | | }, |
| | | handleYearSizeChange(size) { |
| | | this.yearPage.size = size |
| | | this.getYearPlanList() |
| | | }, |
| | | // å¹´æç»è®¡åå页 |
| | | handleYearDetailCurrent(page) { |
| | | this.yearDetailPage.current = page |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | handleYearDetailSizeChange(size) { |
| | | this.yearDetailPage.size = size |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi + this.$api.qualitySupervise.importQualitySupervise |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .table-card { |
| | | background-color: #ffffff; |
| | | } |
| | | .flex_column { |
| | | display: flex; |
| | | height: 80vh; |
| | | flex-direction: column; |
| | | overflow: auto; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .pagination { |
| | | display: flex; |
| | | justify-content: space-between |
| | | } |
| | | |
| | | .items_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .date_box { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .search { |
| | | width: 150px; |
| | | padding: 0 16px; |
| | | } |
| | | </style> |