Browse Source

Merge branch 'master' into zhangteng

ouqian
ZHANGTENG\张腾 1 month ago
parent
commit
9409891c25
24 changed files with 1015 additions and 739 deletions
  1. +5
    -17
      src/components/Template/CustomTable.vue
  2. +19
    -0
      src/components/Template/Step.vue
  3. +75
    -0
      src/components/Template/StepComponents/qxwdx/qxfz.vue
  4. +95
    -0
      src/components/Template/StepComponents/qxwdx/qxjz.vue
  5. +1
    -1
      src/components/Template/StepComponents/ry/ddhy.vue
  6. +4
    -4
      src/components/Template/StepComponents/ry/hwhy.vue
  7. +5
    -1
      src/lang/en/template/dl.js
  8. +5
    -1
      src/lang/zh/template/dl.js
  9. +2
    -3
      src/views/business/comps/template/comps/dl/DL007.vue
  10. +2
    -3
      src/views/business/comps/template/comps/dl/DL008.vue
  11. +7
    -17
      src/views/business/comps/template/comps/dl/DL009.vue
  12. +41
    -159
      src/views/business/comps/template/comps/dl/DL010.vue
  13. +25
    -139
      src/views/business/comps/template/comps/dl/DL011.vue
  14. +17
    -137
      src/views/business/comps/template/comps/dl/DL012.vue
  15. +1
    -2
      src/views/business/comps/template/comps/dl/DL013.vue
  16. +74
    -31
      src/views/business/comps/template/comps/dl/DL014.vue
  17. +30
    -66
      src/views/business/comps/template/comps/dl/DL016.vue
  18. +69
    -54
      src/views/business/comps/template/comps/dl/DL017.vue
  19. +57
    -41
      src/views/business/comps/template/comps/dl/DL018.vue
  20. +56
    -42
      src/views/business/comps/template/comps/dl/DL019.vue
  21. +65
    -15
      src/views/business/comps/template/comps/sp/SP00456.vue
  22. +338
    -0
      src/views/business/comps/template/comps/sp/comps/LadderConfig.vue
  23. +22
    -4
      src/views/business/comps/template/formConfig/paralleAndLadderConfig.js
  24. +0
    -2
      src/views/business/comps/template/mixins/templateMixin.js

+ 5
- 17
src/components/Template/CustomTable.vue View File

