Browse Source

fix:[试验管理]预填bug

lkf
15881625488@163.com 3 months ago
parent
commit
7902eb2c3b
4 changed files with 106 additions and 50 deletions
  1. +34
    -18
      src/views/business/form/drug/comp/ytbdList.vue
  2. +33
    -16
      src/views/business/form/nonTrial/comp/ytbdList.vue
  3. +9
    -4
      src/views/business/study/comp/ytbd/Bj.vue
  4. +30
    -12
      src/views/business/study/comp/ytbdList.vue

+ 34
- 18
src/views/business/form/drug/comp/ytbdList.vue View File

@ -50,11 +50,12 @@
<div class="ytbd-content"> <div class="ytbd-content">
<el-row class="add-box"> <el-row class="add-box">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="showAdd()"
v-hasPermi="['business:drugFormPre:xz']">{{
$t('page.business.study.studyFormPre.xzbd') }}</el-button>
<el-button type="primary" icon="el-icon-plus" @click="showAdd()" v-hasPermi="['business:drugFormPre:xz']">{{
$t('page.business.study.studyFormPre.xzbd') }}</el-button>
<el-button type="primary" @click="sdsy" v-hasPermi="['business:form:drug:sd']" v-if="(leader==id || checkRole(['bz'])) && studyStatus!=5 && formCount===formFinishCount">{{ $t('page.business.study.drug.sdsy') }}</el-button>
<el-button type="primary" @click="sdsy" v-hasPermi="['business:form:drug:sd']"
v-if="(leader == id || checkRole(['bz'])) && studyStatus != 5 && formCount === formFinishCount">{{
$t('page.business.study.drug.sdsy') }}</el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -81,7 +82,7 @@
$t('form.detail') }}</el-button> $t('form.detail') }}</el-button>
<!-- 编辑 --> <!-- 编辑 -->
<el-button type="text" v-hasPermi="['business:drugFormPre:bj']" @click="edit(scope.row)" <el-button type="text" v-hasPermi="['business:drugFormPre:bj']" @click="edit(scope.row)"
v-if="(scope.row.bdzt === 1||scope.row.bdzt === 7)&&id==scope.row.userId">{{
v-if="(scope.row.bdzt === 1 || scope.row.bdzt === 7) && id == scope.row.userId">{{
$t('form.edit') }}</el-button> $t('form.edit') }}</el-button>
<template v-if="scope.row.fzrsh == 10"> <template v-if="scope.row.fzrsh == 10">
<template v-if="scope.row.fzrshzt == 5"> <template v-if="scope.row.fzrshzt == 5">
@ -173,7 +174,7 @@
<script> <script>
import { checkPermi, checkRole } from "@/utils/permission"; import { checkPermi, checkRole } from "@/utils/permission";
import { drug_checkSd,drug_sd } from "@/api/business/form/drug"
import { drug_checkSd, drug_sd } from "@/api/business/form/drug"
import { studyFormPre_list, studyFormPre_info } from '@/api/business/study/studyFormPre' import { studyFormPre_list, studyFormPre_info } from '@/api/business/study/studyFormPre'
import { public_studyList, public_studyFormPreList } from '@/api/business/public/public' import { public_studyList, public_studyFormPreList } from '@/api/business/public/public'
import TemplateTable from '@/views/business/comps/template/TemplateTable'; import TemplateTable from '@/views/business/comps/template/TemplateTable';
@ -215,11 +216,11 @@ export default {
deep: true deep: true
} }
}, },
components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable,Sign },
components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable, Sign },
data() { data() {
return { return {
formCount:0,
formFinishCount:0,
formCount: 0,
formFinishCount: 0,
formPreview: { formPreview: {
templateSn: null templateSn: null
}, },
@ -306,7 +307,17 @@ export default {
this.openPreview = false this.openPreview = false
this.showEdit = true this.showEdit = true
this.$emit('showDetail', this.showEdit) this.$emit('showDetail', this.showEdit)
this.$refs.Bj.edit({ templateId: tmp.templateId,templateMc: tmp.templateMc,templateSn:tmp.templateSn ,bdmc: tmp.bdmc, bdnr: tmp.bdnr })
this.$refs.Bj.edit({
studySn: this.searchForm.studySn,
studyMc: this.searchForm.studyMc,
studyId: this.searchForm.studyId,
templateId: tmp.templateId,
templateMc: tmp.templateMc,
templateSn: tmp.templateSn,
bdmc: tmp.bdmc,
bdnr: tmp.bdnr,
permitForSecectUser: 'business:drugFormPre:sh'
})
}).finally(() => { }).finally(() => {
this.$modal.closeLoading() this.$modal.closeLoading()
}) })
@ -359,7 +370,12 @@ export default {
this.open = false this.open = false
this.showEdit = true this.showEdit = true
this.$emit('showDetail', this.showEdit) this.$emit('showDetail', this.showEdit)
this.$refs.Bj.edit({ studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc,studyId: this.searchForm.studyId })
this.$refs.Bj.edit({
studySn: this.searchForm.studySn,
studyMc: this.searchForm.studyMc,
studyId: this.searchForm.studyId,
permitForSecectUser: 'business:drugFormPre:sh'
})
}, },
edit(row) { edit(row) {
this.showEdit = true this.showEdit = true
@ -384,7 +400,7 @@ export default {
detail(row) { detail(row) {
this.showDetail = true this.showDetail = true
this.$emit('showDetail', this.showDetail) this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row,true)
this.$refs.Xq.show(row, true)
}, },
audit(row) { audit(row) {
this.showAudit = true this.showAudit = true
@ -395,21 +411,21 @@ export default {
sdsy() { sdsy() {
this.$modal.loading() this.$modal.loading()
drug_checkSd({ drug_checkSd({
study:{id:this.study.id},
study: { id: this.study.id },
}).then(() => { }).then(() => {
this.$refs.fsySignRef.show(this.$t('page.business.study.drug.sdsy'),this.$t('page.business.study.drug.sdsy'))
this.$refs.fsySignRef.show(this.$t('page.business.study.drug.sdsy'), this.$t('page.business.study.drug.sdsy'))
}).finally(() => { }).finally(() => {
this.$modal.closeLoading() this.$modal.closeLoading()
}) })
}, },
doSign(val){
doSign(val) {
this.doSd(val) this.doSd(val)
}, },
doSd(sign){
doSd(sign) {
this.$modal.loading() this.$modal.loading()
drug_sd({ drug_sd({
study:{id:this.study.id},
sign:sign
study: { id: this.study.id },
sign: sign
}).then(() => { }).then(() => {
this.$refs.fsySignRef.cancel() this.$refs.fsySignRef.cancel()
this.studyStatus = 5 this.studyStatus = 5

+ 33
- 16
src/views/business/form/nonTrial/comp/ytbdList.vue View File

@ -50,11 +50,13 @@
<div class="ytbd-content"> <div class="ytbd-content">
<el-row class="add-box"> <el-row class="add-box">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="showAdd()"
<el-button type="primary" icon="el-icon-plus" @click="showAdd()"
v-hasPermi="['business:nonTrialFormPre:xz']">{{ v-hasPermi="['business:nonTrialFormPre:xz']">{{
$t('page.business.study.studyFormPre.xzbd') }}</el-button> $t('page.business.study.studyFormPre.xzbd') }}</el-button>
<el-button type="primary" @click="sdsy" v-hasPermi="['business:form:nonTrial:sd']" v-if="(leader==id || checkRole(['bz'])) && studyStatus!=5 && formCount===formFinishCount">{{ $t('page.business.study.nonTrial.sdsy') }}</el-button>
<el-button type="primary" @click="sdsy" v-hasPermi="['business:form:nonTrial:sd']"
v-if="(leader == id || checkRole(['bz'])) && studyStatus != 5 && formCount === formFinishCount">{{
$t('page.business.study.nonTrial.sdsy') }}</el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -81,7 +83,7 @@
$t('form.detail') }}</el-button> $t('form.detail') }}</el-button>
<!-- 编辑 --> <!-- 编辑 -->
<el-button type="text" v-hasPermi="['business:nonTrialFormPre:bj']" @click="edit(scope.row)" <el-button type="text" v-hasPermi="['business:nonTrialFormPre:bj']" @click="edit(scope.row)"
v-if="(scope.row.bdzt === 1||scope.row.bdzt === 7)&&id==scope.row.userId">{{
v-if="(scope.row.bdzt === 1 || scope.row.bdzt === 7) && id == scope.row.userId">{{
$t('form.edit') }}</el-button> $t('form.edit') }}</el-button>
<template v-if="scope.row.fzrsh == 10"> <template v-if="scope.row.fzrsh == 10">
<template v-if="scope.row.fzrshzt == 5"> <template v-if="scope.row.fzrshzt == 5">
@ -173,7 +175,7 @@
<script> <script>
import { checkPermi, checkRole } from "@/utils/permission"; import { checkPermi, checkRole } from "@/utils/permission";
import { nonTrial_checkSd,nonTrial_sd } from "@/api/business/form/nonTrial"
import { nonTrial_checkSd, nonTrial_sd } from "@/api/business/form/nonTrial"
import { studyFormPre_list, studyFormPre_info } from '@/api/business/study/studyFormPre' import { studyFormPre_list, studyFormPre_info } from '@/api/business/study/studyFormPre'
import { public_studyList, public_studyFormPreList } from '@/api/business/public/public' import { public_studyList, public_studyFormPreList } from '@/api/business/public/public'
import TemplateTable from '@/views/business/comps/template/TemplateTable'; import TemplateTable from '@/views/business/comps/template/TemplateTable';
@ -215,11 +217,11 @@ export default {
deep: true deep: true
} }
}, },
components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable,Sign },
components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable, Sign },
data() { data() {
return { return {
formCount:0,
formFinishCount:0,
formCount: 0,
formFinishCount: 0,
formPreview: { formPreview: {
templateSn: null templateSn: null
}, },
@ -306,7 +308,17 @@ export default {
this.openPreview = false this.openPreview = false
this.showEdit = true this.showEdit = true
this.$emit('showDetail', this.showEdit) this.$emit('showDetail', this.showEdit)
this.$refs.Bj.edit({ templateId: tmp.templateId,templateMc: tmp.templateMc,templateSn:tmp.templateSn ,bdmc: tmp.bdmc, bdnr: tmp.bdnr })
this.$refs.Bj.edit({
templateId: tmp.templateId,
templateMc: tmp.templateMc,
templateSn: tmp.templateSn,
bdmc: tmp.bdmc,
bdnr: tmp.bdnr,
studySn: this.searchForm.studySn,
studyMc: this.searchForm.studyMc,
studyId: this.searchForm.studyId,
permitForSecectUser: 'business:nonTrialFormPre:sh'
})
}).finally(() => { }).finally(() => {
this.$modal.closeLoading() this.$modal.closeLoading()
}) })
@ -359,7 +371,12 @@ export default {
this.open = false this.open = false
this.showEdit = true this.showEdit = true
this.$emit('showDetail', this.showEdit) this.$emit('showDetail', this.showEdit)
this.$refs.Bj.edit({ studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc,studyId: this.searchForm.studyId})
this.$refs.Bj.edit({
studySn: this.searchForm.studySn,
studyMc: this.searchForm.studyMc,
studyId: this.searchForm.studyId,
permitForSecectUser: 'business:nonTrialFormPre:sh'
})
}, },
edit(row) { edit(row) {
this.showEdit = true this.showEdit = true
@ -384,7 +401,7 @@ export default {
detail(row) { detail(row) {
this.showDetail = true this.showDetail = true
this.$emit('showDetail', this.showDetail) this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row,true)
this.$refs.Xq.show(row, true)
}, },
audit(row) { audit(row) {
this.showAudit = true this.showAudit = true
@ -394,21 +411,21 @@ export default {
sdsy() { sdsy() {
this.$modal.loading() this.$modal.loading()
nonTrial_checkSd({ nonTrial_checkSd({
study:{id:this.study.id},
study: { id: this.study.id },
}).then(() => { }).then(() => {
this.$refs.fsySignRef.show(this.$t('page.business.study.nonTrial.sdsy'),this.$t('page.business.study.nonTrial.sdsy'))
this.$refs.fsySignRef.show(this.$t('page.business.study.nonTrial.sdsy'), this.$t('page.business.study.nonTrial.sdsy'))
}).finally(() => { }).finally(() => {
this.$modal.closeLoading() this.$modal.closeLoading()
}) })
}, },
doSign(val){
doSign(val) {
this.doSd(val) this.doSd(val)
}, },
doSd(sign){
doSd(sign) {
this.$modal.loading() this.$modal.loading()
nonTrial_sd({ nonTrial_sd({
study:{id:this.study.id},
sign:sign
study: { id: this.study.id },
sign: sign
}).then(() => { }).then(() => {
this.$refs.fsySignRef.cancel() this.$refs.fsySignRef.cancel()
this.studyStatus = 5 this.studyStatus = 5

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

@ -76,7 +76,11 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="$t('page.business.study.studyFormPre.shryId')" prop="shryId"> <el-form-item :label="$t('page.business.study.studyFormPre.shryId')" prop="shryId">
<SelectDeptUser v-model="form.shryId" :name="form.shryMc" key="shryId" @change="selectDeptUserChange" />
<SelectStudyUser v-model="form.shryId" :query="{
studyId: form.studyId,
studySubject: form.studySubjectId,
permit: form.permitForSecectUser
}" key="shryId" @change="selectDeptUserChange" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -136,13 +140,13 @@
import { studyFormPre_bc, studyFormPre_tj, studyFormPre_info } from "@/api/business/study/studyFormPre" import { studyFormPre_bc, studyFormPre_tj, studyFormPre_info } from "@/api/business/study/studyFormPre"
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import SelectTemplate from "@/views/business/comps/select/SelectTemplate"; import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import SelectStudyUser from '@/views/business/comps/select/SelectStudyUser';
import TemplateTable from '@/views/business/comps/template/TemplateTable'; import TemplateTable from '@/views/business/comps/template/TemplateTable';
import { deepClone } from "@/utils/index"; import { deepClone } from "@/utils/index";
export default { export default {
name: "Bj", name: "Bj",
components: { SelectTemplate, SelectDeptUser, TemplateTable },
components: { SelectTemplate, SelectStudyUser, TemplateTable },
data() { data() {
return { return {
showIndex: 1, showIndex: 1,
@ -237,6 +241,7 @@ export default {
studyFormPre_info({ id: row.id }).then(response => { studyFormPre_info({ id: row.id }).then(response => {
this.form = response.data this.form = response.data
this.form.qmyy = this.$t('page.business.study.studyFormPre.zztjyzbd') this.form.qmyy = this.$t('page.business.study.studyFormPre.zztjyzbd')
this.templateData = deepClone(this.form)
this.$modal.closeLoading() this.$modal.closeLoading()
}).finally(() => { }).finally(() => {
this.$modal.closeLoading() this.$modal.closeLoading()
@ -244,8 +249,8 @@ export default {
} else { } else {
this.showIndex = 1 this.showIndex = 1
this.form = _.merge({}, this.form, row) this.form = _.merge({}, this.form, row)
this.templateData = deepClone(this.form)
} }
this.templateData = deepClone(this.form)
}, },
save() { save() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {

+ 30
- 12
src/views/business/study/comp/ytbdList.vue View File

@ -80,7 +80,7 @@
$t('form.detail') }}</el-button> $t('form.detail') }}</el-button>
<!-- 编辑 --> <!-- 编辑 -->
<el-button type="text" v-hasPermi="['business:studyFormPre:bj']" @click="edit(scope.row)" <el-button type="text" v-hasPermi="['business:studyFormPre:bj']" @click="edit(scope.row)"
v-if="(scope.row.bdzt === 1||scope.row.bdzt === 7)&&id==scope.row.userId">{{
v-if="(scope.row.bdzt === 1 || scope.row.bdzt === 7) && id == scope.row.userId">{{
$t('form.edit') }}</el-button> $t('form.edit') }}</el-button>
<template v-if="scope.row.fzrsh == 10"> <template v-if="scope.row.fzrsh == 10">
<template v-if="scope.row.fzrshzt == 5"> <template v-if="scope.row.fzrshzt == 5">
@ -119,12 +119,13 @@
<el-form ref="form" label-width="120px"> <el-form ref="form" label-width="120px">
<el-row> <el-row>
<el-col :span="24" style="text-align: center; margin-top: 50px;"> <el-col :span="24" style="text-align: center; margin-top: 50px;">
<el-button type="primary" style="width: 80%; height: 40px;" @click="add" plain
icon="el-icon-circle-plus">{{ $t('page.business.study.studyFormPre.cjxbd') }}</el-button>
<el-button type="primary" style="width: 80%; height: 40px;" @click="add" plain icon="el-icon-circle-plus">{{
$t('page.business.study.studyFormPre.cjxbd') }}</el-button>
</el-col> </el-col>
<el-col :span="24" style="text-align: center; margin: 50px 0px;"> <el-col :span="24" style="text-align: center; margin: 50px 0px;">
<el-button type="primary" style="width: 80%;height: 40px;" @click="copy" plain <el-button type="primary" style="width: 80%;height: 40px;" @click="copy" plain
icon="el-icon-document-copy">{{ $t('page.business.study.studyFormPre.fzyybd') }}</el-button>
icon="el-icon-document-copy">{{
$t('page.business.study.studyFormPre.fzyybd') }}</el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -150,7 +151,8 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item> <el-form-item>
<el-button type="primary" @click="previewFzbd" :disabled="!(formXz.formPreId)">{{ $t('page.business.study.studyFormPre.yulan') }}</el-button>
<el-button type="primary" @click="previewFzbd" :disabled="!(formXz.formPreId)">{{
$t('page.business.study.studyFormPre.yulan') }}</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -212,7 +214,7 @@ export default {
components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable }, components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable },
data() { data() {
return { return {
isMatchSubject:false,
isMatchSubject: false,
formPreview: { formPreview: {
templateSn: null templateSn: null
}, },
@ -264,9 +266,9 @@ export default {
}, },
created() { }, created() { },
methods: { methods: {
getIsMatchSubject() {
studySubject_isMatchSubject({studySubjectId:this.searchForm.studySubjectId }).then(response => {
this.isMatchSubject=response.data
getIsMatchSubject() {
studySubject_isMatchSubject({ studySubjectId: this.searchForm.studySubjectId }).then(response => {
this.isMatchSubject = response.data
}) })
}, },
copy() { copy() {
@ -302,7 +304,17 @@ export default {
this.openPreview = false this.openPreview = false
this.showEdit = true this.showEdit = true
this.$emit('showDetail', this.showEdit) this.$emit('showDetail', this.showEdit)
this.$refs.Bj.edit({ templateId: tmp.templateId,templateMc: tmp.templateMc,templateSn:tmp.templateSn ,bdmc: tmp.bdmc, bdnr: tmp.bdnr })
this.$refs.Bj.edit({
templateId: tmp.templateId,
templateMc: tmp.templateMc,
templateSn: tmp.templateSn,
bdmc: tmp.bdmc,
bdnr: tmp.bdnr,
studySn: this.searchForm.studySn,
studyMc: this.searchForm.studyMc,
studyId: this.searchForm.studyId,
permitForSecectUser: 'business:studyFormPre:sh'
})
}).finally(() => { }).finally(() => {
this.$modal.closeLoading() this.$modal.closeLoading()
}) })
@ -355,7 +367,13 @@ export default {
this.open = false this.open = false
this.showEdit = true this.showEdit = true
this.$emit('showDetail', this.showEdit) this.$emit('showDetail', this.showEdit)
this.$refs.Bj.edit({ studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc,studyId: this.searchForm.studyId, studySubjectId: this.searchForm.studySubjectId })
this.$refs.Bj.edit({
studySn: this.searchForm.studySn,
studyMc: this.searchForm.studyMc,
studyId: this.searchForm.studyId,
studySubjectId: this.searchForm.studySubjectId,
permitForSecectUser: 'business:studyFormPre:sh'
})
}, },
edit(row) { edit(row) {
this.showEdit = true this.showEdit = true
@ -380,7 +398,7 @@ export default {
detail(row) { detail(row) {
this.showDetail = true this.showDetail = true
this.$emit('showDetail', this.showDetail) this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row,false)
this.$refs.Xq.show(row, false)
}, },
audit(row) { audit(row) {
this.showAudit = true this.showAudit = true

Loading…
Cancel
Save