From 23d870c57d2d0cac94883bb40fa878a97f5d123d Mon Sep 17 00:00:00 2001
From: "15881625488@163.com" <15881625488@163.com>
Date: Thu, 29 Jan 2026 14:53:23 +0800
Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A[=E6=A8=A1=E6=9D=BF=E7=AE=A1?=
=?UTF-8?q?=E7=90=86]sp001,sp002?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../business/comps/template/comps/gsp/MJYLQSQD.vue | 8 ++-
.../comps/template/comps/gsp/SYWZPZJHB.vue | 18 +----
.../comps/template/comps/sp/SWYPFXCBYPZB.vue | 78 ++++++++++----------
.../comps/template/comps/sp/SWYPFXRYPZB.vue | 84 +++++++++++-----------
4 files changed, 91 insertions(+), 97 deletions(-)
diff --git a/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue b/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue
index e44a615..9c376e3 100644
--- a/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue
+++ b/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue
@@ -215,6 +215,7 @@ export default {
mounted() {
},
methods: {
+ //初始化sywzmc,gyjl,gynd
init(val) {
if (val.key == 'sywzmc') {
this.filterGyjl(val, false)
@@ -223,6 +224,7 @@ export default {
this.filterGynd(val, false)
}
},
+ //sywzmc,gyjl选择回调
onSelectBlur(val) {
if (val.key == 'sywzmc' && ((!this.formData.sywzmc||this.formData.sywzmc=='') || val.type == 'save')) {
this.filterGyjl(val, true)
@@ -231,6 +233,7 @@ export default {
this.filterGynd(val, true)
}
},
+ //gyjl选项
filterGyjl(val, reset) {
let that = this
let tmp = []
@@ -257,6 +260,7 @@ export default {
// }, 10)
}
},
+ //gynd选项
filterGynd(val, reset) {
let tmp = []
_.forEach(_.filter(this.gyndOptionsOld, function (o) {
@@ -308,6 +312,7 @@ export default {
}
})
},
+ //试验编号或部门名称点击事件回调
onDialogSubmit(selectedId, currentRow) {
console.log(JSON.stringify(currentRow))
//试验
@@ -332,7 +337,7 @@ export default {
}
this.$refs.selectReagentDialogRef.onCancel()
},
- // 试验编号或部门名称点击事件
+ //试验编号或部门名称点击事件
onClickSybh() {
this.$refs.selectReagentDialogRef.show(this.formData.id)
// this.$refs.baseInfoRef.setClickable("syNo", true);
@@ -345,6 +350,7 @@ export default {
content.sdId = this.formData.sdId
return content;
},
+ //获取填写完成的表单数据
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "remarkRef"]);
content.syId = this.formData.syId
diff --git a/src/views/business/comps/template/comps/gsp/SYWZPZJHB.vue b/src/views/business/comps/template/comps/gsp/SYWZPZJHB.vue
index a283335..7b1fff9 100644
--- a/src/views/business/comps/template/comps/gsp/SYWZPZJHB.vue
+++ b/src/views/business/comps/template/comps/gsp/SYWZPZJHB.vue
@@ -15,7 +15,7 @@
-
+
@@ -62,7 +62,6 @@ export default {
},
},
computed: {
-
// 备注表单配置
remarkConig() {
return [
@@ -177,7 +176,6 @@ export default {
currentSubKey: "",//当前点击的子项key
dataSource: [],
stepTableDataSource: [],
-
};
},
mounted() {
@@ -188,21 +186,9 @@ export default {
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef","stepFormPackageRef", "remarkRef","stepTableRef"])
},
+ //获取填写完成的表单数据
async getFormData() {
return await this.validFormFields(["baseInfoRef", "stepFormPackageRef","stepTableRef","remarkRef"]);
- },
- async onSave() {
- const formData = await this.getFormData();
- // const formData = await this.$refs.stepTableRef.getFormData();
- console.log(formData, "formData")
- },
- // 添加行
- addRow() {
- this.$refs.stepTableRef.addRow({
- startSolutionCode: "",
- preparationConcentration: "",
- preparationVolume: "",
- })
}
}
};
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXCBYPZB.vue b/src/views/business/comps/template/comps/sp/SWYPFXCBYPZB.vue
index b3443af..42ea0b8 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXCBYPZB.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXCBYPZB.vue
@@ -6,27 +6,26 @@
$t('template.sp.sp002.title') }}
-
-
-
-
+
+
+
-
+ 标签打印
+
-
-
+
-
@@ -38,6 +37,7 @@ import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
+import { EventBus } from "@/utils/eventBus";
export default {
name: "SWYPFXCBYPZB",
@@ -50,6 +50,7 @@ export default {
},
},
computed: {
+ // 配置条件
storageFormConfig() {
return [
{
@@ -67,6 +68,7 @@ export default {
}
];
},
+ // 备注表单配置
remarkConig() {
return [
{
@@ -85,7 +87,7 @@ export default {
}
]
},
-
+ // 试验基本信息表单配置
baseInfoFormConfig() {
return [
{
@@ -111,7 +113,7 @@ export default {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
- prepend:"V",
+ prepend: "V",
maxlength: 50
},
@@ -155,6 +157,7 @@ export default {
}
]
},
+ // 操作步骤表单配置
stepFormConfig() {
return [
{
@@ -182,7 +185,7 @@ export default {
fillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
- selectTo:"targetActConcentrationUnit",//下拉选择后,赋值到对应字段
+ selectTo: "targetActConcentrationUnit",//下拉选择后,赋值到对应字段
},
targetActConcentration: {
label: 'template.common.targetActConcentration',
@@ -204,7 +207,7 @@ export default {
subOptions: this.getDictOptions('business_tjdw'),
fillType: "preFill",
maxlength: 10,
- selectTo:"targetActVolumeUnit",//下拉选择后,赋值到对应字段
+ selectTo: "targetActVolumeUnit",//下拉选择后,赋值到对应字段
},
targetActVolume: {
label: 'template.common.targetActVolume',
@@ -250,35 +253,45 @@ export default {
formData: {
immediate: true,
handler(v) {
- if(!v.targetCodeSn && this.fillType === "actFill"){
+ if (!v.targetCodeSn && this.fillType === "actFill") {
this.getCode();
}
}
}
},
methods: {
+ //打印标签
+ printTag() {
+ const printConfig = this.getBasePrintConfig();
+ const { storageCondition, targetCodeSn } = this.formData;
+ printConfig["存储条件"] = storageCondition;
+ printConfig["编号"] = targetCodeSn;
+
+ EventBus.$emit('showTagPrintDialog', { printConfig })
+ },
//获取目标溶液编号
- async getCode(){
+ async getCode() {
const result = await getLatestSn({
count: 1,
})
- if(result.code == 200){
- this.$refs.stepFormPackageRef.updateFormData("targetCodeSn",result.data[0])
+ if (result.code == 200) {
+ this.$refs.stepFormPackageRef.updateFormData("targetCodeSn", result.data[0])
}
},
//获取已填写的表单数据
- getFilledFormData(){
+ getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
},
+ //获取填写完成的表单数据
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]);
//生成resource
let tmpResource = []
- if(this.fillType === "actFill"){
+ if (this.fillType === "actFill") {
//配置的试剂
tmpResource.push({
mc: content.targetName,
- bh: content.targetCode+content.targetCodeSn,
+ bh: content.targetCode + content.targetCodeSn,
ph: '',
nd: content.targetActConcentration + content.targetActConcentrationUnit,
source: 'ELN配制',
@@ -288,22 +301,15 @@ export default {
kc: content.targetActVolume,
kcdw: content.targetActVolumeUnit,
syl: null,
- syldw:content.targetActVolumeUnit,
- yxzq:content.effectivePeriod,
- yxzqdw:content.effectivePeriodUnit,
+ syldw: content.targetActVolumeUnit,
+ yxzq: content.effectivePeriod,
+ yxzqdw: content.effectivePeriodUnit,
})
}
//使用的试剂
- this.resourceTmp=tmpResource
-
+ this.resourceTmp = tmpResource
return content;
- },
- async onSave() {
- const formData = await this.getFilledFormData();
-
- console.log(formData, "formData")
- },
-
+ }
}
};
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue b/src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue
index ef60758..46edb2a 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue
@@ -3,32 +3,29 @@

{{ formData.bdmc ||
- $t('template.sp.sp001.title') }}

+ $t('template.sp.sp001.title') }}

-
-
-
-
+
+
+
-
- 标签打印
-
+ 标签打印
+
-
-
+
-
@@ -41,6 +38,7 @@ import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
import { EventBus } from "@/utils/eventBus";
+
export default {
name: "Sp001",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable },
@@ -52,6 +50,7 @@ export default {
},
},
computed: {
+ // 配置条件
storageFormConfig() {
return [
{
@@ -64,11 +63,11 @@ export default {
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
-
}
}
];
},
+ // 备注表单配置
remarkConig() {
return [
{
@@ -87,7 +86,7 @@ export default {
}
]
},
-
+ // 试验基本信息表单配置
baseInfoFormConfig() {
return [
{
@@ -113,7 +112,7 @@ export default {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
- prepend:"V",
+ prepend: "V",
maxlength: 50
},
@@ -158,6 +157,7 @@ export default {
}
]
},
+ // 操作步骤表单配置
stepFormConfig() {
return [
{
@@ -185,7 +185,7 @@ export default {
fillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
- selectTo:"targetActConcentrationUnit",//下拉选择后,赋值到对应字段
+ selectTo: "targetActConcentrationUnit",//下拉选择后,赋值到对应字段
},
targetActConcentration: {
label: 'template.common.targetActConcentration',
@@ -207,7 +207,7 @@ export default {
subOptions: this.getDictOptions('business_tjdw'),
fillType: "preFill",
maxlength: 10,
- selectTo:"targetActVolumeUnit",//下拉选择后,赋值到对应字段
+ selectTo: "targetActVolumeUnit",//下拉选择后,赋值到对应字段
},
targetActVolume: {
label: 'template.common.targetActVolume',
@@ -251,43 +251,45 @@ export default {
formData: {
immediate: true,
handler(v) {
- if(!v.targetCodeSn && this.fillType === "actFill"){
+ if (!v.targetCodeSn && this.fillType === "actFill") {
this.getCode();
}
}
}
},
methods: {
- printTag(){
+ //打印标签
+ printTag() {
const printConfig = this.getBasePrintConfig();
- const {storageCondition,targetCodeSn} = this.formData;
+ const { storageCondition, targetCodeSn } = this.formData;
printConfig["存储条件"] = storageCondition;
- printConfig["编号"] = targetCodeSn;
+ printConfig["编号"] = targetCodeSn;
- EventBus.$emit('showTagPrintDialog', {printConfig})
+ EventBus.$emit('showTagPrintDialog', { printConfig })
},
//获取目标溶液编号
- async getCode(){
+ async getCode() {
const result = await getLatestSn({
count: 1,
})
- if(result.code == 200){
- this.$refs.stepFormPackageRef.updateFormData("targetCodeSn",result.data[0])
+ if (result.code == 200) {
+ this.$refs.stepFormPackageRef.updateFormData("targetCodeSn", result.data[0])
}
},
//获取已填写的表单数据
- getFilledFormData(){
+ getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
},
+ //获取填写完成的表单数据
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]);
//生成resource
let tmpResource = []
- if(this.fillType === "actFill"){
+ if (this.fillType === "actFill") {
//配置的试剂
tmpResource.push({
mc: content.targetName,
- bh: content.targetCode+content.targetCodeSn,
+ bh: content.targetCode + content.targetCodeSn,
ph: '',
nd: content.targetActConcentration + content.targetActConcentrationUnit,
source: 'ELN配制',
@@ -297,22 +299,15 @@ export default {
kc: content.targetActVolume,
kcdw: content.targetActVolumeUnit,
syl: null,
- syldw:content.targetActVolumeUnit,
- yxzq:content.effectivePeriod,
- yxzqdw:content.effectivePeriodUnit,
+ syldw: content.targetActVolumeUnit,
+ yxzq: content.effectivePeriod,
+ yxzqdw: content.effectivePeriodUnit,
})
}
//使用的试剂
- this.resourceTmp=tmpResource
-
+ this.resourceTmp = tmpResource
return content;
},
- async onSave() {
- const formData = await this.validFormFields(["stepRef"]);
-
- console.log(formData, "formData")
- },
-
}
};
@@ -320,7 +315,8 @@ export default {
.mt-20 {
margin-top: 20px;
}
-.print-btn{
+
+.print-btn {
margin-bottom: 20px;
}
\ No newline at end of file