Browse Source

fix:[模板管理]供试品002

ouqian
15881625488@163.com 1 month ago
parent
commit
c9910a1990
1 changed files with 29 additions and 83 deletions
  1. +29
    -83
      src/views/business/comps/template/comps/gsp/GSP002.vue

+ 29
- 83
src/views/business/comps/template/comps/gsp/GSP002.vue View File

@ -8,18 +8,18 @@
<div class="content"> <div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.gspsywzInfo" :columns="gspColumns" :dataSource="resourceGsp" v-if="sn!='GSP002'"/>
<TableList label="template.common.gspsywzInfo" :columns="gspColumns" :dataSource="resourceGsp"
v-if="sn != 'GSP002'" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" /> <TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel v-if="sn=='GSP002'" label="template.common.operationSteps" />
<LineLabel v-if="sn=='GSP006'" label="template.gsp.GSP002.cbybdpz" />
<LineLabel v-if="sn=='GSP008'" label="template.gsp.GSP002.zlkz" />
<LineLabel v-if="sn=='GSP012'" label="template.gsp.GSP002.cbywdx" />
<LineLabel v-if="sn=='GSP013'" label="template.gsp.GSP002.lmd" />
<LineLabel v-if="sn=='GSP014'" label="template.gsp.GSP002.clhwdx" />
<!-- 平行配制区域 -->
<LineLabel v-if="sn == 'GSP002'" label="template.common.operationSteps" />
<LineLabel v-if="sn == 'GSP006'" label="template.gsp.GSP002.cbybdpz" />
<LineLabel v-if="sn == 'GSP008'" label="template.gsp.GSP002.zlkz" />
<LineLabel v-if="sn == 'GSP012'" label="template.gsp.GSP002.cbywdx" />
<LineLabel v-if="sn == 'GSP013'" label="template.gsp.GSP002.lmd" />
<LineLabel v-if="sn == 'GSP014'" label="template.gsp.GSP002.clhwdx" />
<div :label="$t('template.common.pxpz')" <div :label="$t('template.common.pxpz')"
v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs" v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs"
:key="'paralle_' + paralleIndex"> :key="'paralle_' + paralleIndex">
@ -624,25 +624,7 @@ export default {
showParalleConfig: true showParalleConfig: true
}); });
}, },
//
handleAddLadder() {
//
if (!this.formData.ladderConfigs) {
this.$set(this.formData, 'ladderConfigs', []);
}
//
this.formData.ladderConfigs.push({
ladderStepData: [],
ladderTableFormData: [],
showLadderConfig: true
});
},
//
deleteLadderConfig(index) {
this.formData.ladderConfigs.splice(index, 1);
},
//
//
deleteParalleConfig(index) { deleteParalleConfig(index) {
this.formData.paralleConfigs.splice(index, 1); this.formData.paralleConfigs.splice(index, 1);
}, },
@ -661,11 +643,9 @@ export default {
tableRef[0].deleteRow(rowIndex); tableRef[0].deleteRow(rowIndex);
} }
}, },
// //
onHandleTableBlur(type, configIndex, e) { onHandleTableBlur(type, configIndex, e) {
const { colKey = "", item, rowIndex } = e; const { colKey = "", item, rowIndex } = e;
debugger
if (colKey === "targetStartSolutionConcentration" || colKey === "targetSolutionVolume" || colKey === "targetSolutionConcentration" || colKey === "targetStartSolutionVolumePrecision" || colKey === "targetDiluentVolumePrecision") { if (colKey === "targetStartSolutionConcentration" || colKey === "targetSolutionVolume" || colKey === "targetSolutionConcentration" || colKey === "targetStartSolutionVolumePrecision" || colKey === "targetDiluentVolumePrecision") {
if (type === "paralle") { if (type === "paralle") {
const volumne = item.targetStartSolutionConcentration || 0; const volumne = item.targetStartSolutionConcentration || 0;
@ -677,7 +657,15 @@ export default {
if (type === "paralle") { if (type === "paralle") {
const targetAcSolution = item.targetAcSolution || 0;// const targetAcSolution = item.targetAcSolution || 0;//
if (targetAcSolution) { if (targetAcSolution) {
const volResult = this.updateSjmbrynd(item, targetAcSolution);
const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0];
//
const formData = tableRef.getFilledFormData();
const headerSelectFields = formData.headerSelectFields;
const p = {
targetStartSolutionUnit: rowData.targetStartSolutionConcentrationPrecision,
headerSelectFields
}
const volResult = this.updateSjmbrynd(item, targetAcSolution,p);
if (!volResult) { if (!volResult) {
return return
} }
@ -696,14 +684,21 @@ export default {
callback.prevent('浓度单位与预制不符,请重新选择或申请废止并重新预制。'); callback.prevent('浓度单位与预制不符,请重新选择或申请废止并重新预制。');
} }
}, },
// table
// table
onTableRegentSubmit(type, configIndex, data) { onTableRegentSubmit(type, configIndex, data) {
const { selectInfo, rowIndex, key, rowData } = data; const { selectInfo, rowIndex, key, rowData } = data;
const { row, selectedId } = selectInfo; const { row, selectedId } = selectInfo;
if (key === "actStartSolutionCode") {// if (key === "actStartSolutionCode") {//
const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0]; const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0];
//
const formData = tableRef.getFilledFormData();
const headerSelectFields = formData.headerSelectFields;
const p = {
targetStartSolutionUnit: rowData.targetStartSolutionConcentrationPrecision,
headerSelectFields
}
if (tableRef) { if (tableRef) {
const volResult = this.updateSjmbrynd(rowData, row.nd);
const volResult = this.updateSjmbrynd(rowData, row.nd, p);
//code //code
tableRef.updateDataSourceByRowIndex(rowIndex, { tableRef.updateDataSourceByRowIndex(rowIndex, {
actStartSolutionCode: selectedId, actStartSolutionCode: selectedId,
@ -719,54 +714,6 @@ export default {
} }
} }
}, },
//
onRegentSubmit(type, rowIndex, data) {
const { selectInfo, key } = data;
const { row } = selectInfo;
if (key) {
debugger
const packageRef = this.$refs[`paralleStepFormPackageRef_${rowIndex}`][0];
if (key === "subStartSolution") {
packageRef.updateFormData("targetAcSolution", row.nd);
packageRef.onValueChangeCompareTo("targetAcSolution", row.nd, "targetStartSolution");
this.updateTableNd(row, rowIndex);
}
}
},
updateRecord() {
this.$nextTick(() => {
EventBus.$emit('onModifyRecord', {
type: "fieldChanged",
newRecord: null,
resourceList: null,
},)
})
},
//table
updateTableNd(row, rowIndex) {
const { stepTableFormData = [] } = this.$refs[`ladderStepTableRef_${rowIndex}`][0].getFilledFormData();
const newData = JSON.parse(JSON.stringify(stepTableFormData));
//
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[i - 1].actSolutionConcentration;
}
const volResult = this.updateSjmbrynd(item, initNd);
if (!volResult) {
return
}
item.actSolutionVolume = volResult.actVol;
item.actSolutionConcentration = volResult.actNd;
// stepTableRef
})
this.$refs[`ladderStepTableRef_${rowIndex}`][0].updateDataSource(newData);
},
// //
async validFields() { async validFields() {
// //
@ -792,7 +739,6 @@ export default {
const paralleFormData = this.$refs[`paralleStepFormPackageRef_${i}`][0].getFilledFormData(); const paralleFormData = this.$refs[`paralleStepFormPackageRef_${i}`][0].getFilledFormData();
const paralleTableFormData = this.$refs[`paralleStepTableRef_${i}`][0].getFilledFormData(); const paralleTableFormData = this.$refs[`paralleStepTableRef_${i}`][0].getFilledFormData();
const paralleStepData = this.$refs[`paralleStepRef_${i}`][0].getFilledFormData(); const paralleStepData = this.$refs[`paralleStepRef_${i}`][0].getFilledFormData();
paralleConfigsData.push({ paralleConfigsData.push({
...paralleFormData, ...paralleFormData,
...paralleTableFormData, ...paralleTableFormData,
@ -838,7 +784,7 @@ export default {
//resource //resource
let tmpResource = [] let tmpResource = []
if (this.fillType === "actFill") { if (this.fillType === "actFill") {
//
//
if (content.paralleConfigs && content.paralleConfigs.length > 0) { if (content.paralleConfigs && content.paralleConfigs.length > 0) {
for (let i = 0; i < content.paralleConfigs.length; i++) { for (let i = 0; i < content.paralleConfigs.length; i++) {
let paralleConfigs = content.paralleConfigs[i] let paralleConfigs = content.paralleConfigs[i]

Loading…
Cancel
Save