8 Commits

13 changed files with 323 additions and 147 deletions
Unified View
  1. +10
    -1
      src/components/Template/BaseInfoFormPackage.vue
  2. +15
    -8
      src/components/Template/CustomTable.vue
  3. +6
    -0
      src/components/Template/HandleFormItem.vue
  4. +2
    -1
      src/views/business/comps/template/comps/dl/DL007.vue
  5. +47
    -20
      src/views/business/comps/template/comps/dl/DL011.vue
  6. +50
    -27
      src/views/business/comps/template/comps/dl/DL012.vue
  7. +41
    -10
      src/views/business/comps/template/comps/dl/DL013.vue
  8. +29
    -7
      src/views/business/comps/template/comps/dl/DL014.vue
  9. +24
    -13
      src/views/business/comps/template/comps/dl/DL015.vue
  10. +1
    -0
      src/views/business/comps/template/comps/dl/DL022.vue
  11. +33
    -5
      src/views/business/comps/template/comps/sp/SP0019.vue
  12. +49
    -42
      src/views/business/comps/template/comps/sp/SP0021.vue
  13. +16
    -13
      src/views/business/comps/template/formConfig/sp/SP0019.js

+ 10
- 1
src/components/Template/BaseInfoFormPackage.vue View File

@ -174,6 +174,9 @@
:style="{ 'width': sItem.labelWidth ? sItem.labelWidth + 'px' : '150px' }" :style="{ 'width': sItem.labelWidth ? sItem.labelWidth + 'px' : '150px' }"
v-if="sItem.label"> v-if="sItem.label">
{{ $t(sItem.label) }}</div> {{ $t(sItem.label) }}</div>
<div v-if="sItem.type === 'span'" class="flex1">
{{ formFields[key] }}
</div>
<div v-if="sItem.type === 'dateTime'" class="flex1"> <div v-if="sItem.type === 'dateTime'" class="flex1">
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key" <HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
type="dateTime" :item="sItem" v-model="formFields[key]" @copy="onCopy(sItem, key)" type="dateTime" :item="sItem" v-model="formFields[key]" @copy="onCopy(sItem, key)"
@ -184,6 +187,7 @@
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key" <HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
:type="sItem.type" :item="sItem" style="width: auto;flex:1" v-model="formFields[key]" :type="sItem.type" :item="sItem" style="width: auto;flex:1" v-model="formFields[key]"
@copy="onCopy(sItem, key)" @change="(e, type) => onSelectChange(key, e, type)" @copy="onCopy(sItem, key)" @change="(e, type) => onSelectChange(key, e, type)"
@remoteMethod="(query)=>remoteMethod(query, sItem,key)"
:error="errors[key]" @update:error="errors[key] = false" :error="errors[key]" @update:error="errors[key] = false"
:orange-bg="orangeBgFields[key]" /> :orange-bg="orangeBgFields[key]" />
<div v-show="isShowOther(formFields[key]) || isShowRadioSelect(formFields[key])" class="flex flex1 ml-10"> <div v-show="isShowOther(formFields[key]) || isShowRadioSelect(formFields[key])" class="flex flex1 ml-10">
@ -410,6 +414,9 @@ export default {
}; };
}, },
methods: { methods: {
remoteMethod(query, sItem, key){
this.$emit('remoteMethod', { query, sItem, key, formFields: this.formFields })
},
//radioselect //radioselect
isShowRadioSelect(value){ isShowRadioSelect(value){
const arr = ["动物种属","细胞系"]; const arr = ["动物种属","细胞系"];
@ -430,7 +437,8 @@ export default {
return { return {
...sItem, ...sItem,
key: sItem.subKey, key: sItem.subKey,
fillType: sItem.fourthFillType || sItem.fillType
disabled: sItem.subDisabled,
fillType: sItem.subFillType || sItem.fillType
} }
}, },
getFourthButtonItem(sItem) { getFourthButtonItem(sItem) {
@ -438,6 +446,7 @@ export default {
...sItem, ...sItem,
key: sItem.fourthKey, key: sItem.fourthKey,
buttonName:sItem.fourthButtonName, buttonName:sItem.fourthButtonName,
disabled: sItem.fourthDisabled,
fillType: sItem.fourthFillType || sItem.fillType fillType: sItem.fourthFillType || sItem.fillType
} }
}, },

+ 15
- 8
src/components/Template/CustomTable.vue View File

@ -93,7 +93,7 @@
<template <template
v-if="col.bodyType === 'input' || col.bodyType === 'inputNumber' || col.bodyType === 'select' || col.bodyType === 'dateTimeRange' || col.bodyType === 'radio'"> v-if="col.bodyType === 'input' || col.bodyType === 'inputNumber' || col.bodyType === 'select' || col.bodyType === 'dateTimeRange' || col.bodyType === 'radio'">
<div class="flex flex1"> <div class="flex flex1">
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex"
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + row.id"
:fieldItemLabel="fieldItemLabel" :type="col.bodyType" :fieldItemLabel="fieldItemLabel" :type="col.bodyType"
@blur="onBlur(rowIndex, col.prop, $event)" @copy="onCopy(rowIndex, col)" @blur="onBlur(rowIndex, col.prop, $event)" @copy="onCopy(rowIndex, col)"
class="body-input" :item="getBodyItem(col, rowIndex)" class="body-input" :item="getBodyItem(col, rowIndex)"
@ -120,7 +120,7 @@
:class="{ 'full-row': row[col.prop] && row[col.prop].length == 1 }" :class="{ 'full-row': row[col.prop] && row[col.prop].length == 1 }"
v-for="(opItem, itemIndex) in row[col.prop]" :key="itemIndex"> v-for="(opItem, itemIndex) in row[col.prop]" :key="itemIndex">
<HandleFormItem <HandleFormItem
:fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex + '_' + itemIndex"
:fieldKey="prefixKey + '_' + col.prop + '_' + row.id + '_' + itemIndex"
:fieldItemLabel="fieldItemLabel" type="input" :fieldItemLabel="fieldItemLabel" type="input"
@blur="onOperableInputBlur(opItem, $event)" class="body-input" @blur="onOperableInputBlur(opItem, $event)" class="body-input"
:item="getBodyItem(col, rowIndex)" :value="opItem.value" :item="getBodyItem(col, rowIndex)" :value="opItem.value"
@ -140,7 +140,7 @@
</div> </div>
<div class="flex flex1" v-else-if="col.bodyType === 'clickable'"> <div class="flex flex1" v-else-if="col.bodyType === 'clickable'">
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex"
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + row.id"
:fieldItemLabel="fieldItemLabel" type="clickable" class="body-clickable" :fieldItemLabel="fieldItemLabel" type="clickable" class="body-clickable"
:item="getBodyItem(col, rowIndex)" :value="row[col.prop]" :item="getBodyItem(col, rowIndex)" :value="row[col.prop]"
:error="hasError(rowIndex, colIndex, col.prop)" :error="hasError(rowIndex, colIndex, col.prop)"
@ -150,7 +150,7 @@
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" />
</div> </div>
<div class="flex flex1" v-else-if="isRegent(col, 'bodyType')"> <div class="flex flex1" v-else-if="isRegent(col, 'bodyType')">
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex"
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + row.id"
:fieldItemLabel="fieldItemLabel" :type="col.bodyType" class="body-clickable" :fieldItemLabel="fieldItemLabel" :type="col.bodyType" class="body-clickable"
sourceFrom="customTable" :item="getBodyItem(col, rowIndex)" sourceFrom="customTable" :item="getBodyItem(col, rowIndex)"
:value="row[col.prop]" :error="hasError(rowIndex, colIndex, col.prop)" :value="row[col.prop]" :error="hasError(rowIndex, colIndex, col.prop)"
@ -167,7 +167,7 @@
<template v-else-if="col.bodyType === 'checkboxTag'"> <template v-else-if="col.bodyType === 'checkboxTag'">
<div class="flex flex-wrap" <div class="flex flex-wrap"
:class="{ 'row-error-border': hasError(rowIndex, colIndex, col.prop) }"> :class="{ 'row-error-border': hasError(rowIndex, colIndex, col.prop) }">
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex"
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + row.id"
:fieldItemLabel="fieldItemLabel" type="checkboxTag" :value="row[col.prop]" :fieldItemLabel="fieldItemLabel" type="checkboxTag" :value="row[col.prop]"
:item="getBodyItem(col, rowIndex)" :item="getBodyItem(col, rowIndex)"
@change="onCheckboxTagChange(rowIndex, colIndex, col, $event)" @change="onCheckboxTagChange(rowIndex, colIndex, col, $event)"
@ -177,7 +177,7 @@
</div> </div>
</template> </template>
<template v-else-if="col.bodyType === 'checkbox'"> <template v-else-if="col.bodyType === 'checkbox'">
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex"
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + row.id"
:fieldItemLabel="fieldItemLabel" type="checkbox" v-model="row[col.prop]" :fieldItemLabel="fieldItemLabel" type="checkbox" v-model="row[col.prop]"
:item="getBodyItem(col, rowIndex)" :item="getBodyItem(col, rowIndex)"
@change="onCheckboxChange(rowIndex, colIndex, col, $event)" @change="onCheckboxChange(rowIndex, colIndex, col, $event)"
@ -204,7 +204,7 @@
v-if="isShowBodySub(col, row)"> v-if="isShowBodySub(col, row)">
<template <template
v-if="col.bodySubType === 'inputNumber' || col.bodySubType === 'input' || col.bodySubType === 'select'"> v-if="col.bodySubType === 'inputNumber' || col.bodySubType === 'input' || col.bodySubType === 'select'">
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex"
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + row.id"
:fieldItemLabel="fieldItemLabel" :type="col.bodySubType" :fieldItemLabel="fieldItemLabel" :type="col.bodySubType"
@blur="onSubBlur(rowIndex, col.bodySubKey, $event)" @blur="onSubBlur(rowIndex, col.bodySubKey, $event)"
@copy="onCopy(rowIndex, col)" :item="getBodySubItem(col)" @copy="onCopy(rowIndex, col)" :item="getBodySubItem(col)"
@ -225,7 +225,7 @@
@clickButton="(e, data) => handleClickButton(e, data, col.bodySubKey, rowIndex, colIndex)" /> @clickButton="(e, data) => handleClickButton(e, data, col.bodySubKey, rowIndex, colIndex)" />
</template> </template>
<div class="flex flex1" v-else-if="isRegent(col, 'bodySubType')"> <div class="flex flex1" v-else-if="isRegent(col, 'bodySubType')">
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex"
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + row.id"
:fieldItemLabel="fieldItemLabel" :type="col.bodySubType" class="body-clickable" :fieldItemLabel="fieldItemLabel" :type="col.bodySubType" class="body-clickable"
sourceFrom="customTable" :item="getBodySubItem(col, rowIndex)" sourceFrom="customTable" :item="getBodySubItem(col, rowIndex)"
:value="row[col.bodySubKey]" :value="row[col.bodySubKey]"
@ -1012,6 +1012,12 @@ export default {
this.checkCompareToOnDataLoad(); this.checkCompareToOnDataLoad();
justUpdateFilledFormData(); justUpdateFilledFormData();
}, },
pushDataSource(data=[]) {
this.localDataSource.push(...data);
this.localDataSource = [...this.localDataSource];
this.checkCompareToOnDataLoad();
justUpdateFilledFormData();
},
// newDataoldDatafalse // newDataoldDatafalse
compareOldAndCurrentFormFields(newData, oldData) { compareOldAndCurrentFormFields(newData, oldData) {
for (const key in newData) { for (const key in newData) {
@ -1062,6 +1068,7 @@ export default {
actSolutionConcentrationPrecision: 3,//3 actSolutionConcentrationPrecision: 3,//3
targetDiluentVolumePrecision: 3,//3 targetDiluentVolumePrecision: 3,//3
targetStartSolutionVolumePrecision: 3,//3 targetStartSolutionVolumePrecision: 3,//3
id:getuuid(),
}); });
justUpdateFilledFormData() justUpdateFilledFormData()
}, },

