|
|
|
@ -2,20 +2,13 @@ |
|
|
|
<el-dialog :title="$t(title)" @close="onCancel" :visible.sync="visible" append-to-body width="80%"> |
|
|
|
<!-- 麻醉/精神药品配制/领取申请单 --> |
|
|
|
<div v-if="type === 'MJYLQSQD'" class="header-row"> |
|
|
|
<el-radio-group v-model="radio"> |
|
|
|
<el-radio-group v-model="radio" @input="changeRadio"> |
|
|
|
<el-radio :label="1">试验</el-radio> |
|
|
|
<el-radio :label="2"> |
|
|
|
部门 |
|
|
|
</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
<el-select v-model="depart" filterable :placeholder="$t('form.placeholderSelect')"> |
|
|
|
<el-option |
|
|
|
v-for="item in options" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<select-dept v-if="radio==2" v-model="depart" style="width:200px;margin-left:10px" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
<SelectTable v-if = "isShowTable" ref="selectSjRef" :columns="columns" |
|
|
|
@ -33,11 +26,13 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import SelectTable from '@/components/Template/SelectTable.vue'; |
|
|
|
import { public_sjList } from '@/api/business/public/public'; |
|
|
|
import SelectDept from "@/views/business/comps/select/SelectDept"; |
|
|
|
import { public_sjList,public_bzList } from '@/api/business/public/public'; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
SelectTable, |
|
|
|
SelectDept |
|
|
|
}, |
|
|
|
props: { |
|
|
|
type: { |
|
|
|
@ -108,17 +103,9 @@ export default { |
|
|
|
selectedId: "", |
|
|
|
currentRow: {}, |
|
|
|
radio:1, |
|
|
|
|
|
|
|
bzList:[], |
|
|
|
depart:"", |
|
|
|
options:[ |
|
|
|
{ |
|
|
|
value:1, |
|
|
|
label:"部门1", |
|
|
|
}, |
|
|
|
{ |
|
|
|
value:2, |
|
|
|
label:"部门", |
|
|
|
}, |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -143,6 +130,14 @@ export default { |
|
|
|
show(){ |
|
|
|
this.visible = true |
|
|
|
this.showTableData() |
|
|
|
if(this.type === 'MJYLQSQD'){ |
|
|
|
this.getBzList() |
|
|
|
} |
|
|
|
}, |
|
|
|
getBzList(){ |
|
|
|
public_bzList(this.searchForm).then(response => { |
|
|
|
this.bzList = response.data |
|
|
|
}); |
|
|
|
}, |
|
|
|
showTableData(){ |
|
|
|
if(this.$refs.selectSjRef){ |
|
|
|
@ -163,8 +158,13 @@ export default { |
|
|
|
if(this.radio === 1) { |
|
|
|
row = row; |
|
|
|
}else{ |
|
|
|
const o = this.options.find(item => item.value === this.depart); |
|
|
|
row = {syNo:o.label,SD:o.value}; |
|
|
|
const o = this.bzList.find(item => item.deptId == this.depart); |
|
|
|
if(o){ |
|
|
|
row = o; |
|
|
|
}else{ |
|
|
|
this.$message.error(`该部门没有设置部长!`) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.$emit('submit', this.selectedId,row); |
|
|
|
@ -173,6 +173,11 @@ export default { |
|
|
|
this.selectedId = code; |
|
|
|
this.currentRow = row; |
|
|
|
}, |
|
|
|
changeRadio(val){ |
|
|
|
if(val==1){ |
|
|
|
this.showTableData() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|