diff --git a/src/views/business/comps/template/comps/dl/DL016.vue b/src/views/business/comps/template/comps/dl/DL016.vue index 06abc10..a3151fc 100644 --- a/src/views/business/comps/template/comps/dl/DL016.vue +++ b/src/views/business/comps/template/comps/dl/DL016.vue @@ -21,7 +21,7 @@ fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur" @beforeSaveRecord = "beforeSaveRecord" :showAddRow="false" :showOperation="false" - ref="qcxjjyqkTableRef" :columns="stepColumns" :formData="formData"> + ref="qcxjjyqkTableRef" :columns="stepColumns" :formData="qcxjjyqkFormData"> @@ -62,6 +62,13 @@ export default { }, }, computed: { + // 换液情况表格数据 + qcxjjyqkFormData() { + return { + stepTableFormData: this.formData.qcxjjyqkData || [], + headerSelectFields: {} + } + }, // 备注表单配置 remarkConig() { return [ @@ -136,7 +143,7 @@ export default { label: 'template.dl.dl016.qxbd', type: 'qxbd', fillType: 'actFill', - qxbdType:'DL017', + qxbdType:'DL014', filledCodes:['bdmc','bdbh'], }, bltj: { @@ -194,14 +201,41 @@ export default { onRegentSubmit(e) { const { selectInfo, key, rowIndex } = e const { row } = selectInfo - console.log('selectInfo==============',selectInfo) + console.log('selectInfo==============',selectInfo,key,rowIndex) if (key === 'qxbd') { - const params = { - jlzb: row.mc, - xybh: row.xh, - xccsjzjdrq: '' + try { + // 解析前序表单的内容 + const bdnr = JSON.parse(row.bdnr) + console.log('前序表单数据:', bdnr) + + // 获取剂量组列表数据 + const qcxjjyqkData = bdnr.qcxjjyqkData || [] + + // if (qcxjjyqkData.length === 0) { + // this.$message.warning('前序表单中没有剂量组数据') + // return + // } + + // 从剂量组数据中提取剂量组别和悬液编号 + const itemData = qcxjjyqkData.map(item => ({ + jlzb: item.jlzb || '', // 剂量组别 + xybh: item.xybh || '', // 悬液编号 + hyqszqk: '', // 换液前生长情况 + hyqcdjqk: '', // 换液前沉淀情况 + hyqqtqk: '', // 换液前其他情况 + qqpyy: '', // 倾去培养液 + pbsxd: '', // PBS洗涤 + pyybrl: '' // 培养液补入量 + })) + + // 使用 $set 更新 formData,触发 CustomTable 的响应式更新 + this.$set(this.formData, 'qcxjjyqkData', itemData) + + this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`) + } catch (error) { + console.error('解析前序表单数据失败:', error) + this.$message.error('解析前序表单数据失败') } - this.$refs.qcxjjyqkTableRef.updateDataSourceByRowIndex(rowIndex, params) } }, //选择table header下拉框也要更新体积 diff --git a/src/views/business/comps/template/comps/dl/DL024.vue b/src/views/business/comps/template/comps/dl/DL024.vue index 4cb1b94..228d265 100644 --- a/src/views/business/comps/template/comps/dl/DL024.vue +++ b/src/views/business/comps/template/comps/dl/DL024.vue @@ -111,8 +111,8 @@ export default { label: 'template.dl.dl024.sydd', type: 'select', fillType: 'actFill', - options: this.getDictOptions('business_dl_xbmc'), - otherCode: 'xbmcOther', + options: this.getDictOptions('business_sydd'), + otherCode: 'syddOther', showOtherLabel:false }, }