Browse Source

fix:[表单管理]优化

lkf
15881625488@163.com 1 month ago
parent
commit
f66911992a
4 changed files with 70 additions and 44 deletions
  1. +18
    -13
      src/views/business/study/comp/jhbd/Bj.vue
  2. +17
    -12
      src/views/business/study/comp/sqbd/Bj.vue
  3. +10
    -4
      src/views/business/study/comp/tbbd/Bj.vue
  4. +25
    -15
      src/views/business/study/comp/ytbd/Bj.vue

+ 18
- 13
src/views/business/study/comp/jhbd/Bj.vue View File

@ -41,8 +41,8 @@
<el-row>
<el-col :span="24">
<el-form-item :label="$t('page.business.form.bdmb')" prop="templateId">
<SelectTemplate v-model="form.templateId" :studyType="studyType" :studyFormType="studyFormType" :needPre="1" :name="form.templateMc"
@change="selectTemplateChange" />
<SelectTemplate v-model="form.templateId" :studyType="studyType" :studyFormType="studyFormType"
:needPre="1" :name="form.templateMc" @change="selectTemplateChange" />
</el-form-item>
</el-col>
</el-row>
@ -181,7 +181,7 @@ export default {
},
templateData: {},
studyType: null,
studyFormType:null
studyFormType: null
}
},
computed: {
@ -195,7 +195,7 @@ export default {
onPlanCallback(data) {
console.log("data:" + JSON.stringify(data))
console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
if (data.type == 'fieldChanged' ) {
if (data.type == 'fieldChanged') {
studyFormPlan_updateBdnr(
{
id: this.form.id,
@ -235,9 +235,14 @@ export default {
})
},
selectTemplateChange(val) {
if (this.$i18n.locale === 'zh_CN') {
this.form.templateMc = val.name
this.form.bdmc = val.name
} else {
this.form.templateMc = val.nameEn
this.form.bdmc = val.nameEn
}
this.form.bdnr = val.content
this.form.bdmc = val.name
this.form.templateMc = val.name
this.form.templateSn = val.sn
this.templateData = deepClone(this.form)
},
@ -250,10 +255,10 @@ export default {
id: null,
studyId: null,
bdbh: null,
bdmc: '试验物质配制计划表',
bdmc: this.$i18n.locale === 'zh_CN'?'试验物质配制计划表':'试验物质配制计划表',
bdsm: null,
templateId: 1,
templateMc: '试验物质配制计划表',
templateMc: this.$i18n.locale === 'zh_CN'?'试验物质配制计划表':'试验物质配制计划表',
templateSn: 'SYWZPZJHB',
bdnr: null,
fzrsh: null,
@ -267,8 +272,8 @@ export default {
},
edit(row) {
this.reset()
this.studyType = row.studyType||null
this.studyFormType = row.studyFormType||null
this.studyType = row.studyType || null
this.studyFormType = row.studyFormType || null
this.form.qmyy = this.$t('page.business.study.studyFormPlan.cjjl')
if (row && row.id) {
this.showIndex = 2
@ -285,9 +290,9 @@ export default {
this.showIndex = 1
this.form = _.merge({}, this.form, row)
this.templateData = deepClone(this.form)
let name=this.studyType==1?'试验':(this.studyType==5?'非试验表单':'麻精药表单')
let nameEn=this.studyType==1?'Study':(this.studyType==5?'Non-study':'ontrolled Drug')
this.saveSimpleLog({jcmc:'计划表单新增',jcmcEn:'Plan Table Create',name:name,nameEn:nameEn})
let name = this.studyType == 1 ? '试验' : (this.studyType == 5 ? '非试验表单' : '麻精药表单')
let nameEn = this.studyType == 1 ? 'Study' : (this.studyType == 5 ? 'Non-study' : 'ontrolled Drug')
this.saveSimpleLog({ jcmc: '计划表单新增', jcmcEn: 'Plan Table Create', name: name, nameEn: nameEn })
this.open = true
}
},

+ 17
- 12
src/views/business/study/comp/sqbd/Bj.vue View File

@ -41,8 +41,8 @@
<el-row>
<el-col :span="24">
<el-form-item :label="$t('page.business.form.bdmb')" prop="templateId">
<SelectTemplate v-model="form.templateId" :studyType="studyType" :studyFormType="studyFormType" :name="form.templateMc"
@change="selectTemplateChange" />
<SelectTemplate v-model="form.templateId" :studyType="studyType" :studyFormType="studyFormType"
:name="form.templateMc" @change="selectTemplateChange" />
</el-form-item>
</el-col>
</el-row>
@ -181,7 +181,7 @@ export default {
},
templateData: {},
studyType: null,
studyFormType:null
studyFormType: null
}
},
computed: {
@ -236,9 +236,14 @@ export default {
})
},
selectTemplateChange(val) {
this.form.bdmc = val.name
if (this.$i18n.locale === 'zh_CN') {
this.form.templateMc = val.name
this.form.bdmc = val.name
} else {
this.form.templateMc = val.nameEn
this.form.bdmc = val.nameEn
}
this.form.bdnr = val.content
this.form.templateMc = val.name
this.form.templateSn = val.sn
this.templateData = deepClone(this.form)
},
@ -251,10 +256,10 @@ export default {
id: null,
studyId: null,
bdbh: null,
bdmc: '麻精药领取申请单',
bdmc: this.$i18n.locale === 'zh_CN'?'麻精药领取申请单':'麻精药领取申请单',
bdsm: null,
templateId: 2,
templateMc: '麻精药领取申请单',
templateMc: this.$i18n.locale === 'zh_CN'?'麻精药领取申请单':'麻精药领取申请单',
templateSn: 'MJYLQSQD',
bdnr: null,
fzrsh: null,
@ -270,8 +275,8 @@ export default {
},
edit(row) {
this.reset()
this.studyType = row.studyType||null
this.studyFormType = row.studyFormType||null
this.studyType = row.studyType || null
this.studyFormType = row.studyFormType || null
if (row && row.id) {
this.showIndex = 2
this.$modal.loading()
@ -287,9 +292,9 @@ export default {
this.showIndex = 1
this.form = _.merge({}, this.form, row)
this.templateData = deepClone(this.form)
let name=this.studyType==1?'试验':(this.studyType==5?'非试验表单':'麻精药表单')
let nameEn=this.studyType==1?'Study':(this.studyType==5?'Non-study':'ontrolled Drug')
this.saveSimpleLog({jcmc:'领取申请单新增',jcmcEn:'Material Application Table Create',name:name,nameEn:nameEn})
let name = this.studyType == 1 ? '试验' : (this.studyType == 5 ? '非试验表单' : '麻精药表单')
let nameEn = this.studyType == 1 ? 'Study' : (this.studyType == 5 ? 'Non-study' : 'ontrolled Drug')
this.saveSimpleLog({ jcmc: '领取申请单新增', jcmcEn: 'Material Application Table Create', name: name, nameEn: nameEn })
this.open = true
}
},

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

@ -177,7 +177,8 @@
<div style="display: flex;">
<div> {{ item.bh }}</div>
<div>
<el-input type="number" v-model="item.syl" maxlength="50" style="width:100px; margin:0px 0px 0px 5px;" />
<el-input type="number" v-model="item.syl" maxlength="50"
style="width:100px; margin:0px 0px 0px 5px;" />
</div>
<div>
<div style="width: 70px;">
@ -607,7 +608,7 @@ export default {
this.showIndex = 1
this.$modal.loading()
study_info({ id: params.studyId }).then(response => {
this.form = _.merge({}, this.form, { studySubjectId:params.studySubjectId,studyId: params.studyId, resourceStudy: response.data.resource, sftb: 1 })
this.form = _.merge({}, this.form, { studySubjectId: params.studySubjectId, studyId: params.studyId, resourceStudy: response.data.resource, sftb: 1 })
this.templateData = deepClone(this.form)
const obj = Object.assign({}, this.$route, { title: this.$t('page.business.study.studyFormFill.xzbd') })
this.$tab.updatePage(obj);
@ -764,8 +765,13 @@ export default {
},
selectTemplateChange(val) {
this.form.bdnr = val.content
this.form.templateMc = val.name
this.form.bdmc = val.name
if (this.$i18n.locale === 'zh_CN') {
this.form.templateMc = val.name
this.form.bdmc = val.name
} else {
this.form.templateMc = val.nameEn
this.form.bdmc = val.nameEn
}
this.form.templateSn = val.sn
},
cancel() {

+ 25
- 15
src/views/business/study/comp/ytbd/Bj.vue View File

@ -42,7 +42,8 @@
<el-col :span="24">
<el-form-item :label="$t('page.business.form.bdmb')" prop="templateId">
<SelectTemplate v-model="form.templateId" :disabled="form.id && form.id !== ''" :needPre="10"
:name="form.templateMc" :studyType="studyType" :selectedDeptId="selectedDeptId" :studyFormType="studyFormType" @change="selectTemplateChange" />
:name="form.templateMc" :studyType="studyType" :selectedDeptId="selectedDeptId"
:studyFormType="studyFormType" @change="selectTemplateChange" />
</el-form-item>
</el-col>
</el-row>
@ -89,8 +90,12 @@
<el-col :span="24">
<el-form-item :label="$t('page.business.study.studyFormPre.fzrsh')" prop="fzrsh">
<el-radio-group v-model="form.fzrsh">
<el-radio :label="$t('page.business.study.studyFormPre.yes')">{{ $t('page.business.study.studyFormPre.yes') }}</el-radio>
<el-radio :label="$t('page.business.study.studyFormPre.no')">{{ $t('page.business.study.studyFormPre.no') }}</el-radio>
<el-radio :label="$t('page.business.study.studyFormPre.yes')">{{
$t('page.business.study.studyFormPre.yes')
}}</el-radio>
<el-radio :label="$t('page.business.study.studyFormPre.no')">{{
$t('page.business.study.studyFormPre.no')
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@ -155,7 +160,7 @@ export default {
open: false,
openSubmit: false,
permitForSecectUser: '',
selectedDeptId:null,
selectedDeptId: null,
rulesApprove: {
qmrmm: [{
required: true,
@ -187,8 +192,8 @@ export default {
},
templateData: {},
studyType:null,
studyFormType:null,
studyType: null,
studyFormType: null,
}
},
computed: {
@ -202,7 +207,7 @@ export default {
onPreCallback(data) {
console.log("data:" + JSON.stringify(data))
console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
if (data.type == 'fieldChanged' ) {
if (data.type == 'fieldChanged') {
studyFormPre_updateBdnr(
{
id: this.form.id,
@ -234,8 +239,13 @@ export default {
},
selectTemplateChange(val) {
this.form.bdnr = val.content
this.form.templateMc = val.name
this.form.bdmc = val.name
if ( this.$i18n.locale === 'zh_CN') {
this.form.templateMc = val.name
this.form.bdmc = val.name
} else {
this.form.templateMc = val.nameEn
this.form.bdmc = val.nameEn
}
this.form.templateSn = val.sn
this.templateData = deepClone(this.form)
},
@ -266,9 +276,9 @@ export default {
edit(row) {
this.reset()
this.permitForSecectUser = row.permitForSecectUser
this.studyType = row.studyType||null
this.studyFormType = row.studyFormType||null
this.selectedDeptId=row.selectedDeptId||null
this.studyType = row.studyType || null
this.studyFormType = row.studyFormType || null
this.selectedDeptId = row.selectedDeptId || null
if (row && row.id) {
this.showIndex = 2
this.$modal.loading()
@ -288,9 +298,9 @@ export default {
this.templateData = deepClone(this.form)
const obj = Object.assign({}, this.$route, { title: this.$t('page.business.study.studyFormFill.xzbd') })
this.$tab.updatePage(obj);
let name=this.studyType==1?'试验':(this.studyType==5?'非试验表单':'麻精药表单')
let nameEn=this.studyType==1?'Study':(this.studyType==5?'Non-study':'ontrolled Drug')
this.saveSimpleLog({jcmc:'预填表单新增',jcmcEn:'Preset Create',name:name,nameEn:nameEn})
let name = this.studyType == 1 ? '试验' : (this.studyType == 5 ? '非试验表单' : '麻精药表单')
let nameEn = this.studyType == 1 ? 'Study' : (this.studyType == 5 ? 'Non-study' : 'ontrolled Drug')
this.saveSimpleLog({ jcmc: '预填表单新增', jcmcEn: 'Preset Create', name: name, nameEn: nameEn })
this.open = true
}
},

Loading…
Cancel
Save