Browse Source

fix:[麻精药表单]新增预填

lkf
15881625488@163.com 2 months ago
parent
commit
e7c425f62f
8 changed files with 224 additions and 9 deletions
  1. +5
    -1
      src/views/business/comps/select/SelectTemplate.vue
  2. +1
    -0
      src/views/business/comps/select/SelectTemplateDialog.vue
  3. +5
    -1
      src/views/business/comps/template/TemplateTable.vue
  4. +201
    -0
      src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue
  5. +1
    -0
      src/views/business/form/drug/comp/tbbdList.vue
  6. +3
    -2
      src/views/business/form/drug/comp/ytbdList.vue
  7. +4
    -2
      src/views/business/study/comp/tbbd/Bj.vue
  8. +4
    -3
      src/views/business/study/comp/ytbd/Bj.vue

+ 5
- 1
src/views/business/comps/select/SelectTemplate.vue View File

@ -29,6 +29,10 @@ export default {
type: Number, type: Number,
default: 0 default: 0
}, },
studyType: {
type: Number,
default: null
},
}, },
watch: { watch: {
value: { value: {
@ -57,7 +61,7 @@ export default {
methods: { methods: {
showSelectTemplate(){ showSelectTemplate(){
if(!this.disabled){ if(!this.disabled){
this.$refs.selectTemplateDialog.show({needPre:this.needPre})
this.$refs.selectTemplateDialog.show({needPre:this.needPre,studyType:this.studyType})
} }
}, },
handleChange(obj) { handleChange(obj) {

+ 1
- 0
src/views/business/comps/select/SelectTemplateDialog.vue View File

@ -74,6 +74,7 @@ export default {
this.selectedId = row.id this.selectedId = row.id
}, },
show(val) { show(val) {
debugger
this.searchForm=_.merge({}, this.searchForm, val) this.searchForm=_.merge({}, this.searchForm, val)
this.selectedId=null this.selectedId=null
this.search() this.search()

+ 5
- 1
src/views/business/comps/template/TemplateTable.vue View File

@ -41,8 +41,11 @@ import SP017 from "./comps/sp/SWYPFXFFXYPZBB/SP017.vue";
import SP018 from "./comps/sp/SWYPFXFFXYPZBB/SP018.vue"; import SP018 from "./comps/sp/SWYPFXFFXYPZBB/SP018.vue";
import Demo from "./comps/sp/Demo.vue"; import Demo from "./comps/sp/Demo.vue";
// //
////
import SYWZPZJHB from "./comps/gsp/SYWZPZJHB.vue"; import SYWZPZJHB from "./comps/gsp/SYWZPZJHB.vue";
import MJYLQSQD from "./comps/gsp/MJYLQSQD.vue"; import MJYLQSQD from "./comps/gsp/MJYLQSQD.vue";
import DMYPPZJLB from "./comps/gsp/DMYPPZJLB.vue";
// PCR // PCR
import PCR001 from "./comps/pcr/PCR001.vue"; import PCR001 from "./comps/pcr/PCR001.vue";
@ -53,8 +56,9 @@ export default {
components: { components: {
Demo, Demo,
SubPackageDialog, TagPrintDialog, SelectReagentDialog, SelectInstrumentDialog, SelectMixReagentDialog, EditSign, SubPackageDialog, TagPrintDialog, SelectReagentDialog, SelectInstrumentDialog, SelectMixReagentDialog, EditSign,
////
MJYLQSQD, SYWZPZJHB, DMYPPZJLB,
// //
MJYLQSQD, SYWZPZJHB,
// //
SP001, SP002, SP003, SP00456, SP008, SP009, SP010, SP011, SP012, SP013, SP014, SP015, SP016, SP017, SP018, SP001, SP002, SP003, SP00456, SP008, SP009, SP010, SP011, SP012, SP013, SP014, SP015, SP016, SP017, SP018,
// PCR // PCR

+ 201
- 0
src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue View File

@ -0,0 +1,201 @@
<!-- 毒麻药品配制记录表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{formData.bdmc || $t('template.gsp.DMYPPZJLB.title')}}<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage label="template.common.baseInfo" ref="baseInfoRef" :formConfig="baseInfoFormConfig"
:formData="formData" />
<LineLabel label="template.gsp.SYWZPZJHB.jhxx" />
<div class="template-form-item">
<BaseInfoFormPackage ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<CustomTable @blur="onHandleTableBlur" :showHeaderSelect="fillType === 'actFill'" :showAddRow="fillType === 'actFill'" :showOperation="fillType === 'actFill'" ref="stepTableRef" :columns="stepColumns"
:formData="formData" >
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>
</template>
</CustomTable>
</div>
<BaseInfoFormPackage label="template.gsp.SYWZPZJHB.tbsm" ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
</div>
</template>
<script>
import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage";
import LineLabel from "@/components/Template/LineLabel";
import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
export default {
name: "DMYPPZJLB",
components: { BaseInfoFormPackage, LineLabel, CustomTable, TableOpertaionDelete },
mixins: [templateMixin],
props: {
value: {
type: {},
default: () => { },
},
fillType: {
type: String,
default: 'preFill',
},
},
watch: {
value: {
immediate: true,
handler(v) {
}
},
fillType: {
immediate: true,
handler(v) {
console.log(v,"fillType")
}
},
},
computed: {
//
remarkConig() {
return [
{
type: "cellItem",
config: {
remark: {
label: "",
type: "textarea",
fillType: "actFill",
span: 1,
placeholder: "template.common.remarkPlaceholder",
maxlength: 1000,
rows: 5
}
}
}
]
},
//
baseInfoFormConfig() {
return [
{
type: "cardItem",
config: {
studyMc: {
label: "template.common.testName",
type: "input",
disabled: true,
},
studySn: {
label: "template.common.testNumber",
type: "input",
disabled: true,
},
}
},
]
},
//
stepFormConfig() {
return [
{
type: "step",
config: {
drawTime: {
label: "template.gsp.SYWZPZJHB.lqsj",
type: "input",
fillType: "actFill",
},
analyzeTime: {
label: "template.gsp.SYWZPZJHB.fxsj",
type: "input",
fillType: "actFill",
},
testSubstance: {
label: "template.gsp.SYWZPZJHB.sywz",
type: "input",
fillType: "actFill",
},
configFrequency: {
label: "template.gsp.SYWZPZJHB.pzpl",
type: "input",
fillType: "actFill",
},
}
}
]
},
//
stepColumns() {
return [
{
label: "template.gsp.SYWZPZJHB.gyzjhzb",
prop: "startSolutionCode",
width: 280,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
},
{
label: "template.gsp.SYWZPZJHB.pznd",
prop: "preparationConcentration",
width: 280,
headerSelectKey: "preparationConcentrationUnit",
fillType: "actFill",
headerOptions: this.getDictOptions('business_nddw'),
defaultValue: "mg",
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyMaxlength: 10,
},
{
label: "template.gsp.SYWZPZJHB.pztj",
prop: "preparationVolume",
width: 280,
headerSelectKey: "preparationVolumeUnit",
fillType: "actFill",
headerOptions: this.getDictOptions('business_tjdw'),
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyMaxlength: 10,
},
]
},
},
data() {
return {
selectReagentVisible: false,
subSolutionVisible: false,
currentSubKey: "",//key
dataSource: [],
stepTableDataSource: [],
};
},
mounted() {
},
methods: {
//
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef","stepFormPackageRef", "remarkRef","stepTableRef"])
},
//
async getFormData() {
return await this.validFormFields(["baseInfoRef", "stepFormPackageRef","stepTableRef","remarkRef"]);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
</style>

+ 1
- 0
src/views/business/form/drug/comp/tbbdList.vue View File

@ -330,6 +330,7 @@ export default {
let params = caesarCipher(JSON.stringify({ let params = caesarCipher(JSON.stringify({
url: this.$route.fullPath, url: this.$route.fullPath,
studyId: this.searchForm.studyId, studyId: this.searchForm.studyId,
studyType: 10,
formId: null formId: null
})) }))
this.$tab.openPage(this.$t('page.business.study.studyFormFill.xzbd'), '/drug/formFillBj/' + params) this.$tab.openPage(this.$t('page.business.study.studyFormFill.xzbd'), '/drug/formFillBj/' + params)

+ 3
- 2
src/views/business/form/drug/comp/ytbdList.vue View File

@ -291,7 +291,7 @@ export default {
checkRole, checkRole,
copy() { copy() {
this.$modal.loading() this.$modal.loading()
studyFormPre_studyList().then(response => {
studyFormPre_studyList({type:10}).then(response => {
this.studyList = response.data this.studyList = response.data
this.formXz.studyId = null this.formXz.studyId = null
this.formXz.formPreId = null this.formXz.formPreId = null
@ -303,7 +303,7 @@ export default {
}) })
}, },
previewFzbd() { previewFzbd() {
this.$modal.loading()
this.$modal.loading()
studyFormPre_info({ id: this.formXz.formPreId }).then(response => { studyFormPre_info({ id: this.formXz.formPreId }).then(response => {
this.formDatePreview = _.merge({}, response.data, { this.formDatePreview = _.merge({}, response.data, {
studySn: this.searchForm.studySn, studySn: this.searchForm.studySn,
@ -402,6 +402,7 @@ export default {
studySn: this.searchForm.studySn, studySn: this.searchForm.studySn,
studyMc: this.searchForm.studyMc, studyMc: this.searchForm.studyMc,
studyId: this.searchForm.studyId, studyId: this.searchForm.studyId,
studyType: 10,
permitForSecectUser: 'business:drugFormPre:sh' permitForSecectUser: 'business:drugFormPre:sh'
}) })
}, },

+ 4
- 2
src/views/business/study/comp/tbbd/Bj.vue View File

@ -42,7 +42,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="bdmbTitle" prop="templateId"> <el-form-item :label="bdmbTitle" prop="templateId">
<SelectTemplate v-model="form.templateId" :disabled="form.id && form.id !== ''" <SelectTemplate v-model="form.templateId" :disabled="form.id && form.id !== ''"
:name="form.templateMc" @change="selectTemplateChange" :needPre="1" />
:name="form.templateMc" :studyType="studyType" @change="selectTemplateChange" :needPre="1" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -348,7 +348,8 @@ export default {
trigger: 'blur' trigger: 'blur'
}] }]
}, },
templateData: {}
templateData: {},
studyType:null
} }
}, },
computed: { computed: {
@ -409,6 +410,7 @@ export default {
let params = null let params = null
try { try {
params = JSON.parse(caesarDecipher(this.$route.params.key)) params = JSON.parse(caesarDecipher(this.$route.params.key))
this.studyType = params.studyType||null
} catch (e) { } catch (e) {
console.log('参数错误') console.log('参数错误')
} }

+ 4
- 3
src/views/business/study/comp/ytbd/Bj.vue View File

@ -42,7 +42,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="$t('page.business.form.bdmb')" prop="templateId"> <el-form-item :label="$t('page.business.form.bdmb')" prop="templateId">
<SelectTemplate v-model="form.templateId" :disabled="form.id && form.id !== ''" :needPre="10" <SelectTemplate v-model="form.templateId" :disabled="form.id && form.id !== ''" :needPre="10"
:name="form.templateMc" @change="selectTemplateChange" />
:name="form.templateMc" :studyType="studyType" @change="selectTemplateChange" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -185,7 +185,8 @@ export default {
}] }]
}, },
templateData: {}
templateData: {},
studyType:null
} }
}, },
computed: { computed: {
@ -263,6 +264,7 @@ export default {
edit(row) { edit(row) {
this.reset() this.reset()
this.permitForSecectUser = row.permitForSecectUser this.permitForSecectUser = row.permitForSecectUser
this.studyType = row.studyType||null
if (row && row.id) { if (row && row.id) {
this.showIndex = 2 this.showIndex = 2
this.$modal.loading() this.$modal.loading()
@ -311,7 +313,6 @@ export default {
let content = await this.$refs.templateTable.getFormData() let content = await this.$refs.templateTable.getFormData()
if (content) { if (content) {
this.form.bdnr = JSON.stringify(content) this.form.bdnr = JSON.stringify(content)
debugger
this.openSubmit = true this.openSubmit = true
} }
}, },

Loading…
Cancel
Save