Browse Source

fix:[模板管理]色谱第二个模板

lkf
15881625488@163.com 3 months ago
parent
commit
58d008d526
4 changed files with 130 additions and 67 deletions
  1. +124
    -61
      src/views/business/comps/template/comps/sp/SWYPFXCBYPZB.vue
  2. +0
    -1
      src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue
  3. +1
    -0
      src/views/business/study/comp/tbbd/Fh.vue
  4. +5
    -5
      src/views/business/study/comp/tbbd/Xq.vue

+ 124
- 61
src/views/business/comps/template/comps/sp/SWYPFXCBYPZB.vue View File

@ -1,29 +1,32 @@
<!-- 生物样品分析储备液配制表 -->
<!-- 生物样品分析液配制表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{formData.templateMc || "生物样品分析储备液配制表"}}<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.templateMc ||
$t('template.common.pageTitle') }}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPcakge label="试验基本信息" ref="baseInfoRef" :formConfig="baseInfoFormConfig"
:formData="formData" />
<TableList label="试验试剂信息" :columns="sysjColumns" :dataSource="resource" />
<TableList label="仪器使用信息" :columns="yqsColumns" :dataSource="resource" />
<BaseInfoFormPcakge label="存储条件" ref="storageConditionRef" :formConfig="storageFormConfig"
:formData="formData" />
<LineLabel label="操作步骤" />
<BaseInfoFormPcakge fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" ref="baseInfoRef"
:formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns"
:dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqsColumns"
:dataSource="resource" />
<BaseInfoFormPcakge fieldItemLabel="template.common.storageCondition" label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPcakge ref="stepFormPackageRef" :formConfig="stepFormConfig"
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
</div>
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPcakge label="备注" ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
<BaseInfoFormPcakge fieldItemLabel="template.common.remark" label="template.common.remark" ref="remarkRef" :formConfig="remarkConig"
:formData="formData" />
</div>
</div>
<!-- <button @click = "onSave">保存</button> -->
</div>
<!-- <button @click = "onSave">保存</button> -->
</div>
</template>
@ -33,11 +36,12 @@ import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
export default {
name: "SWYPFXRYPZB",
components: { BaseInfoFormPcakge, LineLabel, TableList, Step },
name: "SWYPFXCBYPZB",
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable },
mixins: [templateMixin],
props: {
fillType: {
@ -52,10 +56,10 @@ export default {
type: "conditionItem",
config: {
storageCondition: {
label: "存储条件",
label: 'template.common.storageConditionLabel',
type: "select",
fillType: "preFill",
options: this.getDictOptions('business_cctj'),
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
@ -73,7 +77,7 @@ export default {
type: "textarea",
fillType: "actFill",
span: 1,
placeholder: "请输入备注",
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
@ -81,40 +85,43 @@ export default {
}
]
},
baseInfoFormConfig() {
return [
{
type: "cardItem",
config: {
studyMc: {
label: "试验名称",
label: 'template.common.testName',
type: "input",
disabled: true,
},
studySn: {
label: "试验编号",
label: 'template.common.testNumber',
type: "input",
disabled: true,
},
methodCode: {
label: "方法编号",
label: 'template.common.methodCode',
type: "input",
fillType: "preFill",
maxlength: 50
},
versionNum: {
label: "版本号",
label: 'template.common.versionNumber',
type: "input",
fillType: "actFill"
fillType: "actFill",
maxlength: 50
},
}
},
{
type: "conditionItem",
label: "试验配制条件",
label: 'template.common.testConfigurationConditions',
config: {
pre: {
label: "预填",
label: 'template.common.preFill',
type: "select",
multiple: true,
fillType: "preFill",
@ -122,25 +129,25 @@ export default {
otherCode: "preOther",
},
act: {
label: "实际",
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
otherCode: "actOther",
multiple: true,
options: this.getDictOptions('business_pztj'),
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "cellItem",
label: "配置时间",
label: 'template.common.configurationTime',
config: {
startDate: {
label: "开始时间",
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: "结束时间",
label: 'template.common.endTime',
type: "input",
},
}
@ -153,63 +160,72 @@ export default {
type: "step",
config: {
targetName: {
label: "目标溶液名称",
label: 'template.common.targetSolutionName',
type: "input",
fillType: "preFill",
maxlength: 50
},
targetCode: {
label: "目标溶液编号",
label: 'template.common.targetSolutionCode',
type: "input",
subType: "span",
fillType: "preFill",
subKey: "targetCode1",
subKey: "targetCodeSn",
maxlength: 20
},
targetPreConcentration: {
label: "目标溶液预计浓度",
type: "input",
label: 'template.common.targetPreConcentration',
type: "inputNumber",
subType: "select",
subKey: "targetPreConcentrationUnit",
fillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10
},
targetActConcentration: {
label: "目标溶液实际浓度",
type: "input",
label: 'template.common.targetActConcentration',
type: "inputNumber",
subType: "select",
subKey: "targetActConcentrationUnit",
compareTo: "targetPreConcentration",//
fillType: "actFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
copyFrom: "targetPreConcentration",//
maxlength: 10
},
targetPreVolume: {
label: "目标溶液预计体积",
type: "input",
label: 'template.common.targetPreVolume',
type: "inputNumber",
subType: "select",
subKey: "targetPreVolumeUnit",
subOptions: this.getDictOptions('business_tjdw'),
fillType: "preFill",
maxlength: 10
},
targetActVolume: {
label: "目标溶液实际体积",
type: "input",
label: 'template.common.targetActVolume',
type: "inputNumber",
subType: "select",
subKey: "targetActVolumeUnit",
fillType: "actFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'),
compareTo: "targetPreVolume",//
copyFrom: "targetPreVolume",//
maxlength: 10
},
effectivePeriod: {
label: "有效周期",
type: "input",
label: 'template.common.effectivePeriod',
type: "inputNumber",
subType: "select",
subKey: "effectivePeriodUnit",
fillType: "preFill",
subOptions: this.getDictOptions('business_yxqdw'),
maxlength: 10
},
expireDate: {
label: "失效日",
label: 'template.common.expireDate',
type: "input",
},
}
@ -219,37 +235,84 @@ export default {
},
data() {
return {
dataSource: [],
resource: [],
resourceData1: [],
sysjColumns: [
{ label: "试剂名称", prop: "reagentName" },
{ label: "编号", prop: "reagentCode" },
{ label: "批号", prop: "reagentNo" },
{ label: "浓度/含量/纯度", prop: "concentration" },
{ label: "来源", prop: "source" },
{ label: "失效日", prop: "expireDate" },
{ label: 'template.common.reagentName', prop: "mc" },//
{ label: 'template.common.reagentCode', prop: "bh" },//
{ label: 'template.common.reagentNo', prop: "ph" },//
{ label: 'template.common.concentration', prop: "nd" },//
{ label: 'template.common.source', prop: "source" },//
{ label: 'template.common.reagentExpireDate', prop: "sxrq" },//
],
yqsColumns: [
{ label: "仪器名称", prop: "instrumentName" },
{ label: "仪器型号", prop: "instrumentModel" },
{ label: "仪器编号", prop: "instrumentCode" },
{ label: "下次测试/校准/检定日期", prop: "nextTestDate" },
{ label: 'template.common.instrumentName', prop: "instrumentName" },
{ label: 'template.common.instrumentModel', prop: "instrumentModel" },
{ label: 'template.common.instrumentCode', prop: "instrumentCode" },
{ label: 'template.common.nextTestDate', prop: "nextTestDate" },
],
formData: {}
};
},
mounted() {
},
watch: {
formData: {
immediate: true,
handler(v) {
if(!v.targetCodeSn && this.fillType === "actFill"){
this.getCode();
}
}
}
},
methods: {
//
async getCode(){
const result = await getLatestSn({
count: 1,
})
if(result.code == 200){
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn",result.data)
}
},
//
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
},
async getFormData() {
return await this.validFormFields(["baseInfoRef", "storageConditionRef","stepFormPackageRef","stepRef","remarkRef"]);
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]);
//resource
let tmpResource = []
//
tmpResource.push({
mc: content.targetName,
bh: content.targetCode+content.targetCodeSn,
ph: '',
nd: content.targetActConcentration + content.targetActConcentrationUnit,
source: 'ELN配制',
sxrq: content.expireDate,
ndz: content.targetActConcentration,
nddw: content.targetActConcentrationUnit,
kc: content.targetActVolume,
kcdw: content.targetActVolumeUnit,
syl: null,
syldw:content.targetActVolumeUnit,
yxzq:content.effectivePeriod,
yxzqdw:content.effectivePeriodUnit,
})
//使
this.resource=tmpResource
return content;
},
async onSave() {
const formData = await this.getFormData();
const formData = await this.getFilledFormData();
console.log(formData, "formData")
}
},
}
};
</script>

+ 0
- 1
src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue View File

@ -285,7 +285,6 @@ export default {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]);
//resource
let tmpResource = []
debugger
//
tmpResource.push({
mc: content.targetName,

+ 1
- 0
src/views/business/study/comp/tbbd/Fh.vue View File

@ -167,6 +167,7 @@ export default {
console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
if (data.type == 'checkbox') {
// {"type":"checkbox","fieldCheckObj":"{\"_methodCode\":{\"checked\":false}}"}
debugger
studyFormFill_updateZdgxjl(
{
id: this.form.id,

+ 5
- 5
src/views/business/study/comp/tbbd/Xq.vue View File

@ -25,7 +25,7 @@
</el-button>
<el-button type="primary" @click="exportExcel(999)">{{ $t('page.business.study.studyFormFill.dcbhsjgj') }}
</el-button>
<!-- <el-button type="primary" @click="dcqbjcgj">{{ $t('page.business.study.studyFormFill.dcqbjcgj') }}
<el-button type="primary" @click="dcqbjcgj">{{ $t('page.business.study.studyFormFill.dcqbjcgj') }}
</el-button>
<el-button type="primary" @click="dcqbjcgj">{{ $t('page.business.study.studyFormFill.dcqbjcgj') }}
</el-button>
@ -36,11 +36,11 @@
<el-button type="primary" @click="dcxgjcgj">{{ $t('page.business.study.studyFormFill.dcxgjcgj') }}
</el-button>
<el-button type="primary" @click="dcbhsjgj">{{ $t('page.business.study.studyFormFill.dcbhsjgj') }}
</el-button> -->
</el-button>
<div class="edit-content ">
<div class="content" style="width: 100%;">
<!-- <vue-html2pdf :show-layout="false" pdf-content-width="100%" :float-layout="false" pdf-orientation="landscape"
:enable-download="true" :preview-modal="true" ref="html2Pdf"> -->
<vue-html2pdf :show-layout="false" pdf-content-width="100%" :float-layout="false" pdf-orientation="landscape"
:enable-download="true" :preview-modal="true" ref="html2Pdf">
<section slot="pdf-content">
<TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="detail" />
<div class="content-title">
@ -73,7 +73,7 @@
@pagination="getJjcgjList" /> -->
</section>
<!-- </vue-html2pdf> -->
</vue-html2pdf>
</div>
</div>
</div>

Loading…
Cancel
Save