+ 6
- 0
src/components/Template/HandleFormItem.vue View File

@ -19,6 +19,8 @@
<el-select v-else-if="type === 'select'" class="flex1" :multiple="item.multiple" <el-select v-else-if="type === 'select'" class="flex1" :multiple="item.multiple"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" :class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue"
:disabled="getDisabled()" :placeholder="getPlaceholder()" @remove-tag="onRemoveTag" :disabled="getDisabled()" :placeholder="getPlaceholder()" @remove-tag="onRemoveTag"
:remote = "true"
:remote-method="remoteMethod"
@visible-change="onSelectBlur" @change="onInputChange" filterable> @visible-change="onSelectBlur" @change="onInputChange" filterable>
<el-option v-for="op in item.options" :key="op.value" :label="op.label" :value="op.value"> <el-option v-for="op in item.options" :key="op.value" :label="op.label" :value="op.value">
</el-option> </el-option>
@ -401,6 +403,10 @@ export default {
EventBus.$off("onMixReagentSubmit", this.onMixReagentSubmit) EventBus.$off("onMixReagentSubmit", this.onMixReagentSubmit)
}, },
methods: { methods: {
remoteMethod(query) {
console.log(query,"qqq")
this.$emit('remoteMethod', query);
},
handleFalse() { handleFalse() {
return false; return false;
}, },

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

@ -221,11 +221,12 @@ export default {
disabled: true disabled: true
}, },
pyjssj: { pyjssj: {
// TODOinputdateTime
label: 'template.dl.dl007.pyjssj', label: 'template.dl.dl007.pyjssj',
type: 'input', type: 'input',
fillType: 'actFill', fillType: 'actFill',
subType: 'button', subType: 'button',
disabled: true,
subDisabled: this.fillType !== 'actFill',
subKey: 'pyjssjButton', subKey: 'pyjssjButton',
buttonName: 'template.dl.dl007.jsButton' buttonName: 'template.dl.dl007.jsButton'
} }

+ 47
- 20
src/views/business/comps/template/comps/dl/DL011.vue View File

@ -198,6 +198,8 @@ export default {
fillType: 'actFill', fillType: 'actFill',
subType: 'button', subType: 'button',
subKey: 'pykssjButton', subKey: 'pykssjButton',
subDisabled: this.fillType !== 'actFill',
disabled: true,
buttonName: 'template.dl.dl011.pykssjButton' buttonName: 'template.dl.dl011.pykssjButton'
} }
} }
@ -214,7 +216,8 @@ export default {
type: 'select', type: 'select',
options: this.getDictOptions('business_dl_xbmc'), options: this.getDictOptions('business_dl_xbmc'),
fillType: 'preFill', fillType: 'preFill',
otherCode: 'xbmcOther'
otherCode: 'xbmcOther',
otherMaxlength: 50
}, },
xbdcbh: { xbdcbh: {
label: 'template.dl.dl011.xbdcbh', label: 'template.dl.dl011.xbdcbh',
@ -248,8 +251,7 @@ export default {
copyFrom: 'fshxbyjtj', copyFrom: 'fshxbyjtj',
compareTo: 'fshxbyjtj', compareTo: 'fshxbyjtj',
subOptions: this.getDictOptions('business_nddw'), subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
copyFrom: 'fshxbyjtj' //
maxlength: 10
} }
} }
} }
@ -257,12 +259,35 @@ export default {
} }
}, },
mounted() { mounted() {
// pytjText
const pyxxData = this.getFilledFormDataByRefs([refConf.pyxx])
const { pytjText } = pyxxData || {}
// pytjText
if (!pytjText) {
this.$nextTick(() => {
this.$refs[refConf.pyxx]?.updateFormData(
'pytjText',
'培养条件:温度为温度为37℃±2℃,CO2浓度为5%±0.5%',
{ isUpdateRecord: false, signData: null }
)
})
}
//
if (this.fillType !== 'actFill') return
const data = this.getFilledFormDataByRefs([refConf.xbxx])
const { fshxbbhCodeSn } = data || {}
// fshxbbhCodeSn
if (fshxbbhCodeSn) return
this.$nextTick(() => { this.$nextTick(() => {
this.$refs[refConf.pyxx]?.updateFormData(
'pytjText',
'培养条件:温度为温度为37℃±2℃,CO2浓度为5%±0.5%',
{ isUpdateRecord: false, signData: null }
)
const updateData = {}
const formattedDate = moment().format('YYMMDD')
updateData['fshxbbhCodeSn'] = formattedDate + '-' + '0001'
this.$refs[refConf.xbxx].batchUpdateFormData(updateData)
}) })
}, },
data() { data() {
@ -301,28 +326,30 @@ export default {
// 使 // 使
this.resourceTmp = stepResource.sjResource || [] this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = [...(stepResource.yqResource || [])] this.yqResourceTmp = [...(stepResource.yqResource || [])]
// //
const xbxxData = this.$refs.xbxxRef?.getFilledFormData() || {} const xbxxData = this.$refs.xbxxRef?.getFilledFormData() || {}
// //
if (xbxxData.xbdcbh) { if (xbxxData.xbdcbh) {
const xbInfo = xbxxData.selectInfo_xbdcbh || {} const xbInfo = xbxxData.selectInfo_xbdcbh || {}
// type StepFormPackage xb // type StepFormPackage xb
this.xbxjTmp = [{
value: xbxxData.xbdcbh,
bh: xbInfo.bh || xbxxData.xbdcbh,
mc: xbInfo.mc || '',
xh: xbInfo.xh || '',
jzrq: xbInfo.jzrq || ''
}]
this.xbxjTmp = [
{
value: xbxxData.xbdcbh,
bh: xbInfo.bh || xbxxData.xbdcbh,
mc: xbInfo.mc || '',
xh: xbInfo.xh || '',
jzrq: xbInfo.jzrq || ''
}
]
} else { } else {
this.xbxjTmp = [] this.xbxjTmp = []
} }
// //
const pyxxData = this.$refs.pyxxRef?.getFilledFormData() || {} const pyxxData = this.$refs.pyxxRef?.getFilledFormData() || {}
// //
if (pyxxData.pyxbh) { if (pyxxData.pyxbh) {
const pyxInfo = pyxxData.selectInfo_pyxbh || {} const pyxInfo = pyxxData.selectInfo_pyxbh || {}
@ -336,7 +363,7 @@ export default {
jzrq: pyxInfo.jzrq || '' jzrq: pyxInfo.jzrq || ''
}) })
} }
return this.resourceTmp return this.resourceTmp
}, },
onRegentSubmit(e) { onRegentSubmit(e) {

+ 50
- 27
src/views/business/comps/template/comps/dl/DL012.vue View File

@ -194,6 +194,8 @@ export default {
fillType: 'actFill', fillType: 'actFill',
subType: 'button', subType: 'button',
subKey: 'pykssjButton', subKey: 'pykssjButton',
disabled: true,
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dl.dl012.pykssjButton' buttonName: 'template.dl.dl012.pykssjButton'
} }
} }
@ -271,30 +273,49 @@ export default {
} }
}, },
mounted() { mounted() {
this.$nextTick(() => {
this.$refs[refConf.pyxx]?.updateFormData(
'pytjText',
'培养条件:温度为温度为37℃±2℃,CO2浓度为5%±0.5%',
{ isUpdateRecord: false, signData: null }
)
})
const data = this.getFilledFormDataByRefs([refConf.xbxx, refConf.base])
console.log(data)
const { zbxbs, zbhxbbh_1, startDate } = data || {}
console.log(this.fillType, '===>fillType')
// pytjText
const pyxxData = this.getFilledFormDataByRefs([refConf.pyxx])
const { pytjText } = pyxxData || {}
// pytjText
if (!pytjText) {
this.$nextTick(() => {
this.$refs[refConf.pyxx]?.updateFormData(
'pytjText',
'培养条件:温度为温度为37℃±2℃,CO2浓度为5%±0.5%',
{ isUpdateRecord: false, signData: null }
)
})
}
//
const data = this.getFilledFormDataByRefs([refConf.xbxx])
const { zbxbs, zbhxbbh_1 } = data || {}
if (!zbxbs) return if (!zbxbs) return
try { try {
this.zbxbs = Number(zbxbs) this.zbxbs = Number(zbxbs)
} catch (error) { } catch (error) {
this.zbxbs = 1 this.zbxbs = 1
} }
if (this.fillType !== 'actFill') return
this.$nextTick(() => { this.$nextTick(() => {
const updateData = {} const updateData = {}
// Convert startDate from "2026-03-07 14:02:15" to "260307" (YYMMDD)
const formattedDate = startDate ? moment(startDate).format('YYMMDD') : ''
// 使
const formattedDate = moment().format('YYMMDD')
for (let index = 1; index <= this.zbxbs; index++) { for (let index = 1; index <= this.zbxbs; index++) {
updateData['zbhxbbh_' + index] = zbhxbbh_1
updateData['zbhxbbhCodeSn_' + index] =
formattedDate + '-' + `${index}`.padStart(2, '0')
const zbhxbbhKey = 'zbhxbbh_' + index
const codeSnKey = 'zbhxbbhCodeSn_' + index
//
if (!data[zbhxbbhKey]) {
updateData[zbhxbbhKey] = zbhxbbh_1
}
if (!data[codeSnKey]) {
updateData[codeSnKey] =
formattedDate + '-' + `${index}`.padStart(4, '0')
}
} }
this.$refs[refConf.xbxx].batchUpdateFormData(updateData) this.$refs[refConf.xbxx].batchUpdateFormData(updateData)
}) })
@ -339,28 +360,30 @@ export default {
// 使 // 使
this.resourceTmp = stepResource.sjResource || [] this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = [...(stepResource.yqResource || [])] this.yqResourceTmp = [...(stepResource.yqResource || [])]
// //
const xbxxData = this.$refs.xbxxRef?.getFilledFormData() || {} const xbxxData = this.$refs.xbxxRef?.getFilledFormData() || {}
// //
if (xbxxData.xbzbqbh) { if (xbxxData.xbzbqbh) {
const xbInfo = xbxxData.selectInfo_xbzbqbh || {} const xbInfo = xbxxData.selectInfo_xbzbqbh || {}
// type // type
this.xbxjTmp = [{
value: xbxxData.xbzbqbh,
bh: xbInfo.bh || xbxxData.xbzbqbh,
mc: xbInfo.mc || '',
xh: xbInfo.xh || '',
jzrq: xbInfo.jzrq || ''
}]
this.xbxjTmp = [
{
value: xbxxData.xbzbqbh,
bh: xbInfo.bh || xbxxData.xbzbqbh,
mc: xbInfo.mc || '',
xh: xbInfo.xh || '',
jzrq: xbInfo.jzrq || ''
}
]
} else { } else {
this.xbxjTmp = [] this.xbxjTmp = []
} }
// //
const pyxxData = this.$refs.pyxxRef?.getFilledFormData() || {} const pyxxData = this.$refs.pyxxRef?.getFilledFormData() || {}
// //
if (pyxxData.pyxbh) { if (pyxxData.pyxbh) {
const pyxInfo = pyxxData.selectInfo_pyxbh || {} const pyxInfo = pyxxData.selectInfo_pyxbh || {}
@ -374,7 +397,7 @@ export default {
jzrq: pyxInfo.jzrq || '' jzrq: pyxInfo.jzrq || ''
}) })
} }
return this.resourceTmp return this.resourceTmp
}, },
onRegentSubmit(e) { onRegentSubmit(e) {

+ 41
- 10
src/views/business/comps/template/comps/dl/DL013.vue View File

@ -254,7 +254,9 @@ export default {
type: 'select', type: 'select',
options: this.getDictOptions('business_dl_xbmc'), options: this.getDictOptions('business_dl_xbmc'),
fillType: 'actFill', fillType: 'actFill',
otherCode: 'xbmcOther'
otherCode: 'xbmcOther',
otherMaxlength: 50
}, },
xbbh: { xbbh: {
label: 'template.dl.dl013.xbbh', label: 'template.dl.dl013.xbbh',
@ -450,13 +452,28 @@ export default {
}, },
// //
handleCdxxAdd() { handleCdxxAdd() {
// 使
const yqsyTableRef = this.$refs[refConf.yqsy]
const beforeData = yqsyTableRef?.getDataSource() || []
// 使
const currentYqsyData = yqsyTableRef?.getFilledFormData() || {}
// formData使
if (currentYqsyData.stepTableFormData && currentYqsyData.stepTableFormData.length > 0) {
// 使$set
this.$set(this.formData, 'yqsyTablestepTableFormData', currentYqsyData.stepTableFormData)
this.$set(this.formData, 'yqsyTableheaderSelectFields', currentYqsyData.headerSelectFields || {})
this.$set(this.formData, 'yqsyTableheaderFields', currentYqsyData.headerFields || {})
}
// //
if (!this.formData.cdxxConfigs) { if (!this.formData.cdxxConfigs) {
this.$set(this.formData, 'cdxxConfigs', []) this.$set(this.formData, 'cdxxConfigs', [])
} }
//
this.formData.cdxxConfigs.push({
//
const newCdxxItem = {
id: getuuid(), id: getuuid(),
xsbs: null, xsbs: null,
xbmd: null, xbmd: null,
@ -464,7 +481,10 @@ export default {
ysg: null, ysg: null,
zxg: null, zxg: null,
yxg: null yxg: null
})
}
//
this.formData.cdxxConfigs.push(newCdxxItem)
// //
this.$refs[refConf.cdxx]?.updateFormData( this.$refs[refConf.cdxx]?.updateFormData(
@ -476,13 +496,24 @@ export default {
} }
) )
// 使
this.$nextTick(() => { this.$nextTick(() => {
//
EventBus.$emit('onModifyRecord', {
type: 'fieldChanged',
newRecord: null,
resourceList: null
})
const afterData = yqsyTableRef?.getDataSource() || []
//
if (afterData.length === 0 && beforeData.length > 0) {
yqsyTableRef?.updateDataSource(beforeData)
}
//
setTimeout(() => {
EventBus.$emit('onModifyRecord', {
type: 'fieldChanged',
newRecord: null,
resourceList: null,
source: 'cdxxAdd'
})
}, 100)
}) })
}, },
// //

+ 29
- 7
src/views/business/comps/template/comps/dl/DL014.vue View File

@ -298,14 +298,16 @@ export default {
type: 'select', type: 'select',
options: this.getDictOptions('business_dl_qsxjbltj'), options: this.getDictOptions('business_dl_qsxjbltj'),
fillType: 'preFill', fillType: 'preFill',
otherCode: 'bltjOther'
otherCode: 'bltjOther',
otherMaxlength: 50
}, },
xbmc: { xbmc: {
label: 'template.dl.dl014.xbmc', label: 'template.dl.dl014.xbmc',
type: 'select', type: 'select',
options: this.getDictOptions('business_dl_xbmc'), options: this.getDictOptions('business_dl_xbmc'),
fillType: 'preFill', fillType: 'preFill',
otherCode: 'xbmcOther'
otherCode: 'xbmcOther',
otherMaxlength: 50
} }
} }
} }
@ -317,7 +319,8 @@ export default {
pxpb: { pxpb: {
label: 'template.dl.dl014.pxpb', label: 'template.dl.dl014.pxpb',
type: 'inputNumber', type: 'inputNumber',
fillType: 'preFill'
fillType: 'preFill',
maxlength: 2
}, },
sftjs9: { sftjs9: {
label: 'template.dl.dl014.sftjs9', label: 'template.dl.dl014.sftjs9',
@ -343,7 +346,8 @@ export default {
const jlzzsConfig = { const jlzzsConfig = {
label: 'template.dl.dl014.jlzzs', label: 'template.dl.dl014.jlzzs',
type: 'inputNumber', type: 'inputNumber',
fillType: 'preFill'
fillType: 'preFill',
maxlength: 2
} }
// preFill // preFill
@ -369,7 +373,8 @@ export default {
label: 'template.dl.dl014.jlzzmc', label: 'template.dl.dl014.jlzzmc',
prop: 'jlzzmc', prop: 'jlzzmc',
bodyType: 'input', bodyType: 'input',
bodyFillType: 'preFill'
bodyFillType: 'preFill',
bodyMaxlength: 20
} }
] ]
}, },
@ -399,7 +404,8 @@ export default {
label: 'template.dl.dl014.jlzb', label: 'template.dl.dl014.jlzb',
prop: 'jlzb', prop: 'jlzb',
bodyType: 'input', bodyType: 'input',
bodyFillType: 'preFill'
bodyFillType: 'preFill',
bodyMaxlength: 10
}, },
{ {
label: 'template.dl.dl014.xybh', label: 'template.dl.dl014.xybh',
@ -584,7 +590,7 @@ export default {
if (this.fillType === 'actFill') { if (this.fillType === 'actFill') {
const yqsyTableRef = this.$refs[refConf.yqsy] const yqsyTableRef = this.$refs[refConf.yqsy]
const yqsyTableData = yqsyTableRef?.getDataSource() || [] const yqsyTableData = yqsyTableRef?.getDataSource() || []
if (yqsyTableData.length === 0) { if (yqsyTableData.length === 0) {
this.$message.warning(this.$t('template.dl.dl014.yqsyxxEmpty')) this.$message.warning(this.$t('template.dl.dl014.yqsyxxEmpty'))
return Promise.reject(this.$t('template.dl.dl014.yqsyxxEmpty')) return Promise.reject(this.$t('template.dl.dl014.yqsyxxEmpty'))
@ -892,6 +898,11 @@ export default {
return return
} }
//
if (jlzmcList.length > 0) {
this.$set(this.formData, 'jlzmcTableData', jlzmcList)
}
// //
const newRows = [] const newRows = []
@ -920,6 +931,17 @@ export default {
// formDataCustomTable // formDataCustomTable
this.$set(this.formData, 'jlzTableData', newRows) this.$set(this.formData, 'jlzTableData', newRows)
//
this.$nextTick(() => {
const jlzmcTableRef = this.$refs[refConf.jlzmcTable]
const currentJlzmcData = jlzmcTableRef?.getDataSource() || []
//
if (currentJlzmcData.length === 0 && jlzmcList.length > 0) {
jlzmcTableRef?.updateDataSource(jlzmcList)
}
})
this.$message.success(`已生成 ${newRows.length} 行剂量组数据`) this.$message.success(`已生成 ${newRows.length} 行剂量组数据`)
}, },
// //

+ 24
- 13
src/views/business/comps/template/comps/dl/DL015.vue View File

@ -16,8 +16,16 @@
:formData="formData" :formData="formData"
/> />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<TableList
label="template.common.reagentInfo"
:columns="sysjColumns"
:dataSource="resourceSj"
/>
<TableList
label="template.common.instrumentInfo"
:columns="yqColumns"
:dataSource="yqResource"
/>
<LineLabel label="template.dl.dl015.xbxx" /> <LineLabel label="template.dl.dl015.xbxx" />
<BaseInfoFormPackage <BaseInfoFormPackage
@ -185,7 +193,7 @@ export default {
qxbd: { qxbd: {
label: 'template.dl.dl015.qxbd', label: 'template.dl.dl015.qxbd',
type: 'qxbd', type: 'qxbd',
qxbdType:'DL014',
qxbdType: 'DL014',
fillType: 'actFill', fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh'] filledCodes: ['bdmc', 'bdbh']
}, },
@ -194,7 +202,8 @@ export default {
type: 'select', type: 'select',
options: this.getDictOptions('business_dl_qsxjbltj'), options: this.getDictOptions('business_dl_qsxjbltj'),
fillType: 'preFill', fillType: 'preFill',
otherCode: 'bltjOther'
otherCode: 'bltjOther',
otherMaxlength: 50
} }
} }
} }
@ -290,14 +299,14 @@ export default {
// //
getFilledFormData() { getFilledFormData() {
const baseData = this.getFilledFormDataByRefs(refNames) const baseData = this.getFilledFormDataByRefs(refNames)
// stepTableFormData // stepTableFormData
const hyqkData = this.$refs[refConf.hyqk]?.getFilledFormData() const hyqkData = this.$refs[refConf.hyqk]?.getFilledFormData()
if (hyqkData) { if (hyqkData) {
baseData.stepTableFormData = hyqkData.stepTableFormData || [] baseData.stepTableFormData = hyqkData.stepTableFormData || []
baseData.headerSelectFields = hyqkData.headerSelectFields || {} baseData.headerSelectFields = hyqkData.headerSelectFields || {}
} }
return baseData return baseData
}, },
// //
@ -312,16 +321,16 @@ export default {
const stepResource = this.$refs.stepRef.getStepResource() const stepResource = this.$refs.stepRef.getStepResource()
const hyqkData = this.$refs.hyqkTableRef?.getFilledFormData() const hyqkData = this.$refs.hyqkTableRef?.getFilledFormData()
const hyqkList = hyqkData?.stepTableFormData || [] const hyqkList = hyqkData?.stepTableFormData || []
// //
this.resourceTmp = stepResource.sjResource || [] this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || [] this.yqResourceTmp = stepResource.yqResource || []
// //
// Set // Set
const xybhSet = new Set() const xybhSet = new Set()
const sjResourceFromHyqk = [] const sjResourceFromHyqk = []
hyqkList.forEach((item) => { hyqkList.forEach((item) => {
if (item.xybh && !xybhSet.has(item.xybh)) { if (item.xybh && !xybhSet.has(item.xybh)) {
xybhSet.add(item.xybh) xybhSet.add(item.xybh)
@ -344,9 +353,9 @@ export default {
}) })
} }
}) })
this.resourceTmp = [...this.resourceTmp, ...sjResourceFromHyqk] this.resourceTmp = [...this.resourceTmp, ...sjResourceFromHyqk]
return this.resourceTmp return this.resourceTmp
}, },
onRegentSubmit(e) { onRegentSubmit(e) {
@ -370,7 +379,7 @@ export default {
} }
// //
const hyqkData = jlzTableData.map(item => ({
const hyqkData = jlzTableData.map((item) => ({
jlzb: item.jlzb || '', // jlzb: item.jlzb || '', //
xybh: item.xybh || '', // xybh: item.xybh || '', //
hyqszqk: '', // hyqszqk: '', //
@ -384,7 +393,9 @@ export default {
// 使 $set formData CustomTable // 使 $set formData CustomTable
this.$set(this.formData, 'stepTableFormData', hyqkData) this.$set(this.formData, 'stepTableFormData', hyqkData)
this.$message.success(`已从前序表单加载 ${hyqkData.length} 条剂量组数据`)
this.$message.success(
`已从前序表单加载 ${hyqkData.length} 条剂量组数据`
)
} catch (error) { } catch (error) {
console.error('解析前序表单数据失败:', error) console.error('解析前序表单数据失败:', error)
// //

+ 1
- 0
src/views/business/comps/template/comps/dl/DL022.vue View File

@ -244,6 +244,7 @@ export default {
onAddRow() { onAddRow() {
this.$refs.tableRef.addRow({ this.$refs.tableRef.addRow({
jblx: [{value: undefined}], jblx: [{value: undefined}],
id: getuuid(),
}) })
}, },
onFormSelect(fields) { onFormSelect(fields) {

+ 33
- 5
src/views/business/comps/template/comps/sp/SP0019.vue View File

@ -23,6 +23,7 @@
</template> </template>
</CustomTable> </CustomTable>
<BaseInfoFormPackage class="mt-20" fieldItemLabel="色谱柱型号" label="色谱柱型号" ref="spzxhRef" <BaseInfoFormPackage class="mt-20" fieldItemLabel="色谱柱型号" label="色谱柱型号" ref="spzxhRef"
@remoteMethod="remoteMethod"
:formConfig="storageFormConfig" :formData="formData" /> :formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="溶液" /> <LineLabel label="溶液" />
<CustomTable <CustomTable
@ -55,8 +56,9 @@ import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin"; import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue'; import CustomTable from '@/components/Template/CustomTable.vue';
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue" import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
import { public_sjList } from '@/api/business/public/public';
import { getBaseInfoFormConfig, storageFormConfig, getYqColumns,getRyColumns,getYqphFormConfig } from "../../formConfig/sp/SP0019"
import { getBaseInfoFormConfig, getStorageFormConfig, getYqColumns,getRyColumns,getYqphFormConfig } from "../../formConfig/sp/SP0019"
export default { export default {
name: "SP0019", name: "SP0019",
@ -83,7 +85,7 @@ export default {
}, },
// //
storageFormConfig() { storageFormConfig() {
return storageFormConfig;
return getStorageFormConfig(this);
}, },
// //
remarkConig() { remarkConig() {
@ -111,7 +113,8 @@ export default {
}, },
data() { data() {
return { return {
formData: {}
formData: {},
spzxhOptions: [],
}; };
}, },
mounted() { mounted() {
@ -119,6 +122,22 @@ export default {
}, },
methods: { methods: {
async remoteMethod({ query, key }) {
if (key === "spzxh") {
const res = await public_sjList({
pageNum: 1,
pageSize: 10,
mc: query
});
if(res.code === 200){
const {rows = []} = res;
this.spzxhOptions = rows.map(item => ({
label: item.bh,
value: item.bh,
}));
}
}
},
onRegentSubmit(e){ onRegentSubmit(e){
const {selectInfo, key, col, rowIndex, colIndex, rowData} = e; const {selectInfo, key, col, rowIndex, colIndex, rowData} = e;
const {row} = selectInfo; const {row} = selectInfo;
@ -130,8 +149,17 @@ export default {
this.$refs.ryTableRef.updateDataSourceByRowIndex(rowIndex, params); this.$refs.ryTableRef.updateDataSourceByRowIndex(rowIndex, params);
} }
}, },
onYqSubmit(data, col, rowIndex, colIndex, row){
console.log(data, col, rowIndex, colIndex, row,"onRegentSubmit")
onYqSubmit(data){
const {selectInfo,rowIndex,key} = data;
const {row} = selectInfo;
if(key === "bh"){//
const params = {
mc: row.mc,
xh: row.xh,
jzrq: row.jzrq,
}
this.$refs.yqInfoTableRef.updateDataSourceByRowIndex(rowIndex, params);
}
}, },
// //
getFilledFormData() { getFilledFormData() {

+ 49
- 42
src/views/business/comps/template/comps/sp/SP0021.vue View File

@ -19,30 +19,26 @@
<div class="config-header"> <div class="config-header">
<div></div> <div></div>
<el-popconfirm title="确认删除当前样本?" @confirm="deleteConfig(item)"> <el-popconfirm title="确认删除当前样本?" @confirm="deleteConfig(item)">
<el-button slot="reference" v-if="fillType === 'actFill'" type="text" icon="el-icon-delete" >{{
$t('template.common.deleteBtn')
}}</el-button>
<el-button slot="reference" v-if="fillType === 'actFill'" type="text"
icon="el-icon-delete">{{
$t('template.common.deleteBtn')
}}</el-button>
</el-popconfirm> </el-popconfirm>
</div> </div>
<BaseInfoFormPackage fieldItemLabel="样本说明" :ref="`ybsmFormPackageRef${index}`"
:formConfig="ybsmFormConfig" @blur="onHandleBlur" :formData="item" />
<el-button v-if="fillType === 'actFill'" type="primary" @click="onImportAnimal">导入动物</el-button>
<CustomTable
:ref = "`ybsmTableRef${index}`"
:columns="ybsmColumns"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData = "item">
<BaseInfoFormPackage fieldItemLabel="样本说明" :ref="`ybsmFormPackageRef${index}`"
:formConfig="ybsmFormConfig" @blur="onHandleBlur" :formData="item" />
<el-button v-if="fillType === 'actFill'" type="primary"
@click="onImportAnimal(item, index)">导入动物</el-button>
<CustomTable :ref="`ybsmTableRef${index}`" :columns="ybsmColumns"
:showOperation="fillType === 'actFill'" :showAddRow="fillType === 'actFill'"
:formData="item">
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, `ybsmTableRef${index}`)"
></TableOpertaionDelete>
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, `ybsmTableRef${index}`)">
</TableOpertaionDelete>
</template> </template>
</CustomTable> </CustomTable>
<Step :ref="`stepRef${index}`" :formData="item.stepData ||[]"></Step>
<Step :ref="`stepRef${index}`" :formData="item.stepData || []"></Step>
</div> </div>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" <BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
:ref="refConfig.remarkRef" :formConfig="remarkConig" :formData="formData" /> :ref="refConfig.remarkRef" :formConfig="remarkConig" :formData="formData" />
@ -50,7 +46,8 @@
</div> </div>
</div> </div>
<!-- <button @click="onSave">保存</button> --> <!-- <button @click="onSave">保存</button> -->
<ImportExcelDialog ref="ImportExcelDialog" @onLoadData="onLoadExcelData" :downloadArr="['动物编号']" @downloadExcelTemplate="downloadExcelTemplate" />
<ImportExcelDialog ref="ImportExcelDialog" @onLoadData="onLoadExcelData" :downloadArr="['动物编号']"
@downloadExcelTemplate="downloadExcelTemplate" />
</div> </div>
</template> </template>
@ -65,8 +62,8 @@ import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin"; import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue'; import CustomTable from '@/components/Template/CustomTable.vue';
import { uniqeResource } from "@/utils/calUnitTools"; import { uniqeResource } from "@/utils/calUnitTools";
import {getuuid,justUpdateFilledFormData} from "@/utils/index";
import { getBaseInfoFormConfig, getStorageFormConfig, getRemarkFormConfig, getYbsmFormConfig,getTableColumns } from "../../formConfig/sp/SP0021";
import { getuuid, justUpdateFilledFormData } from "@/utils/index";
import { getBaseInfoFormConfig, getStorageFormConfig, getRemarkFormConfig, getYbsmFormConfig, getTableColumns } from "../../formConfig/sp/SP0021";
const refConfig = { const refConfig = {
baseInfoRef: "baseInfoRef", baseInfoRef: "baseInfoRef",
remarkRef: "remarkRef", remarkRef: "remarkRef",
@ -78,7 +75,7 @@ const refConfig = {
const compRefs = Object.values(refConfig); const compRefs = Object.values(refConfig);
export default { export default {
name: "SP0021", name: "SP0021",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete,ImportExcelDialog },
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete, ImportExcelDialog },
mixins: [templateMixin], mixins: [templateMixin],
props: { props: {
fillType: { fillType: {
@ -113,23 +110,24 @@ export default {
}, },
}, },
data() { data() {
return {
refConfig,
};
},
return {
refConfig,
currentIndex: -1,
};
},
mounted() { mounted() {
if(this.fillType === 'preFill' &&!this.formData.ybsmDataList){//
if (this.fillType === 'preFill' && !this.formData.ybsmDataList) {//
this.onAdd() this.onAdd()
} }
}, },
methods: { methods: {
// //
deleteConfig(item){
deleteConfig(item) {
// ybsmDataList // ybsmDataList
if (this.formData.ybsmDataList.length > 1) { if (this.formData.ybsmDataList.length > 1) {
const configIndex = this.formData.ybsmDataList.findIndex(config => config.id === item.id); const configIndex = this.formData.ybsmDataList.findIndex(config => config.id === item.id);
console.log(configIndex,"configIndex")
if(configIndex>-1){
console.log(configIndex, "configIndex")
if (configIndex > -1) {
const newList = [...this.formData.ybsmDataList] const newList = [...this.formData.ybsmDataList]
newList.splice(configIndex, 1); newList.splice(configIndex, 1);
this.$set(this.formData, 'ybsmDataList', newList); this.$set(this.formData, 'ybsmDataList', newList);
@ -141,19 +139,19 @@ export default {
} else { } else {
this.$message.warning('至少保留一个样本说明项'); this.$message.warning('至少保留一个样本说明项');
} }
}, },
// //
onAdd(){
onAdd() {
if (!this.formData.ybsmDataList) { if (!this.formData.ybsmDataList) {
this.$set(this.formData, 'ybsmDataList', []); this.$set(this.formData, 'ybsmDataList', []);
} }
let defaultInfo = {
let defaultInfo = {
id: getuuid(), id: getuuid(),
stepData: [], stepData: [],
} }
if(this.fillType === "actFill"){
const {ybsmDataList} = this.formData
if (this.fillType === "actFill") {
const { ybsmDataList } = this.formData
defaultInfo.stepData = ybsmDataList[0]?.stepData || [] defaultInfo.stepData = ybsmDataList[0]?.stepData || []
} }
// //
@ -161,21 +159,29 @@ export default {
}, },
onLoadExcelData(excelData) { onLoadExcelData(excelData) {
const data = excelData.splice(1); const data = excelData.splice(1);
const transData = data.map((item)=>{
return{
dwbh: item[0],
id: getuuid(),
}
})
this.$refs[`ybsmTableRef${this.currentIndex}`][0].pushDataSource(transData)
this.$refs.ImportExcelDialog.cancel() this.$refs.ImportExcelDialog.cancel()
setTimeout(() => { setTimeout(() => {
justUpdateFilledFormData(); justUpdateFilledFormData();
}, 100); }, 100);
}, },
downloadExcelTemplate(arr){
downloadExcelTemplate(arr) {
this.exportExcel(arr) this.exportExcel(arr)
}, },
// //
onImportAnimal(){
onImportAnimal(item, index) {
this.currentIndex = index;
this.$refs.ImportExcelDialog.show() this.$refs.ImportExcelDialog.show()
}, },
// //
deleteTableRow(rowIndex, refName) { deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex)
this.$refs[refName][0].deleteRow(rowIndex)
}, },
// //
getFilledFormData() { getFilledFormData() {
@ -202,18 +208,18 @@ export default {
// //
let content = await this.validFormFields(compRefs); let content = await this.validFormFields(compRefs);
if (!content) return null; if (!content) return null;
// //
for (let index = 0; index < this.formData.ybsmDataList.length; index++) { for (let index = 0; index < this.formData.ybsmDataList.length; index++) {
// //
const ybsmFormValid = await this.$refs[`ybsmFormPackageRef${index}`][0]?.getFormData() || true; const ybsmFormValid = await this.$refs[`ybsmFormPackageRef${index}`][0]?.getFormData() || true;
if (!ybsmFormValid) return null; if (!ybsmFormValid) return null;
// //
const stepValid = await this.$refs[`stepRef${index}`][0]?.getFormData() || true; const stepValid = await this.$refs[`stepRef${index}`][0]?.getFormData() || true;
if (!stepValid) return null; if (!stepValid) return null;
} }
// //
return this.getFilledFormData(); return this.getFilledFormData();
}, },
@ -272,6 +278,7 @@ export default {
.print-btn { .print-btn {
margin-bottom: 20px; margin-bottom: 20px;
} }
.config-header { .config-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

+ 16
- 13
src/views/business/comps/template/formConfig/sp/SP0019.js View File

@ -43,19 +43,22 @@ export const getBaseInfoFormConfig = (formType) => {
] ]
} }
export const storageFormConfig = [
{
type: 'step',
config: {
yqmxh: {
label: '色谱柱型号',
type: 'yq',
fillType: 'actFill',
filledCodes:['mc','bh'],
},
}
},
]
export const getStorageFormConfig = ($this)=>{
return[
{
type: 'step',
config: {
spzxh: {
label: '色谱柱型号',
type: 'select',
fillType: 'actFill',
options: $this.spzxhOptions,
filledCodes:['mc','bh'],
},
}
},
]
}
//仪器信息 //仪器信息
export const getYqColumns = ($this) => { export const getYqColumns = ($this) => {

Loading…
Cancel
Save