Browse Source

fix:[麻精药表单]领取申请单

lkf
15881625488@163.com 2 months ago
parent
commit
43b14a91a8
1 changed files with 92 additions and 34 deletions
  1. +92
    -34
      src/views/business/comps/template/comps/gsp/MJYLQSQD.vue

+ 92
- 34
src/views/business/comps/template/comps/gsp/MJYLQSQD.vue View File

@ -8,15 +8,17 @@
<div class="content"> <div class="content">
<LineLabel label="template.gsp.MJYLQSQD.jbxx" /> <LineLabel label="template.gsp.MJYLQSQD.jbxx" />
<div class="template-form-item"> <div class="template-form-item">
<BaseInfoFormPcakge @clickable="onClickSybh" ref="baseInfoRef" :formConfig="baseInfoFormConfig"
:formData="formData" />
<BaseInfoFormPcakge @select="onSelectBlur" @clickable="onClickSybh" ref="baseInfoRef"
:formConfig="baseInfoFormConfig" :formData="formData" />
</div> </div>
<BaseInfoFormPcakge label="template.common.remark" ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
<BaseInfoFormPcakge label="template.common.remark" ref="remarkRef" :formConfig="remarkConig"
:formData="formData" />
</div> </div>
</div> </div>
</div> </div>
<SelectReagentDialog type="MJYLQSQD" selectedCode="sn" title="template.gsp.MJYLQSQD.qxzsyhbm" :searchForm="searchForm"
:columns="columns" @submit="onDialogSubmit" :listApi="public_studyList" ref="selectReagentDialogRef">
<SelectReagentDialog type="MJYLQSQD" selectedCode="sn" title="template.gsp.MJYLQSQD.qxzsyhbm"
:searchForm="searchForm" :columns="columns" @submit="onDialogSubmit" :listApi="public_studyList"
ref="selectReagentDialogRef">
</SelectReagentDialog> </SelectReagentDialog>
</div> </div>
</template> </template>
@ -29,6 +31,7 @@ import CustomTable from '@/components/Template/CustomTable.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue";
import SelectReagentDialog from "../../dialog/SelectReagentDialog.vue"; import SelectReagentDialog from "../../dialog/SelectReagentDialog.vue";
import { public_studyList } from '@/api/business/public/public'; import { public_studyList } from '@/api/business/public/public';
import { listData } from "@/api/system/dict/data"
export default { export default {
name: "MJYLQSQD", name: "MJYLQSQD",
@ -60,7 +63,6 @@ export default {
}, },
}, },
computed: { computed: {
// //
remarkConig() { remarkConig() {
return [ return [
@ -94,28 +96,28 @@ export default {
SD: { SD: {
label: "template.gsp.MJYLQSQD.sd", label: "template.gsp.MJYLQSQD.sd",
type: "input", type: "input",
disabled:true,
fillType: "actFill", fillType: "actFill",
}, },
sywzmc: { sywzmc: {
label: "template.gsp.MJYLQSQD.sywzmc", label: "template.gsp.MJYLQSQD.sywzmc",
type: "select", type: "select",
fillType: "actFill", fillType: "actFill",
otherCode: "sywzmcOther",
options: this.getDictOptions('business_sywzmc'), options: this.getDictOptions('business_sywzmc'),
}, },
gyjl: { gyjl: {
label: "template.gsp.MJYLQSQD.gyjl", label: "template.gsp.MJYLQSQD.gyjl",
type: "select", type: "select",
fillType: "actFill",
otherCode: "gyjlOther", otherCode: "gyjlOther",
options: this.getDictOptions('business_gyjl'),
fillType: "actFill",
options: this.gyjlOptions,
}, },
xynd: { xynd: {
label: "template.gsp.MJYLQSQD.xynd", label: "template.gsp.MJYLQSQD.xynd",
type: "select", type: "select",
fillType: "actFill",
otherCode: "xyndOther", otherCode: "xyndOther",
options: this.getDictOptions('business_gynd'),
fillType: "actFill",
options: this.gyndOptions,
}, },
xyl: { xyl: {
label: "template.gsp.MJYLQSQD.xyl", label: "template.gsp.MJYLQSQD.xyl",
@ -162,13 +164,10 @@ export default {
} }
}, },
] ]
},
}
}, },
data() { data() {
return { return {
syId: null,
bmId: null,
sdId: null,
public_studyList: public_studyList, public_studyList: public_studyList,
searchForm: { searchForm: {
name: { name: {
@ -202,12 +201,76 @@ export default {
prop: 'createTime', prop: 'createTime',
label: 'page.business.study.study.createDate', label: 'page.business.study.study.createDate',
} }
]
],
gyjlOptionsOld: [],
gyndOptionsOld: [],
gyjlOptions: [],
gyndOptions: []
}; };
}, },
created() {
this.getGyjl()
this.getGynd()
},
mounted() { mounted() {
}, },
methods: { methods: {
onSelectBlur(val) {
if (val.key == 'sywzmc') {
let tmp = []
_.forEach(_.filter(this.gyjlOptionsOld, function (o) {
return o.remark.indexOf(val.value) > -1;
}), function (item) {
tmp.push({ label: item.dictLabel, value: item.dictValue })
})
this.gyjlOptions = tmp
this.gyndOptions = []
this.$refs.baseInfoRef.batchUpdateFormData({
gyjl: '',
xynd: '',
});
}
if (val.key == 'gyjl') {
let tmp = []
_.forEach(_.filter(this.gyndOptionsOld, function (o) {
return o.remark.indexOf(val.value) > -1;
}), function (item) {
tmp.push({ label: item.dictLabel, value: item.dictValue })
})
this.gyndOptions = tmp
this.$refs.baseInfoRef.batchUpdateFormData({
xynd: '',
});
}
},
//
getGyjl() {
listData({
pageNum: 1,
pageSize: 999999,
dictType: 'business_gyjl',
status: 0
}).then(response => {
this.gyjlOptionsOld = response.rows
if (this.formData.sywzmc && this.formData.sywzmc !== '') {
this.onSelectBlur({ key: 'sywzmc', value: this.formData.sywzmc })
}
})
},
//
getGynd() {
listData({
pageNum: 1,
pageSize: 999999,
dictType: 'business_gynd',
status: 0
}).then(response => {
this.gyndOptionsOld = response.rows
if (this.formData.gyjl && this.formData.gyjl !== '') {
this.onSelectBlur({ key: 'gyjl', value: this.formData.gyjl })
}
})
},
onDialogSubmit(selectedId, currentRow) { onDialogSubmit(selectedId, currentRow) {
console.log(JSON.stringify(currentRow)) console.log(JSON.stringify(currentRow))
// //
@ -216,9 +279,9 @@ export default {
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.formData.syId = currentRow.id
this.formData.bmId = currentRow.deptId
this.formData.sdId = currentRow.leader
} }
// //
if (currentRow.type == 2) { if (currentRow.type == 2) {
@ -226,9 +289,9 @@ export default {
syNo: currentRow.deptName, syNo: currentRow.deptName,
SD: currentRow.nickName, SD: currentRow.nickName,
}); });
this.syId = ''
this.bmId = currentRow.deptId
this.sdId = currentRow.userId
this.formData.syId = ''
this.formData.bmId = currentRow.deptId
this.formData.sdId = currentRow.userId
} }
this.$refs.selectReagentDialogRef.onCancel() this.$refs.selectReagentDialogRef.onCancel()
}, },
@ -240,23 +303,18 @@ export default {
// //
getFilledFormData() { getFilledFormData() {
let content = this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]) let content = this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
content.syId = this.syId
content.bmId = this.bmId
content.sdId = this.sdId
content.syId = this.formData.syId
content.bmId = this.formData.bmId
content.sdId = this.formData.sdId
return content; return content;
}, },
async getFormData() { async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "remarkRef"]); let content = await this.validFormFields(["baseInfoRef", "remarkRef"]);
content.syId = this.syId
content.bmId = this.bmId
content.sdId = this.sdId
content.syId = this.formData.syId
content.bmId = this.formData.bmId
content.sdId = this.formData.sdId
return content; return content;
},
async onSave() {
const formData = await this.getFormData();
// const formData = await this.$refs.stepTableRef.getFormData();
console.log(formData, "formData")
},
}
} }
}; };
</script> </script>

Loading…
Cancel
Save