Browse Source

fix:[填报表单]药剂存储

lkf
15881625488@163.com 2 months ago
parent
commit
0912d792be
4 changed files with 193 additions and 5 deletions
  1. +8
    -0
      src/api/business/study/studyFormFill.js
  2. +2
    -1
      src/lang/en/business/study/studyFormFill.js
  3. +2
    -1
      src/lang/zh/business/study/studyFormFill.js
  4. +181
    -3
      src/views/business/study/comp/tbbd/Bj.vue

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

@ -111,6 +111,14 @@ export function studyFormFill_tj(data) {
data: data
})
}
//药剂存储
export function studyFormFill_yjcc(data) {
return request({
url: '/system/business/studyFormFill/yjcc',
method: 'post',
data: data
})
}
//观察
export function studyFormFill_gc(data) {

+ 2
- 1
src/lang/en/business/study/studyFormFill.js View File

@ -73,5 +73,6 @@ export default {
fztgjj: 'Approve/Reject Record Abolition',
ysy: 'Reviewed',
bcjl:'Save',
txbbc:'Fill In And Save'
txbbc:'Fill In And Save',
yjcc:'药剂存储'
}

+ 2
- 1
src/lang/zh/business/study/studyFormFill.js View File

@ -74,5 +74,6 @@ export default {
fztgjj: '废止通过/拒绝',
ysy: '已审阅',
bcjl:'保存记录',
txbbc:'填写并保存'
txbbc:'填写并保存',
yjcc:'药剂存储'
}

+ 181
- 3
src/views/business/study/comp/tbbd/Bj.vue View File

@ -28,6 +28,8 @@
<el-button type="primary" @click="next">{{ $t('page.business.study.studyFormFill.next') }}</el-button>
</template>
<template v-else>
<el-button @click="showYjcc">{{ $t('page.business.study.studyFormFill.yjcc')
}}</el-button>
<el-button @click="showSave">{{ $t('page.business.study.studyFormFill.save') }}</el-button>
<el-button type="primary" @click="showApprove">{{ $t('page.business.study.studyFormFill.submit')
}}</el-button>
@ -223,6 +225,96 @@
</div>
</el-dialog>
<el-dialog :title="$t('page.business.study.studyFormFill.yjcc')" :visible.sync="openYjcc" width="1200px"
append-to-body :close-on-click-modal="false">
<el-form ref="formYjcc" :model="formYjcc" :rules="rulesYjcc" label-width="120px" v-if="openYjcc">
<div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div>
<el-row>
<el-col :psna="24">
<el-form-item>
<div>
<el-button type="primary" @click="addCcYj" style="margin-left: 10px;">{{
$t('page.business.study.studyFormFill.tjcc') }}</el-button>
</div>
<template>
<div v-if="cclistYj.length > 0">
<el-card class="box-card" v-for="(citem, cindex) in cclistYj" :key="'cz' + cindex"
style="margin-top: 10px;">
<div slot="header" class="clearfix">
<div style="display: flex;justify-content: space-between;">
<div style="display: flex;">
<div style="display: flex;">
<div> 存储条件</div>
<div>
<BusinessSelect v-model="citem.cctj" dictType="business_cctj" style="width: 200px;">
</BusinessSelect>
</div>
</div>
<div style="display: flex; margin-left: 10px;">
<div> 存储位置</div>
<div>
<BusinessSelect v-model="citem.ccwz" dictType="business_ccwz" style="width: 200px;">
</BusinessSelect>
</div>
</div>
</div>
<div>
<el-button type="danger" icon="el-icon-delete" v-if="cclistYj.length > 1" circle
@click="delccYj(cindex)"></el-button>
</div>
</div>
</div>
<el-checkbox-group v-model="citem.list">
<el-checkbox :label="item.bh" v-for="item in resourceYj" :key="'icz' + item.bh"
:disabled="getDisabledCcYj(item.bh, cindex)"></el-checkbox>
</el-checkbox-group>
</el-card>
</div>
</template>
</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="formYjcc.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="formYjcc.remark" :rows="5" 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">
<div class="sbzdtcma"> <input type="text"></div>
<el-input type="password" show-password v-model="formYjcc.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="yjcc">{{ $t('form.confirm') }}</el-button>
<el-button @click="openYjcc = false">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
<el-dialog :title="$t('page.business.study.studyFormFill.bcjl')" :visible.sync="openSave" width="600px"
append-to-body :close-on-click-modal="false">
<el-form ref="formSave" :model="formSave" :rules="rulesSave" label-width="120px" v-if="openSave">
@ -271,7 +363,7 @@
</template>
<script>
import { studyFormFill_bc, studyFormFill_bcOnly, studyFormFill_updateBdnr, studyFormFill_tj, studyFormFill_info, studyFormFill_updateFhyjjl } from "@/api/business/study/studyFormFill"
import { studyFormFill_bc,studyFormFill_yjcc, studyFormFill_bcOnly, studyFormFill_updateBdnr, studyFormFill_tj, studyFormFill_info, studyFormFill_updateFhyjjl } from "@/api/business/study/studyFormFill"
import { study_info } from "@/api/business/study/study"
import { mapGetters } from 'vuex'
import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
@ -307,8 +399,10 @@ export default {
},
czlist: [],
cclist: [],
cclistYj: [],
openSave: false,
openApprove: false,
openYjcc: false,
formSave: {
qmyy: this.$t('page.business.study.studyFormFill.txbbc'),
remark: '',
@ -331,6 +425,22 @@ export default {
ccwz: '',
ccids: '',
},
formYjcc: {
id: null,
qmyy: this.$t('page.business.study.studyFormFill.yjcc'),
remark: '',
resource: '',
qmrmm: '',
sfcz: false,
czfs: '',
czfsqt: '',
czids: '',
sfcc: false,
cctj: '',
ccwz: '',
ccids: '',
},
resourceYj: [],
resource: [],
yqResource: [],
bdmbTitle: this.$t('page.business.form.bdmb'),
@ -349,7 +459,7 @@ export default {
}]
},
templateData: {},
studyType:null
studyType: null
}
},
computed: {
@ -388,6 +498,9 @@ export default {
delcc(index) {
this.cclist.splice(index, 1)
},
delccYj(index) {
this.cclistYj.splice(index, 1)
},
delcz(index) {
this.czlist.splice(index, 1)
},
@ -404,13 +517,20 @@ export default {
ccwz: ''
})
},
addCcYj() {
this.cclistYj.push({
list: [],
cctj: '',
ccwz: ''
})
},
getInfo() {
let key = this.$route.params.key
if (key && key != undefined && key != '') {
let params = null
try {
params = JSON.parse(caesarDecipher(this.$route.params.key))
this.studyType = params.studyType||null
this.studyType = params.studyType || null
} catch (e) {
console.log('参数错误')
}
@ -476,6 +596,20 @@ export default {
}
return mark
},
getDisabledCcYj(bh, idx) {
let mark = false
for (var i = 0; i < this.cclistYj.length; i++) {
if (idx != i) {
for (var j = 0; j < this.cclistYj[i].list.length; j++) {
if (this.cclistYj[i].list[j] == bh) {
mark = true;
break
}
}
}
}
return mark
},
sfczChange() {
if (!this.formApprove.sfcz) {
this.czlist = []
@ -498,6 +632,33 @@ export default {
that.openApprove = true
}
},
async showYjcc() {
let that = this
let content = await that.$refs.templateTable.getFormData()
if (content) {
that.resetYjcc()
that.formYjcc.id = that.form.id
this.cclistYj = []
that.addCcYj()
that.resourceYj = that.$refs.templateTable.getResource()
that.openYjcc = true
}
},
resetYjcc() {
this.formYjcc = {
id: null,
qmyy: this.$t('page.business.study.studyFormFill.yjcc'),
remark: '',
bdnr: '',
resource: '',
qmrmm: '',
sfcz: false,
czlist: '',
sfcc: false,
cclist: '',
}
this.resetForm("formYjcc")
},
resetApprove() {
this.formApprove = {
id: null,
@ -620,6 +781,23 @@ export default {
}
})
},
yjcc() {
let that = this
this.$refs["formYjcc"].validate(valid => {
if (valid) {
that.$modal.loading()
that.formYjcc.resource = JSON.stringify(that.resource)
that.formApprove.cclist = JSON.stringify(that.cclistYj)
studyFormFill_yjcc(that.formApprove).then(response => {
that.openApprove = false
that.$modal.closeLoading()
that.cancelSave()
}).finally(() => {
that.$modal.closeLoading()
})
}
})
},
tj() {
let that = this
this.$refs["formApprove"].validate(valid => {

Loading…
Cancel
Save