diff --git a/src/views/business/comps/template/TemplateTable.vue b/src/views/business/comps/template/TemplateTable.vue
index 21c5e83..a10c221 100644
--- a/src/views/business/comps/template/TemplateTable.vue
+++ b/src/views/business/comps/template/TemplateTable.vue
@@ -28,17 +28,8 @@ import SP003 from "./comps/sp/SP003.vue";
import SP00456 from "./comps/sp/SP00456.vue";
import SP007 from "./comps/sp/SP007.vue";
//色谱生物样品分析方法学样品制备表-10个类似
-import SP008 from "./comps/sp/SWYPFXFFXYPZBB/SP008.vue";
-import SP009 from "./comps/sp/SWYPFXFFXYPZBB/SP009.vue";
-import SP010 from "./comps/sp/SWYPFXFFXYPZBB/SP010.vue";
-import SP011 from "./comps/sp/SWYPFXFFXYPZBB/SP011.vue";
-import SP012 from "./comps/sp/SWYPFXFFXYPZBB/SP012.vue";
-import SP013 from "./comps/sp/SWYPFXFFXYPZBB/SP013.vue";
-import SP014 from "./comps/sp/SWYPFXFFXYPZBB/SP014.vue";
-import SP015 from "./comps/sp/SWYPFXFFXYPZBB/SP015.vue";
-import SP016 from "./comps/sp/SWYPFXFFXYPZBB/SP016.vue";
-import SP017 from "./comps/sp/SWYPFXFFXYPZBB/SP017.vue";
-import SP018 from "./comps/sp/SWYPFXFFXYPZBB/SP018.vue";
+import SP008 from "./comps/sp/SP008.vue";
+import SP009 from "./comps/sp/SP009.vue";
import Demo from "./comps/sp/Demo.vue";
//供试品
import GSP002 from "./comps/gsp/GSP002.vue";
@@ -85,7 +76,7 @@ export default {
//供试品
GSP002, GSP003, GSP004,GSP009, GSP010,
//色谱
- SP001, SP003, SP00456,SP007, SP008, SP009, SP010, SP011, SP012, SP013, SP014, SP015, SP016, SP017, SP018,
+ SP001, SP003, SP00456,SP007, SP008, SP009,
// PCR
PCR002,
//LBA
@@ -127,15 +118,15 @@ export default {
'SP007': 'SP007',
'SP008': 'SP008',
'SP009': 'SP009',
- 'SP010': 'SP010',
- 'SP011': 'SP011',
- 'SP012': 'SP012',
- 'SP013': 'SP013',
- 'SP014': 'SP014',
- 'SP015': 'SP015',
- 'SP016': 'SP016',
- 'SP017': 'SP017',
- 'SP018': 'SP018',
+ 'SP010': 'SP008',
+ 'SP011': 'SP008',
+ 'SP012': 'SP008',
+ 'SP013': 'SP008',
+ 'SP014': 'SP008',
+ 'SP015': 'SP008',
+ 'SP016': 'SP008',
+ 'SP017': 'SP008',
+ 'SP018': 'SP008',
//供试品
'GSP001': 'DMYPPZJLB',
diff --git a/src/views/business/comps/template/comps/gsp/GSP009.vue b/src/views/business/comps/template/comps/gsp/GSP009.vue
index 1a7578d..4e367a6 100644
--- a/src/views/business/comps/template/comps/gsp/GSP009.vue
+++ b/src/views/business/comps/template/comps/gsp/GSP009.vue
@@ -29,6 +29,9 @@
{{ $t('template.lba.lba004.sc')}}
handleClickable('paralle', paralleIndex, e)"
+ @beforeReagentSubmit="(data) => onTableBeforeReagentSubmit(data, paralleIndex, paralleConfig)"
+ @onRegentSubmit="(data) => onTableRegentSubmit('paralle', paralleIndex, data)"
+
:ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig"
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex"
:fieldItemLabel="$t('template.lba.lba004.xszj')" />
@@ -163,7 +166,7 @@ export default {
},
xz: {
label: 'template.gsp.gsp009.xz',
- type: "sj",
+ type: "mix",
fillType: "actFill",
subType:"text",
subText:this.sn=='GSP009'?'template.gsp.gsp009.zw':'template.gsp.gsp011.zw'
@@ -180,8 +183,30 @@ export default {
},
mounted() {
this.handleAddParalle(true);
+ const formData = this.getFormDataByTemplateData();
+ if(this.fillType === "actFill"){
+ this.getCode(formData);
+ }
},
methods: {
+ //获取目标溶液编号
+ async getCode(content){
+ if (content.paralleConfigs && content.paralleConfigs.length > 0 && !content.paralleConfigs[0].ypBh) {
+ const codes = content.paralleConfigs.map((item) => ({ pre: item.yp, type: 1 }));
+ const snList = await this.getLatestSnArr(codes);
+ content.paralleConfigs.forEach((row, idx) => {
+ this.$refs[`paralleStepFormPackageRef_${idx}`][0].updateFormData('ypBh',snList[idx])
+ });
+ const params = {
+ type: "fieldChanged",
+ newRecord: null,
+ resourceList: null,
+ }
+ setTimeout(() => {
+ EventBus.$emit('onModifyRecord', params,)
+ }, 10);
+ }
+ },
//获取已填写的表单数据
getFilledFormData() {
const baseData = this.$refs.baseInfoRef.getFilledFormData();
@@ -230,8 +255,45 @@ export default {
},
getResource() {
let content = this.getFilledFormData();
+ //生成resource
+ let tmpResource = []
+ if (this.fillType === "actFill") {
+ //平行配置
+ if (content.paralleConfigs && content.paralleConfigs.length > 0) {
+ for (let i = 0; i < content.paralleConfigs.length; i++) {
+ let paralleConfigs = content.paralleConfigs[i]
+ //使用量
+ tmpResource.push({
+ mc: null,
+ bh: paralleConfigs.xz,
+ ph: null,
+ nd: null,
+ nddw: null,
+ ndz: null,
+ ly: null,
+ sxrq: null,
+ kc: null,
+ kcdw: null,
+ type: 1,
+ syl: null,
+ syldw: null,
+ yxzq: null,
+ yxzqdw: null,
+ })
+ }
+ }
+ }
+ if (tmpResource.length > 0) {
+ tmpResource = uniqeResourceOne(tmpResource)
+ }
+ tmpResource.forEach((row, idx) => {
+ row.syldw = null
+ row.syl = null
+ });
+
+ debugger
//使用的试剂、仪器
- this.resourceTmp = []
+ this.resourceTmp = tmpResource
this.yqResourceTmp = []
return this.resourceTmp;
},
@@ -242,7 +304,6 @@ export default {
},
//新增平行配制
handleAddParalle(init) {
- debugger
let isAdd = !init
if(init && (!this.formData.paralleConfigs || this.formData.paralleConfigs.length===0)){
isAdd = true
@@ -258,7 +319,6 @@ export default {
});
}
//todo: 需要回调保存?
- debugger
},
// 删除平行配制配置
deleteParalleConfig(index) {
@@ -268,21 +328,12 @@ export default {
}
this.formData.paralleConfigs.splice(index, 1);
},
- // 删除表格行
- deleteRow(rowIndex, type, configIndex = 0) {
- // 根据类型删除对应的表格行
- if (type === 'ladder') {
- const tableRef = this.$refs[`ladderStepTableRef_${configIndex}`];
- if (tableRef) {
- tableRef.deleteRow(rowIndex);
- }
- } else if (type === 'paralle') {
- const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`];
- if (tableRef) {
- tableRef[0].deleteRow(rowIndex);
- }
- }
+ onTableBeforeReagentSubmit(val1,va2,va3){
+ debugger
},
+ onTableRegentSubmit(val1,va2,va3){
+ debugger
+ }
}
};
diff --git a/src/views/business/comps/template/comps/lba/LBA006.vue b/src/views/business/comps/template/comps/lba/LBA006.vue
index 0537695..6bd877b 100644
--- a/src/views/business/comps/template/comps/lba/LBA006.vue
+++ b/src/views/business/comps/template/comps/lba/LBA006.vue
@@ -183,7 +183,9 @@ export default {
};
},
mounted() {
- this.handleAddParalle(true);
+ setTimeout(()=>{
+ this.handleAddParalle(true);
+ },300)
},
methods: {
//获取已填写的表单数据
@@ -246,7 +248,6 @@ export default {
},
//新增平行配制
handleAddParalle(init) {
- debugger
let isAdd = !init
if(init && (!this.formData.paralleConfigs || this.formData.paralleConfigs.length===0)){
isAdd = true
@@ -261,7 +262,6 @@ export default {
showParalleConfig: true
});
}
- debugger
},
// 删除平行配制配置
deleteParalleConfig(index) {
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP008.vue b/src/views/business/comps/template/comps/sp/SP008.vue
similarity index 84%
rename from src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP008.vue
rename to src/views/business/comps/template/comps/sp/SP008.vue
index 1534d70..4c1c256 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP008.vue
+++ b/src/views/business/comps/template/comps/sp/SP008.vue
@@ -15,7 +15,7 @@
:formConfig="storageFormConfig" :formData="formData" />