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> <template>
<div> <div>
<div class="detail-container"> <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="detail-content">
<div class="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"> <div class="template-form-item">
<BaseInfoFormPcakge ref="stepFormPackageRef" :formConfig="stepFormConfig"
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" /> :formData="formData" />
</div> </div>
<Step ref="stepRef" :formData="formData.stepData"></Step> <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>
</div> </div>
<!-- <button @click = "onSave">保存</button> -->
</div> </div>
<!-- <button @click = "onSave">保存</button> -->
</div> </div>
</template> </template>
@ -33,11 +36,12 @@ import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table"; import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step"; import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin"; import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
export default { export default {
name: "SWYPFXRYPZB",
components: { BaseInfoFormPcakge, LineLabel, TableList, Step },
name: "SWYPFXCBYPZB",
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable },
mixins: [templateMixin], mixins: [templateMixin],
props: { props: {
fillType: { fillType: {
@ -52,10 +56,10 @@ export default {
type: "conditionItem", type: "conditionItem",
config: { config: {
storageCondition: { storageCondition: {
label: "存储条件",
label: 'template.common.storageConditionLabel',
type: "select", type: "select",
fillType: "preFill", fillType: "preFill",
options: this.getDictOptions('business_cctj'),
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther", otherCode: "storageConditionOther",
}, },
@ -73,7 +77,7 @@ export default {
type: "textarea", type: "textarea",
fillType: "actFill", fillType: "actFill",
span: 1, span: 1,
placeholder: "请输入备注",
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000, maxlength: 1000,
rows: 5 rows: 5
} }
@ -81,40 +85,43 @@ export default {
} }
] ]
}, },
baseInfoFormConfig() { baseInfoFormConfig() {
return [ return [
{ {
type: "cardItem", type: "cardItem",
config: { config: {
studyMc: { studyMc: {
label: "试验名称",
label: 'template.common.testName',
type: "input", type: "input",
disabled: true, disabled: true,
}, },
studySn: { studySn: {
label: "试验编号",
label: 'template.common.testNumber',
type: "input", type: "input",
disabled: true, disabled: true,
}, },
methodCode: { methodCode: {
label: "方法编号",
label: 'template.common.methodCode',
type: "input", type: "input",
fillType: "preFill", fillType: "preFill",
maxlength: 50
}, },
versionNum: { versionNum: {
label: "版本号",
label: 'template.common.versionNumber',
type: "input", type: "input",
fillType: "actFill"
fillType: "actFill",
maxlength: 50
}, },
} }
}, },
{ {
type: "conditionItem", type: "conditionItem",
label: "试验配制条件",
label: 'template.common.testConfigurationConditions',
config: { config: {
pre: { pre: {
label: "预填",
label: 'template.common.preFill',
type: "select", type: "select",
multiple: true, multiple: true,
fillType: "preFill", fillType: "preFill",
@ -122,25 +129,25 @@ export default {
otherCode: "preOther", otherCode: "preOther",
}, },
act: { act: {
label: "实际",
label: 'template.common.actualFill',
type: "select", type: "select",
fillType: "actFill", fillType: "actFill",
otherCode: "actOther", otherCode: "actOther",
multiple: true, multiple: true,
options: this.getDictOptions('business_pztj'),
options: this.getDictOptions('business_pztj')
} }
} }
}, },
{ {
type: "cellItem", type: "cellItem",
label: "配置时间",
label: 'template.common.configurationTime',
config: { config: {
startDate: { startDate: {
label: "开始时间",
label: 'template.common.startTime',
type: "input", type: "input",
}, },
endDate: { endDate: {
label: "结束时间",
label: 'template.common.endTime',
type: "input", type: "input",
}, },
} }
@ -153,63 +160,72 @@ export default {
type: "step", type: "step",
config: { config: {
targetName: { targetName: {
label: "目标溶液名称",
label: 'template.common.targetSolutionName',
type: "input", type: "input",
fillType: "preFill", fillType: "preFill",
maxlength: 50
}, },
targetCode: { targetCode: {
label: "目标溶液编号",
label: 'template.common.targetSolutionCode',
type: "input", type: "input",
subType: "span", subType: "span",
fillType: "preFill", fillType: "preFill",
subKey: "targetCode1",
subKey: "targetCodeSn",
maxlength: 20
}, },
targetPreConcentration: { targetPreConcentration: {
label: "目标溶液预计浓度",
type: "input",
label: 'template.common.targetPreConcentration',
type: "inputNumber",
subType: "select", subType: "select",
subKey: "targetPreConcentrationUnit", subKey: "targetPreConcentrationUnit",
fillType: "preFill", fillType: "preFill",
subOptions: this.getDictOptions('business_nddw'), subOptions: this.getDictOptions('business_nddw'),
maxlength: 10
}, },
targetActConcentration: { targetActConcentration: {
label: "目标溶液实际浓度",
type: "input",
label: 'template.common.targetActConcentration',
type: "inputNumber",
subType: "select", subType: "select",
subKey: "targetActConcentrationUnit", subKey: "targetActConcentrationUnit",
compareTo: "targetPreConcentration",//
fillType: "actFill", fillType: "actFill",
subFillType: "preFill", subFillType: "preFill",
subOptions: this.getDictOptions('business_nddw'), subOptions: this.getDictOptions('business_nddw'),
copyFrom: "targetPreConcentration",// copyFrom: "targetPreConcentration",//
maxlength: 10
}, },
targetPreVolume: { targetPreVolume: {
label: "目标溶液预计体积",
type: "input",
label: 'template.common.targetPreVolume',
type: "inputNumber",
subType: "select", subType: "select",
subKey: "targetPreVolumeUnit", subKey: "targetPreVolumeUnit",
subOptions: this.getDictOptions('business_tjdw'), subOptions: this.getDictOptions('business_tjdw'),
fillType: "preFill", fillType: "preFill",
maxlength: 10
}, },
targetActVolume: { targetActVolume: {
label: "目标溶液实际体积",
type: "input",
label: 'template.common.targetActVolume',
type: "inputNumber",
subType: "select", subType: "select",
subKey: "targetActVolumeUnit", subKey: "targetActVolumeUnit",
fillType: "actFill", fillType: "actFill",
subFillType: "preFill", subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'), subOptions: this.getDictOptions('business_tjdw'),
compareTo: "targetPreVolume",//
copyFrom: "targetPreVolume",// copyFrom: "targetPreVolume",//
maxlength: 10
}, },
effectivePeriod: { effectivePeriod: {
label: "有效周期",
type: "input",
label: 'template.common.effectivePeriod',
type: "inputNumber",
subType: "select", subType: "select",
subKey: "effectivePeriodUnit", subKey: "effectivePeriodUnit",
fillType: "preFill", fillType: "preFill",
subOptions: this.getDictOptions('business_yxqdw'), subOptions: this.getDictOptions('business_yxqdw'),
maxlength: 10
}, },
expireDate: { expireDate: {
label: "失效日",
label: 'template.common.expireDate',
type: "input", type: "input",
}, },
} }
@ -219,37 +235,84 @@ export default {
}, },
data() { data() {
return { return {
dataSource: [],
resource: [],
resourceData1: [],
sysjColumns: [ 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: [ 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: {} formData: {}
}; };
}, },
mounted() { mounted() {
}, },
watch: {
formData: {
immediate: true,
handler(v) {
if(!v.targetCodeSn && this.fillType === "actFill"){
this.getCode();
}
}
}
},
methods: { 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() { 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() { async onSave() {
const formData = await this.getFormData();
const formData = await this.getFilledFormData();
console.log(formData, "formData") console.log(formData, "formData")
}
},
} }
}; };
</script> </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"]); let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]);
//resource //resource
let tmpResource = [] let tmpResource = []
debugger
// //
tmpResource.push({ tmpResource.push({
mc: content.targetName, 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())) console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
if (data.type == 'checkbox') { if (data.type == 'checkbox') {
// {"type":"checkbox","fieldCheckObj":"{\"_methodCode\":{\"checked\":false}}"} // {"type":"checkbox","fieldCheckObj":"{\"_methodCode\":{\"checked\":false}}"}
debugger
studyFormFill_updateZdgxjl( studyFormFill_updateZdgxjl(
{ {
id: this.form.id, id: this.form.id,

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

@ -25,7 +25,7 @@
</el-button> </el-button>
<el-button type="primary" @click="exportExcel(999)">{{ $t('page.business.study.studyFormFill.dcbhsjgj') }} <el-button type="primary" @click="exportExcel(999)">{{ $t('page.business.study.studyFormFill.dcbhsjgj') }}
</el-button> </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>
<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>
@ -36,11 +36,11 @@
<el-button type="primary" @click="dcxgjcgj">{{ $t('page.business.study.studyFormFill.dcxgjcgj') }} <el-button type="primary" @click="dcxgjcgj">{{ $t('page.business.study.studyFormFill.dcxgjcgj') }}
</el-button> </el-button>
<el-button type="primary" @click="dcbhsjgj">{{ $t('page.business.study.studyFormFill.dcbhsjgj') }} <el-button type="primary" @click="dcbhsjgj">{{ $t('page.business.study.studyFormFill.dcbhsjgj') }}
</el-button> -->
</el-button>
<div class="edit-content "> <div class="edit-content ">
<div class="content" style="width: 100%;"> <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"> <section slot="pdf-content">
<TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="detail" /> <TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="detail" />
<div class="content-title"> <div class="content-title">
@ -73,7 +73,7 @@
@pagination="getJjcgjList" /> --> @pagination="getJjcgjList" /> -->
</section> </section>
<!-- </vue-html2pdf> -->
</vue-html2pdf>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save