2 Commits

4 changed files with 136 additions and 185 deletions
Unified View
  1. +107
    -129
      src/views/business/comps/template/comps/dl/DL018.vue
  2. +1
    -43
      src/views/business/comps/template/comps/dl/DL022.vue
  3. +9
    -1
      src/views/business/comps/template/comps/dl/DL023.vue
  4. +19
    -12
      src/views/business/comps/template/comps/dl/DL024.vue

+ 107
- 129
src/views/business/comps/template/comps/dl/DL018.vue View File

@ -11,23 +11,20 @@
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> <TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <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"
@onRegentSubmit="onRegentSubmit" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl018.xbxx" label="template.dl.dl018.xbxx"
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" :showAddRow="false" :showOperation="false"
@clickButton="clickButton"
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"
:row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow">
</TableOpertaion>
</template> -->
</CustomTable>
<LineLabel label="template.dl.dl018.xbczqk" />
<CustomTable
fieldItemLabel="template.common.operationSteps"
@clickButton="handleClickButton"
:showAddRow="false" :showOperation="false"
ref="stepTableRef" :prefixKey = "`tableSecond`" :columns="stepColumns" :formData="tableFormData">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow(rowIndex,'secondTable')" ></TableOpertaionDelete>
</template>
</CustomTable>
<LineLabel label="template.dl.dl018.czbz" /> <LineLabel label="template.dl.dl018.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step> <Step ref="stepRef" :formData="formData.stepData"></Step>
@ -52,13 +49,14 @@ import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools"; import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue" import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
import moment from 'moment'
export default { export default {
name: "DL018", name: "DL018",
dicts: [
'business_dl_qsxjbltj', 'business_tjdw'
],
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete },
dicts: [
'business_dl_qsxjbltj','business_tjdw'
],
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin], mixins: [templateMixin],
props: { props: {
fillType: { fillType: {
@ -67,13 +65,13 @@ export default {
}, },
}, },
computed: { computed: {
//
tableFormData() {
return {
stepTableFormData: [{}],
headerSelectFields: {}
}
},
//
tableFormData() {
return {
stepTableFormData: this.formData.stepTableFormData || [],
headerSelectFields: {}
}
},
// //
remarkConig() { remarkConig() {
return [ return [
@ -138,7 +136,7 @@ export default {
} }
] ]
}, },
//
//
swypyjInfoFormConfig() { swypyjInfoFormConfig() {
return [ return [
{ {
@ -149,16 +147,16 @@ export default {
label: 'template.dl.dl018.qxbd', label: 'template.dl.dl018.qxbd',
type: 'qxbd', type: 'qxbd',
fillType: 'actFill', fillType: 'actFill',
qxbdType: 'DL014',
filledCodes: ['bdmc', 'bdbh'],
qxbdType:'DL014',
filledCodes:['bdmc','bdbh'],
}, },
bltj: {
bltj: {
label: 'template.dl.dl018.bltj', label: 'template.dl.dl018.bltj',
type: 'select', type: 'select',
fillType: 'preFill', fillType: 'preFill',
options: this.getDictOptions('business_dl_qsxjbltj'), options: this.getDictOptions('business_dl_qsxjbltj'),
otherCode: 'bltjOther', otherCode: 'bltjOther',
showOtherLabel: false
showOtherLabel:false
}, },
} }
} }
@ -173,7 +171,7 @@ export default {
width: 180, width: 180,
bodyType: "input", bodyType: "input",
bodyFillType: "actFill", bodyFillType: "actFill",
disabled: true,
disabled: true,
bodyDisabled: true, bodyDisabled: true,
}, },
{ {
@ -182,38 +180,34 @@ export default {
width: 180, width: 180,
bodyType: "input", bodyType: "input",
bodyFillType: "actFill", bodyFillType: "actFill",
disabled: true,
disabled: true,
bodyDisabled: true, bodyDisabled: true,
}, },
{ {
label: "template.dl.dl018.rsks", label: "template.dl.dl018.rsks",
prop: "rsks", prop: "rsks",
width: 180,
bodyType: "input", bodyType: "input",
bodyFillType: "actFill",
// disabled: true,
// showOtherLabel: false,
bodySubType: 'button',
bodySubFillType: 'actFill',
bodySubKey: 'rsks',
bodySubType: 'button',
bodySubButtonName: 'template.dl.dl018.ksButton', bodySubButtonName: 'template.dl.dl018.ksButton',
showBodySub: this.fillType === "actFill",
bodySubKey: 'rsks1',
bodySubFillType: 'actFill',
bodyFillType: 'actFill',
bodyDisabled: true,
width: 280,
bodyMaxlength: 50,
}, },
{ {
label: "template.dl.dl018.rsjs", label: "template.dl.dl018.rsjs",
prop: "rsjs", prop: "rsjs",
width: 180,
bodyType: "input", bodyType: "input",
bodyFillType: "actFill",
// disabled: true,
// showOtherLabel: false,
bodySubType: 'button',
bodySubType: 'button',
bodySubButtonName: 'template.dl.dl018.jsButton',
bodySubKey: 'rsjs1',
bodySubFillType: 'actFill', bodySubFillType: 'actFill',
bodySubKey: 'rsjs',
bodySubButtonName: 'template.dl.dl018.jsButton',
showBodySub: this.fillType === "actFill",
bodyFillType: 'actFill',
bodyDisabled: true,
width: 280,
bodyMaxlength: 50,
}, },
{ {
label: "template.dl.dl018.zs", label: "template.dl.dl018.zs",
@ -261,115 +255,98 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
clickButton(e,rowIndex) {
console.log(e,rowIndex)
//
handleClickButton(e, rowIndex) {
const arrStr = typeof e === 'string' ? e.slice(0, -1) : '';
const updateData = { [arrStr]: moment().format('YYYY/MM/DD HH:mm') };
this.$refs.stepTableRef?.updateDataSourceByRowIndex(rowIndex, updateData);
// console.log(this.getFilledFormData())
}, },
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
if (key === 'qxbd') {
try {
//
const bdnr = JSON.parse(row.bdnr)
//
const stepTableFormData = bdnr.jlzTableData || []
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
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
}
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)
//
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('解析前序表单数据失败')
}
}
},
//table header
onHeaderSelectChange(data) {
const { key, headerSelectFields, dataSource = [] } = data;
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`)
} catch (error) {
this.$set(this.formData, 'stepTableFormData', [])
console.error('解析前序表单数据失败:', error)
this.$message.error('解析前序表单数据失败')
}
}
},
//table header
onHeaderSelectChange(data){
const {key, headerSelectFields,dataSource=[]} = data;
const keys = [ const keys = [
'targetStartSolutionVolumeUnit', 'targetStartSolutionVolumeUnit',
'targetDiluentVolumeUnit', 'targetDiluentVolumeUnit',
'targetSolutionConcentrationUnit', 'targetSolutionConcentrationUnit',
'targetSolutionVolumeUnit', 'targetSolutionVolumeUnit',
] ]
if (keys.includes(key)) {
const { targetStartSolution, subTargetStartSolution } = this.$refs.swypyjInfoRef?.getFilledFormData();
if(keys.includes(key)){
const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData();
const params = { const params = {
subTargetStartSolution, subTargetStartSolution,
headerSelectFields headerSelectFields
} }
this.batchUpdateTargetStartSolutionVolume(dataSource, targetStartSolution, params)
}
},
beforeSaveRecord(data) {
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.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
} }
this.configCompleteRequest(postData);
}, },
// //
getFilledFormData() { getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef", "remarkRef"])
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])
}, },
// //
async getFormData() { async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef", "remarkRef"]);
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]);
return content; return content;
}, },
getResource() { getResource() {
//使 //使
const stepResource = this.$refs.stepRef.getStepResource() const stepResource = this.$refs.stepRef.getStepResource()
const tableList = this.$refs.qcxjjyqkTableRef?.getFilledFormData()?.stepTableFormData || []
const tableList = this.$refs.qcxjjyqkTableRef?.getFilledFormData()?.stepTableFormData || []
// //
this.resourceTmp = stepResource.sjResource || [] this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || [] this.yqResourceTmp = stepResource.yqResource || []
const tableFromHyqk = tableList
.filter(item => item.xybh)
.map(item => ({
bh: item.xybh,
type: 'cell'
}))
const tableFromHyqk = tableList
.filter(item => item.xybh)
.map(item => ({
bh: item.xybh,
type: 'cell'
}))
this.resourceTmp = [...this.resourceTmp, ...tableFromHyqk]
this.resourceTmp = [...this.resourceTmp, ...tableFromHyqk]
return this.resourceTmp; return this.resourceTmp;
}, },
// //
@ -387,4 +364,5 @@ export default {
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss"></style>
<style rel="stylesheet/scss" lang="scss">
</style>

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

@ -244,7 +244,6 @@ export default {
onAddRow() { onAddRow() {
this.$refs.tableRef.addRow({ this.$refs.tableRef.addRow({
jblx: [{value: undefined}], jblx: [{value: undefined}],
id: getuuid(),
}) })
}, },
onFormSelect(fields) { onFormSelect(fields) {
@ -272,48 +271,7 @@ export default {
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData(); const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
this.onCommonVerifyNdException(formFields, data); 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() { getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "remarkRef", "tableRef"]) return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "remarkRef", "tableRef"])

+ 9
- 1
src/views/business/comps/template/comps/dl/DL023.vue View File

@ -22,7 +22,7 @@
<LineLabel label="template.dl.dl023.czjl" /> <LineLabel label="template.dl.dl023.czjl" />
<!-- 操作记录 --> <!-- 操作记录 -->
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps" <BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps"
@select="onSelect" :formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
@select="onSelect" @clickButton="handleClickButton" :formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" <BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div> </div>
@ -43,6 +43,7 @@ import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools"; import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue" import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
import moment from 'moment'
export default { export default {
name: "dl023", name: "dl023",
@ -210,6 +211,13 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
//
handleClickButton(item,signData) {
const arrStr = item.subKey;
const value = moment().format('YYYY/MM/DD HH:mm');
this.$refs.swypyjInfoRef.updateFormData(arrStr, value,{isUpdateRecord:true,signData});
// console.log(this.getFilledFormData())
},
onSelect(e) { onSelect(e) {
const { key, value } = e const { key, value } = e
if (key === "dwzshxbx") {// if (key === "dwzshxbx") {//

+ 19
- 12
src/views/business/comps/template/comps/dl/DL024.vue View File

@ -15,12 +15,15 @@
<!-- 操作记录 --> <!-- 操作记录 -->
<div class="template-form-item"> <div class="template-form-item">
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps" <BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps"
:formConfig="stepFormConfig" @blur="onHandleBlur" @onRegentSubmit="onRegentSubmit"
:formConfig="stepFormConfig"
@blur="onHandleBlur"
@clickButton="handleClickButton"
@onRegentSubmit="onRegentSubmit"
:formData="formData" /> :formData="formData" />
<CustomTable <CustomTable
:ref="`tableRef`" :ref="`tableRef`"
:columns="tableColumns" :columns="tableColumns"
:formData="formData"
:formData="tableFormData"
operationWidth = "80px" operationWidth = "80px"
:prefixKey = "`table`" :prefixKey = "`table`"
fieldItemLabel = "template.dl.dl024.gcqk" fieldItemLabel = "template.dl.dl024.gcqk"
@ -52,6 +55,7 @@ import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools"; import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue" import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
import moment from 'moment'
export default { export default {
name: "dl024", name: "dl024",
@ -183,7 +187,7 @@ export default {
bodyType: 'input', bodyType: 'input',
bodyFillType: 'actFill', bodyFillType: 'actFill',
width: 100, width: 100,
bodyMaxlength: 50,
bodyDisabled: true,
} }
] ]
}, },
@ -196,6 +200,13 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
//
handleClickButton(item,signData) {
const arrStr = item.subKey;
const value = moment().format('YYYY/MM/DD HH:mm');
this.$refs.swypyjInfoRef.updateFormData(arrStr, value,{isUpdateRecord:true,signData});
// console.log(this.getFilledFormData())
},
// //
onRegentSubmit(e) { onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e const { selectInfo, key, rowIndex } = e
@ -205,7 +216,7 @@ export default {
// //
const bdnr = JSON.parse(row.bdnr) const bdnr = JSON.parse(row.bdnr)
// //
const stepTableFormData = bdnr.jlzTableData || []
const stepTableFormData = bdnr.stepTableFormData || []
if (stepTableFormData.length === 0) { if (stepTableFormData.length === 0) {
// //
@ -213,12 +224,13 @@ export default {
this.$message.warning('前序表单中没有细胞编号数据') this.$message.warning('前序表单中没有细胞编号数据')
return return
} }
console.log('选择仪器编号预留=2==',stepTableFormData)
// //
const itemData = stepTableFormData.map(item => ({ const itemData = stepTableFormData.map(item => ({
xbbh: item.jlzb || '', //
xbbh: item.jzlybh || '', //
})) }))
// 使 $set formData CustomTable // 使 $set formData CustomTable
console.log('选择仪器编号预留=3==',itemData)
this.$set(this.formData, 'stepTableFormData', itemData) this.$set(this.formData, 'stepTableFormData', itemData)
this.$message.success(`已从前序表单加载 ${itemData.length} 条细胞编号数据`) this.$message.success(`已从前序表单加载 ${itemData.length} 条细胞编号数据`)
@ -249,19 +261,14 @@ export default {
return content; return content;
}, },
getResource() { getResource() {
//使
const stepResource = this.$refs.stepRef.getStepResource()
const tableList = this.$refs.qcxjjyqkTableRef?.getFilledFormData()?.stepTableFormData || [] const tableList = this.$refs.qcxjjyqkTableRef?.getFilledFormData()?.stepTableFormData || []
// //
this.resourceTmp = stepResource.sjResource || []
const tableFromHyqk = tableList
this.resourceTmp = tableList
.filter(item => item.xybh) .filter(item => item.xybh)
.map(item => ({ .map(item => ({
bh: item.xybh, bh: item.xybh,
type: 'cell' type: 'cell'
})) }))
this.resourceTmp = [...this.resourceTmp, ...tableFromHyqk]
return this.resourceTmp; return this.resourceTmp;
}, },
// //

Loading…
Cancel
Save