Browse Source

feat:[试验管理][填报表单]

master
15881625488@163.com 1 week ago
parent
commit
5864ba546f
15 changed files with 1098 additions and 185 deletions
  1. +82
    -0
      src/api/business/study/studyFormFill.js
  2. +5
    -1
      src/lang/en.js
  3. +28
    -0
      src/lang/en/business/study/studyFormFill.js
  4. +0
    -2
      src/lang/en/business/study/studyFormPre.js
  5. +5
    -1
      src/lang/zh.js
  6. +28
    -0
      src/lang/zh/business/study/studyFormFill.js
  7. +0
    -2
      src/lang/zh/business/study/studyFormPre.js
  8. +6
    -6
      src/views/business/study/comp/enter.vue
  9. +12
    -7
      src/views/business/study/comp/tbbd.vue
  10. +277
    -0
      src/views/business/study/comp/tbbd/Bj.vue
  11. +233
    -0
      src/views/business/study/comp/tbbd/Sh.vue
  12. +227
    -0
      src/views/business/study/comp/tbbd/Xq.vue
  13. +185
    -160
      src/views/business/study/comp/tbbdList.vue
  14. +8
    -4
      src/views/business/study/comp/ytbd/Bj.vue
  15. +2
    -2
      vue.config.js

+ 82
- 0
src/api/business/study/studyFormFill.js View File

@ -0,0 +1,82 @@
import request from '@/utils/request'
//列表
export function studyFormFill_list(query) {
return request({
url: '/system/business/studyFormFill/list',
method: 'get',
params: query
})
}
//稽查轨迹
export function studyFormFill_jcgj(query) {
return request({
url: '/system/business/studyFormFill/jcgjList',
method: 'get',
params: query
})
}
//签名信息
export function studyFormFill_qmxx(query) {
return request({
url: '/system/business/studyFormFill/qmxxList',
method: 'get',
params: query
})
}
//详情
export function studyFormFill_info(query) {
return request({
url: '/system/business/studyFormFill/info',
method: 'get',
params: query
})
}
//保存
export function studyFormFill_bc(data) {
return request({
url: '/system/business/studyFormFill/bc',
method: 'post',
data: data
})
}
//提交
export function studyFormFill_tj(data) {
return request({
url: '/system/business/studyFormFill/tj',
method: 'post',
data: data
})
}
//填报
export function studyFormFill_tb(data) {
return request({
url: '/system/business/studyFormFill/tb',
method: 'post',
data: data
})
}
//通过
export function studyFormFill_tg(data) {
return request({
url: '/system/business/studyFormFill/tg',
method: 'post',
data: data
})
}
//拒绝
export function studyFormFill_jj(data) {
return request({
url: '/system/business/studyFormFill/jj',
method: 'post',
data: data
})
}

+ 5
- 1
src/lang/en.js View File

@ -13,7 +13,10 @@ import template from './en/system/template'
// 试验管理
import study from './en/business/study/study'
import studyEnter from './en/business/study/studyEnter'
//预填表单
import studyFormPre from './en/business/study/studyFormPre'
//填报表单
import studyFormFill from './en/business/study/studyFormFill'
//表单
import form from './en/business/form/form'
@ -122,7 +125,8 @@ export default {
study: {
study: study,
studyEnter: studyEnter,
studyFormPre:studyFormPre
studyFormPre:studyFormPre,
studyFormFill:studyFormFill
},
form: form
}

+ 28
- 0
src/lang/en/business/study/studyFormFill.js View File

@ -0,0 +1,28 @@
export default {
jcsz:'基础设置',
bdsj:'表单设计',
zc:'暂存',
next:'下一步',
save:'保存',
submit:'提交',
bdsm:'表单说明',
tjysb:'提交预设表',
shryId:'审核人员',
fzrsh:'是否需要试验负责人审核',
approve:'通过',
reject:'拒绝',
reject:'拒绝',
shtg:'审核通过',
shjj:'审核拒绝',
tb:'填报',
bdnr:'表单内容',
qmxx:'签名信息',
qmr:'签名人',
qmyy:'签名意义',
qmsj:'签名时间',
bzyy:'备注原因',
jcgj:'稽查轨迹',
xztbbd:'新增填报表单',
cjjl:'创建记录',
ts:'是否确定用该预填模板进行实际填报?',
}

+ 0
- 2
src/lang/en/business/study/studyFormPre.js View File

@ -24,6 +24,4 @@ export default {
jcgj:'稽查轨迹',
cjjl:'创建记录',
ts:'是否确定用该预填模板进行实际填报?',
ts:'是否确定用该预填模板进行实际填报?',
ts:'是否确定用该预填模板进行实际填报?',
}

+ 5
- 1
src/lang/zh.js View File

