| | |
| | | <el-button type="primary" @click="addTemplateDia" :loading="templateLoading">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="检验下发" :visible.sync="issuedDialogVisible" width="400px"> |
| | | <div class="body" style="max-height: 60vh;"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label"><span class="required-span">* </span>约定时间:</div> |
| | | <div class="search_input"> |
| | | <el-date-picker size="small" v-model="distributeData.appointed" type="date" placeholder="选择日期" |
| | | value-format="yyyy-MM-dd" style="width: 100%;" format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label"><span class="required-span">* </span>指派人员:</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="distributeData.userId" placeholder="请选择" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="issuedDialogVisible=false">取 消</el-button> |
| | | <el-button type="primary" @click="submitForm2" :loading="upLoad">确 定</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | saveLoad: false, |
| | | templateDia:false, |
| | | templateLoading:false, |
| | | templateName:'' |
| | | templateName:'', |
| | | issuedDialogVisible:false, |
| | | distributeData:{ |
| | | appointed:'', |
| | | userId:'' |
| | | }, |
| | | personList:[], |
| | | upLoad:false, |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | this.getUserNow() |
| | | this.selectStandardTreeList() |
| | | this.selectInsOrderTemplate() |
| | | this.getAuthorizedPerson(); |
| | | if(this.active==1){ |
| | | // 下单流程 |
| | | }else { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | 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 |
| | | }) |
| | | }, |
| | | selectEnumByCategoryForType() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "紧急程度" |
| | |
| | | this.saveLoad = false |
| | | if(res.code==201)return |
| | | this.$message.success('已提交') |
| | | this.$parent.playOrder(0) |
| | | // 如果紧急程度为紧急,需要直接下发人员 |
| | | if(this.addObj.type==2){ |
| | | this.issuedDialogVisible = true; |
| | | this.$axios.post(this.$api.insOrder.selectOrderManDay,{ |
| | | id: res.data |
| | | }).then(ress=>{ |
| | | // TODO 需要再确认一下返回值 |
| | | this.distributeData.orderId = res.data |
| | | // this.distributeData.sampleId = res.data.sampleId |
| | | this.distributeData.appointed = ress.data |
| | | }) |
| | | }else{ |
| | | this.$parent.playOrder(0) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | |
| | | this.$parent.playOrder(0) |
| | | }) |
| | | }, |
| | | // 下发 |
| | | submitForm2(){ |
| | | if(this.distributeData.appointed==null||this.distributeData.appointed==''){ |
| | | this.$message.error('约定时间未填写') |
| | | return |
| | | } |
| | | if(this.distributeData.userId==null||this.distributeData.userId==''){ |
| | | this.$message.error('指派人员未填写') |
| | | return |
| | | } |
| | | this.upLoad = true; |
| | | this.$axios.post(this.$api.insOrder.upInsOrder, { |
| | | orderId: this.distributeData.orderId, |
| | | sampleId: this.distributeData.sampleId, |
| | | appointed: this.distributeData.appointed, |
| | | userId: this.distributeData.userId |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.upLoad = false |
| | | return |
| | | } |
| | | this.$message.success('提交成功') |
| | | this.upLoad = false |
| | | this.issuedDialogVisible = false |
| | | this.$parent.playOrder(0) |
| | | }).catch(e => { |
| | | this.$message.error('修改失败') |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | getUserNow() { |
| | | this.$axios.get(this.$api.user.getUserNow).then(res => { |
| | | let selects = res.data |