luojie 1 month ago
parent
commit
e23aa5e532
6 changed files with 354 additions and 5 deletions
  1. +16
    -1
      src/lang/en/template/dj.js
  2. +16
    -1
      src/lang/zh/template/dj.js
  3. +3
    -0
      src/views/business/comps/template/TemplateTable.vue
  4. +314
    -0
      src/views/business/comps/template/comps/dj/DJ003.vue
  5. +2
    -3
      src/views/business/comps/template/comps/dl/DL005.vue
  6. +3
    -0
      src/views/business/comps/template/mixins/templateMixin.js

+ 16
- 1
src/lang/en/template/dj.js View File

@ -3,5 +3,20 @@ export default {
dj001: { dj001: {
syts: '试验天数', syts: '试验天数',
}, },
dj003: {
yplx: '样品类型',
knj: '抗凝剂',
cyhcftj: '采样后存放条件',
cyd: '采样点',
dwbh: '动物编号',
cysj: '采样时间',
sjbd: '时间比对',
sjbd: '时间比对',
yps: '样品数',
ypyjxx: '样品移交信息',
yjczxx: '移交处置信息',
yjsj: '移交时间',
hqsj: '获取时间',
dsfs: '递送方式',
},
} }

+ 16
- 1
src/lang/zh/template/dj.js View File

@ -3,5 +3,20 @@ export default {
dj001: { dj001: {
syts: '试验天数', syts: '试验天数',
}, },
dj003: {
yplx: '样品类型',
knj: '抗凝剂',
cyhcftj: '采样后存放条件',
cyd: '采样点',
dwbh: '动物编号',
cysj: '采样时间',
sjbd: '时间比对',
sjbd: '时间比对',
yps: '样品数',
ypyjxx: '样品移交信息',
yjczxx: '移交处置信息',
yjsj: '移交时间',
hqsj: '获取时间',
dsfs: '递送方式',
},
} }

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

