Browse Source

feat:[模板管理][新增领取申请单模板]

master
15881625488@163.com 4 days ago
parent
commit
bfd75f0ba6
12 changed files with 616 additions and 110 deletions
  1. +6
    -4
      src/lang/en/business/study/studyFormApply.js
  2. +3
    -2
      src/lang/zh/business/study/studyFormApply.js
  3. +8
    -3
      src/views/business/comps/template/TemplateTable.vue
  4. +240
    -0
      src/views/business/comps/template/comps/gy/MJYLQSQD.vue
  5. +240
    -0
      src/views/business/comps/template/comps/gy/SYWZPZJHB.vue
  6. +10
    -10
      src/views/business/form/drug/comp/sqbdList.vue
  7. +2
    -2
      src/views/business/study/comp/jhbd/Bj.vue
  8. +33
    -23
      src/views/business/study/comp/sqbd/Bj.vue
  9. +24
    -22
      src/views/business/study/comp/sqbd/Fh.vue
  10. +23
    -28
      src/views/business/study/comp/sqbd/Sh.vue
  11. +25
    -14
      src/views/business/study/comp/sqbd/Sy.vue
  12. +2
    -2
      vue.config.js

+ 6
- 4
src/lang/en/business/study/studyFormApply.js View File

@ -37,19 +37,21 @@ export default {
tbz:'On-going',
ytj:'Submitted',
ywc:'Completed',
ywcfh:'Completed & Approved',
wtg:'未通过',
yfh:'Approved',
dfz:'Pending Abandon',
yfz:'Abandoned',
sh:'审核',
guancha:'View',
jiaqian:'Sign',
qrfz:'Confirm',
reason:'Reason',
reject:'Reject',
approve:'Approve',
szqk:'生长情况',
rybg:'Change of Person',
shenyue:'Review',
szqk:'生长情况',
rybg:'Change of Person',
shenyue:'Review',
fhjj:'复核拒绝',
fhtg:'复核通过',

+ 3
- 2
src/lang/zh/business/study/studyFormApply.js View File

@ -36,12 +36,13 @@ sqfz:'申请废止',
tbz:'填报中',
ytj:'已提交',
ywc:'已完成',
ywcfh:'已完成(经复核',
wtg:'未通过',
yfh:'已复核',
ywc:'已完成',
dfz:'待废止',
yfz:'已废止',
sh:'审核',
guancha:'观察',
jiaqian:'加签',
qrfz:'确认废止',

+ 8
- 3
src/views/business/comps/template/TemplateTable.vue View File

@ -13,13 +13,17 @@ import SP001 from './comps/sp/SP001';
import SWYPFXRYPZB from "./comps/sp/SWYPFXRYPZB.vue";
import SWYPFXCBYPZB from "./comps/sp/SWYPFXCBYPZB.vue";
import SWYPBQGZYZBB from "./comps/sp/SWYPBQGZYZBB.vue";
import SYWZPZJHB from "./comps/dl/SYWZPZJHB.vue";
import SWYPNBGZYZBB from "./comps/sp/SWYPNBGZYZBB.vue";
import Demo from "./comps/sp/Demo.vue";
//
import SYWZPZJHB from "./comps/gy/SYWZPZJHB.vue";
import MJYLQSQD from "./comps/gy/MJYLQSQD.vue";
export default {
name: "TemplateTable",
components: {
SP001,SWYPFXRYPZB ,Demo,SWYPFXCBYPZB,SWYPBQGZYZBB,SYWZPZJHB,SWYPNBGZYZBB,
MJYLQSQD,SYWZPZJHB,
SP001,SWYPFXRYPZB ,Demo,SWYPFXCBYPZB,SWYPBQGZYZBB,SWYPNBGZYZBB,
},
props: {
sn: {
@ -44,7 +48,8 @@ export default {
'SP002': 'SWYPFXCBYPZB',
'SP003': 'SWYPBQGZYZBB',
'SP004': 'SWYPNBGZYZBB',
'DL001': 'SYWZPZJHB',
'SYWZPZJHB': 'SYWZPZJHB',
'MJYLQSQD': 'MJYLQSQD',
// 'SP001': 'Demo',
}
}

+ 240
- 0
src/views/business/comps/template/comps/gy/MJYLQSQD.vue View File

@ -0,0 +1,240 @@
<!-- 试验物质配制计划表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">试验物质配制计划表<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPcakge label="试验基本信息" ref="baseInfoRef" :formConfig="baseInfoFormConfig"
:formData="formData" />
<LineLabel label="计划信息" />
<div class="template-form-item">
<BaseInfoFormPcakge ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<CustomTable @blur="onHandleTableBlur" :showHeaderSelect="fillType === 'actFill'" :showOperation="fillType === 'actFill'" ref="stepTableRef" :columns="stepColumns"
:formData="formData" >
<template slot="operation" slot-scope="{ row, rowIndex}">
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" @deleteRow="deleteRow"></TableOpertaion>
</template>
</CustomTable>
<div class="add-row">
<el-button type="primary" plain @click="addRow">添加行</el-button>
</div>
</div>
<BaseInfoFormPcakge label="特别说明" ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
<button @click="onSave">保存</button>
</div>
</div>
</template>
<script>
import BaseInfoFormPcakge from "@/components/Template/BaseInfoFormPcakge";
import LineLabel from "@/components/Template/LineLabel";
import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
export default {
name: "MJYLQSQD",
components: { BaseInfoFormPcakge, LineLabel, CustomTable, TableOpertaion },
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: "请输入特别说明",
maxlength: 1000,
rows: 5
}
}
}
]
},
//
baseInfoFormConfig() {
return [
{
type: "cardItem",
config: {
studyMc: {
label: "试验名称",
type: "input",
disabled: true,
},
studySn: {
label: "试验编号",
type: "input",
disabled: true,
},
}
},
]
},
//
stepFormConfig() {
return [
{
type: "step",
config: {
drawTime: {
label: "领取时间",
type: "dateTime",
fillType: "actFill",
},
analyzeTime: {
label: "分析时间",
type: "dateTime",
fillType: "actFill",
},
testSubstance: {
label: "试验物质",
type: "input",
fillType: "actFill",
},
configFrequency: {
label: "配置频率",
type: "input",
fillType: "actFill",
},
}
}
]
},
//
stepColumns() {
return [
{
label: "给药剂量或组别",
prop: "startSolutionCode",
width: 280,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
},
{
label: "配制浓度",
prop: "preparationConcentration",
width: 280,
headerSelectKey: "preparationConcentrationUnit",
fillType: "actFill",
headerOptions: this.$store.state.template.volumeOptions,
defaultValue: "mg",
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyMaxlength: 10,
},
{
label: "配制体积",
prop: "preparationVolume",
width: 280,
headerSelectKey: "preparationVolumeUnit",
fillType: "actFill",
headerOptions: this.$store.state.template.volumeOptions,
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyMaxlength: 10,
},
]
},
},
data() {
return {
selectReagentVisible: false,
subSolutionVisible: false,
currentSubKey: "",//key
dataSource: [],
stepTableDataSource: [],
};
},
mounted() {
this.formData = {
headerSelectFields: {
preparationVolumeUnit: "ml",
preparationConcentrationUnit: "ul",
}
}
},
methods: {
async getFormData() {
const baseData = await this.$refs.baseInfoRef.getFormData();
const stepFormData = await this.$refs.stepFormPackageRef.getFormData();
const stepTableFormData = await this.$refs.stepTableRef.getFormData();
const remarkData = await this.$refs.remarkRef.getFormData();
if(!stepTableFormData.stepTableFormData.length){
this.$message.error("请添加计划信息");
return;
}
return {
...baseData,
...stepFormData,
...remarkData,
...stepTableFormData
}
},
async onSave() {
const formData = await this.getFormData();
// const formData = await this.$refs.stepTableRef.getFormData();
console.log(formData, "formData")
},
//
addRow() {
this.$refs.stepTableRef.addRow({
startSolutionCode: "",
preparationConcentration: "",
preparationVolume: "",
})
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.add-row{
display: flex;
justify-content: center;
padding: 20px 0;
}
</style>

+ 240
- 0
src/views/business/comps/template/comps/gy/SYWZPZJHB.vue View File

@ -0,0 +1,240 @@
<!-- 试验物质配制计划表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">试验物质配制计划表<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPcakge label="试验基本信息" ref="baseInfoRef" :formConfig="baseInfoFormConfig"
:formData="formData" />
<LineLabel label="计划信息" />
<div class="template-form-item">
<BaseInfoFormPcakge ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<CustomTable @blur="onHandleTableBlur" :showHeaderSelect="fillType === 'actFill'" :showOperation="fillType === 'actFill'" ref="stepTableRef" :columns="stepColumns"
:formData="formData" >
<template slot="operation" slot-scope="{ row, rowIndex}">
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" @deleteRow="deleteRow"></TableOpertaion>
</template>
</CustomTable>
<div class="add-row">
<el-button type="primary" plain @click="addRow">添加行</el-button>
</div>
</div>
<BaseInfoFormPcakge label="特别说明" ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
<button @click="onSave">保存</button>
</div>
</div>
</template>
<script>
import BaseInfoFormPcakge from "@/components/Template/BaseInfoFormPcakge";
import LineLabel from "@/components/Template/LineLabel";
import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
export default {
name: "SYWZPZJHB",
components: { BaseInfoFormPcakge, LineLabel, CustomTable, TableOpertaion },
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: "请输入特别说明",
maxlength: 1000,
rows: 5
}
}
}
]
},
//
baseInfoFormConfig() {
return [
{
type: "cardItem",
config: {
studyMc: {
label: "试验名称",
type: "input",
disabled: true,
},
studySn: {
label: "试验编号",
type: "input",
disabled: true,
},
}
},
]
},
//
stepFormConfig() {
return [
{
type: "step",
config: {
drawTime: {
label: "领取时间",
type: "dateTime",
fillType: "actFill",
},
analyzeTime: {
label: "分析时间",
type: "dateTime",
fillType: "actFill",
},
testSubstance: {
label: "试验物质",
type: "input",
fillType: "actFill",
},
configFrequency: {
label: "配置频率",
type: "input",
fillType: "actFill",
},
}
}
]
},
//
stepColumns() {
return [
{
label: "给药剂量或组别",
prop: "startSolutionCode",
width: 280,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
},
{
label: "配制浓度",
prop: "preparationConcentration",
width: 280,
headerSelectKey: "preparationConcentrationUnit",
fillType: "actFill",
headerOptions: this.$store.state.template.volumeOptions,
defaultValue: "mg",
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyMaxlength: 10,
},
{
label: "配制体积",
prop: "preparationVolume",
width: 280,
headerSelectKey: "preparationVolumeUnit",
fillType: "actFill",
headerOptions: this.$store.state.template.volumeOptions,
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyMaxlength: 10,
},
]
},
},
data() {
return {
selectReagentVisible: false,
subSolutionVisible: false,
currentSubKey: "",//key
dataSource: [],
stepTableDataSource: [],
};
},
mounted() {
this.formData = {
headerSelectFields: {
preparationVolumeUnit: "ml",
preparationConcentrationUnit: "ul",
}
}
},
methods: {
async getFormData() {
const baseData = await this.$refs.baseInfoRef.getFormData();
const stepFormData = await this.$refs.stepFormPackageRef.getFormData();
const stepTableFormData = await this.$refs.stepTableRef.getFormData();
const remarkData = await this.$refs.remarkRef.getFormData();
if(!stepTableFormData.stepTableFormData.length){
this.$message.error("请添加计划信息");
return;
}
return {
...baseData,
...stepFormData,
...remarkData,
...stepTableFormData
}
},
async onSave() {
const formData = await this.getFormData();
// const formData = await this.$refs.stepTableRef.getFormData();
console.log(formData, "formData")
},
//
addRow() {
this.$refs.stepTableRef.addRow({
startSolutionCode: "",
preparationConcentration: "",
preparationVolume: "",
})
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.add-row{
display: flex;
justify-content: center;
padding: 20px 0;
}
</style>

+ 10
- 10
src/views/business/form/drug/comp/sqbdList.vue View File

@ -1,6 +1,6 @@
<template>
<div>
<div class="sqbd-list" v-show="!showDetail && !showEdit && !showAudit && !showFh">
<div class="sqbd-list" v-show="!showDetail && !showEdit && !showAudit && !showFh&& !showSh">
<div class="sqbd-search">
<el-form :model="searchForm" ref="searchForm" :inline="true" label-width="100px">
<el-row>
@ -80,6 +80,13 @@
<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.gsr')" align="center" prop="userMc" width="100" />
<el-table-column :label="$t('page.business.study.studyFormApply.sfbl')" align="center" prop="status"
width="100">
<template slot-scope="scope">
<span v-if="scope.row.sfbl === 10">{{ $t('page.business.study.studyFormApply.yes') }}</span>
<span v-if="scope.row.sfbl === 1">{{ $t('page.business.study.studyFormApply.no') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.form.status')" prop="status" align="center" width="100">
<template slot-scope="scope">
<span v-if="scope.row.bdzt === 1">{{ $t('page.business.study.studyFormApply.tbz') }}</span>
@ -91,13 +98,6 @@
<span v-if="scope.row.bdzt === 11">{{ $t('page.business.study.studyFormApply.yfz') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.study.studyFormApply.sfbl')" align="center" prop="status"
width="100">
<template slot-scope="scope">
<span v-if="scope.row.sfbl === 10">{{ $t('page.business.study.studyFormApply.yes') }}</span>
<span v-if="scope.row.sfbl === 1">{{ $t('page.business.study.studyFormApply.no') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.form.tjsj')" align="center" prop="tjsj" width="140" />
<el-table-column :label="$t('form.operate')" align="left" fixed="right" width="200">
<template slot-scope="scope">
@ -128,8 +128,8 @@
$t('page.business.study.studyFormApply.sy') }}</el-button>
<!-- 审核 -->
<el-button type="text" v-if="scope.row.bdzt === 5" @click="sh(scope.row)"
v-hasPermi="['business:drugFormApply:sy']">{{
$t('page.business.study.studyFormApply.sy') }}</el-button>
v-hasPermi="['business:drugFormApply:sh']">{{
$t('page.business.study.studyFormApply.sh') }}</el-button>
<!-- 废止 -->
<el-button type="text" v-if="scope.row.bdzt === 1" @click="fz(scope.row)"
v-hasPermi="['business:drugFormApply:fz']">{{

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

@ -165,9 +165,9 @@ export default {
bdbh: null,
bdmc: '试验物质配制计划表',
bdsm: null,
templateId: 23,
templateId: 1,
templateMc: '试验物质配制计划表',
templateSn: 'DL001',
templateSn: 'SYWZPZJHB',
bdnr: null,
fzrsh: null,
shryId: null,

+ 33
- 23
src/views/business/study/comp/sqbd/Bj.vue View File

@ -29,7 +29,7 @@
</template>
<template v-else>
<el-button @click="saveNext">{{ $t('page.business.study.studyFormApply.save') }}</el-button>
<el-button type="primary" @click="openSubmit = true">{{ $t('page.business.study.studyFormApply.submit')
<el-button type="primary" @click="showtijjiao">{{ $t('page.business.study.studyFormApply.submit')
}}</el-button>
<el-button type="primary" @click="pre">{{ $t('page.business.study.studyFormApply.pre') }}</el-button>
</template>
@ -210,16 +210,16 @@ export default {
id: null,
studyId: null,
bdbh: null,
bdmc: null,
bdmc: '麻醉/精神药品配制/领取申请单',
bdsm: null,
templateId: null,
templateMc: null,
templateSn: null,
templateId: 2,
templateMc: '麻醉/精神药品配制/领取申请单',
templateSn: 'MJYLQSQD',
bdnr: null,
fzrsh: null,
shryId: null,
sfbl: null,
qmyy:'制作提交预制表单',
qmyy: '制作提交预制表单',
shryMc: null,
}
this.resetForm("form")
@ -256,16 +256,24 @@ export default {
}
})
},
async showtijjiao() {
let content = await this.$refs.templateTable.getFormData()
if (content) {
this.openSubmit = true
}
},
async saveNext() {
let content = await this.$refs.templateTable.getFormData()
this.form.bdnr = JSON.stringify(content)
this.$modal.loading()
studyFormApply_bc(this.form).then(response => {
this.$emit('close')
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
if (content) {
this.form.bdnr = JSON.stringify(content)
this.$modal.loading()
studyFormApply_bc(this.form).then(response => {
this.$emit('close')
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
}
},
tj() {
this.$refs["formSubmit"].validate(valid => {
@ -276,15 +284,17 @@ export default {
},
async dotj() {
let content = await this.$refs.templateTable.getFormData()
this.form.bdnr = JSON.stringify(content)
this.$modal.loading()
studyFormApply_tj(this.form).then(response => {
this.$emit('close')
this.openSubmit = false
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
if (content) {
this.form.bdnr = JSON.stringify(content)
this.$modal.loading()
studyFormApply_tj(this.form).then(response => {
this.$emit('close')
this.openSubmit = false
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
}
}
}
}

+ 24
- 22
src/views/business/study/comp/sqbd/Fh.vue View File

@ -108,7 +108,7 @@
</template>
<script>
import { studyFormApply_fhtg, studyFormApply_fhjj, studyFormApply_info, studyFormApply_jcgj, studyFormApply_qmxx } from "@/api/business/study/studyFormApply"
import { studyFormApply_fhtg, studyFormApply_fhjj, studyFormApply_info, studyFormApply_jcgj, studyFormApply_qmxx } from "@/api/business/study/studyFormApply"
import { mapGetters } from 'vuex'
import JcgjList from "@/views/business/comps/common/JcgjList";
import TemplateTable from '@/views/business/comps/template/TemplateTable';
@ -159,7 +159,7 @@ export default {
created() {
},
methods: {
getJjcgjList(val) {
this.$modal.loading()
studyFormApply_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => {
@ -209,7 +209,7 @@ export default {
this.openTitle = 'page.business.study.studyFormApply.fhtg'
} else if (qmyy == '复核拒绝') {
this.openTitle = 'page.business.study.studyFormApply.fhjj'
}
}
},
resetApprove() {
this.formApprove = {
@ -231,25 +231,27 @@ export default {
},
async doapprove() {
let content = await this.$refs.templateTable.getFormData()
this.formApprove.bdnr = JSON.stringify(content)
this.$modal.loading()
if (this.formApprove.qmyy == '复核通过') {
studyFormApply_fhtg(this.formApprove).then(response => {
this.openApprove = false
this.$modal.closeLoading()
this.$emit('close')
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.formApprove.qmyy == '复核拒绝') {
this.formApprove.remark=this.formApprove.reason
studyFormApply_fhjj(this.formApprove).then(response => {
this.openApprove = false
this.$modal.closeLoading()
this.$emit('close')
}).finally(() => {
this.$modal.closeLoading()
})
if (content) {
this.formApprove.bdnr = JSON.stringify(content)
this.$modal.loading()
if (this.formApprove.qmyy == '复核通过') {
studyFormApply_fhtg(this.formApprove).then(response => {
this.openApprove = false
this.$modal.closeLoading()
this.$emit('close')
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.formApprove.qmyy == '复核拒绝') {
this.formApprove.remark = this.formApprove.reason
studyFormApply_fhjj(this.formApprove).then(response => {
this.openApprove = false
this.$modal.closeLoading()
this.$emit('close')
}).finally(() => {
this.$modal.closeLoading()
})
}
}
}
}

+ 23
- 28
src/views/business/study/comp/sqbd/Sh.vue View File

@ -108,7 +108,7 @@
</template>
<script>
import { studyFormApply_shtg, studyFormApply_shjj, studyFormApply_info, studyFormApply_jcgj, studyFormApply_qmxx } from "@/api/business/study/studyFormApply"
import { studyFormApply_shtg, studyFormApply_shjj, studyFormApply_info, studyFormApply_jcgj, studyFormApply_qmxx } from "@/api/business/study/studyFormApply"
import { mapGetters } from 'vuex'
import JcgjList from "@/views/business/comps/common/JcgjList";
import TemplateTable from '@/views/business/comps/template/TemplateTable';
@ -159,7 +159,7 @@ export default {
created() {
},
methods: {
getJjcgjList(val) {
this.$modal.loading()
studyFormApply_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => {
@ -200,7 +200,7 @@ export default {
this.$modal.closeLoading()
})
},
showApprove(qmyy) {
async showApprove(qmyy) {
this.openApprove = true
this.resetApprove()
this.formApprove.id = this.form.id
@ -209,7 +209,7 @@ export default {
this.openTitle = 'page.business.study.studyFormApply.shtg'
} else if (qmyy == '审核拒绝') {
this.openTitle = 'page.business.study.studyFormApply.shjj'
}
}
},
resetApprove() {
this.formApprove = {
@ -225,33 +225,28 @@ export default {
approve() {
this.$refs["formApprove"].validate(valid => {
if (valid) {
this.doapprove()
this.$modal.loading()
if (this.formApprove.qmyy == '审核通过') {
studyFormApply_shtg(this.formApprove).then(response => {
this.openApprove = false
this.$modal.closeLoading()
this.$emit('close')
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.formApprove.qmyy == '审核拒绝') {
this.formApprove.remark = this.formApprove.reason
studyFormApply_shjj(this.formApprove).then(response => {
this.openApprove = false
this.$modal.closeLoading()
this.$emit('close')
}).finally(() => {
this.$modal.closeLoading()
})
}
}
})
},
async doapprove() {
let content = await this.$refs.templateTable.getFormData()
this.formApprove.bdnr = JSON.stringify(content)
this.$modal.loading()
if (this.formApprove.qmyy == '审核通过') {
studyFormApply_shtg(this.formApprove).then(response => {
this.openApprove = false
this.$modal.closeLoading()
this.$emit('close')
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.formApprove.qmyy == '审核拒绝') {
this.formApprove.remark=this.formApprove.reason
studyFormApply_shjj(this.formApprove).then(response => {
this.openApprove = false
this.$modal.closeLoading()
this.$emit('close')
}).finally(() => {
this.$modal.closeLoading()
})
}
}
}
}
</script>

+ 25
- 14
src/views/business/study/comp/sqbd/Sy.vue View File

@ -43,7 +43,7 @@
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormApply.jcgj') }}</div>
</div>
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true"/>
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true" />
<pagination v-show="jcgjTotal > 0" small layout="prev, pager, next" :total="jcgjTotal"
@pagination="getJjcgjList" />
@ -142,7 +142,7 @@ export default {
created() {
},
methods: {
getJjcgjList(val) {
this.$modal.loading()
studyFormApply_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => {
@ -183,16 +183,20 @@ export default {
this.$modal.closeLoading()
})
},
showApprove() {
this.resetApprove()
this.formApprove.id = this.form.id
this.openApprove = true
async showApprove() {
let content = await this.$refs.templateTable.getFormData()
if (content) {
this.resetApprove()
this.formApprove.id = this.form.id
this.openApprove = true
}
},
resetApprove() {
this.formApprove = {
id: null,
qmyy: '已审阅',
remark: '',
bdnr: '',
qmrmm: '',
}
this.resetForm("formApprove")
@ -200,16 +204,23 @@ export default {
approve() {
this.$refs["formApprove"].validate(valid => {
if (valid) {
this.$modal.loading()
studyFormApply_sy(this.formApprove).then(response => {
this.openApprove = false
this.$modal.closeLoading()
this.$emit('close')
}).finally(() => {
this.$modal.closeLoading()
})
this.doapprove()
}
})
},
async doapprove() {
let content = await this.$refs.templateTable.getFormData()
if (content) {
this.formApprove.bdnr = JSON.stringify(content)
this.$modal.loading()
studyFormApply_sy(this.formApprove).then(response => {
this.openApprove = false
this.$modal.closeLoading()
this.$emit('close')
}).finally(() => {
this.$modal.closeLoading()
})
}
}
}
}

+ 2
- 2
vue.config.js View File

@ -34,8 +34,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://localhost:8080`,
// target: `http://39.99.251.173:8080`,
target: `http://localhost:8080`,
// target: `http://39.99.251.173:8080`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save