@ -13,7 +13,10 @@ import template from './zh/system/template'
// 试验管理
import study from './zh/business/study/study'
import studyEnter from './zh/business/study/studyEnter'
//预填表单
import studyFormPre from './zh/business/study/studyFormPre'
//填报表单
import studyFormFill from './zh/business/study/studyFormFill'
//表单
import form from './zh/business/form/form'
@ -119,7 +122,8 @@ export default {
study: {
study: study,
studyEnter: studyEnter,
studyFormPre
studyFormPre:studyFormPre,
studyFormFill:studyFormFill
},
form: form
}

+ 28
- 0
src/lang/zh/business/study/studyFormFill.js View File

@ -0,0 +1,28 @@
export default {
jcsz:'基础设置',
bdsj:'表单设计',
zc:'暂存',
next:'下一步',
save:'保存',
submit:'提交',
bdsm:'表单说明',
tjysb:'提交预设表',
shryId:'审核人员',
fzrsh:'是否需要试验负责人审核',
approve:'通过',
reject:'拒绝',
reject:'拒绝',
shtg:'审核通过',
shjj:'审核拒绝',
tb:'填报',
bdnr:'表单内容',
qmxx:'签名信息',
qmr:'签名人',
qmyy:'签名意义',
qmsj:'签名时间',
bzyy:'备注原因',
jcgj:'稽查轨迹',
cjjl:'创建记录',
xztbbd:'新增填报表单',
ts:'是否确定用该预填模板进行实际填报?',
}

+ 0
- 2
src/lang/zh/business/study/studyFormPre.js View File

@ -24,6 +24,4 @@ export default {
jcgj:'稽查轨迹',
cjjl:'创建记录',
ts:'是否确定用该预填模板进行实际填报?',
ts:'是否确定用该预填模板进行实际填报?',
ts:'是否确定用该预填模板进行实际填报?',
}

+ 6
- 6
src/views/business/study/comp/enter.vue View File