@ -89,6 +89,7 @@ import XB001 from "./comps/xb/XB001.vue";
// //
import DJ001 from "./comps/dj/DJ001.vue"; import DJ001 from "./comps/dj/DJ001.vue";
import DJ003 from "./comps/dj/DJ003.vue";
// //
// DL001-SYWZPZJHB // DL001-SYWZPZJHB
@ -169,6 +170,7 @@ export default {
XB001, XB001,
// //
DJ001, DJ001,
DJ003,
}, },
data() { data() {
return { return {
@ -285,6 +287,7 @@ export default {
'XB001': 'XB001', 'XB001': 'XB001',
// //
'DJ001': 'DJ001', 'DJ001': 'DJ001',
'DJ003': 'DJ003',
// //
//DL001-SYWZPZJHB //DL001-SYWZPZJHB
'DL002': 'SP001', 'DL002': 'SP001',

+ 314
- 0
src/views/business/comps/template/comps/dj/DJ003.vue View File

@ -0,0 +1,314 @@
<!-- 生物样品全血移交记录表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title">
<img src="@/assets/images/detail-title.png" />{{ formData.bdmc
}}<img src="@/assets/images/detail-title.png" />
</div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage
fieldItemLabel="template.common.baseInfo"
label="template.common.baseInfo"
:ref="refConf.base"
:formConfig="baseInfoFormConfig"
:formData="formData"
/>
<LineLabel label="template.dj.dj003.yjczxx" />
<CustomTable
fieldItemLabel="template.dj.dj003.yjczxx"
:columns="ypyjColumns"
:ref="'ypyjTableRef'"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`ypyjTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'ypyjTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<BaseInfoFormPackage
fieldItemLabel="template.dj.dj003.yjczxx"
:ref="refConf.yjczxx"
:formConfig="yjczxxFormConfig"
:formData="formData"
@clickButton="handleClickButton"
/>
<BaseInfoFormPackage
fieldItemLabel="template.common.remark"
label="template.common.remark"
:ref="refConf.remark"
:formConfig="remarkConig"
:formData="formData"
/>
</div>
</div>
</div>
</div>
</template>
<script>
import BaseInfoFormPackage from '@/components/Template/BaseInfoFormPackage'
import TableOpertaionDelete from '@/components/Template/operation/TableOpertaionDelete.vue'
import CustomTable from '@/components/Template/CustomTable.vue'
import LineLabel from '@/components/Template/LineLabel'
import TableList from '@/components/Template/Table'
import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin'
import moment from 'moment'
import StepFormPackage from "@/components/Template/StepFormPackage.vue"
const refConf = {
base: 'baseInfoRef',
remark: 'remarkRef',
ypyj:'ypyjTableRef',
yjczxx: 'yjczxxRef'
}
const refNames = Object.values(refConf)
export default {
name: 'DJ003',
components: {
BaseInfoFormPackage,
LineLabel,
TableList,
Step,
CustomTable,
TableOpertaionDelete,
StepFormPackage
},
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill'
}
},
computed: {
//
remarkConig() {
return [
{
type: 'cellItem',
config: {
remark: {
label: '',
type: 'textarea',
fillType: 'actFill',
span: 1,
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
}
}
]
},
//
baseInfoFormConfig() {
return [
{
type: 'cardItem',
config: {
studyMc: {
label: 'template.common.testName',
type: 'input',
disabled: true
},
studySn: {
label: 'template.common.testNumber',
type: 'input',
disabled: true
}
}
},
{
type: 'conditionItem',
label: 'template.dj.dj003.yplx',
config: {
yplx: {
span: 1,
label: 'template.dj.dj003.yplx',
type: 'select',
options: this.getDictOptions('business_yplx'),
fillType: 'actFill',
otherCode: 'yplxOther'
}
}
},
{
type: 'conditionItem',
label: 'template.dj.dj003.knj',
config: {
knj: {
span: 1,
label: 'template.dj.dj003.knj',
type: 'select',
options: this.getDictOptions('business_knj'),
fillType: 'actFill',
otherCode: 'knjOther'
}
}
},
{
type: 'conditionItem',
label: 'template.dj.dj003.cyhcftj',
config: {
cyhcftj: {
span: 1,
label: 'template.common.actualFill',
multiple: true,
type: 'select',
options: this.getDictOptions('business_cftj'),
fillType: 'actFill',
otherCode: 'cftjOther'
}
}
},
]
},
//
ypyjColumns() {
return [
{
label: 'template.dj.dj003.cyd',
prop: "cyd",
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dj.dj003.dwbh',
prop: "dwbh",
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dj.dj003.cysj',
prop: "cysj",
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dj.dj003.sjbd',
prop: "sjbd",
bodyType: 'select',
bodyOptions: [
{value:1,label:'正常'},
{value:0,label:'偏离'},
],
bodyFillType: 'actFill'
},
{
label: 'template.dj.dj003.yps',
prop: "yps",
bodyType: 'inputNumber',
bodyFillType: 'actFill'
},
]
},
//
yjczxxFormConfig() {
return [
{
type: 'cellItem',
config: {
yjsj: {
label: 'template.dj.dj003.yjsj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'yjsj',
buttonName: 'template.dj.dj003.hqsj',
},
dsfs: {
label: 'template.dj.dj003.dsfs',
type: 'select',
options: this.getDictOptions('business_dsfs'),
fillType: 'actFill',
},
}
}
]
}
},
data() {
return {
formData: {},
refConf
}
},
methods: {
//
async deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex)
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(refNames)
},
//
async getFormData() {
return await this.validFormFields(refNames)
},
//
async validFields() {
return await this.validFormFields(refNames)
},
getResource() {
// const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使
// this.resourceTmp = stepResource.sjResource || []
// this.yqResourceTmp = stepResource.yqResource || []
// return this.resourceTmp
},
//
async onSave() {
const formData = this.getStepResource()
console.log(formData, 'formData')
},
//
handleClickButton(_item, signData) {
this.$refs.yjczxxRef.updateFormData(
_item.subKey,
moment().format('YYYY/MM/DD HH:mm'),
{ isUpdateRecord: true, signData }
)
},
}
}
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

+ 2
- 3
src/views/business/comps/template/comps/dl/DL005.vue View File

@ -166,10 +166,9 @@ export default {
qxbd: { qxbd: {
label: 'template.dl.dl007.qxbd', label: 'template.dl.dl007.qxbd',
type: 'qxbd', type: 'qxbd',
qxbdType:'DL003',
fillType: 'actFill', fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh']
// checkType:"checkbox",
filledCodes: ['bdmc', 'bdbh'],
checkType:"checkbox",
}, },
} }
} }

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

@ -49,6 +49,9 @@ export default {
'business_xblx', // 细胞类型 'business_xblx', // 细胞类型
'business_pytj', // 毒理-培养条件 'business_pytj', // 毒理-培养条件
'business_fstj', // 毒理-复苏条件 'business_fstj', // 毒理-复苏条件
'business_dsfs', //动技-递送方式
'business_knj', //动技-抗凝剂
], ],
props: { props: {
templateData: { templateData: {

Loading…
Cancel
Save