Browse Source

fix:[模板管理]标签打印

master
15881625488@163.com 6 hours ago
parent
commit
4c6368fdf5
6 changed files with 79 additions and 22 deletions
  1. +2
    -0
      src/lang/en/template/commonTemplate.js
  2. +2
    -0
      src/lang/zh/template/commonTemplate.js
  3. +0
    -3
      src/views/business/comps/template/TemplateTable.vue
  4. +0
    -8
      src/views/business/comps/template/comps/gsp/GSP001.vue
  5. +0
    -4
      src/views/business/comps/template/mixins/templateMixin.js
  6. +75
    -7
      src/views/business/study/comp/tbbd/Bj.vue

+ 2
- 0
src/lang/en/template/commonTemplate.js View File

@ -13,6 +13,8 @@ export default {
remark: 'Comments', remark: 'Comments',
step: 'Step', step: 'Step',
bqdy: 'Label Print', bqdy: 'Label Print',
dayji: 'Printer',
label: 'Label',
//平行配制,阶梯配制 //平行配制,阶梯配制
xzpxpz:'新增平行配制', xzpxpz:'新增平行配制',

+ 2
- 0
src/lang/zh/template/commonTemplate.js View File

@ -19,6 +19,8 @@ export default {
step: '步骤', step: '步骤',
remark: '备注', remark: '备注',
bqdy: '标签打印', bqdy: '标签打印',
dayji: '打印机',
label: '标签',
//平行配制,阶梯配制 //平行配制,阶梯配制
xzpxpz:'新增平行配制', xzpxpz:'新增平行配制',

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

@ -524,9 +524,6 @@ export default {
getResource() { getResource() {
return this.$refs.templateComponent.getResource(); return this.$refs.templateComponent.getResource();
}, },
getPrintResource() {
return this.$refs.templateComponent.getPrintResource();
},
getYqResource() { getYqResource() {
return this.$refs.templateComponent.getYqResource(); return this.$refs.templateComponent.getYqResource();
}, },

+ 0
- 8
src/views/business/comps/template/comps/gsp/GSP001.vue View File

@ -477,14 +477,6 @@ export default {
this.yqResourceTmp = stepResource.yqResource || [] this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp; return this.resourceTmp;
}, },
//
getPrintResource() {
let content = this.getFilledFormData();
let printResourceTmp = []
this.printResourceTmp=printResourceTmp
return this.printResourceTmp
},
//使 //使
getStepResource() { getStepResource() {
const sjResource = [], yqResource = []; const sjResource = [], yqResource = [];

+ 0
- 4
src/views/business/comps/template/mixins/templateMixin.js View File

@ -215,7 +215,6 @@ export default {
jcbList: [], //检测板信息 jcbList: [], //检测板信息
xbxj: [], //细胞细菌信息 xbxj: [], //细胞细菌信息
printResourceTmp:[],//标签打印list信息
resourceTmp: [], //试验试剂信息提交用 resourceTmp: [], //试验试剂信息提交用
yqResourceTmp: [], //仪器信息提交用 yqResourceTmp: [], //仪器信息提交用
jcbListTmp: [], //检测板信息提交用 jcbListTmp: [], //检测板信息提交用
@ -387,9 +386,6 @@ export default {
getResource() { getResource() {
return this.resourceTmp return this.resourceTmp
}, },
getPrintResource() {
return this.printResourceTmp
},
getYqResource() { getYqResource() {
return this.yqResourceTmp return this.yqResourceTmp
}, },

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

@ -28,7 +28,7 @@
<el-button type="primary" @click="next">{{ $t('page.business.study.studyFormFill.next') }}</el-button> <el-button type="primary" @click="next">{{ $t('page.business.study.studyFormFill.next') }}</el-button>
</template> </template>
<template v-else> <template v-else>
<el-button @click="showDy" v-if="form.templateShowDy == 10">{{
<el-button @click="showDy" v-if="form.templateShowDy == 10">{{
$t('template.common.bqdy') $t('template.common.bqdy')
}}</el-button> }}</el-button>
<el-button @click="showYjcc" v-if="form.templateShowYjcc == 10">{{ <el-button @click="showYjcc" v-if="form.templateShowYjcc == 10">{{
@ -430,6 +430,37 @@
<el-button @click="openTjsh = false">{{ $t('form.cancel') }}</el-button> <el-button @click="openTjsh = false">{{ $t('form.cancel') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="$t('template.common.bqdy')" :visible.sync="openBqdy" width="1200px" append-to-body
:close-on-click-modal="false">
<el-form ref="formBqdy" :model="formBqdy" :rules="rulesBqdy" label-width="120px" v-if="openBqdy">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('template.common.dayji')" prop="dyj">
<el-select v-model="formBqdy.dyj" placeholder="请选择">
<el-option label="打印机" value="打印机">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('template.common.label')" prop="printList">
<!-- {{ JSON.stringify(formBqdy) }} -->
<el-checkbox-group v-model="printCheck" @change="printCheckChange">
<el-checkbox :label="item.bh" v-for="item in resourcePrint" :key="'print' + item.bh"></el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="printbq">{{ $t('form.confirm') }}</el-button>
<el-button @click="openBqdy = false">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -451,6 +482,7 @@ export default {
data() { data() {
return { return {
showIndex: 1, showIndex: 1,
printCheck: [],
form: {}, form: {},
rules: { rules: {
bdmc: [{ bdmc: [{
@ -476,12 +508,17 @@ export default {
openSave: false, openSave: false,
openTjsh: false, openTjsh: false,
openApprove: false, openApprove: false,
openBqdy: false,
openYjcc: false, openYjcc: false,
formSave: { formSave: {
qmyy: this.$t('page.business.study.studyFormFill.txbbc'), qmyy: this.$t('page.business.study.studyFormFill.txbbc'),
remark: '', remark: '',
qmrmm: '', qmrmm: '',
}, },
formBqdy: {
dyj: null,
printList: null
},
formApprove: { formApprove: {
id: null, id: null,
qmyy: this.$t('page.business.study.studyFormFill.txbtjjl'), qmyy: this.$t('page.business.study.studyFormFill.txbtjjl'),
@ -531,6 +568,18 @@ export default {
jcbList: [], jcbList: [],
xbxj: [], xbxj: [],
bdmbTitle: this.$t('page.business.form.bdmb'), bdmbTitle: this.$t('page.business.form.bdmb'),
rulesBqdy: {
dyj: [{
required: true,
message: ' ',
trigger: 'blur'
}],
printList: [{
required: true,
message: ' ',
trigger: 'blur'
}]
},
rulesApprove: { rulesApprove: {
qmrmm: [{ qmrmm: [{
required: true, required: true,
@ -564,6 +613,7 @@ export default {
studyFormType: null, studyFormType: null,
ccwzlist: [], ccwzlist: [],
selectedDeptId: null, selectedDeptId: null,
resourcePrint: []
} }
}, },
computed: { computed: {
@ -576,6 +626,13 @@ export default {
this.getCcwz() this.getCcwz()
}, },
methods: { methods: {
printCheckChange() {
if (this.printCheck && this.printCheck.length > 0) {
this.formBqdy.printList = this.printCheck.join(',')
} else {
this.formBqdy.printList = null
}
},
validForm() { validForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { } if (valid) { }
@ -823,13 +880,24 @@ export default {
that.cclistYj = [] that.cclistYj = []
that.addCcYj() that.addCcYj()
that.$refs.templateTable.getFilledFormData() that.$refs.templateTable.getFilledFormData()
let resource = that.$refs.templateTable.getPrintResource()
if (resource.length > 0) {
that.resourcePrint = _.filter(that.$refs.templateTable.getResource(), function (item) { return item.type == null || item.elnType && item.elnType != '' })
if (that.resourcePrint.length > 0) {
that.formBqdy.dyj=null
that.formBqdy.printList=null
that.printCheck=[]
that.openBqdy = true
} else { } else {
that.$modal.msgError("没有可打印的标签") that.$modal.msgError("没有可打印的标签")
} }
}, },
printbq() {
let that = this
this.$refs["formBqdy"].validate(valid => {
if (valid) {
that.$modal.msgError("todo")
}
})
},
async showTjsh(qmyy) { async showTjsh(qmyy) {
let that = this let that = this
let content = await this.$refs.templateTable.getFormData() let content = await this.$refs.templateTable.getFormData()
@ -1022,7 +1090,7 @@ export default {
this.$modal.msgError('第' + (i + 1) + "个存储,存储条件不能为空") this.$modal.msgError('第' + (i + 1) + "个存储,存储条件不能为空")
return return
} }
if (that.cclistYj[i].cctj == '其他'&& that.cclistYj[i].cctjqt == '') {
if (that.cclistYj[i].cctj == '其他' && that.cclistYj[i].cctjqt == '') {
this.$modal.msgError('第' + (i + 1) + "个存储,存储条件不能为空") this.$modal.msgError('第' + (i + 1) + "个存储,存储条件不能为空")
return return
} }
@ -1060,7 +1128,7 @@ export default {
this.$modal.msgError('第' + (i + 1) + "个处置,处置方式不能为空") this.$modal.msgError('第' + (i + 1) + "个处置,处置方式不能为空")
return return
} }
if (that.czlist[i].czfs == '其他'&& that.czlist[i].czfsqt == '') {
if (that.czlist[i].czfs == '其他' && that.czlist[i].czfsqt == '') {
this.$modal.msgError('第' + (i + 1) + "个存储,处置方式不能为空") this.$modal.msgError('第' + (i + 1) + "个存储,处置方式不能为空")
return return
} }
@ -1074,7 +1142,7 @@ export default {
this.$modal.msgError('第' + (i + 1) + "个存储,存储条件不能为空") this.$modal.msgError('第' + (i + 1) + "个存储,存储条件不能为空")
return return
} }
if (that.cclist[i].cctj=='其他' && that.cclist[i].cctjqt == '') {
if (that.cclist[i].cctj == '其他' && that.cclist[i].cctjqt == '') {
this.$modal.msgError('第' + (i + 1) + "个存储,存储条件不能为空") this.$modal.msgError('第' + (i + 1) + "个存储,存储条件不能为空")
return return
} }

Loading…
Cancel
Save