Browse Source

Merge branch 'zhangteng'

ouqian
ZHANGTENG\张腾 1 month ago
parent
commit
2bfdfcec94
8 changed files with 868 additions and 38 deletions
  1. +3
    -0
      src/lang/en/template/dj.js
  2. +3
    -0
      src/lang/zh/template/dj.js
  3. +6
    -0
      src/views/business/comps/template/TemplateTable.vue
  4. +374
    -0
      src/views/business/comps/template/comps/bl/BL001.vue
  5. +114
    -36
      src/views/business/comps/template/comps/dj/DJ001.vue
  6. +363
    -0
      src/views/business/comps/template/comps/dj/DJ002.vue
  7. +3
    -2
      src/views/business/comps/template/comps/dj/DJ003.vue
  8. +2
    -0
      src/views/business/comps/template/mixins/templateMixin.js

+ 3
- 0
src/lang/en/template/dj.js View File

@ -3,12 +3,15 @@ export default {
dj001: { dj001: {
syts: '试验天数', syts: '试验天数',
fhfw: '复核范围', fhfw: '复核范围',
fhlr: '复核内容',
}, },
//dj002复用dj003
dj003: { dj003: {
yplx: '样品类型', yplx: '样品类型',
knj: '抗凝剂', knj: '抗凝剂',
cyhcftj: '采样后存放条件', cyhcftj: '采样后存放条件',
cyd: '采样点', cyd: '采样点',
ypmc: '样品名称',
dwbh: '动物编号', dwbh: '动物编号',
cysj: '采样时间', cysj: '采样时间',
sjbd: '时间比对', sjbd: '时间比对',

+ 3
- 0
src/lang/zh/template/dj.js View File

@ -3,12 +3,15 @@ export default {
dj001: { dj001: {
syts: '试验天数', syts: '试验天数',
fhfw: '复核范围', fhfw: '复核范围',
fhlr: '复核内容',
}, },
//dj002复用dj003
dj003: { dj003: {
yplx: '样品类型', yplx: '样品类型',
knj: '抗凝剂', knj: '抗凝剂',
cyhcftj: '采样后存放条件', cyhcftj: '采样后存放条件',
cyd: '采样点', cyd: '采样点',
ypmc: '样品名称',
dwbh: '动物编号', dwbh: '动物编号',
cysj: '采样时间', cysj: '采样时间',
sjbd: '时间比对', sjbd: '时间比对',

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

@ -89,9 +89,11 @@ import XB001 from "./comps/xb/XB001.vue";
// //
import DJ001 from "./comps/dj/DJ001.vue"; import DJ001 from "./comps/dj/DJ001.vue";
import DJ002 from "./comps/dj/DJ002.vue";
import DJ003 from "./comps/dj/DJ003.vue"; import DJ003 from "./comps/dj/DJ003.vue";
// //
import BL001 from "./comps/bl/BL001.vue";
import BL002 from "./comps/bl/BL002.vue"; import BL002 from "./comps/bl/BL002.vue";
// //
@ -173,8 +175,10 @@ export default {
XB001, XB001,
// //
DJ001, DJ001,
DJ002,
DJ003, DJ003,
// //
BL001,
BL002 BL002
}, },
data() { data() {
@ -292,8 +296,10 @@ export default {
'XB001': 'XB001', 'XB001': 'XB001',
// //
'DJ001': 'DJ001', 'DJ001': 'DJ001',
'DJ002': 'DJ002',
'DJ003': 'DJ003', 'DJ003': 'DJ003',
// //
'BL001': 'BL001',
'BL002': 'BL002', 'BL002': 'BL002',
// //
//DL001-SYWZPZJHB //DL001-SYWZPZJHB

+ 374
- 0
src/views/business/comps/template/comps/bl/BL001.vue View File

@ -0,0 +1,374 @@
<!-- 生物样品采集移交记录表 -->
<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.ypyjxx" />
<div class="template-form-item" >
<span>{{ $t('template.dj.dj003.ypmc') }}</span>
<CustomTable
fieldItemLabel="template.dj.dj003.ypmc"
:columns="ypmcColumns"
:isBorder="false"
:ref="'ypmcTableRef'"
:showOperation="fillType === 'preFill'"
:showAddRow="fillType === 'preFill'"
:formData="{ stepTableFormData: formData.stepTableFormData_1 }"
:prefixKey="`ypmcTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'ypmcTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<CustomTable
fieldItemLabel="template.dj.dj003.ypyjxx"
: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>
</div>
<BaseInfoFormPackage
fieldItemLabel="template.dj.dj003.yjczxx"
:ref="refConf.yjczxx"
label="template.dj.dj003.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',
ypmc:'ypmcTableRef',
yjczxx: 'yjczxxRef',
}
const refNames = Object.values(refConf)
export default {
name: 'BL001',
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: {
cyhcftjyt: {
span: 1,
label: 'template.common.actualFill',
multiple: true,
type: 'select',
options: this.getDictOptions('business_cftj'),
fillType: 'preFill',
otherCode: 'cftjytOther'
},
cyhcftjsj: {
span: 1,
label: 'template.common.actualFill',
multiple: true,
type: 'select',
options: this.getDictOptions('business_cftj'),
fillType: 'actFill',
compareTo:"cyhcftjyt",
copyFrom:"cyhcftjyt",
otherCode: 'cftjsjOther'
}
}
},
]
},
//
ypmcColumns() {
return [
{
label: 'template.dj.dj003.ypmc',
prop: "ypmc",
bodyType: 'input',
bodyFillType: 'preFill',
bodyMaxlength: 20,
},
]
},
//
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.ypmc',
prop: "ypmcTa",
bodyType: 'checkboxTree',
bodyFillType: 'actFill',
bodyOptions: [
{value:1,label:'正常'},
{value:0,label:'偏离'},
],
},
{
label: 'template.dj.dj003.cysj',
prop: "cysj",
bodyType: 'dateTimeRange',
width: 450,
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>

+ 114
- 36
src/views/business/comps/template/comps/dj/DJ001.vue View File

@ -8,35 +8,56 @@
<div class="content"> <div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<!-- 操作步骤 --> <!-- 操作步骤 -->
<LineLabel label="template.common.operationSteps" /> <LineLabel label="template.common.operationSteps" />
<div class="template-form-item"> <div class="template-form-item">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo"
ref="operateStepRef" :formConfig="operateConfig" :formData="formData" /> ref="operateStepRef" :formConfig="operateConfig" :formData="formData" />
<CustomTable
:columns="operateColumns"
ref="operateTableRef"
:showOperation="fillType === 'preFill'"
:showAddRow="fillType === 'preFill'"
:formData="formData"
:isBorder="false"
:prefixKey="`operateTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'operateTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<BaseInfoFormPackage fieldItemLabel="template.dj.dj001.fhfw"
ref="fhfwCheckBoxRef" :formConfig="fhfwCheckBoxConfig" :formData="formData" />
<div class="template-form-item" >
<span>{{ $t('template.dj.dj001.fhfw') }}</span>
<CustomTable
:columns="operateColumns"
ref="operateTableRef"
:showOperation="fillType === 'preFill'"
:showAddRow="fillType === 'preFill'"
:formData="formData"
:isBorder="false"
:prefixKey="`operateTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'operateTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
</div>
<div class="template-form-item" >
<span>{{ $t('template.dj.dj001.fhlr') }}</span>
<CustomTable
:columns="fhlrColumns"
ref="fhlrTableRef"
:showOperation="fillType === 'preFill'"
:showAddRow="fillType === 'preFill'"
:formData="{ stepTableFormData: formData.stepTableFormData_1 }"
:isBorder="false"
:prefixKey="`fhlrTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'fhlrTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
</div>
</div> </div>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" <BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div> </div>
@ -59,6 +80,7 @@ import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue" import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
import StepFormPackage from "@/components/Template/StepFormPackage.vue" import StepFormPackage from "@/components/Template/StepFormPackage.vue"
import { fill } from "lodash";
export default { export default {
name: "DJ001", name: "DJ001",
@ -115,7 +137,7 @@ export default {
operateConfig() { operateConfig() {
return [ return [
{ {
type: "step",
type: "cellItem",
config: { config: {
syts: { syts: {
label: 'template.dj.dj001.syts', label: 'template.dj.dj001.syts',
@ -127,6 +149,30 @@ export default {
] ]
}, },
//
fhfwCheckBoxConfig() {
return [
{
type: "checkboxList",
config: {
fhfwCheck: {
label: 'template.dj.dj001.fhfw',
type: "checkboxTree",
fillType: 'actFill',
options: this.fhfwCheckOptions
},
fhlrCheck: {
label: 'template.dj.dj001.fhlr',
type: "checkboxTree",
fillType: 'actFill',
options: this.fhlrCheckOptions
},
}
},
]
},
//
operateColumns() { operateColumns() {
return [ return [
{ {
@ -138,42 +184,54 @@ export default {
}, },
] ]
}, },
//
fhlrColumns() {
return [
{
label: 'template.dj.dj001.fhlr',
prop: 'fhlr',
bodyType: 'select',
bodyOptions: this.getDictOptions('business_fhlr'),
bodyFillType: 'preFill'
},
]
},
}, },
data() { data() {
return { return {
formData: {}, formData: {},
fhfwCheckOptions:[],
fhlrCheckOptions:[],
isFirstTableDataRecorded: false,
}; };
}, },
mounted() { mounted() {
setTimeout(()=>{
this.getTableData()
},200)
}, },
methods: { methods: {
// //
getFilledFormData() { getFilledFormData() {
return this.getFilledFormDataByRefs( return this.getFilledFormDataByRefs(
[ [
"baseInfoRef", "stepRef", "remarkRef",
"fjRef", "tableFirstRef", "stepFormPackageSecondRef",
"stepFormPackageThirdRef", "stepFormPackageFourthRef",
"stepFormPackageFivthRef", "tableSecondRef", "stepFormPackageSixthRef"
"baseInfoRef", "operateStepRef", "operateTableRef", "fhlrTableRef", "fhfwCheckBoxRef"
] ]
) )
}, },
// //
async getFormData() { async getFormData() {
let content = await this.validFormFields([ let content = await this.validFormFields([
"baseInfoRef", "stepRef", "remarkRef",
"fjRef", "tableFirstRef", "stepFormPackageSecondRef",
"stepFormPackageThirdRef", "stepFormPackageFourthRef",
"stepFormPackageFivthRef", "tableSecondRef", "stepFormPackageSixthRef"
"baseInfoRef", "operateStepRef", "operateTableRef", "fhlrTableRef", "fhfwCheckBoxRef"
]); ]);
return content; return content;
}, },
getResource() { getResource() {
//使 //使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
// const stepResource = this.$refs.stepRef.getStepResource()
// this.resourceTmp = stepResource.sjResource || []
// this.yqResourceTmp = stepResource.yqResource || []
// return this.resourceTmp;
}, },
// //
async onSave() { async onSave() {
@ -191,6 +249,26 @@ export default {
tableRef2.deleteRow(rowIndex); tableRef2.deleteRow(rowIndex);
} }
}, },
//
getTableData() {
const formData = this.getFilledFormData() || {};
const stepTableFormData = formData.stepTableFormData || [];
const stepTableFormData_1 = formData.stepTableFormData_1 || [];
// options+
const firstList = stepTableFormData
.filter(item => item.fhfw) //
.map(item => ({ label: item.fhfw, value: item.fhfw }))
.filter((item, index, arr) => arr.findIndex(i => i.value === item.value) === index); //
const secondList = stepTableFormData_1
.filter(item => item.fhlr) //
.map(item => ({ label: item.fhlr, value: item.fhlr }))
.filter((item, index, arr) => arr.findIndex(i => i.value === item.value) === index); //
// computed
this.fhfwCheckOptions = firstList;
this.fhlrCheckOptions = secondList;
},
} }
}; };
</script> </script>

+ 363
- 0
src/views/business/comps/template/comps/dj/DJ002.vue View File

@ -0,0 +1,363 @@
<!-- 生物样品组织移交记录表 -->
<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.ypyjxx" />
<div class="template-form-item" >
<span>{{ $t('template.dj.dj003.ypmc') }}</span>
<CustomTable
fieldItemLabel="template.dj.dj003.ypmc"
:columns="ypmcColumns"
:isBorder="false"
:ref="'ypmcTableRef'"
:showOperation="fillType === 'preFill'"
:showAddRow="fillType === 'preFill'"
:formData="{ stepTableFormData: formData.stepTableFormData_1 }"
:prefixKey="`ypmcTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'ypmcTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<CustomTable
fieldItemLabel="template.dj.dj003.ypyjxx"
: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>
</div>
<BaseInfoFormPackage
fieldItemLabel="template.dj.dj003.yjczxx"
:ref="refConf.yjczxx"
label="template.dj.dj003.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',
ypmc:'ypmcTableRef',
yjczxx: 'yjczxxRef',
}
const refNames = Object.values(refConf)
export default {
name: 'DJ002',
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'
}
}
},
]
},
//
ypmcColumns() {
return [
{
label: 'template.dj.dj003.ypmc',
prop: "ypmc",
bodyType: 'input',
bodyFillType: 'preFill',
bodyMaxlength: 20,
},
]
},
//
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.ypmc',
prop: "ypmcTa",
bodyType: 'checkboxTree',
bodyFillType: 'actFill',
bodyOptions: [
{value:1,label:'正常'},
{value:0,label:'偏离'},
],
},
{
label: 'template.dj.dj003.cysj',
prop: "cysj",
bodyType: 'dateTimeRange',
width: 450,
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>

+ 3
- 2
src/views/business/comps/template/comps/dj/DJ003.vue View File

@ -16,9 +16,9 @@
:formData="formData" :formData="formData"
/> />
<LineLabel label="template.dj.dj003.yjczxx" />
<LineLabel label="template.dj.dj003.ypyjxx" />
<CustomTable <CustomTable
fieldItemLabel="template.dj.dj003.yjczxx"
fieldItemLabel="template.dj.dj003.ypyjxx"
:columns="ypyjColumns" :columns="ypyjColumns"
:ref="'ypyjTableRef'" :ref="'ypyjTableRef'"
:showOperation="fillType === 'actFill'" :showOperation="fillType === 'actFill'"
@ -38,6 +38,7 @@
<BaseInfoFormPackage <BaseInfoFormPackage
fieldItemLabel="template.dj.dj003.yjczxx" fieldItemLabel="template.dj.dj003.yjczxx"
label="template.dj.dj003.yjczxx"
:ref="refConf.yjczxx" :ref="refConf.yjczxx"
:formConfig="yjczxxFormConfig" :formConfig="yjczxxFormConfig"
:formData="formData" :formData="formData"

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

@ -52,6 +52,8 @@ export default {
'business_dsfs', //动技-递送方式 'business_dsfs', //动技-递送方式
'business_knj', //动技-抗凝剂 'business_knj', //动技-抗凝剂
'business_fhlr', //动技-复核内容
'business_fhfw', //动技-复核范围
], ],
props: { props: {
templateData: { templateData: {

Loading…
Cancel
Save