@ -1,7 +1,7 @@
<template>
<div class="study-enter">
<div class="content-list">
<div class="search-box" v-show="!showDetailYt">
<div class="search-box" v-show="!showDetail">
<div class="search-item" :class="active === item.key ? 'active' : ''" v-for="(item, index) in tabList"
:key="index" @click="changeTab(item)">
{{ item.name }}
@ -9,8 +9,8 @@
</div>
<div class="content-box">
<ytbd v-if="active === 'ytbd'" :study="study" @showDetail="showDetailCallbackYt" />
<tbbd v-if="active === 'tbbd'" :study="study" />
<ytbd v-if="active === 'ytbd'" :study="study" @showDetail="showDetailCallback" />
<tbbd v-if="active === 'tbbd'" :study="study" @showDetail="showDetailCallback"/>
</div>
</div>
</div>
@ -27,7 +27,7 @@ export default {
filters: {},
data() {
return {
showDetailYt: false,
showDetail: false,
tabList: [
{ key: 'ytbd', name: this.$t('page.business.study.studyEnter.ytbdlb') },
{ key: 'tbbd', name: this.$t('page.business.study.studyEnter.tbbdlb') },
@ -46,8 +46,8 @@ export default {
show(row) {
this.study = row
},
showDetailCallbackYt(val) {
this.showDetailYt = val
showDetailCallback(val) {
this.showDetail = val
},
changeTab(item) {
if (this.active !== item.key) {

+ 12
- 7
src/views/business/study/comp/tbbd.vue View File

@ -1,10 +1,10 @@
<template>
<div class="study-ytbd">
<div class="ytbd-left">
<div class="study-tbbd">
<div class="tbbd-left" v-show="!showDetail">
<sbject :study="study" />
</div>
<div class="ytbd-right">
<tbbdList :study="study" />
<div class="tbbd-right" >
<tbbdList :study="study" @showDetail="showDetailCallback"/>
</div>
</div>
</template>
@ -27,25 +27,30 @@ export default {
filters: {},
data() {
return {
showDetail:false
}
},
created() {},
methods: {
showDetailCallback(val){
this.showDetail=val
this.$emit('showDetail',val)
}
}
}
</script>
<style lang="scss" scoped>
.study-ytbd {
.study-tbbd {
display: flex;
flex-direction: row;
.ytbd-left {
.tbbd-left {
background: #fff;
padding: 20px;
margin-right: 10px;
flex-shrink: 0;
width: 350px;
}
.ytbd-right{
.tbbd-right{
flex-grow: 1;
overflow: hidden;
}

+ 277
- 0
src/views/business/study/comp/tbbd/Bj.vue View File

@ -0,0 +1,277 @@
G<template>
<div>
<div class="edit-container">
<div class="edit-top">
<div class="left-top">
<img src="@/assets/images/back.png" @click="cancel()" />
<div class="left-title"></div>
</div>
<div class="center-top">
<div>
<div :class="showIndex == 1 ? 'el-step__icon is-text is-finish' : 'el-step__icon is-text is-info'">
<div class="el-step__icon-inner">1</div>
</div>
{{ $t('page.business.study.studyFormFill.jcsz') }}
</div>
<div class="line"></div>
<div>
<div :class="showIndex == 2 ? 'el-step__icon is-text is-finish' : 'el-step__icon is-text is-info'">
<div class="el-step__icon-inner">2</div>
</div>
{{ $t('page.business.study.studyFormFill.bdsj') }}
</div>
</div>
<div class="right-top">
<el-button @click="cancel()">{{ $t('form.cancel') }}</el-button>
<template v-if="showIndex == 1">
<el-button @click="save">{{ $t('page.business.study.studyFormFill.zc') }}</el-button>
<el-button type="primary" @click="next">{{ $t('page.business.study.studyFormFill.next') }}</el-button>
</template>
<template v-else>
<el-button @click="saveNext">{{ $t('page.business.study.studyFormFill.save') }}</el-button>
<el-button type="primary" @click="openSubmit = true">{{ $t('page.business.study.studyFormFill.submit')
}}</el-button>
</template>
</div>
</div>
<div class="edit-content">
<div class="content" style="width:60%" v-show="showIndex == 1">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('page.business.form.xtmbmc')" prop="templateId">
<SelectTemplate v-model="form.templateId" :name="form.templateMc" @change="selectTemplateChange" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('page.business.form.bdmc')" prop="bdmc">
<el-input type="text" v-model="form.bdmc" maxlength="50" :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('page.business.study.studyFormFill.bdsm')" prop="bdsm">
<el-input type="textarea" v-model="form.bdsm" :rows="5" maxlength="500"
:placeholder="$t('form.placeholderInput')">
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="content" v-show="showIndex == 2">
<TemplateTable ref="templateTable" sn="SP001" fillType="preFill" />
</div>
</div>
</div>
<el-dialog :title="$t('page.business.study.studyFormFill.tjysb')" :visible.sync="openSubmit" width="500px"
append-to-body :close-on-click-modal="false">
<el-form ref="formSubmit" :model="form" :rules="rulesApprove" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('page.business.study.studyFormFill.shryId')" prop="shryId">
<SelectDeptUser v-model="form.shryId" :name="form.shryMc" key="shryId" @change="selectDeptUserChange" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('page.business.study.studyFormFill.shryId')" prop="fzrsh">
<el-radio-group v-model="form.fzrsh">
<el-radio :label="10"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
<el-input type="text" :value="form.qmyy" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.remark')" prop="remark">
<el-input type="textarea" v-model="form.getReason" :rows="2" maxlength="500"
:placeholder="$t('form.placeholderInput')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.signer')">
<el-input type="text" v-model="nickName" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<el-input type="password" v-model="form.qmrmm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="tj">{{ $t('form.confirm') }}</el-button>
<el-button @click="openSubmit = false">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { studyFormFill_bc, studyFormFill_tj, studyFormFill_info } from "@/api/business/study/studyFormFill"
import { mapGetters } from 'vuex'
import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import TemplateTable from '@/views/business/comps/template/TemplateTable';
export default {
name: "Bj",
components: { SelectTemplate, SelectDeptUser, TemplateTable },
data() {
return {
open: false,
showIndex: 1,
form: {},
openSubmit: false,
rulesApprove: {
qmrmm: [{
required: true,
message: ' ',
trigger: 'blur'
}],
fzrsh: [{
required: true,
message: ' ',
trigger: 'blur'
}],
shryId: [{
required: true,
message: ' ',
trigger: 'blur'
}]
},
rules: {
bdmc: [{
required: true,
message: ' ',
trigger: 'blur'
}],
templateId: [{
required: true,
message: ' ',
trigger: 'blur'
}]
}
}
},
computed: {
...mapGetters([
'nickName'
]),
},
created() {
},
methods: {
next() {
this.$refs["form"].validate(valid => {
if (valid) {
this.showIndex = 2
}
})
},
selectTemplateChange(val) {
this.form.bdnr = val.content
this.form.templateMc = val.name
},
cancel() {
this.$emit('close')
},
reset() {
this.form = {
id: null,
studyId: null,
bdbh: null,
bdmc: null,
bdsm: null,
templateId: null,
templateMc: null,
bdnr: null,
fzrsh: null,
shryId: null,
shryMc: null,
}
this.resetForm("form")
},
selectDeptUserChange(val) {
this.form.shryMc = val.name
},
edit(row) {
this.reset()
this.showIndex = 1
if (row && row.id) {
this.$modal.loading()
studyFormFill_info({ id: row.id }).then(response => {
this.form = response.data
this.form.qmyy = '制作提交预制表单'
this.open = true
this.$modal.closeLoading()
})
} else {
this.form = row
this.open = true
}
},
save() {
this.$refs["form"].validate(valid => {
if (valid) {
this.$modal.loading()
studyFormFill_bc(this.form).then(response => {
this.$emit('close')
this.$modal.closeLoading()
})
}
})
},
async saveNext() {
let content = await this.$refs.templateTable.getFormData()
this.form.bdnr=JSON.stringify(content)
this.$modal.loading()
studyFormFill_bc(this.form).then(response => {
this.$emit('close')
this.$modal.closeLoading()
})
},
tj() {
this.$refs["formSubmit"].validate(valid => {
if (valid) {
this.dotj()
}
})
},
async dotj() {
let content = await this.$refs.templateTable.getFormData()
this.form.bdnr=JSON.stringify(content)
this.$modal.loading()
studyFormFill_tj(this.form).then(response => {
this.$emit('close')
this.openSubmit = false
this.$modal.closeLoading()
})
}
}
}
</script>

+ 233
- 0
src/views/business/study/comp/tbbd/Sh.vue View File

@ -0,0 +1,233 @@
G<template>
<div>
<div class="edit-container">
<div class="edit-top">
<div class="left-top">
<img src="@/assets/images/back.png" @click="cancel()" />
<div class="left-title"></div>
</div>
<div class="center-top">
{{ form.bdmc }}
</div>
<div class="right-top">
<el-button @click="cancel()">{{ $t('form.cancel') }}</el-button>
<el-button type="danger" @click="showReject">{{ $t('page.business.study.studyFormFill.reject') }}</el-button>
<el-button type="primary" @click="showApprove">{{ $t('page.business.study.studyFormFill.approve') }}</el-button>
</div>
</div>
<div class="edit-content ">
表单详情todo
</div>
</div>
<!-- 通过 -->
<el-dialog :title="$t('page.business.study.studyFormFill.shtg')" :visible.sync="openApprove" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="formApprove" :model="formApprove" :rules="rulesApprove" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
<el-input type="text" :value="formApprove.qmyy" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.remark')" prop="remark">
<el-input type="textarea" v-model="formApprove.remark" :rows="2" maxlength="500"
:placeholder="$t('form.placeholderInput')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.signer')">
<el-input type="text" v-model="nickName" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<el-input type="password" v-model="formApprove.qmrmm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="approve">{{ $t('form.confirm') }}</el-button>
<el-button @click="openApprove = false">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
<!-- 拒绝 -->
<el-dialog :title="$t('page.business.study.studyFormFill.shjj')" :visible.sync="openReject" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="formReject" :model="formReject" :rules="rulesReject" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
<el-input type="text" :value="formReject.qmyy" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.remark')" prop="remark">
<el-input type="textarea" v-model="formReject.remark" :rows="2" maxlength="500"
:placeholder="$t('form.placeholderInput')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.signer')">
<el-input type="text" v-model="nickName" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<el-input type="password" v-model="formReject.qmrmm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="reject">{{ $t('form.confirm') }}</el-button>
<el-button @click="openReject = false">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { studyFormFill_tg, studyFormFill_jj, studyFormFill_info } from "@/api/business/study/studyFormFill"
import { mapGetters } from 'vuex'
export default {
name: "Sh",
components: {},
data() {
return {
showIndex: 1,
form: {},
rules: {
bdmc: [{
required: true,
message: ' ',
trigger: 'blur'
}],
templateId: [{
required: true,
message: ' ',
trigger: 'blur'
}]
},
openApprove: false,
formApprove: {
id: null,
qmyy: '审核通过',
remark: '',
qmrmm: '',
},
rulesApprove: {
qmrmm: [{
required: true,
message: ' ',
trigger: 'blur'
}]
},
openReject: false,
formReject: {
id: null,
qmyy: '审核拒绝',
remark: '',
qmrmm: '',
},
rulesReject: {
qmrmm: [{
required: true,
message: ' ',
trigger: 'blur'
}],
remark: [{
required: true,
message: ' ',
trigger: 'blur'
}]
}
}
},
computed: {
...mapGetters([
'nickName'
]),
},
created() {
},
methods: {
cancel() {
this.$emit('close')
},
reset() {
this.form = {
id: null,
studyId: null,
qmyy: null,
remark: null,
qmrmm: null
}
this.resetForm("form")
},
show(row) {
this.reset()
this.$modal.loading()
studyFormFill_info({ id: row.id }).then(response => {
this.form = response.data
this.open = true
this.$modal.closeLoading()
})
},
showApprove() {
this.formApprove.id = this.form.id
this.openApprove = true
},
approve() {
this.$refs["formApprove"].validate(valid => {
if (valid) {
this.$modal.loading()
studyFormFill_tg(this.formApprove).then(response => {
this.openApprove = false
this.$modal.closeLoading()
this.$emit('close')
})
}
})
},
showReject() {
this.formReject.id = this.form.id
this.openReject = true
},
reject() {
this.$refs["formReject"].validate(valid => {
if (valid) {
this.$modal.loading()
studyFormFill_jj(this.formReject).then(response => {
this.openReject = false
this.$modal.closeLoading()
this.$emit('close')
})
}
})
}
}
}
</script>

+ 227
- 0
src/views/business/study/comp/tbbd/Xq.vue View File

@ -0,0 +1,227 @@
G<template>
<div>
<div class="edit-container">
<div class="edit-top">
<div class="left-top">
<img src="@/assets/images/back.png" @click="cancel()" />
<div class="left-title"></div>
</div>
<div class="center-top">
{{ form.bdmc }}
</div>
<div class="right-top">
<el-button @click="cancel()">{{ $t('form.cancel') }}</el-button>
<el-button type="primary" v-if="form.bdzt === 5&&form.tbzt === 1" @click="openApprove = true">{{ $t('page.business.study.studyFormFill.tb') }}</el-button>
</div>
</div>
<div class="edit-content ">
<div class="content-left">
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.bdnr') }}</div>
</div>
todo
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.qmxx') }}</div>
</div>
<div class="pal">
<el-table :data="qmxxList" v-loading="loadingQmxx">
<el-table-column :label="$t('page.business.study.studyFormFill.qmr')" align="center" prop="qmrMc" width="150px" />
<el-table-column :label="$t('page.business.study.studyFormFill.qmyy')" align="center" prop="qmyy" width="150px" />
<el-table-column :label="$t('page.business.study.studyFormFill.qmsj')" align="center" prop="createTime" width="150px" />
<el-table-column :label="$t('page.business.study.studyFormFill.bzyy')" align="center" prop="remark" :show-overflow-tooltip="true" />
</el-table>
</div>
<div class="pal">
<pagination v-show="totalQmxx > 0" :total="totalQmxx" :page.sync="queryParamsQmxx.pageNum"
:limit.sync="queryParamsQmxx.pageSize" @pagination="getQmxxList" />
</div>
</div>
<div class="content-right">
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.jcgj') }}</div>
</div>
<jcgjList ref="jcgjList" @handleQuery="getJjcgjList" />
<pagination v-show="jcgjTotal > 0" small layout="prev, pager, next" :total="jcgjTotal"
@pagination="getJjcgjList" />
</div>
</div>
</div>
<!-- 填报 -->
<el-dialog :title="$t('page.business.study.studyFormFill.cjjl')" :visible.sync="openApprove" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="formApprove" :model="formApprove" :rules="rulesApprove" label-width="120px">
<el-alert :title="$t('page.business.study.studyFormFill.ts')" :closable="false" type="success">
</el-alert>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
<el-input type="text" :value="formApprove.qmyy" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.remark')" prop="remark">
<el-input type="textarea" v-model="formApprove.remark" :rows="2" maxlength="500"
:placeholder="$t('form.placeholderInput')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.signer')">
<el-input type="text" v-model="nickName" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<el-input type="password" v-model="formApprove.qmrmm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="approve">{{ $t('form.confirm') }}</el-button>
<el-button @click="openApprove = false">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { studyFormFill_tb, studyFormFill_info, studyFormFill_jcgj, studyFormFill_qmxx } from "@/api/business/study/studyFormFill"
import { mapGetters } from 'vuex'
import JcgjList from "@/views/business/comps/common/JcgjList";
export default {
name: "Xq",
components: { JcgjList },
data() {
return {
openApprove: false,
formApprove: {
id: null,
qmyy: '创建记录',
remark: '',
qmrmm: '',
},
rulesApprove: {
qmrmm: [{
required: true,
message: ' ',
trigger: 'blur'
}]
},
qmxxList: [],
totalQmxx: 0,
loadingQmxx: true,
queryParamsQmxx: {
formId: null,
pageNum: 1,
pageSize: 10
},
open: false,
showIndex: 1,
form: {},
rules: {
bdmc: [{
required: true,
message: ' ',
trigger: 'blur'
}],
templateId: [{
required: true,
message: ' ',
trigger: 'blur'
}]
},
jcgjTotal: 0,
jcgjList: [],
queryParamsJcgj: {
pageNum: 1,
formId: null,
pageSize: 10,
}
}
},
computed: {
...mapGetters([
'nickName'
]),
},
created() {
},
methods: {
getJjcgjList(val) {
this.$modal.loading()
studyFormFill_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => {
this.jcgjList = response.rows
this.jcgjTotal = response.total
this.$refs.jcgjList.init(this.jcgjList)
this.$modal.closeLoading()
})
},
getQmxxList() {
this.loadingQmxx = true
studyFormFill_qmxx(this.queryParamsQmxx).then(response => {
this.qmxxList = response.rows
this.totalQmxx = response.total
this.loadingQmxx = false
})
},
cancel() {
this.$emit('close')
},
reset() {
this.form = {
id: null,
studyId: null,
bdbh: null,
bdmc: null,
bdsm: null,
templateId: null,
templateMc: null,
bdnr: null
}
this.resetForm("form")
},
show(row) {
this.reset()
this.$modal.loading()
this.formApprove.id = row.id
this.queryParamsJcgj.formId = row.id
this.queryParamsQmxx.formId = row.id
studyFormFill_info({ id: row.id }).then(response => {
this.form = response.data
this.open = true
this.getQmxxList()
this.getJjcgjList()
this.$modal.closeLoading()
})
},
approve() {
this.$refs["formApprove"].validate(valid => {
if (valid) {
this.$modal.loading()
studyFormFill_tb(this.formApprove).then(response => {
this.$emit('close')
this.openApprove = false
this.$modal.closeLoading()
})
}
})
}
}
}
</script>

+ 185
- 160
src/views/business/study/comp/tbbdList.vue View File

@ -1,155 +1,156 @@
<template>
<div class="ytbd-list">
<div class="ytbd-search">
<el-form :model="searchForm" ref="searchForm" :inline="true">
<el-form-item :label="$t('page.business.form.bdmc')" prop="name">
<el-input v-model="searchForm.name" :placeholder="$t('form.placeholderInput')" clearable style="width: 150px" @keyup.enter.native="search" />
</el-form-item>
<el-form-item :label="$t('page.business.form.bdbh')" prop="sn">
<el-input v-model="searchForm.sn" :placeholder="$t('form.placeholderInput')" clearable style="width: 150px" @keyup.enter.native="search" />
</el-form-item>
<el-form-item :label="$t('page.business.form.gsr')" prop="ownerName">
<el-input v-model="searchForm.ownerName" :placeholder="$t('form.placeholderInput')" clearable style="width: 150px" @keyup.enter.native="search" />
</el-form-item>
<el-form-item :label="$t('page.business.form.xtmbmc')" prop="templateName">
<el-input v-model="searchForm.templateName" :placeholder="$t('form.placeholderInput')" clearable style="width: 150px" @keyup.enter.native="search" />
</el-form-item>
<el-form-item :label="$t('page.business.form.cjsj')">
<el-date-picker v-model="daterange" clearable type="daterange" range-separator="-" :start-placeholder="$t('page.business.form.startDate')"
:end-placeholder="$t('page.business.form.endDate')" value-format="yyyy-MM-dd" @change="search" style="width: 220px" />
</el-form-item>
<el-form-item :label="$t('page.business.form.tjsj')">
<el-date-picker v-model="daterangeTj" clearable type="daterange" range-separator="-" :start-placeholder="$t('page.business.form.startDate')"
:end-placeholder="$t('page.business.form.endDate')" value-format="yyyy-MM-dd" @change="search" style="width: 220px" />
</el-form-item>
<div>
<div class="tbbd-list" v-show="!showDetail && !showEdit && !showAudit">
<div class="tbbd-search">
<el-form :model="searchForm" ref="searchForm" :inline="true">
<el-form-item :label="$t('page.business.form.bdmc')" prop="name">
<el-input v-model="searchForm.bdmc" :placeholder="$t('form.placeholderInput')" clearable
style="width: 150px" @keyup.enter.native="search" />
</el-form-item>
<el-form-item :label="$t('page.business.form.bdbh')" prop="sn">
<el-input v-model="searchForm.bdbh" :placeholder="$t('form.placeholderInput')" clearable
style="width: 150px" @keyup.enter.native="search" />
</el-form-item>
<el-form-item :label="$t('page.business.form.gsr')" prop="userId">
<el-input v-model="searchForm.userId" :placeholder="$t('form.placeholderInput')" clearable
style="width: 150px" @keyup.enter.native="search" />
</el-form-item>
<el-form-item :label="$t('page.business.form.xtmbmc')" prop="templateName">
<el-input v-model="searchForm.templateMc" :placeholder="$t('form.placeholderInput')" clearable
style="width: 150px" @keyup.enter.native="search" />
</el-form-item>
<el-form-item :label="$t('page.business.form.sfwbl')">
<el-select v-model="searchForm.sfwbl" clearable :placeholder="$t('form.placeholderSelect')" @change="search">
<el-option :label="$t('page.business.form.yes')" :value="10"></el-option>
<el-option :label="$t('page.business.form.no')" :value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('page.business.form.cjsj')">
<el-date-picker v-model="daterange" clearable type="daterange" range-separator="-"
:start-placeholder="$t('page.business.form.startDate')"
:end-placeholder="$t('page.business.form.endDate')" value-format="yyyy-MM-dd" @change="search"
style="width: 220px" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search">{{ $t('form.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="reset">{{ $t('form.reset') }}</el-button>
</el-form-item>
<!-- <div>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search">{{ $t('form.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="reset">{{ $t('form.reset') }}</el-button>
</el-form-item>
</div> -->
</el-form>
</div>
<div class="ytbd-content">
<el-row class="add-box">
<el-col>
<el-button type="primary" icon="el-icon-plus" @click="edit(null)" v-hasPermi="['business:study:add']">{{ $t('page.business.form.xzytbd') }}</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('page.business.form.bh')" prop="sn" />
<el-table-column :label="$t('page.business.form.bdmc')" prop="name" />
<el-table-column :label="$t('page.business.form.xtmbmc')" prop="templateName" />
<el-table-column :label="$t('page.business.form.cjsj')" align="center" prop="createTime" width="140" />
<el-table-column :label="$t('page.business.form.gsr')" align="center" prop="ownerName" width="100" />
<el-table-column :label="$t('page.business.form.sfwbl')" prop="sfwbl" width="100">
<template slot-scope="scope">
<span v-if="scope.row.sfwbl===1">{{$t('page.business.form.no')}}</span>
<span v-if="scope.row.sfwbl===10">{{$t('page.business.form.yes')}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.form.status')" prop="status" width="100">
<template slot-scope="scope">
<span v-if="scope.row.status===1">{{$t('page.business.form.statusBdTbz')}}</span>
<span v-if="scope.row.status===3">{{$t('page.business.form.statusBdYtj')}}</span>
<span v-if="scope.row.status===5">{{$t('page.business.form.statusBdYwc')}}</span>
<span v-if="scope.row.status===7">{{$t('page.business.form.statusBdYwcJfh')}}</span>
<span v-if="scope.row.status===9">{{$t('page.business.form.statusBdDfz')}}</span>
<span v-if="scope.row.status===10">{{$t('page.business.form.statusBdYfz')}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.form.tjsj')" align="center" prop="submitTime" width="140" />
<el-table-column :label="$t('form.operate')" fixed="right" align="center" width="300">
<template slot-scope="scope">
<!-- 详情 -->
<el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:study:detail']">{{$t('page.business.form.detail')}}</el-button>
<!-- 编辑 -->
<el-button type="text" @click="edit(scope.row)" v-hasPermi="['business:study:edit']" v-if="scope.row.status===1 || scope.row.status===5 || scope.row.status===7">{{$t('page.business.form.edit')}}</el-button>
<!-- 加签 -->
<el-button type="text" @click="jq(scope.row)" v-if="scope.row.status===1">{{$t('page.business.form.jq')}}</el-button>
<!-- 更换归属人 -->
<el-button type="text" @click="changeOwner(scope.row)" v-if="scope.row.status!==9 && scope.row.status!==10">{{$t('page.business.form.ghgsr')}}</el-button>
<!-- 废止 -->
<el-button type="text" @click="fz(scope.row)" v-if="scope.row.status===1">{{$t('page.business.form.fz')}}</el-button>
<!-- 复核 -->
<el-button type="text" @click="fh(scope.row)" v-if="scope.row.status===3">{{$t('page.business.form.fh')}}</el-button>
<!-- 审阅 -->
<el-button type="text" @click="audit(scope.row)" v-hasPermi="['business:study:audit']" v-if="scope.row.status===5 || scope.row.status===7">{{$t('page.business.form.sy')}}</el-button>
<!-- 观察 -->
<el-button type="text" @click="gc(scope.row)" v-hasPermi="['business:study:audit']" v-if="scope.row.status===1">{{$t('page.business.form.gc')}}</el-button>
<!-- 确认废止 -->
<el-button type="text" @click="qrfz(scope.row)" v-hasPermi="['business:study:audit']" v-if="scope.row.status===9">{{$t('page.business.form.qrfz')}}</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="searchForm.pageNum"
:limit.sync="searchForm.pageSize"
@pagination="getList"
/>
</el-form>
</div>
<div class="tbbd-content">
<el-row class="add-box">
<el-col>
<el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:study:add']">{{
$t('page.business.study.studyFormFill.xztbbd') }}</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('page.business.form.bh')" prop="bdbh" />
<el-table-column :label="$t('page.business.form.bdmc')" prop="bdmc" />
<el-table-column :label="$t('page.business.form.xtmbmc')" prop="templateMc" />
<el-table-column :label="$t('page.business.form.cjsj')" align="center" prop="createTime" width="140" />
<el-table-column :label="$t('page.business.form.cjr')" align="center" prop="userMc" width="100" />
<el-table-column :label="$t('page.business.form.status')" prop="status" width="100">
<template slot-scope="scope">
<span v-if="scope.row.bdzt === 1">{{ $t('page.business.form.statusTbz') }}</span>
<span v-if="scope.row.bdzt === 3">{{ $t('page.business.form.statusYtj') }}</span>
<span v-if="scope.row.bdzt === 5">{{ $t('page.business.form.statusYtg') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('form.operate')" fixed="right" align="center" width="200">
<template slot-scope="scope">
<!-- 详情 -->
<el-button type="text" @click="detail(scope.row)">{{
$t('form.detail') }}</el-button>
<!-- 编辑 -->
<el-button type="text" @click="edit(scope.row)" v-if="scope.row.bdzt === 1">{{
$t('form.edit') }}</el-button>
<template v-if="scope.row.fzrsh == 10">
<template v-if="scope.row.fzrshzt == 5">
<!-- 负责人审核 -->
<el-button type="text" @click="audit(scope.row)" v-if="scope.row.bdzt === 3 && id == leader">{{
$t('page.business.form.audit') }}</el-button>
</template>
<template>
<!-- 有权限审核 -->
<el-button type="text" @click="audit(scope.row)" v-hasPermi="['business:studyFormFill:audit']"
v-if="scope.row.bdzt === 3">{{ $t('page.business.form.audit') }}</el-button>
</template>
</template>
<template v-else>
<!-- 有权限审核 -->
<el-button type="text" @click="audit(scope.row)" v-hasPermi="['business:studyFormFill:audit']"
v-if="scope.row.bdzt === 3">{{ $t('page.business.form.audit') }}</el-button>
</template>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize"
@pagination="getList" />
</div>
</div>
<!-- 编辑 -->
<Bj v-show="showEdit" key="Bj" ref="Bj" @close="bjClose" />
<!-- 详情 -->
<Xq v-show="showDetail" key="Xq" ref="Xq" @close="xqClose" />
<!-- 审核 -->
<Sh v-show="showAudit" key="Sh" ref="Sh" @close="shClose" />
</div>
</template>
<script>
import {
study_list,
study_info,
study_save,
study_delete
} from '@/api/business/study/study'
studyFormFill_list
} from '@/api/business/study/studyFormFill'
import Bj from "./tbbd/Bj";
import Xq from "./tbbd/Xq";
import Sh from "./tbbd/Sh";
import { mapGetters } from 'vuex'
export default {
name: 'TbbdList',
name: 'YtbdList',
props: {
study:{
type:Object,
default:()=>{
study: {
type: Object,
default: () => {
return {}
}
}
},
components: {},
computed: {},
filters: {},
computed: {
...mapGetters([
'id'
]),
},
watch: {
study: {
handler(newVal) {
this.searchForm.studyId = newVal.id
this.leader = newVal.leader
this.search()
},
immediate: true,
deep: true
}
},
components: { Bj, Xq, Sh },
data() {
return {
daterange:[],
daterangeTj:[],
leader: null,
showAudit: false,
showEdit: false,
showDetail: false,
daterange: [],
searchForm: {
pageNum: 1,
pageSize: 10,
sn:'',
name:'',
ownerName:'',
templateName:'',
startDate:'',
endDate:'',
tjStartDate:'',
tjEndDate:'',
studyId: '',
bdbh: '',
bdmc: '',
userId: '',
templateMc: '',
startDate: '',
endDate: '',
},
loading: false,
@ -157,61 +158,85 @@ export default {
list: [],
}
},
created() {},
created() { },
methods: {
search(){
search() {
this.searchForm.pageNum = 1
this.getList()
},
reset(){
reset() {
},
getList(){
},
edit(row){
},
detail(row){
getList() {
if (this.daterange != null && this.daterange.length > 0) {
this.searchForm.startDate = this.daterange[0]
this.searchForm.endDate = moment().add(this.daterange[1], 'days').format('YYYY-MM-DD');
} else {
this.searchForm.startDate = ''
this.searchForm.endDate = ''
}
this.loading = true
studyFormFill_list(this.searchForm).then(response => {
this.list = response.rows
this.total = response.total
this.loading = false
})
},
audit(row){
add() {
this.showEdit = true
this.$emit('showDetail', this.showEdit)
this.$refs.Bj.edit({ studyId: this.searchForm.studyId })
},
jq(row){
edit(row) {
this.showEdit = true
this.$emit('showDetail', this.showEdit)
this.$refs.Bj.edit(row)
},
changeOwner(row){
bjClose() {
this.showEdit = false
this.$emit('showDetail', this.showEdit)
this.search()
},
fz(row){
xqClose() {
this.showDetail = false
this.$emit('showDetail', this.showDetail)
this.search()
},
fh(row){
shClose() {
this.showAudit = false
this.$emit('showDetail', this.showAudit)
this.search()
},
gc(row){
detail(row) {
this.showDetail = true
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
},
qrfz(row){
audit(row) {
this.showAudit = true
this.$emit('showDetail', this.showAudit)
this.$refs.Sh.show(row)
},
}
}
</script>
<style lang="scss" scoped>
.ytbd-list {
.ytbd-search{
.tbbd-list {
.tbbd-search {
background: #fff;
padding: 20px;
margin-bottom: 10px;
.right-btn{
text-align:right
.right-btn {
text-align: right
}
}
.ytbd-content{
.tbbd-content {
padding: 20px;
background: #fff;
.add-box{
.add-box {
margin-bottom: 10px;
}
}

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

@ -29,7 +29,7 @@ G