@ -575,7 +575,6 @@ export default {
// HandleFormItem
this.columns.forEach((col, colIndex) => {
console.log(col.headerColumns, col, "ttt")
if (col.headerSelectKey && col.headerOptions && col.fillType === this.templateFillType) {
const headerValue = this.headerSelectFields[col.headerSelectKey];
if (isValueEmpty(headerValue)) {
@ -682,11 +681,9 @@ export default {
errors.push(errorItem);
this.formErrors.push(errorItem);
}
//
if (col.bodySubKey && !col.bodySubDisabled && col.bodySubType !== 'span' && col.bodySubType !== "button") {
if (col.bodySubKey && !col.bodySubDisabled &&col.bodySubFillType === this.templateFillType&& col.bodySubType !== 'span' && col.bodySubType !== "button") {
const subValue = row[col.bodySubKey];
console.log(col, subValue, "subValue")
if (isValueEmpty(subValue)) {
const errorItem = {
rowIndex,
@ -732,19 +729,7 @@ export default {
errors: errors
};
},
//
isValueEmpty(value) {
if (value === null || value === undefined || value === '') {
return true;
}
if (typeof value === 'string' && value.trim() === '') {
return true;
}
if (Array.isArray(value) && value.length === 0) {
return true;
}
return false;
},
//
onHeaderSelectChange(col, value) {
if (col.headerSelectTo) {
@ -943,6 +928,9 @@ export default {
this.isIndeterminate = false;
this.$emit('selectionChange', this.selectedRows);
},
updateHeaderSelectFields(fields) {
this.headerSelectFields = {...this.headerSelectFields, ...fields};
},
// formData
updateDataSource(dataSource = []) {
this.oldLocalDataSource = JSON.parse(JSON.stringify(this.localDataSource));

+ 19
- 0
src/components/Template/Step.vue View File

@ -140,6 +140,12 @@ import fy_spyjzzb from './StepComponents/spyjzzb/fy_spyjzzb.vue';//色谱匀浆
import jz_spyjzzb from './StepComponents/spyjzzb/jz_spyjzzb.vue';//-
//
//-使-
//-使-
import qxfz from './StepComponents/qxwdx/qxfz.vue';//-
import qxjz from './StepComponents/qxwdx/qxjz.vue';//-
import { public_templateStepList } from '@/api/business/public/public';
@ -275,6 +281,10 @@ export default {
yjbc,
fy_spyjzzb,
jz_spyjzzb,
//
qxfz,
qxjz,
},
computed: {
stepComponentMap() {
@ -375,6 +385,13 @@ export default {
'yjyhh':'jszz',
'fy_spyjzzb':'fy_spyjzzb',
'jz_spyjzzb':'jz_spyjzzb',
//
'ddhy_qxwdx': 'Ddhy',
'hwph':'Hwhy',
'qxfz':'qxfz',
'qxjz':'qxjz',
}
}
@ -436,6 +453,7 @@ export default {
type: '',
formData: {}
})
justUpdateFilledFormData();
this.$emit('step-added', this.steps.length)
} catch (error) {
console.error('添加步骤失败:', error)
@ -447,6 +465,7 @@ export default {
if (this.steps.length > 1) {
const removedStep = this.steps.splice(index, 1)[0]
justUpdateFilledFormData();
this.$emit('step-removed', { index, step: removedStep, remaining: this.steps.length })
} else {
this.$message.warning('至少需要保留一个步骤')

+ 75
- 0
src/components/Template/StepComponents/qxwdx/qxfz.vue View File

@ -0,0 +1,75 @@
<!-- 匀浆液分装2 -->
<template>
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'qxwdx_qxfz'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'qxfz',
},
},
components: {
StepFormPackage
},
computed: {
formConfig() {
let config = [{
config: {
text1: {
label: "将平衡完成后的样品进行分装,分装",
type: "text",
},
count: {
type: "inputNumber",
fillType: "preFill",
},
text2: {
label: "份,每份预计分装",
type: "text",
},
yjfz: {
type: "inputNumber",
fillType: "preFill",
},
yjfzdw:{
type:"select",
options:this.getDictOptions("business_tjdw"),
selectTo:"sjfzdw",
fillType:"preFill",
},
text3: {
label: ",实际分装",
type: "text",
},
sjfz: {
type: "inputNumber",
fillType: "actFill",
compareTo:"yjfz",
copyFrom:"yjfz"
},
sjfzdw:{
type:"select",
options:this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text4: {
label: "。",
type: "text",
},
}
}]
return config
}
},
}
</script>
<style lang="scss" scoped></style>

+ 95
- 0
src/components/Template/StepComponents/qxwdx/qxjz.vue View File

@ -0,0 +1,95 @@
<!-- 全血静置 -->
<template>
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'qxwdx_qxjz'" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'qxjz',
},
},
components: {
StepFormPackage
},
computed: {
formConfig() {
let config = [{
config: {
text1: {
label: "将样品分装后的第",
type: "text",
},
sort: {
type: "inputNumber",
fillType: "preFill",
},
text2: {
label: "份,立即放置于",
type: "text",
},
yjwd: {
type: "select",
options: this.getDictOptions("business_wddw"),
fillType: "preFill",
otherCode: "yjwdOther",
},
yjhj: {
type: "select",
options: this.getDictOptions("business_hjxx"),
fillType: "preFill",
otherCode: "yjhjOther",
},
text5: {
label: ",实际放置于",
type: "text",
},
sjwd: {
type: "select",
options: this.getDictOptions("business_wddw"),
fillType: "actFill",
otherCode: "sjwdOther",
compareTo: "yjwd",
},
sjhj: {
type: "select",
options: this.getDictOptions("business_hjxx"),
fillType: "actFill",
otherCode: "sjhjOther",
compareTo: "yjhj",
},
text6: {
label: "条件下静置,即稳定性",
type: "text",
},
startDate: {
type: "input",
fillType: "actFill",
disabled: true,
},
button1:{
type:"button",
buttonName:"开始",
},
text9: {
type: "text",
label: "。",
},
}
}]
return config
}
},
}
</script>
<style lang="scss" scoped></style>

+ 1
- 1
src/components/Template/StepComponents/ry/ddhy.vue View File

@ -23,7 +23,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
let config = [{
config:{
text1:{
label:"将溶液进行上下颠倒,预计颠倒",
label:this.sn==='ddhy_qxwdx'?"将全血样品进行轻轻上下颠倒,预计颠倒":"将溶液进行上下颠倒,预计颠倒",
type:"text",
},
ddcs1:{

+ 4
- 4
src/components/Template/StepComponents/ry/hwhy.vue View File

@ -40,7 +40,7 @@ export default {
fillType: "preFill",
},
text3: {
label: "°C,实际温度为",
label: "°C,设置实际温度为",
type: "text",
},
sjwd: {
@ -64,7 +64,7 @@ export default {
fillType: "preFill",
},
text8: {
label: "实际转速为",
label: "实际设置转速为",
type: "text",
},
sjzs: {
@ -93,7 +93,7 @@ export default {
fillType: "preFill",
},
text5: {
label: ",实际时长为",
label: ",实际设置时长为",
type: "text",
},
sjsc: {
@ -108,7 +108,7 @@ export default {
fillType: "preFill",
},
text6: {
label: ",进行恒温混匀,混匀",
label: this.sn==='hwph'?",进行恒温平衡,平衡": ",进行恒温混匀,混匀",
type: "text",
},
startDate: {

+ 5
- 1
src/lang/en/template/dl.js View File

@ -30,6 +30,7 @@ const common = {
export default {
dl001: {},
common,
czsj: 'Operation Time',
dl003: {
...common,
pytj: '培养条件',
@ -127,6 +128,8 @@ export default {
yslhnzsjyjrl: 'Preset 0.9% Sodium Chloride Injection Volume',
sjlhnzsjyjrl: 'Actual 0.9% Sodium Chloride Injection Volume',
sjgs: 'Bone Marrow Collection',
sj: 'Collection',
gusui: 'Bone Marrow',
lx: 'Centrifugation',
ysjrxq: 'Preset Serum Addition',
sjjrxq: 'Actual Serum Addition',
@ -148,7 +151,8 @@ export default {
pyxbh: 'Incubator Number',
pytjText: 'Culture Conditions',
pykssj: 'Culture Start Time',
pykssjButton: 'Start'
pykssjButton: 'Start',
bqdy: 'Label Print'
},
dl012: {
...common,

+ 5
- 1
src/lang/zh/template/dl.js View File

@ -30,6 +30,7 @@ const common = {
export default {
dl001: {},
common,
czsj: '操作时间',
dl003: {
...common,
pytj: '培养条件',
@ -128,6 +129,8 @@ export default {
yslhnzsjyjrl: '预设0.9%氯化钠注射液加入量',
sjlhnzsjyjrl: '实际0.9%氯化钠注射液加入量',
sjgs: '收集骨髓',
sj: '收集',
gusui: '骨髓',
lx: '离心',
ysjrxq: '预设加入血清',
sjjrxq: '实际加入血清',
@ -149,7 +152,8 @@ export default {
pyxbh: '培养箱编号',
pytjText: '培养条件',
pykssj: '培养开始时间',
pykssjButton: '开始'
pykssjButton: '开始',
bqdy: '标签打印'
},
dl012: {
...common,

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

@ -133,11 +133,10 @@ export default {
}
},
{
type: 'conditionItem',
type: 'cellItem',
label: 'template.dl.dl007.sydd',
config: {
sydd: {
span: 1,
label: 'template.dl.dl007.sydd',
type: 'select',
options: this.getDictOptions('business_sydd'),
@ -148,7 +147,7 @@ export default {
},
{
type: 'cellItem',
label: 'template.common.configurationTime',
label: 'template.dl.czsj',
config: {
startDate: {
label: 'template.common.startTime',

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

@ -181,11 +181,10 @@ export default {
}
},
{
type: 'conditionItem',
type: 'cellItem',
label: 'template.dl.dl007.sydd',
config: {
sydd: {
span: 1,
label: 'template.dl.dl007.sydd',
type: 'select',
options: this.getDictOptions('business_sydd'),
@ -196,7 +195,7 @@ export default {
},
{
type: 'cellItem',
label: 'template.common.configurationTime',
label: 'template.dl.czsj',
config: {
startDate: {
label: 'template.common.startTime',

+ 7
- 17
src/views/business/comps/template/comps/dl/DL009.vue View File

@ -22,12 +22,6 @@
:formData="formData"
/>
<BaseInfoFormPackage
:ref="refConf.czsj"
:formConfig="czsjFormConfig"
:formData="formData"
/>
<LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable
:columns="yqsyColumns"
@ -96,7 +90,6 @@ import templateMixin from '../../mixins/templateMixin'
const refConf = {
base: 'baseInfoRef',
cltj: 'cltjRef',
czsj: 'czsjRef',
yqsy: 'yqsyTableRef',
jgxxQxbd: 'jgxxQxbdRef',
jgxx: 'jgxxTableRef',
@ -165,10 +158,10 @@ export default {
cltjFormConfig() {
return [
{
type: 'conditionItem',
type: 'cellItem',
label: 'template.dl.dl009.cltj',
config: {
cltj: {
span: 1,
label: 'template.dl.dl009.cltj',
type: 'select',
options: this.getDictOptions('business_dl_amescltj'),
@ -178,10 +171,10 @@ export default {
}
},
{
type: 'conditionItem',
type: 'cellItem',
label: 'template.dl.dl009.sydd',
config: {
sydd: {
span: 1,
label: 'template.dl.dl009.sydd',
type: 'select',
options: this.getDictOptions('business_sydd'),
@ -189,14 +182,10 @@ export default {
otherCode: 'syddOther'
}
}
}
]
},
//
czsjFormConfig() {
return [
},
{
type: 'cellItem',
label: 'template.dl.dl009.czsj',
config: {
startDate: {
label: 'template.dl.dl009.kssj',
@ -212,6 +201,7 @@ export default {
}
]
},
// 使
yqsyColumns() {
return [

+ 41
- 159
src/views/business/comps/template/comps/dl/DL010.vue View File

@ -16,44 +16,16 @@
:formData="formData"
/>
<LineLabel label="template.dl.dl010.sysj" />
<CustomTable
<TableList
label="template.common.reagentInfo"
:columns="sysjColumns"
:ref="refConf.sysj"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`sysjTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'sysjTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable
:columns="yqsyColumns"
:ref="refConf.yqsy"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`yqsyTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'yqsyTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
:dataSource="resource"
/>
<TableList
label="template.common.instrumentInfo"
:columns="yqColumns"
:dataSource="yqResource"
/>
<LineLabel label="template.dl.dl010.sjxx" />
<div class="template-form-item">
@ -130,8 +102,6 @@ import ImportExcelDialog from '../../dialog/ImportExcelDialog'
const refConf = {
base: 'baseInfoRef',
sysj: 'sysjTableRef',
yqsy: 'yqsyTableRef',
sjxxStep: 'sjxxStepRef',
sjxx: 'sjxxTableRef',
remark: 'remarkRef'
@ -195,11 +165,10 @@ export default {
}
},
{
type: 'conditionItem',
type: 'cellItem',
label: 'template.dl.dl010.dwzs',
config: {
dwzs: {
span: 1,
label: 'template.dl.dl010.dwzs',
type: 'select',
options: this.getDictOptions('business_dwzs'),
@ -214,9 +183,9 @@ export default {
config: {
cjdd: {
label: 'template.dl.dl010.cjdd',
type: 'input',
fillType: 'actFill',
maxlength: 200
type: 'select',
options: this.getDictOptions('business_cjdd'),
fillType: 'actFill'
}
}
},
@ -226,18 +195,17 @@ export default {
config: {
zpdd: {
label: 'template.dl.dl010.zpdd',
type: 'input',
fillType: 'actFill',
maxlength: 200
type: 'select',
options: this.getDictOptions('business_zpdd'),
fillType: 'actFill'
}
}
},
{
type: 'conditionItem',
type: 'cellItem',
label: 'template.dl.dl010.cjbw',
config: {
cjbw: {
span: 1,
label: 'template.dl.dl010.cjbw',
type: 'select',
options: this.getDictOptions('business_cjbw'),
@ -250,97 +218,20 @@ export default {
type: 'cellItem',
label: 'template.dl.dl010.jprq',
config: {
jprqKssj: {
startDate: {
label: 'template.dl.dl010.jprqKssj',
type: 'input',
disabled: true
},
jprqJssj: {
endDate: {
label: 'template.dl.dl010.jprqJssj',
type: 'input',
fillType: 'actFill',
maxlength: 200
disabled: true
}
}
}
]
},
//
sysjColumns() {
return [
{
label: 'template.dl.dl010.sjmc',
prop: 'sjmc',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl010.bh',
prop: 'bh',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl010.ph',
prop: 'ph',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl010.ndhlcd',
prop: 'ndhlcd',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl010.ly',
prop: 'ly',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl010.sxr',
prop: 'sxr',
bodyType: 'input',
bodyFillType: 'actFill'
}
]
},
// 使
yqsyColumns() {
return [
{
label: 'template.dl.dl010.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
},
{
label: 'template.dl.dl010.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
},
{
label: 'template.dl.dl010.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl010.xccsjzjdrq',
prop: 'jzrq',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
}
]
},
//
sjxxColumns() {
return [
@ -354,6 +245,7 @@ export default {
{
label: 'template.dl.dl010.yslhnzsjyjrl',
headerSelectKey: 'yslhnUnit',
headerSelectTo: 'sjlhnUnit',
headerOptions: this.getDictOptions('business_tjdw'),
prop: 'yslhnzsjyjrl',
bodyType: 'inputNumber',
@ -363,10 +255,12 @@ export default {
},
{
label: 'template.dl.dl010.sjlhnzsjyjrl',
headerSelectKey: 'yslhnUnit',
headerSelectKey: 'sjlhnUnit',
headerOptions: this.getDictOptions('business_tjdw'),
prop: 'sjlhnzsjyjrl',
bodyMaxlength: 10,
compareTo: 'yslhnzsjyjrl',
copyFrom: 'yslhnzsjyjrl',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
fillType: 'preFill'
@ -378,9 +272,14 @@ export default {
checkboxLabel: '',
bodyFillType: 'actFill',
headerColumns: [
{ type: 'span', label: '收集' },
{ type: 'inputNumber', fillType: 'actFill', key: 'gs' },
{ type: 'span', label: '骨髓' }
{ type: 'span', label: 'template.dl.dl010.sj' },
{
type: 'inputNumber',
fillType: 'actFill',
maxLength: 10,
key: 'gs'
},
{ type: 'span', label: 'template.dl.dl010.gusui' }
],
span: 3
},
@ -398,7 +297,8 @@ export default {
bodyFillType: 'preFill',
bodyMaxlength: 10,
fillType: 'preFill',
headerSelectKey: 'yslhnUnit',
headerSelectKey: 'ysjrxqUnit',
headerSelectTo: 'sjjrxqUnit',
headerOptions: this.getDictOptions('business_tjdw')
},
{
@ -408,7 +308,9 @@ export default {
bodyMaxlength: 10,
bodyFillType: 'actFill',
fillType: 'preFill',
headerSelectKey: 'yslhnUnit',
compareTo: 'ysjrxq',
copyFrom: 'ysjrxq',
headerSelectKey: 'sjjrxqUnit',
headerOptions: this.getDictOptions('business_tjdw')
}
]
@ -543,16 +445,12 @@ export default {
//
getFilledFormData() {
const baseData = this.$refs.baseInfoRef.getFilledFormData()
const sysjData = this.$refs.sysjTableRef.getFilledFormData()
const yqsyData = this.$refs.yqsyTableRef.getFilledFormData()
const sjxxStepData = this.$refs.sjxxStepRef.getFilledFormData()
const sjxxData = this.$refs.sjxxTableRef.getFilledFormData()
const remarkData = this.$refs.remarkRef.getFilledFormData()
return {
...baseData,
...sysjData,
...yqsyData,
...sjxxStepData,
...sjxxData,
...remarkData
@ -571,8 +469,6 @@ export default {
async validFields() {
const refsToValidate = [
'baseInfoRef',
'sysjTableRef',
'yqsyTableRef',
'sjxxStepRef',
'sjxxTableRef',
'remarkRef'
@ -580,28 +476,14 @@ export default {
return await this.validFormFields(refsToValidate)
},
getResource() {
const sysjStepResource = this.$refs.sysjTableRef.getStepResource()
const yqsyStepResource = this.$refs.yqsyTableRef.getStepResource()
const sjxxStepResource = this.$refs.sjxxStepRef.getStepResource()
// 使
this.resourceTmp = [
...(sysjStepResource.sjResource || []),
...(yqsyStepResource.sjResource || [])
]
this.yqResourceTmp = yqsyStepResource.yqResource || []
this.resourceTmp = sjxxStepResource.sjResource || []
this.yqResourceTmp = sjxxStepResource.yqResource || []
return this.resourceTmp
},
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
if (key === 'yqbh') {
const params = {
yqmc: row.mc,
yqxh: row.xh,
jzrq: row.jzrq
}
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
//
},
//
async onSave() {

+ 25
- 139
src/views/business/comps/template/comps/dl/DL011.vue View File

@ -16,48 +16,25 @@
:formData="formData"
/>
<LineLabel label="template.dl.dl011.sysj" />
<CustomTable
<TableList
label="template.common.reagentInfo"
:columns="sysjColumns"
:ref="refConf.sysj"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`sysjTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'sysjTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable
:columns="yqsyColumns"
:ref="refConf.yqsy"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`yqsyTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'yqsyTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
:dataSource="resource"
/>
<TableList
label="template.common.instrumentInfo"
:columns="yqColumns"
:dataSource="yqResource"
/>
<!-- 细胞信息 -->
<LineLabel label="template.dl.dl011.xbxx" />
<div class="template-form-item">
<div class="config-header-end" v-if="fillType === 'actFill'">
<el-button type="primary" size="small">{{
$t('template.dl.dl011.bqdy')
}}</el-button>
</div>
<BaseInfoFormPackage
fieldItemLabel=""
label=""
@ -103,12 +80,9 @@ 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'
const refConf = {
base: 'baseInfoRef',
sysj: 'sysjTableRef',
yqsy: 'yqsyTableRef',
step: 'stepRef',
remark: 'remarkRef',
xbxx: 'xbxxRef',
@ -177,9 +151,10 @@ export default {
config: {
sydd: {
label: 'template.dl.dl011.sydd',
type: 'input',
fillType: 'actFill',
maxlength: 200
type: 'select',
options: this.getDictOptions('business_sydd'),
otherCode: 'syddOther',
fillType: 'actFill'
}
}
},
@ -187,12 +162,12 @@ export default {
type: 'cellItem',
label: '操作时间',
config: {
kssj: {
startDate: {
label: 'template.dl.dl011.kssj',
type: 'input',
disabled: true
},
jssj: {
endDate: {
label: 'template.dl.dl011.jssj',
type: 'input',
disabled: true
@ -201,78 +176,6 @@ export default {
}
]
},
//
sysjColumns() {
return [
{
label: 'template.dl.dl011.sjmc',
prop: 'sjmc',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl011.bh',
prop: 'bh',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl011.ph',
prop: 'ph',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl011.ndhlcd',
prop: 'ndhlcd',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl011.ly',
prop: 'ly',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl011.sxr',
prop: 'sxr',
bodyType: 'input',
bodyFillType: 'actFill'
}
]
},
// 使
yqsyColumns() {
return [
{
label: 'template.dl.dl011.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl011.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl011.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl011.xccsjzjdrq',
prop: 'xccsjzjdrq',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
}
]
},
pyxxConfig() {
return [
{
@ -340,6 +243,8 @@ export default {
subType: 'select',
subKey: 'fshxbsjtjUnit',
fillType: 'actFill',
copyFrom: 'fshxbyjtj',
compareTo: 'fshxbyjtj',
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
copyFrom: 'fshxbyjtj' //
@ -382,33 +287,14 @@ export default {
return await this.validFormFields(refNames)
},
getResource() {
const sysjStepResource = this.$refs.sysjTableRef.getStepResource()
const yqsyStepResource = this.$refs.yqsyTableRef.getStepResource()
const stepResource = this.$refs.stepRef.getStepResource()
// 使
this.resourceTmp = [
...(sysjStepResource.sjResource || []),
...(yqsyStepResource.sjResource || []),
...(stepResource.sjResource || [])
]
this.yqResourceTmp = [
...(yqsyStepResource.yqResource || []),
...(stepResource.yqResource || [])
]
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp
},
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
if (key === 'yqbh') {
const params = {
yqmc: row.mc,
yqxh: row.xh,
xccsjzjdrq: row.jzrq
}
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
//
},
//
async onSave() {

+ 17
- 137
src/views/business/comps/template/comps/dl/DL012.vue View File

@ -16,44 +16,16 @@
:formData="formData"
/>
<LineLabel label="template.dl.dl012.sysj" />
<CustomTable
<TableList
label="template.common.reagentInfo"
:columns="sysjColumns"
:ref="refConf.sysj"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`sysjTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'sysjTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable
:columns="yqsyColumns"
:ref="refConf.yqsy"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`yqsyTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'yqsyTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
:dataSource="resource"
/>
<TableList
label="template.common.instrumentInfo"
:columns="yqColumns"
:dataSource="yqResource"
/>
<!-- 细胞信息 -->
<LineLabel label="template.dl.dl012.xbxx" />
@ -108,8 +80,6 @@ import moment from 'moment'
const refConf = {
base: 'baseInfoRef',
sysj: 'sysjTableRef',
yqsy: 'yqsyTableRef',
xbxx: 'xbxxRef',
step: 'stepRef',
pyxx: 'pyxxRef',
@ -173,10 +143,10 @@ export default {
}
},
{
type: 'conditionItem',
type: 'cellItem',
label: 'template.dl.dl012.sydd',
config: {
sydd: {
span: 1,
label: 'template.dl.dl012.sydd',
type: 'select',
options: this.getDictOptions('business_sydd'),
@ -203,78 +173,6 @@ export default {
}
]
},
//
sysjColumns() {
return [
{
label: 'template.dl.dl012.sjmc',
prop: 'sjmc',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl012.bh',
prop: 'bh',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl012.ph',
prop: 'ph',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl012.ndhlcd',
prop: 'ndhlcd',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl012.ly',
prop: 'ly',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl012.sxr',
prop: 'sxr',
bodyType: 'input',
bodyFillType: 'actFill'
}
]
},
// 使
yqsyColumns() {
return [
{
label: 'template.dl.dl012.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl012.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl012.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl012.xccsjzjdrq',
prop: 'xccsjzjdrq',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
}
]
},
//
pyxxConfig() {
return [
@ -364,7 +262,8 @@ export default {
fillType: 'actFill',
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
copyFrom: 'zbhxbyjtj' //
compareTo: 'zbhxbyjtj',
copyFrom: 'zbhxbyjtj'
}
}
}
@ -408,7 +307,7 @@ export default {
}
},
methods: {
handleClickButton(e,signData) {
handleClickButton(e, signData) {
console.log(e)
const { subKey } = e || {}
if (subKey === 'pykssjButton') {
@ -436,33 +335,14 @@ export default {
return await this.validFormFields(refNames)
},
getResource() {
const sysjStepResource = this.$refs.sysjTableRef.getStepResource()
const yqsyStepResource = this.$refs.yqsyTableRef.getStepResource()
const stepResource = this.$refs.stepRef.getStepResource()
// 使
this.resourceTmp = [
...(sysjStepResource.sjResource || []),
...(yqsyStepResource.sjResource || []),
...(stepResource.sjResource || [])
]
this.yqResourceTmp = [
...(yqsyStepResource.yqResource || []),
...(stepResource.yqResource || [])
]
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp
},
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
if (key === 'yqbh') {
const params = {
yqmc: row.mc,
yqxh: row.xh,
xccsjzjdrq: row.jzrq
}
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
//
},
//
async onSave() {

+ 1
- 2
src/views/business/comps/template/comps/dl/DL013.vue View File

@ -179,11 +179,10 @@ export default {
}
},
{
type: 'conditionItem',
type: 'cellItem',
label: 'template.dl.dl013.sydd',
config: {
sydd: {
span: 1,
label: 'template.dl.dl013.sydd',
type: 'select',
options: this.getDictOptions('business_sydd'),

+ 74
- 31
src/views/business/comps/template/comps/dl/DL014.vue View File

@ -16,8 +16,16 @@
:formData="formData"
/>
<TableList label="template.common.gyzjInfo" :columns="gyzjColumns" :dataSource="resourceGyzj" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList
label="template.common.gyzjInfo"
:columns="gyzjColumns"
:dataSource="resourceGyzj"
/>
<TableList
label="template.common.reagentInfo"
:columns="sysjColumns"
:dataSource="resource"
/>
<LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable
@ -78,6 +86,15 @@
}}</el-button>
</div>
<!-- 培养液 -->
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.pyy"
:formConfig="pyyFormConfig"
:formData="formData"
/>
<!-- 剂量组列表 -->
<CustomTable
:columns="jlzTableColumns"
@ -129,6 +146,7 @@ const refConf = {
xbInfo: 'xbInfoRef',
jlzInfo: 'jlzInfoRef',
jlzmcTable: 'jlzmcTableRef',
pyy: 'pyyRef',
jlzTable: 'jlzTableRef',
remark: 'remarkRef'
}
@ -204,11 +222,10 @@ export default {
}
},
{
type: 'conditionItem',
type: 'cellItem',
label: 'template.dl.dl014.sydd',
config: {
sydd: {
span: 1,
label: 'template.dl.dl014.sydd',
type: 'select',
options: this.getDictOptions('business_sydd'),
@ -328,14 +345,14 @@ export default {
type: 'inputNumber',
fillType: 'preFill'
}
// preFill
if (this.fillType === 'preFill') {
jlzzsConfig.subType = 'button'
jlzzsConfig.subKey = 'jlzzsButton'
jlzzsConfig.buttonName = 'template.dl.dl014.qrButton'
}
firstStepConfig.jlzzs = jlzzsConfig
return [
@ -356,6 +373,25 @@ export default {
}
]
},
//
pyyFormConfig() {
return [
{
type: 'step',
config: {
pyymc: {
label: 'template.dl.dl014.pyy',
type: 'input',
fillType: 'preFill',
maxlength: 20,
subType: 'sj',
subKey: 'pyysj',
subFillType: 'actFill'
}
}
}
]
},
//
jlzTableColumns() {
const columns = [
@ -438,11 +474,12 @@ export default {
columns.push(
{
label: 'template.dl.dl014.gspbh',
prop: 'gspbh',
prop: 'gspbhmc',
bodyType: 'input',
bodyFillType: 'actFill',
bodyFillType: 'preFill',
bodyMaxlength: 20,
bodySubType: 'gsp',
bodySubKey: 'gspbh1',
bodySubKey: 'gspbh',
bodySubFillType: 'actFill'
},
{
@ -499,12 +536,12 @@ export default {
this.isSftjs9Yes =
this.formData.sftjs9 === '是' || this.formData.sftjs9 === 'Yes'
}
//
if (this.formData.jlzzs) {
this.oldJlzzs = this.formData.jlzzs
}
//
if (this.formData.pxpb) {
this.oldPxpb = this.formData.pxpb
@ -523,6 +560,7 @@ export default {
const jlzInfoData = this.$refs[refConf.jlzInfo]?.getFilledFormData() || {}
const jlzmcTableData =
this.$refs[refConf.jlzmcTable]?.getFilledFormData() || {}
const pyyData = this.$refs[refConf.pyy]?.getFilledFormData() || {}
const jlzTableData =
this.$refs[refConf.jlzTable]?.getFilledFormData() || {}
const remarkData = this.$refs[refConf.remark]?.getFilledFormData() || {}
@ -532,6 +570,7 @@ export default {
...yqsyData,
...xbInfoData,
...jlzInfoData,
...pyyData,
...remarkData,
// formData
jlzmcTableData: jlzmcTableData.stepTableFormData || [],
@ -547,6 +586,7 @@ export default {
refConf.xbInfo,
refConf.jlzInfo,
refConf.jlzmcTable,
refConf.pyy,
refConf.jlzTable,
refConf.remark
]
@ -559,7 +599,7 @@ export default {
//
const jlzmcTableData = this.$refs[refConf.jlzmcTable]?.getFilledFormData()
const jlzmcList = jlzmcTableData?.stepTableFormData || []
if (jlzmcList.length === 0) {
this.$message.warning('请先生成剂量组名称')
return false
@ -567,7 +607,7 @@ export default {
const jlzTableData = this.$refs[refConf.jlzTable]?.getFilledFormData()
const jlzList = jlzTableData?.stepTableFormData || []
if (jlzList.length === 0) {
this.$message.warning('请先生成剂量组列表数据')
return false
@ -583,6 +623,7 @@ export default {
refConf.xbInfo,
refConf.jlzInfo,
refConf.jlzmcTable,
refConf.pyy,
refConf.jlzTable,
refConf.remark
]
@ -595,7 +636,7 @@ export default {
//
const jlzmcTableData = this.$refs[refConf.jlzmcTable]?.getFilledFormData()
const jlzmcList = jlzmcTableData?.stepTableFormData || []
if (jlzmcList.length === 0) {
this.$message.warning('请先生成剂量组名称')
return false
@ -603,7 +644,7 @@ export default {
const jlzTableData = this.$refs[refConf.jlzTable]?.getFilledFormData()
const jlzList = jlzTableData?.stepTableFormData || []
if (jlzList.length === 0) {
this.$message.warning('请先生成剂量组列表数据')
return false
@ -615,22 +656,22 @@ export default {
// 使
const yqsyData = this.$refs.yqsyTableRef?.getFilledFormData()
const yqsyList = yqsyData?.stepTableFormData || []
//
this.yqResourceTmp = yqsyList
.filter(item => item.yqbh)
.map(item => ({
.filter((item) => item.yqbh)
.map((item) => ({
bh: item.yqbh,
mc: item.yqmc,
xh: item.yqxh
}))
// S9
const jlzData = this.$refs.jlzTableRef?.getFilledFormData()
const jlzList = jlzData?.stepTableFormData || []
const sjResourceFromJlz = []
jlzList.forEach(item => {
jlzList.forEach((item) => {
//
if (item.xybh) {
sjResourceFromJlz.push({
@ -639,9 +680,9 @@ export default {
})
}
})
this.resourceTmp = sjResourceFromJlz
return this.resourceTmp
},
onRegentSubmit(e) {
@ -668,7 +709,7 @@ export default {
// blur
onJlzInfoBlur(e) {
const { key, value } = e
//
if (key === 'jlzzs') {
//
@ -677,24 +718,26 @@ export default {
this.$set(this.formData, 'jlzmcTableData', [])
//
this.$set(this.formData, 'jlzTableData', [])
this.$message.info('剂量组总数已改变,已清空剂量组名称和剂量组列表数据')
this.$message.info(
'剂量组总数已改变,已清空剂量组名称和剂量组列表数据'
)
}
//
this.oldJlzzs = value
}
//
if (key === 'pxpb') {
//
if (this.oldPxpb !== null && this.oldPxpb !== value) {
//
this.$set(this.formData, 'jlzTableData', [])
this.$message.info('平行瓶数已改变,已清空剂量组列表数据')
}
//
this.oldPxpb = value
}
@ -702,7 +745,7 @@ export default {
// blur
onJlzmcTableBlur(e) {
const { colKey } = e
//
if (colKey === 'jlzzmc') {
//

+ 30
- 66
src/views/business/comps/template/comps/dl/DL016.vue View File

@ -21,7 +21,7 @@
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord"
:showAddRow="false" :showOperation="false"
ref="qcxjjyqkTableRef" :columns="stepColumns" :formData="qcxjjyqkFormData">
ref="qcxjjyqkTableRef" :columns="stepColumns" :formData="tableFormData">
</CustomTable>
<LineLabel label="template.dl.dl016.czbz" />
@ -62,10 +62,10 @@ export default {
},
},
computed: {
//
qcxjjyqkFormData() {
//
tableFormData() {
return {
stepTableFormData: this.formData.qcxjjyqkData || [],
stepTableFormData: this.formData.stepTableFormData || [],
headerSelectFields: {}
}
},
@ -196,42 +196,34 @@ export default {
};
},
mounted() {
console.log('mounted=============',this.formData);
},
methods: {
onRegentSubmit(e) {
debugger
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('selectInfo==============',selectInfo,key,rowIndex)
if (key === 'qxbd') {
try {
//
const bdnr = JSON.parse(row.bdnr)
console.log('前序表单数据:', bdnr)
//
const qcxjjyqkData = bdnr.jlzTableData || []
const stepTableFormData = bdnr.jlzTableData || []
// if (qcxjjyqkData.length === 0) {
// this.$message.warning('')
// return
// }
if (stepTableFormData.length === 0) {
//
this.$set(this.formData, 'stepTableFormData', [])
this.$message.warning('前序表单中没有剂量组数据')
return
}
//
const itemData = qcxjjyqkData.map(item => ({
const itemData = stepTableFormData.map(item => ({
jlzb: item.jlzb || '', //
xybh: item.xybh || '', //
hyqszqk: '', //
hyqcdjqk: '', //
hyqqtqk: '', //
qqpyy: '', //
pbsxd: '', // PBS
pyybrl: '' //
qsxjjrl: '', //
}))
debugger
// 使 $set formData CustomTable
this.$set(this.formData, 'qcxjjyqkData', itemData)
this.$set(this.formData, 'stepTableFormData', itemData)
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`)
} catch (error) {
@ -262,48 +254,6 @@ export default {
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
this.onCommonVerifyNdException(formFields,data);
},
configComplete(val) {
const { rowData, headerSelectFields } = val;
//(+)
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
let postData = {
mc: null,
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
nd: rowData.actSolutionConcentration,//
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
studyId:this.formData.studyId,
kc: total,
kcdw: unit,
}
this.configCompleteRequest(postData);
},
//
subPackageSubmit(data) {
const { fzsj, rowData, headerSelectFields } = data;
const { fzList = [], dw = "", mybh } = fzsj;
if (fzList && fzList.length > 0) {
const list = fzList.map((item) => {
return {
bh: mybh + item.preCode + item.subCode,
kc: item.num,
kcdw: dw,
}
})
let postData = {
studyId: this.formData.studyId,
studyFormId: this.formData.id,
bh: mybh,
nd: rowData.actSolutionConcentration || 0,
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
list: list
}
this.subPackageRequest(postData);
}
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "qcxjjyqkTableRef", "stepRef","remarkRef"])
@ -311,13 +261,27 @@ export default {
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "qcxjjyqkTableRef", "stepRef","remarkRef"]);
return content;
console.log('获取填写完成的表单数据==============',content);
return content;
},
getResource() {
//使
const stepResource = this.$refs.stepRef.getStepResource()
const tableList = this.$refs.qcxjjyqkTableRef?.getFilledFormData()?.stepTableFormData || []
// const tableList = hyqkData?.stepTableFormData || []
//
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
const tableFromHyqk = tableList
.filter(item => item.xybh)
.map(item => ({
bh: item.xybh,
type: 'cell'
}))
this.resourceTmp = [...this.resourceTmp, ...tableFromHyqk]
console.log('回显填写完成的表单数据==============',this.resourceTmp);
return this.resourceTmp;
},
//

+ 69
- 54
src/views/business/comps/template/comps/dl/DL017.vue View File

@ -12,22 +12,16 @@
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl017.xbxx" label="template.dl.dl017.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" @onRegentSubmit="onRegentSubmit"
/>
<LineLabel label="template.dl.dl017.xbczqk" />
<CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord" @onRegentSubmit="(e) => onRegentSubmit"
@beforeSaveRecord = "beforeSaveRecord"
:showAddRow="false" :showOperation="false"
ref="stepTableRef" :columns="stepColumns" :formData="formData">
<!-- <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion @startConfig="startConfig" @configComplete="configComplete"
@printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType"
:row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow">
</TableOpertaion>
</template> -->
ref="stepTableRef" :columns="stepColumns" :formData="tableFormData">
</CustomTable>
<LineLabel label="template.dl.dl017.czbz" />
@ -57,7 +51,7 @@ import TableOpertaionDelete from "@/components/Template/operation/TableOpertaion
export default {
name: "DL017",
dicts: [
'business_dl_qsxjbltj','business_tjdw','business_dl_sjqszqk','business_dl_sjqcdqk','business_dl_sjqqtqk','business_dl_xbmc'
'business_dl_qsxjbltj','business_tjdw','business_dl_sjqszqk','business_dl_sjqcdqk','business_dl_sjqqtqk','business_dl_xbmc',"business_sydd"
],
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
@ -68,6 +62,13 @@ export default {
},
},
computed: {
//
tableFormData() {
return {
stepTableFormData: this.formData.stepTableFormData,
headerSelectFields: {}
}
},
//
remarkConig() {
return [
@ -113,7 +114,7 @@ export default {
label: 'template.dl.dl017.sydd',
type: 'select',
fillType: 'actFill',
options: this.getDictOptions('business_dl_xbmc'),
options: this.getDictOptions('business_sydd'),
otherCode: 'xbmcOther',
showOtherLabel:false
},
@ -146,7 +147,7 @@ export default {
label: 'template.dl.dl017.qxbd',
type: 'qxbd',
fillType: 'actFill',
qxbdType:'DL017',
qxbdType:'DL014',
filledCodes:['bdmc','bdbh'],
},
bltj: {
@ -187,21 +188,21 @@ export default {
width: 180,
bodyType: "select",
bodyFillType: "actFill",
options: this.getDictOptions('business_dl_sjqszqk'),
bodyOptions: this.getDictOptions('business_dl_sjqszqk'),
},{
label: "template.dl.dl017.sjqcdqk",
prop: "sjqcdqk",
width: 180,
bodyType: "select",
bodyFillType: "actFill",
options: this.getDictOptions('business_dl_sjqcdqk'),
bodyOptions: this.getDictOptions('business_dl_sjqcdqk'),
},{
label: "template.dl.dl017.saqqtqk",
prop: "saqqtqk",
width: 180,
bodyType: "select",
bodyFillType: "actFill",
options: this.getDictOptions('business_dl_sjqqtqk'),
bodyOptions: this.getDictOptions('business_dl_sjqqtqk'),
},{
label: "template.dl.dl017.ddpyy",
prop: "ddpyy",
@ -209,7 +210,6 @@ export default {
bodyType: "checkbox",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},{
label: "template.dl.dl017.xd",
prop: "xd",
@ -217,7 +217,6 @@ export default {
bodyType: "checkbox",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},{
label: "template.dl.dl017.sj",
prop: "sj",
@ -225,7 +224,6 @@ export default {
bodyType: "checkbox",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},{
label: "template.dl.dl017.ds",
prop: "ds",
@ -233,7 +231,6 @@ export default {
bodyType: "checkbox",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},{
label: "template.dl.dl017.dy1gd",
prop: "dy1gd",
@ -241,7 +238,6 @@ export default {
bodyType: "checkbox",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},{
label: "template.dl.dl017.dy2gd",
prop: "dy2gd",
@ -249,7 +245,6 @@ export default {
bodyType: "checkbox",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},{
label: "template.dl.dl017.dy3gd",
prop: "dy3gd",
@ -257,7 +252,6 @@ export default {
bodyType: "checkbox",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},{
label: "template.dl.dl017.dy4gd",
prop: "dy4gd",
@ -265,7 +259,6 @@ export default {
bodyType: "checkbox",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},
]
},
@ -281,13 +274,47 @@ export default {
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('selectInfo==============',selectInfo)
if (key === 'yqbh') {
const params = {
jlzb: row.mc,
xybh: row.xh,
if (key === 'qxbd') {
try {
//
const bdnr = JSON.parse(row.bdnr)
console.log('前序表单内容============', bdnr)
//
const stepTableFormData = bdnr.jlzTableData || []
if (stepTableFormData.length === 0) {
//
this.$set(this.formData, 'stepTableFormData', [])
this.$message.warning('前序表单中没有剂量组数据')
return
}
//
const itemData = stepTableFormData.map(item => ({
jlzb: item.jlzb || '',
xybh: item.xybh || '',
sjqszqk: '',
sjqcdqk: '',
saqqtqk: '',
ddpyy: '',
xd: '',
sj: '',
ds: '',
dy1gd: '',
dy2gd: '',
dy3gd: '',
dy4gd: ''
}))
// 使 $set formData CustomTable
this.$set(this.formData, 'stepTableFormData', itemData)
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`)
} catch (error) {
this.$set(this.formData, 'stepTableFormData', [])
console.error('解析前序表单数据失败:', error)
this.$message.error('解析前序表单数据失败')
}
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
},
//table header
@ -329,31 +356,7 @@ export default {
}
this.configCompleteRequest(postData);
},
//
subPackageSubmit(data) {
const { fzsj, rowData, headerSelectFields } = data;
const { fzList = [], dw = "", mybh } = fzsj;
if (fzList && fzList.length > 0) {
const list = fzList.map((item) => {
return {
bh: mybh + item.preCode + item.subCode,
kc: item.num,
kcdw: dw,
}
})
let postData = {
studyId: this.formData.studyId,
studyFormId: this.formData.id,
bh: mybh,
nd: rowData.actSolutionConcentration || 0,
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
list: list
}
this.subPackageRequest(postData);
}
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])
@ -366,8 +369,20 @@ export default {
getResource() {
//使
const stepResource = this.$refs.stepRef.getStepResource()
const hyqkData = this.$refs.stepTableRef?.getFilledFormData()
const tableList = hyqkData?.stepTableFormData || []
//
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
const sjResourceFromHyqk = tableList
.filter(item => item.xybh)
.map(item => ({
bh: item.xybh,
type: 'cell'
}))
this.resourceTmp = [...this.resourceTmp, ...sjResourceFromHyqk]
return this.resourceTmp;
},
//

+ 57
- 41
src/views/business/comps/template/comps/dl/DL018.vue View File

@ -12,16 +12,16 @@
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl018.xbxx" label="template.dl.dl018.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" @onRegentSubmit="onRegentSubmit"
/>
<LineLabel label="template.dl.dl018.xbczqk" />
<CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord" @onRegentSubmit="(e) => onRegentSubmit"
@beforeSaveRecord = "beforeSaveRecord"
:showAddRow="false" :showOperation="false"
ref="stepTableRef" :columns="stepColumns" :formData="formData">
ref="stepTableRef" :columns="stepColumns" :formData="tableFormData">
<!-- <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion @startConfig="startConfig" @configComplete="configComplete"
@printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType"
@ -68,6 +68,13 @@ export default {
},
},
computed: {
//
tableFormData() {
return {
stepTableFormData: this.formData.stepTableFormData || [],
headerSelectFields: {}
}
},
//
remarkConig() {
return [
@ -185,7 +192,6 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyDisabled: true,
disabled: true,
subType: 'button',
subKey: 'rsks',
@ -197,7 +203,6 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyDisabled: true,
disabled: true,
subType: 'button',
subKey: 'rsjs',
@ -209,7 +214,6 @@ export default {
width: 180,
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyDisabled: true,
},
{
label: "template.dl.dl018.ys",
@ -217,7 +221,6 @@ export default {
width: 180,
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyDisabled: true,
},
{
label: "template.dl.dl018.zy",
@ -225,7 +228,6 @@ export default {
width: 180,
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyDisabled: true,
},
{
label: "template.dl.dl018.yx",
@ -233,7 +235,6 @@ export default {
width: 180,
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyDisabled: true,
},
{
label: "template.dl.dl018.tj",
@ -241,7 +242,6 @@ export default {
width: 180,
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyDisabled: true,
}
]
},
@ -257,13 +257,41 @@ export default {
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('selectInfo==============',selectInfo)
if (key === 'yqbh') {
const params = {
jlzb: row.mc,
xybh: row.xh,
if (key === 'qxbd') {
try {
//
const bdnr = JSON.parse(row.bdnr)
//
const stepTableFormData = bdnr.jlzTableData || []
if (stepTableFormData.length === 0) {
//
this.$set(this.formData, 'stepTableFormData', [])
this.$message.warning('前序表单中没有剂量组数据')
return
}
//
const itemData = stepTableFormData.map(item => ({
jlzb: item.jlzb || '', //
xybh: item.xybh || '', //
rsks: '', //
rsjs: '', //
zs: '', //
ys: '', //
zy: '', //
yx: '', //
tj: '', //
}))
// 使 $set formData CustomTable
this.$set(this.formData, 'stepTableFormData', itemData)
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`)
} catch (error) {
this.$set(this.formData, 'stepTableFormData', [])
console.error('解析前序表单数据失败:', error)
this.$message.error('解析前序表单数据失败')
}
this.$refs.stepTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
},
//table header
@ -305,31 +333,7 @@ export default {
}
this.configCompleteRequest(postData);
},
//
subPackageSubmit(data) {
const { fzsj, rowData, headerSelectFields } = data;
const { fzList = [], dw = "", mybh } = fzsj;
if (fzList && fzList.length > 0) {
const list = fzList.map((item) => {
return {
bh: mybh + item.preCode + item.subCode,
kc: item.num,
kcdw: dw,
}
})
let postData = {
studyId: this.formData.studyId,
studyFormId: this.formData.id,
bh: mybh,
nd: rowData.actSolutionConcentration || 0,
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
list: list
}
this.subPackageRequest(postData);
}
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])
@ -342,8 +346,20 @@ export default {
getResource() {
//使
const stepResource = this.$refs.stepRef.getStepResource()
const tableList = this.$refs.qcxjjyqkTableRef?.getFilledFormData()?.stepTableFormData || []
//
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
const tableFromHyqk = tableList
.filter(item => item.xybh)
.map(item => ({
bh: item.xybh,
type: 'cell'
}))
this.resourceTmp = [...this.resourceTmp, ...tableFromHyqk]
return this.resourceTmp;
},
//

+ 56
- 42
src/views/business/comps/template/comps/dl/DL019.vue View File

@ -12,16 +12,16 @@
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl019.xbxx" label="template.dl.dl019.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" @onRegentSubmit="onRegentSubmit"
/>
<LineLabel label="template.dl.dl019.xbczqk" />
<CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord" @onRegentSubmit="(e) => onRegentSubmit"
@beforeSaveRecord = "beforeSaveRecord"
:showAddRow="false" :showOperation="false"
ref="stepTableRef" :columns="stepColumns" :formData="formData">
ref="stepTableRef" :columns="stepColumns" :formData="tableFormData">
<!-- <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion @startConfig="startConfig" @configComplete="configComplete"
@printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType"
@ -68,6 +68,13 @@ export default {
},
},
computed: {
//
tableFormData() {
return {
stepTableFormData: this.formData.stepTableFormData || [],
headerSelectFields: {}
}
},
//
remarkConig() {
return [
@ -167,8 +174,7 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
disabled: true,
bodyDisabled: true,
bodyDisabled: true
},
{
label: "template.dl.dl019.xybh",
@ -176,8 +182,7 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
disabled: true,
bodyDisabled: true,
bodyDisabled: true
},
{
label: "template.dl.dl019.bplsh1",
@ -185,8 +190,7 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 50,
bodyDisabled: true,
bodyMaxlength: 50
},
{
label: "template.dl.dl019.bplsh2",
@ -194,8 +198,7 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 50,
bodyDisabled: true,
bodyMaxlength: 50
}
]
},
@ -211,13 +214,35 @@ export default {
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('selectInfo==============',selectInfo)
if (key === 'yqbh') {
const params = {
jlzb: row.mc,
xybh: row.xh,
if (key === 'qxbd') {
try {
//
const bdnr = JSON.parse(row.bdnr)
//
const stepTableFormData = bdnr.jlzTableData || []
if (stepTableFormData.length === 0) {
//
this.$set(this.formData, 'stepTableFormData', [])
this.$message.warning('前序表单中没有剂量组数据')
return
}
//
const itemData = stepTableFormData.map(item => ({
jlzb: item.jlzb || '', //
xybh: item.xybh || '', //
bplsh1: '', //
bplsh2: '', //
}))
// 使 $set formData CustomTable
this.$set(this.formData, 'stepTableFormData', itemData)
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`)
} catch (error) {
console.error('解析前序表单数据失败:', error)
this.$message.error('解析前序表单数据失败')
}
this.$refs.stepTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
},
//table header
@ -259,31 +284,7 @@ export default {
}
this.configCompleteRequest(postData);
},
//
subPackageSubmit(data) {
const { fzsj, rowData, headerSelectFields } = data;
const { fzList = [], dw = "", mybh } = fzsj;
if (fzList && fzList.length > 0) {
const list = fzList.map((item) => {
return {
bh: mybh + item.preCode + item.subCode,
kc: item.num,
kcdw: dw,
}
})
let postData = {
studyId: this.formData.studyId,
studyFormId: this.formData.id,
bh: mybh,
nd: rowData.actSolutionConcentration || 0,
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
list: list
}
this.subPackageRequest(postData);
}
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])
@ -296,8 +297,21 @@ export default {
getResource() {
//使
const stepResource = this.$refs.stepRef.getStepResource()
const tableList = this.$refs.qcxjjyqkTableRef?.getFilledFormData()?.stepTableFormData || []
// const tableList = hyqkData?.stepTableFormData || []
//
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
const tableFromHyqk = tableList
.filter(item => item.xybh)
.map(item => ({
bh: item.xybh,
type: 'cell'
}))
this.resourceTmp = [...this.resourceTmp, ...tableFromHyqk]
console.log('回显填写完成的表单数据==============',this.resourceTmp);
return this.resourceTmp;
},
//

+ 65
- 15
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -10,10 +10,26 @@
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"
<BaseInfoFormPackage v-if="!isLba" fieldItemLabel="template.common.storageCondition"
label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div v-if="isLba">
<LineLabel label="template.lba.lba004.xbxx" />
<CustomTable
:isBorder="false"
:ref="`jcbRef`"
:columns="jcbColumns"
:formData="formData"
:prefixKey = "`jcb`"
fieldItemLabel = "template.lba.lba004.xbxx"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteJcbRow" ></TableOpertaionDelete>
</template>
</CustomTable>
</div>
<LineLabel :label="isLba ? 'template.lba.lba005.bzqxpz' : 'template.common.operationSteps'" />
<div v-if="fillType === 'preFill'" class="mt-20">
<el-button type="primary" @click="handleAddParalle">{{ $t('template.common.xzpxpz')
}}</el-button>
@ -24,8 +40,18 @@
<!-- 阶梯配制区域 -->
<div v-for="(ladderConfig, ladderIndex) in formData.ladderConfigs"
:key="'ladder_' + ladderConfig.id">
<LadderConfig
:currentFormConfig="ladderStepFormConfig"
:currentFormData = "ladderConfig"
:showOperation="fillType === 'actFill' || fillType === 'preFill'"
:tableColumns = "ladderStepColumns"
:prefixKey="'ladder_'+ladderIndex"
:ref="`ladderRef_${ladderIndex}`"
:fieldItemLabel="$t('template.common.jtpz')"
:fillType="fillType"
<div class="template-form-item">
/>
<!-- <div class="template-form-item">
<div class="config-header">
<div>{{ $t('template.common.jtpz') }}</div>
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete"
@ -61,7 +87,7 @@
<Step class="mt-0 s-container" :ref="`ladderStepRef_${ladderIndex}`"
:formData="ladderConfig.ladderStepData" :fieldItemLabel="$t('template.common.jtpz')"
:prefixKey="'ladder_' + ladderIndex"></Step>
</div>
</div> -->
</div>
<!-- 平行配制区域 -->
@ -126,15 +152,20 @@ import templateMixin from "../../mixins/templateMixin.js";
import CustomTable from '@/components/Template/CustomTable.vue';
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue";
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
import { getExpireDate, duplicateResource } from "@/utils/index.js";
import { getuuid } from "@/utils/index.js";
import { isCommonUnit } from "@/utils/conTools";
import moment from "moment";
import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
import { getLadderColumnsConfig, getParallelColumnsConfig, getLadderFormConfig, getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig } from "../../formConfig/paralleAndLadderConfig.js";
import {
getLadderColumnsConfig, getParallelColumnsConfig, getLadderFormConfig,
getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig ,getJcbColumnsConfig
} from "../../formConfig/paralleAndLadderConfig.js";
import LadderConfig from "@/views/business/comps/template/comps/sp/comps/LadderConfig.vue";
export default {
name: "SP00456",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion },
components: { LadderConfig,BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion, TableOpertaionDelete, LadderConfig },
mixins: [templateMixin],
props: {
fillType: {
@ -155,6 +186,10 @@ export default {
},
},
computed: {
//
jcbColumns(){
return getJcbColumnsConfig(this);
},
//
storageFormConfig() {
return getStorageConditionFormConfig(this);
@ -183,6 +218,7 @@ export default {
},
},
data() {
const labArr = ["LBA005","LBA007"]
return {
subSolutionVisible: false,
currentSubKey: "",//key
@ -193,6 +229,7 @@ export default {
currentTableKey: "",//key
targetAcSolutionFromTable: true,//
currentRowData: {},//
isLba: labArr.includes(this.sn),
};
},
mounted() {
@ -204,7 +241,12 @@ export default {
}
},
methods: {
deleteJcbRow(rowIndex){
const jcbRef = this.$refs['jcbRef'];
if (jcbRef) {
jcbRef.deleteRow(rowIndex);
}
},
onBeforeSaveRecord(data, type, configIndex) {
if (type === "ladder") {
const formFields = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFilledFormData();
@ -407,6 +449,7 @@ export default {
paralleTableFormData: [],
showParalleConfig: true
});
this.justUpdateFilledFormData();
},
//
handleAddLadder() {
@ -422,6 +465,7 @@ export default {
ladderTableFormData: [],
showLadderConfig: true
});
this.justUpdateFilledFormData();
},
//
deleteConfig(type, config) {
@ -616,8 +660,9 @@ export default {
},
//
async validFields() {
const { isLba } = this;
const refsToValidate = isLba ? ["baseInfoRef", "jcbRef", "remarkRef"]: ["baseInfoRef", "storageConditionRef", "remarkRef"]
//
let refsToValidate = ["baseInfoRef", "storageConditionRef", "remarkRef"];
//
if (this.formData.ladderConfigs && this.formData.ladderConfigs.length > 0) {
@ -640,21 +685,26 @@ export default {
},
getFilledFormData() {
const baseData = this.$refs.baseInfoRef.getFilledFormData();
const conditionData = this.$refs.storageConditionRef.getFilledFormData();
let conditionData = {};
if (!this.isLba) {
conditionData = this.$refs.storageConditionRef.getFilledFormData();
}
//
const ladderConfigsData = [];
if (this.formData.ladderConfigs && this.formData.ladderConfigs.length > 0) {
for (let i = 0; i < this.formData.ladderConfigs.length; i++) {
const id = this.formData.ladderConfigs[i].id;
const ladderFormData = this.$refs[`ladderStepFormPackageRef_${i}`][0].getFilledFormData();
const ladderTableFormData = this.$refs[`ladderStepTableRef_${i}`][0].getFilledFormData();
const ladderStepData = this.$refs[`ladderStepRef_${i}`][0].getFilledFormData();
const {
baseFormData,
tableData,
stepData,
} = this.$refs[`ladderRef_${i}`][0].getFilledFormData();
ladderConfigsData.push({
...ladderFormData,
...ladderTableFormData,
ladderStepData: ladderStepData.stepData,
...baseFormData,
...tableData,
ladderStepData: stepData,
showLadderConfig: true,
id
});

+ 338
- 0
src/views/business/comps/template/comps/sp/comps/LadderConfig.vue View File

@ -0,0 +1,338 @@
<template>
<div class="template-form-item">
<div class="config-header">
<div>{{ $t('template.common.jtpz') }}</div>
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete"
@click="deleteConfig('ladderConfigs')">{{
$t('template.common.deleteBtn')
}}</el-button>
</div>
<BaseInfoFormPackage @onRegentSubmit="(e) => onRegentSubmit(e)"
@beforeReagentSubmit="(data) => onBeforeReagentSubmit(data)"
ref="formPackageRef" :formConfig="currentFormConfig" :formData="currentFormData"
:fieldItemLabel="fieldItemLabel" @blur="(e) => onHandleBlur(e)"
@select="(e) => onHandleBlur(e)" :prefixKey="prefixKey" />
<CustomTable @blur="(e) => onHandleTableBlur(e)"
ref="tableRef" :showOperation="showOperation"
:columns="tableColumns" :formData="currentFormData"
@bodySelectChange="bodySelectChange"
@beforeSaveRecord="(data) => onBeforeSaveRecord(data )"
@headerSelectChange="(data) => onHeaderSelectChange(data)"
:prefixKey="prefixKey" :fieldItemLabel="fieldItemLabel">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion @printTag="(e) => printTag(e)"
@startConfig="(val) => startConfig(val )"
@configComplete="(val) => configComplete(val)"
@subPackageSubmit="(val) => subPackageSubmit(val)"
:fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="(rowIndex) => deleteRow(rowIndex)">
</TableOpertaion>
</template>
</CustomTable>
<Step class="mt-0 s-container" ref="stepRef" :formData="currentFormData.ladderStepData"
:fieldItemLabel="fieldItemLabel" :prefixKey="prefixKey"></Step>
</div>
</template>
<script>
import Step from '@/components/Template/Step.vue';
import CustomTable from '@/components/Template/CustomTable.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue";
import BaseInfoFormPackage from '@/components/Template/BaseInfoFormPackage.vue';
import templateMixin from "../../../mixins/templateMixin.js";
import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
export default {
components: {
Step,
CustomTable,
TableOpertaion,
BaseInfoFormPackage,
},
name: "LadderConfig",
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: '',
},
currentFormConfig: {
type: Array,
default: () => [],
},
prefixKey: {
type: String,
default: '',
},
fieldItemLabel: {
type: String,
default: '',
},
currentFormData: {
type: Object,
default: () => {},
},
showOperation: {
type: Boolean,
default: false,
},
tableColumns: {
type: Array,
default: () => [],
},
configType:{
type: String,
default: 'ladder',
}
},
methods: {
getStepResource(){
return this.$refs.stepRef?.getStepResource();
},
getFilledFormData() {
const baseFormData = this.$refs.formPackageRef?.getFilledFormData();
const tableData = this.$refs.tableRef?.getFilledFormData();
const stepData = this.$refs.stepRef?.getFilledFormData();
return {
baseFormData,
tableData,
stepData:stepData?.stepData || [],
}
},
//
onRegentSubmit(data) {
const { selectInfo, key } = data;
const { row } = selectInfo;
if (key) {
const packageRef = this.$refs.formPackageRef;
if (key === "subStartSolution") {
packageRef.updateFormData("targetAcSolution", row.nd);
packageRef.updateFormData("subTargetAcSolutionUnit", row.nddw);
packageRef.onValueChangeCompareTo("targetAcSolution", row.nd, "targetStartSolution");
packageRef.onValueChangeCompareTo("subTargetAcSolutionUnit", row.nddw, "subTargetStartSolution");
this.updateTableNd(row);
}
}
},
//table
updateTableNd(row) {
const { stepTableFormData = [], headerSelectFields = [] } = this.$refs.tableRef?.getFilledFormData();
const newData = JSON.parse(JSON.stringify(stepTableFormData));
const params = this.getLadderNdParamsByIndex(rowIndex);
//
newData.forEach((item, index) => {
let initNd = row.nd;//
if (index === 0) {
item.startSolutionCode = row.bh;
} else {
item.startSolutionCode = newData[index - 1].targetSolutionCode + newData[index - 1].subTargetSolutionCode;
initNd = newData[index - 1].actSolutionConcentration;
}
const volResult = this.updateSjmbrynd(item, initNd, params);
if (!volResult) {
return
}
item.actSolutionVolume = volResult.actVol;
item.actSolutionConcentration = volResult.actNd;
// stepTableRef
})
this.$refs.tableRef?.updateDataSource(newData);
},
getLadderNdParamsByIndex() {
const { headerSelectFields = [] } = this.$refs.tableRef?.getFilledFormData();
const subTargetAcSolutionUnit = this.$refs.formPackageRef?.getFormDataByKey("subTargetAcSolutionUnit");//
return {
targetStartSolutionUnit: subTargetAcSolutionUnit,
headerSelectFields
}
},
onHandleBlur(e) {
const { targetStartSolution, subTargetStartSolution } = e;
const { stepTableFormData, headerSelectFields } = this.$refs.tableRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
this.batchUpdateTargetStartSolutionVolume(stepTableFormData, targetStartSolution, params)
},
//
onHandleTableBlur(e) {
const { configType } = this;
const { colKey = "", item, rowIndex, headerSelectFields } = e;
if (colKey === "targetStartSolutionConcentration" || colKey === "targetSolutionVolume" || colKey === "targetSolutionConcentration" || colKey === "targetStartSolutionVolumePrecision" || colKey === "targetDiluentVolumePrecision") {
if (configType === "ladder") {
const { targetStartSolution, subTargetStartSolution } = this.$refs.formPackageRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
if (targetStartSolution) {
this.updateTargetStartSolutionVolume(item, targetStartSolution, params);
}
} else if (configType === "paralle") {
this.paralleUpdateTargetStartSolutionVolume(item, headerSelectFields);
}
} else if (colKey === "actStartSolutionVolume" || colKey === "actDiluentVolume") {//
if (configType === "ladder") {
const targetAcSolution = this.$refs.formPackageRef?.getFormDataByKey("targetAcSolution");//
const params = this.getLadderNdParamsByIndex(configIndex);
if (targetAcSolution) {
const volResult = this.updateSjmbrynd(item, targetAcSolution, params);
if (!volResult) {
return
}
this.$refs.tableRef?.updateDataSourceByRowIndex(rowIndex, {
actSolutionVolume: volResult.actVol,
actSolutionConcentration: volResult.actNd,
});
}
} else if (configType === "paralle") {
const targetAcSolution = item.targetAcSolution || 0;//
const params = this.getParalleNdParamsByIndex(item, configIndex);
if (targetAcSolution) {
const volResult = this.updateSjmbrynd(item, targetAcSolution, params);
if (!volResult) {
return
}
this.$refs.tableRef?.updateDataSourceByRowIndex(rowIndex, {
actSolutionVolume: volResult.actVol,
actSolutionConcentration: volResult.actNd,
});
}
}
}
},
bodySelectChange(data) {
this.paralleUpdateTargetStartSolutionVolume(data.item, data.headerSelectFields);
},
//
paralleUpdateTargetStartSolutionVolume(item, headerSelectFields) {
const volumne = item.targetStartSolutionConcentration;
const subTargetStartSolution = item.targetStartSolutionConcentrationPrecision;
const params = {
headerSelectFields,
subTargetStartSolution
}
if (volumne) {
this.updateTargetStartSolutionVolume(item, volumne, params);
}
},
onBeforeSaveRecord(data) {
if (this.configType === "ladder") {
const formFields = this.$refs.formPackageRef?.getFilledFormData();
this.onCommonVerifyNdException(formFields, data);
}
},
//table header
onHeaderSelectChange(data) {
const { key, headerSelectFields, dataSource = [] } = data;
const keys = [
'targetStartSolutionVolumeUnit',
'targetDiluentVolumeUnit',
'targetSolutionConcentrationUnit',
'targetSolutionVolumeUnit',
]
if (keys.includes(key)) {
if (this.configType === 'ladder') {
const { targetStartSolution, subTargetStartSolution } = this.$refs.formPackageRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
this.batchUpdateTargetStartSolutionVolume(dataSource, targetStartSolution, params)
} else {
dataSource.forEach(item => {
this.paralleUpdateTargetStartSolutionVolume(item, headerSelectFields);
})
}
}
},
//
printTag(e) {
const { nickName, name } = this.$store.getters;
const { printCode, row, type } = e;
const currentForm = this.$refs.formPackageRef?.getFilledFormData();
const { stepStorageCondition, startDate, expireDate, paralleStepStorageCondition } = currentForm;
const targetSolutionExpirationDate = row.targetSolutionExpirationDate;
const lang = this.$i18n.locale;
const printConfig = {
"品名": "暂时还不知道品名是哪个字段",
"存储条件": stepStorageCondition || paralleStepStorageCondition,
"配制日期": moment(startDate).format("YYYY-MM-DD"),
"有效期至": moment(targetSolutionExpirationDate || expireDate).format("YYYY-MM-DD HH:mm"),
"配置者": lang === "zh_CN" ? nickName : name,
//type==="subPackage"
//type==="row"
"编号": type === "subPackage" ? printCode : (row.targetSolutionCode + row.subTargetSolutionCode),
}
console.log(printConfig, "printConfig")
EventBus.$emit('showTagPrintDialog', { printConfig })
},
//
startConfig(val) {
const { rowData } = val;
let postData = {
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
}
this.startConfigRequest(postData);
},
//
configComplete(val) {
const { rowData, headerSelectFields } = val;
//(+)
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
debugger
let postData = {
mc: null,
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
nd: rowData.actSolutionConcentration,//
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
kc: total,
kcdw: unit,
}
this.configCompleteRequest(postData);
},
//
subPackageSubmit(data) {
const { fzsj, rowData, headerSelectFields } = data;
const { fzList = [], dw = "", mybh } = fzsj;
if (fzList && fzList.length > 0) {
const list = fzList.map((item) => {
return {
bh: mybh + item.preCode + item.subCode,
kc: item.num,
kcdw: dw,
}
})
let postData = {
studyId: this.formData.studyId,
studyFormId: this.formData.id,
bh: mybh,
nd: rowData.actSolutionConcentration || 0,
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
list: list
}
this.subPackageRequest(postData);
}
},
//
deleteRow(rowIndex) {
this.$refs.tableRef.deleteRow(rowIndex);
},
}
}
</script>
<style lang="scss" scoped></style>

+ 22
- 4
src/views/business/comps/template/formConfig/paralleAndLadderConfig.js View File

@ -477,7 +477,7 @@ export const getLadderFormConfig = ($this) => {
export const getBaseInfoFormConfig = ($this) => {
const sn = $this.sn;
const labArr = ["LBA005","LBA007"]
const isLab = labArr.includes(sn);
const isLba = labArr.includes(sn);
return [
{
type: 'cardItem',
@ -509,7 +509,7 @@ export const getBaseInfoFormConfig = ($this) => {
},
{
type: 'conditionItem',
label:isLab? 'template.lba.lba002.cztj':'template.common.testConfigurationConditions',
label:isLba? 'template.lba.lba002.cztj':'template.common.testConfigurationConditions',
config: {
pre: {
label: 'template.common.preFill',
@ -530,7 +530,7 @@ export const getBaseInfoFormConfig = ($this) => {
}
}
},
{
isLba?{}:{
type: 'conditionItem',
label: 'template.sp.sp00456.rqcz',
config: {
@ -546,7 +546,7 @@ export const getBaseInfoFormConfig = ($this) => {
},
{
type: 'cellItem',
label: 'template.common.configurationTime',
label: isLba?'template.lba.lba002.czsj':'template.common.configurationTime',
config: {
startDate: {
label: 'template.common.startTime',
@ -625,3 +625,21 @@ export const getParalleStepFormConfig = ($this) => {
}
]
}
//选板信息;
export const getJcbColumnsConfig = ($this) => {
return [{
label: 'template.lba.lba002.jcbmc',
prop: 'jcb',
bodyType: 'input',
bodyFillType: 'preFill',
width: 280,
bodyMaxlength:20
},{
label: '',
prop: 'jcbBh',
bodyType: 'jcb',
bodyFillType: 'actFill',
width: 280
}]
}

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

@ -372,10 +372,8 @@ export default {
},
//统一校验form表单是否填写
async validFormFields(refArr = []) {
console.log(refArr,2121)
let result = {}
const refs = refArr.map((ref) => {
console.log(ref,312312321)
let refData = {}
if (this.$refs[ref][0]) {
refData = this.$refs[ref][0]?.getFormData() || {}

Loading…
Cancel
Save