Browse Source

fix:[模板管理][DL011~DL012核对]

ouqian
ouqian 1 month ago
parent
commit
4177ca07ea
2 changed files with 97 additions and 47 deletions
  1. +47
    -20
      src/views/business/comps/template/comps/dl/DL011.vue
  2. +50
    -27
      src/views/business/comps/template/comps/dl/DL012.vue

+ 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',
subDisable: 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,
subDisable: 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) {

Loading…
Cancel
Save