Browse Source

fix:[非实验管理]麻精药申请单

lkf
15881625488@163.com 3 months ago
parent
commit
875f7c63ef
1 changed files with 60 additions and 65 deletions
  1. +60
    -65
      src/views/business/comps/template/comps/gy/MJYLQSQD.vue

+ 60
- 65
src/views/business/comps/template/comps/gy/MJYLQSQD.vue View File

@ -2,31 +2,24 @@
<template> <template>
<div> <div>
<div class="detail-container"> <div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{formData.bdmc || "麻醉/精神药品配制/领取申请单"}}<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc ||
"麻醉/精神药品配制/领取申请单" }}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content"> <div class="detail-content">
<div class="content"> <div class="content">
<LineLabel label="基本信息" /> <LineLabel label="基本信息" />
<div class="template-form-item"> <div class="template-form-item">
<BaseInfoFormPcakge @clickable = "onClickSybh" ref="baseInfoRef" :formConfig="baseInfoFormConfig"
<BaseInfoFormPcakge @clickable="onClickSybh" ref="baseInfoRef" :formConfig="baseInfoFormConfig"
:formData="formData" /> :formData="formData" />
</div> </div>
<BaseInfoFormPcakge label="备注" ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> <BaseInfoFormPcakge label="备注" ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div> </div>
</div> </div>
</div> </div>
<SelectReagentDialog
type = "MJYLQSQD"
selectedCode="sn"
title = "请选择试验/部门"
:searchForm="searchForm"
:columns="columns"
@submit="onDialogSubmit"
:listApi="public_studyList"
ref="selectReagentDialogRef" >
</SelectReagentDialog>
<SelectReagentDialog type="MJYLQSQD" selectedCode="sn" title="请选择试验/部门" :searchForm="searchForm"
:columns="columns" @submit="onDialogSubmit" :listApi="public_studyList" ref="selectReagentDialogRef">
</SelectReagentDialog>
</div> </div>
</template> </template>
@ -41,8 +34,8 @@ import { public_studyList } from '@/api/business/public/public';
export default { export default {
name: "MJYLQSQD", name: "MJYLQSQD",
dicts:["business_gyjl","business_gynd","business_dwzs","business_dwsl","business_dwtz","business_sywzmc"],
components: { BaseInfoFormPcakge, LineLabel, CustomTable, TableOpertaion,SelectReagentDialog },
dicts: ["business_gyjl", "business_gynd", "business_dwzs", "business_dwsl", "business_dwtz", "business_sywzmc"],
components: { BaseInfoFormPcakge, LineLabel, CustomTable, TableOpertaion, SelectReagentDialog },
mixins: [templateMixin], mixins: [templateMixin],
props: { props: {
value: { value: {
@ -64,12 +57,12 @@ export default {
fillType: { fillType: {
immediate: true, immediate: true,
handler(v) { handler(v) {
console.log(v,"fillType")
console.log(v, "fillType")
} }
}, },
}, },
computed: { computed: {
// //
remarkConig() { remarkConig() {
return [ return [
@ -163,7 +156,7 @@ export default {
fillType: "actFill", fillType: "actFill",
subType: "select", subType: "select",
subFillType: "actFill", subFillType: "actFill",
subKey: "dwzsUnit",
subKey: "dwslUnit",
otherCode: "dwslOther", otherCode: "dwslOther",
subOptions: this.getDictOptions('business_dwsl'), subOptions: this.getDictOptions('business_dwsl'),
}, },
@ -175,71 +168,70 @@ export default {
}, },
data() { data() {
return { return {
syId:null,
bmId:null,
sdId:null,
public_studyList:public_studyList,
syId: null,
bmId: null,
sdId: null,
public_studyList: public_studyList,
searchForm: { searchForm: {
name: { name: {
label:this.$t('page.business.study.study.name'),
label: this.$t('page.business.study.study.name'),
}, },
sn: { sn: {
label:this.$t('page.business.study.study.sn'),
label: this.$t('page.business.study.study.sn'),
}, },
leaderName: { leaderName: {
label:this.$t('page.business.study.study.leader'),
label: this.$t('page.business.study.study.leader'),
}, },
}, },
columns:[
{
prop: 'name',
label: 'page.business.study.study.name',
},
{
prop: 'sn',
label: 'page.business.study.study.sn',
},
{
prop: 'status',
label: 'page.business.study.study.status',
},
{
prop: 'leaderName',
label: 'page.business.study.study.leader',
},
{
prop: 'createTime',
label: 'page.business.study.study.createDate',
}
]
columns: [
{
prop: 'name',
label: 'page.business.study.study.name',
},
{
prop: 'sn',
label: 'page.business.study.study.sn',
},
{
prop: 'status',
label: 'page.business.study.study.status',
},
{
prop: 'leaderName',
label: 'page.business.study.study.leader',
},
{
prop: 'createTime',
label: 'page.business.study.study.createDate',
}
]
}; };
}, },
mounted() { mounted() {
}, },
methods: { methods: {
onDialogSubmit(selectedId,currentRow){
onDialogSubmit(selectedId, currentRow) {
console.log(JSON.stringify(currentRow)) console.log(JSON.stringify(currentRow))
// //
if(currentRow.type==1){
if (currentRow.type == 1) {
this.$refs.baseInfoRef.batchUpdateFormData({ this.$refs.baseInfoRef.batchUpdateFormData({
syNo: currentRow.sn, syNo: currentRow.sn,
SD: currentRow.leaderName, SD: currentRow.leaderName,
}); });
this.syId=currentRow.id
this.bmId=currentRow.deptId
this.sdId=currentRow.leader
this.syId = currentRow.id
this.bmId = currentRow.deptId
this.sdId = currentRow.leader
} }
// //
if(currentRow.type==2){
if (currentRow.type == 2) {
this.$refs.baseInfoRef.batchUpdateFormData({ this.$refs.baseInfoRef.batchUpdateFormData({
syNo: currentRow.deptName, syNo: currentRow.deptName,
SD: currentRow.nickName, SD: currentRow.nickName,
}); });
this.syId=''
this.bmId=currentRow.deptId
this.sdId=currentRow.userId
this.syId = ''
this.bmId = currentRow.deptId
this.sdId = currentRow.userId
} }
console.log(currentRow,"currentRow")
this.$refs.selectReagentDialogRef.onCancel() this.$refs.selectReagentDialogRef.onCancel()
}, },
// //
@ -248,14 +240,18 @@ export default {
// this.$refs.baseInfoRef.setClickable("syNo", true); // this.$refs.baseInfoRef.setClickable("syNo", true);
}, },
// //
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
getFilledFormData() {
let content = this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
content.syId = this.syId
content.bmId = this.bmId
content.sdId = this.sdId
return content;
}, },
async getFormData() { async getFormData() {
let content = await this.validFormFields(["baseInfoRef","remarkRef"]);
content.syId=this.syId
content.bmId=this.bmId
content.sdId=this.sdId
let content = await this.validFormFields(["baseInfoRef", "remarkRef"]);
content.syId = this.syId
content.bmId = this.bmId
content.sdId = this.sdId
return content; return content;
}, },
async onSave() { async onSave() {
@ -270,5 +266,4 @@ export default {
.mt-20 { .mt-20 {
margin-top: 20px; margin-top: 20px;
} }
</style> </style>

Loading…
Cancel
Save