-

{{formData.templateMc || "生物样品标曲工作液制备表"}}

+

{{ formData.templateMc ||
+ "生物样品标曲工作液制备表" }}

-
+
@@ -46,11 +46,11 @@ import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue";
-import {EventBus} from "@/utils/eventBus";
+import { EventBus } from "@/utils/eventBus";
export default {
name: "SWYPBQGZYZBB",
- components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion },
+ components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion },
mixins: [templateMixin],
props: {
fillType: {
@@ -62,7 +62,7 @@ export default {
fillType: {
immediate: true,
handler(v) {
- if(v &&this.fillType === "actFill"){
+ if (v && this.fillType === "actFill") {
this.handleUpdateCode();
}
}
@@ -132,7 +132,7 @@ export default {
label: "版本号",
type: "inputNumber",
fillType: "actFill",
- prepend:"V",
+ prepend: "V",
maxlength: 50,
},
@@ -268,10 +268,11 @@ export default {
bodySubType: "span",
bodySubKey: "subTargetSolutionCode",
bodyFillType: "preFill",
- width: 280
+ width: 280,
+ myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],
},
{
- label: "起始溶液编号",
+ label: "起始溶液编号",
prop: "startSolutionCode",
width: 280,
bodyType: "input",
@@ -279,7 +280,7 @@ export default {
bodyMaxlength: 10,
},
{
- label: "预设起始溶液体积",
+ label: "预设起始溶液体积",
prop: "targetStartSolutionVolume",
width: 280,
headerSelectKey: "targetStartSolutionVolumeUnit",
@@ -297,7 +298,7 @@ export default {
bodySubPlaceholder: "请输入保留小数位数",
},
{
- label: "实际起始溶液体积",
+ label: "实际起始溶液体积",
prop: "actStartSolutionVolume",
width: 280,
headerSelectKey: "actStartSolutionVolumeUnit",
@@ -310,7 +311,7 @@ export default {
copyFrom: "targetStartSolutionVolume",//复制哪个字段
},
{
- label: "预设稀释液体积",
+ label: "预设稀释液体积",
prop: "targetDiluentVolume",
width: 280,
headerSelectKey: "targetDiluentVolumeUnit",
@@ -328,7 +329,7 @@ export default {
bodySubPlaceholder: "请输入保留小数位数",
},
{
- label: "实际稀释液体积",
+ label: "实际稀释液体积",
prop: "actDiluentVolume",
width: 280,
headerSelectKey: "actDiluentVolumeUnit",
@@ -341,7 +342,7 @@ export default {
copyFrom: "targetDiluentVolume",//复制哪个字段
},
{
- label: "预设目标溶液浓度",
+ label: "预设目标溶液浓度",
prop: "targetSolutionConcentration",
width: 280,
headerSelectKey: "targetSolutionConcentrationUnit",
@@ -352,7 +353,7 @@ export default {
bodyMaxlength: 10,
},
{
- label: "实际目标溶液浓度",
+ label: "实际目标溶液浓度",
prop: "actSolutionConcentration",
width: 280,
headerSelectKey: "actSolutionConcentrationUnit",
@@ -369,8 +370,8 @@ export default {
bodyMaxlength: 10,
bodySubPlaceholder: "请输入保留小数位数",
},
- {
- label: "预设目标溶液体积",
+ {
+ label: "预设目标溶液体积",
prop: "targetSolutionVolume",
width: 280,
headerSelectKey: "targetSolutionVolumeUnit",
@@ -381,7 +382,7 @@ export default {
bodyMaxlength: 10,
},
{
- label: "实际目标溶液体积",
+ label: "实际目标溶液体积",
prop: "actSolutionVolume",
width: 280,
headerSelectKey: "actSolutionVolumeUnit",
@@ -413,46 +414,46 @@ export default {
methods: {
//更新代码
async handleUpdateCode() {
- const {stepTableFormData = []} = this.formData;
- if(stepTableFormData.length === 0){
+ const { stepTableFormData = [] } = this.formData;
+ if (stepTableFormData.length === 0) {
return;
}
- const hasAnyWithValue = stepTableFormData.some(row =>
- row.subTargetSolutionCode && row.subTargetSolutionCode.trim() !== '');
- if(hasAnyWithValue){
+ const hasAnyWithValue = stepTableFormData.some(row =>
+ row.subTargetSolutionCode && row.subTargetSolutionCode.trim() !== '');
+ if (hasAnyWithValue) {
return;
}
const snList = await this.getLatestSn(stepTableFormData.length);
- stepTableFormData.forEach((item,index) => {
- this.$refs.stepTableRef.updateDataSourceByRowIndex(index,{subTargetSolutionCode: stepTableFormData.length==1?snList:snList[index]});
+ stepTableFormData.forEach((item, index) => {
+ this.$refs.stepTableRef.updateDataSourceByRowIndex(index, { subTargetSolutionCode: stepTableFormData.length == 1 ? snList : snList[index] });
})
this.$nextTick(() => {
//通知后端保存数据
const params = {
- type: "fieldChanged",
- newRecord: null,
- resourceList: null,
- }
+ type: "fieldChanged",
+ newRecord: null,
+ resourceList: null,
+ }
EventBus.$emit('onModifyRecord', params,)
})
},
//获取已填写的表单数据
- getFilledFormData(){
- return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef","stepTableRef"])
+ getFilledFormData() {
+ return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef", "stepTableRef"])
},
handleClickable(item) {
- if(this.fillType === "preFill"){
+ if (this.fillType === "preFill") {
return;
}
- const {subKey = ""} = item;
- if(subKey === "subStartSolution" || subKey === "subSolution"){//起始源溶液点击事件
+ const { subKey = "" } = item;
+ if (subKey === "subStartSolution" || subKey === "subSolution") {//起始源溶液点击事件
this.$refs.selectReagentDialogRef.show()
this.currentSubKey = subKey;
}
},
//选择试剂提交事件
- onSelectReagentSubmit(code,row){
- if(this.currentSubKey === "subStartSolution"){//起始源溶液点击事件
+ onSelectReagentSubmit(code, row) {
+ if (this.currentSubKey === "subStartSolution") {//起始源溶液点击事件
this.$refs.stepFormPackageRef.updateFormData("targetAcSolution", row.nd);
this.updateStepTableData(row);
}
@@ -460,12 +461,12 @@ export default {
this.$refs.selectReagentDialogRef.onCancel()
},
//更新table数据
- updateStepTableData(row){
- const {stepTableFormData = []} = this.formData;
-
+ updateStepTableData(row) {
+ const { stepTableFormData = [] } = this.formData;
+
// 创建新的表格数据副本
const newStepTableData = JSON.parse(JSON.stringify(stepTableFormData));
-
+
// 遍历数据,按要求更新起始溶液编号
for (let i = 0; i < newStepTableData.length; i++) {
if (i === 0) {
@@ -477,16 +478,16 @@ export default {
newStepTableData[i].startSolutionCode = newStepTableData[i - 1].targetSolutionCode;
}
}
-
+
// 更新stepTableRef组件的数据
this.$refs.stepTableRef.updateDataSource(newStepTableData);
},
async getFormData() {
- return await this.validFormFields(["baseInfoRef", "storageConditionRef","stepFormPackageRef","stepTableRef","stepRef","remarkRef"]);
+ return await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]);
},
async onSave() {
// const formData = await this.getFormData();
- const formData = await this.validFormFields(["baseInfoRef", "storageConditionRef","stepFormPackageRef","stepTableRef","stepRef","remarkRef"]);
+ const formData = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]);
console.log(formData, "formData")
}
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue
index f9154ec..e02cbe3 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue
@@ -28,11 +28,12 @@
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
-
+
deleteRow(rowIndex)"
>
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue
index f6962bc..a0f211d 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue
@@ -28,11 +28,12 @@
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
-
+
deleteRow(rowIndex)"
>
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue
index db0ddea..2672ec3 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue
@@ -26,11 +26,12 @@
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
-
+
deleteRow(rowIndex)"
>
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue
index c8cc6db..a1904c1 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue
@@ -28,11 +28,12 @@
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
-
+
deleteRow(rowIndex)"
>
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue
index 962866d..fba3b8f 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue
@@ -28,11 +28,12 @@
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
-
+
deleteRow(rowIndex)"
>
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue
index 18c3d2d..f4e3a24 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue
@@ -23,8 +23,8 @@
-
-
+ deleteRow(rowIndex)">
@@ -38,8 +38,8 @@
-
-
+ deleteRow(rowIndex)">
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue
index 5350236..bf0c952 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue
@@ -28,11 +28,12 @@
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
-
+
deleteRow(rowIndex)"
>
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue
index 0cac362..1a9169b 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue
@@ -28,11 +28,12 @@
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
-
+
deleteRow(rowIndex)"
>
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue
index b51085d..396a0f8 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue
@@ -28,11 +28,12 @@
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
-
+
deleteRow(rowIndex)"
>
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue
index 6e9b1c4..549d085 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue
@@ -28,11 +28,12 @@
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
-
+
deleteRow(rowIndex)"
>
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXZKPZB.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXZKPZB.vue
index b5b0607..a1da2ec 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXZKPZB.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXZKPZB.vue
@@ -28,11 +28,12 @@
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
-
+
deleteRow(rowIndex)"
>
diff --git a/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue b/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue
index 0e83fa6..c86be93 100644
--- a/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue
@@ -34,8 +34,8 @@
onHandleTableBlur('ladder', ladderIndex,e)" :ref="`ladderStepTableRef_${ladderIndex}`"
:columns="ladderStepColumns" :formData="ladderConfig" :prefixKey="'ladder_' + ladderIndex"
fieldItemLabel="阶梯配制">
-
-
+ deleteRow(rowIndex, 'ladder', ladderIndex)">
@@ -65,8 +65,8 @@
:columns="paralleStepColumns" :formData="paralleConfig"
@clickable="(col,rowIndex) => handleTableClickable('paralle', paralleIndex, col,rowIndex)"
:prefixKey="'paralle' + paralleIndex" fieldItemLabel="平行配制">
-
-
+ deleteRow(rowIndex, 'paralle', paralleIndex)">