memorylkf 1 month ago
parent
commit
bcd263d1a3
4 changed files with 382 additions and 2 deletions
  1. +12
    -0
      src/lang/en/template/pcr.js
  2. +13
    -1
      src/lang/zh/template/pcr.js
  3. +3
    -1
      src/views/business/comps/template/TemplateTable.vue
  4. +354
    -0
      src/views/business/comps/template/comps/pcr/PCR008.vue

+ 12
- 0
src/lang/en/template/pcr.js View File

@ -65,6 +65,18 @@ export default {
ypznd: '样品终浓度', ypznd: '样品终浓度',
fj: 'Attachment', fj: 'Attachment',
}, },
pcr008: {
czb: '称重表',
clsj: 'Work Time',
yjry: '匀浆溶液',
bs: '倍数',
yjyjry: '已加匀浆溶液',
dztpbh: '电子天平编号',
ypmc: '样品名称',
zzz: '组织重',
ysyjrybjrl: '预设匀浆溶液补加入量',
sjyjrybjrl: '实际匀浆溶液补加入量',
},
pcr009: { pcr009: {
clsj: 'Work Time', clsj: 'Work Time',
yjry: '匀浆溶液', yjry: '匀浆溶液',

+ 13
- 1
src/lang/zh/template/pcr.js View File

@ -64,6 +64,18 @@ export default {
ypznd: '样品终浓度', ypznd: '样品终浓度',
fj: 'Attachment', fj: 'Attachment',
}, },
pcr008: {
czb: '称重表',
clsj: '处理时间',
yjry: '匀浆溶液',
bs: '倍数',
yjyjry: '已加匀浆溶液',
dztpbh: '电子天平编号',
ypmc: '样品名称',
zzz: '组织重',
ysyjrybjrl: '预设匀浆溶液补加入量',
sjyjrybjrl: '实际匀浆溶液补加入量',
},
pcr009: { pcr009: {
clsj: '处理时间', clsj: '处理时间',
yjry: '匀浆溶液', yjry: '匀浆溶液',
@ -75,7 +87,7 @@ export default {
sjyjrybjrl: '实际匀浆溶液补加入量', sjyjrybjrl: '实际匀浆溶液补加入量',
}, },
pcr010: { pcr010: {
clsj: 'Work Time',
clsj: '处理时间',
dztpbh: '电子天平编号', dztpbh: '电子天平编号',
yjry: '匀浆溶液', yjry: '匀浆溶液',
bs: '倍数', bs: '倍数',

+ 3
- 1
src/views/business/comps/template/TemplateTable.vue View File

@ -56,6 +56,7 @@ import PCR003 from "./comps/pcr/PCR003.vue";
import PCR004 from "./comps/pcr/PCR004.vue"; import PCR004 from "./comps/pcr/PCR004.vue";
import PCR005 from "./comps/pcr/PCR005.vue"; import PCR005 from "./comps/pcr/PCR005.vue";
import PCR007 from "./comps/pcr/PCR007.vue"; import PCR007 from "./comps/pcr/PCR007.vue";
import PCR008 from "./comps/pcr/PCR008.vue";
import PCR009 from "./comps/pcr/PCR009.vue"; import PCR009 from "./comps/pcr/PCR009.vue";
import PCR010 from "./comps/pcr/PCR010.vue"; import PCR010 from "./comps/pcr/PCR010.vue";
@ -125,7 +126,7 @@ export default {
// //
SP001, SP003, SP00456,SP007, SP008, SP009,SP0019,SP0020,SP0021, SP001, SP003, SP00456,SP007, SP008, SP009,SP0019,SP0020,SP0021,
// PCR // PCR
PCR002, PCR003, PCR004, PCR005,PCR007,PCR009,PCR010,
PCR002, PCR003, PCR004, PCR005,PCR007, PCR008, PCR009,PCR010,
//LBA //LBA
LBA002, LBA002,
LBA003, LBA003,
@ -251,6 +252,7 @@ export default {
'PCR004': 'PCR004', 'PCR004': 'PCR004',
'PCR005': 'PCR005', 'PCR005': 'PCR005',
'PCR007': 'PCR007', 'PCR007': 'PCR007',
'PCR008': 'PCR008',
'PCR009': 'PCR009', 'PCR009': 'PCR009',
'PCR010': 'PCR010', 'PCR010': 'PCR010',
//LBA //LBA

+ 354
- 0
src/views/business/comps/template/comps/pcr/PCR008.vue View File

@ -0,0 +1,354 @@
<!-- PCR分析组织匀浆表-知管重 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc }}<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage 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="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
<div v-if="fillType == 'preFill'">
<el-button type="danger" @click="onClickDelete">{{
$t('form.delete') }}</el-button>
</div>
<CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur"
:ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`"
:showCheckAll="true" @selectionChange="handleSelectionChange"
:showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"></TableOpertaion>
</template>
</CustomTable>
</div>
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
<!-- <button @click="onSave">保存</button> -->
</div>
</template>
<script>
import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage";
import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin.js";
import CustomTable from '@/components/Template/CustomTable.vue';
import { isValueEmpty } from '@/utils/index';
import { getLatestSnArr } from '@/api/template';
import { EventBus } from "@/utils/eventBus";
import { volumeConverter } from "@/utils/volConverter";//
import { convertConcentration } from "@/utils/conConverter";//
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import { getPCR010Config } from "../../formConfig/PCRTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import { addTj, subTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
import ImportExcelDialog from '../../dialog/ImportExcelDialog'
export default {
name: "PCR005",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaion, SelectReagentDialog, ImportExcelDialog },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
tableStepColumns() {
return getPCR010Config(this);
},
//
storageFormConfig() {
return [
{
type: "conditionItem",
config: {
storageCondition: {
label: 'template.common.storageConditionLabel',
type: "select",
fillType: "preFill",
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
}
}
];
},
//
remarkConig() {
return [
{
type: "cellItem",
config: {
remark: {
label: "",
type: "textarea",
fillType: "actFill",
span: 1,
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
}
}
]
},
//
baseInfoFormConfig() {
return [
{
type: "cardItem",
config: {
studyMc: {
label: 'template.common.testName',
type: "input",
disabled: true,
},
studySn: {
label: 'template.common.testNumber',
type: "input",
disabled: true,
},
}
},
{
type: "conditionItem",
label: 'template.common.processCondition',
config: {
pre: {
label: 'template.common.preFill',
type: "select",
multiple: true,
fillType: "preFill",
options: this.getDictOptions('business_pztj'),
otherCode: "preOther",
},
act: {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
otherCode: "actOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "cellItem",
label: 'template.pcr.pcr008.clsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
stepFormConfig() {
return [
{
type: 'step',
config: {
czb: {
label: 'template.pcr.pcr008.czb',
type: 'qxbd',
fillType: 'preFill',
qxbdType: 'PCR007',
filledCodes: ['bdmc', 'bdbh'],
},
yjry: {
label: 'template.pcr.pcr008.yjry',
type: 'input',
fillType: 'preFill',
subType: 'sj',
subKey: 'yjrybh',
subFillType: 'actFill',
maxlength: 20
},
bs: {
label: 'template.pcr.pcr010.bs',
type: 'inputNumber',
fillType: 'actFill',
maxlength: 20
},
yjyjry: {
label: 'template.pcr.pcr009.yjyjry',
type: 'inputNumber',
fillType: 'preFill',
subType: 'select',
subKey: 'yjyjryUnit',
subOptions: this.getDictOptions('business_tjdw'),
subFillType: 'preFill',
maxlength: 20
},
dztpbh: {
label: 'template.pcr.pcr010.dztpbh',
type: 'yq',
fillType: 'actFill',
},
}
}
]
},
},
data() {
return {
reagentType: null, // 1- 2-
formData: {},
currentSubKey: "",//key
currentType: "",//
currentRowIndex: "",//
deleteRows: [],
};
},
mounted() {
const formData = this.getFormDataByTemplateData();
this.onHandleTableBlur()
},
methods: {
onClickDelete() {
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
//this.$refs.stepTableRef.deleteRow()
this.deleteRow.forEach(item => {
this.$refs.stepTableRef.deleteRow(item)
})
}).catch(() => { });
},
handleSelectionChange(row) {
this.deleteRow = []
row.forEach(item => {
this.deleteRow.push(item.rowIndex)
})
},
//
onHandleTableBlur() {
this.updateTable()
},
onHandleBlur(fields) {
this.updateTable()
},
//
updateTable() {
let content = this.getFilledFormData();
let bs = content.bs
content
if (this.fillType === "actFill") {
let tableList = content.stepTableFormData
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
let item = tableList[i]
let cqzl = item.cqzl * bs
//
let ysyjrybjrl = volumeConverter.convert(cqzl + content.headerSelectFields.cqzlUnit, content.headerSelectFields.ysyjrybjrlUnit)
tableList[i].ysyjrybjrl = ysyjrybjrl
}
}
this.$refs.stepTableRef.updateDataSource(tableList);
}
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"])
},
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]);
return content;
},
getResource() {
let content = this.getFilledFormData();
//resource
let tmpResource = []
if (this.fillType === "actFill") {
let tableList = content.stepTableFormData
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
//
let item = tableList[i]
console.log('表格item:' + JSON.stringify(item))
//使
tmpResource.push({
mc: null,
bh: content.subSolution,
ph: null,
ndz: null,
nd: null,
nddw: null,
ly: 'ELN配制',
sxrq: null,
kc: null,
kcdw: null,
syl: item.ysxsyxytj,
type: 1,
elnType: this.product,
syldw: content.headerSelectFields.sjxsyxytjUnit,
yxzq: null,
yxzqdw: null,
})
}
}
}
if (tmpResource.length > 0) {
tmpResource = uniqeResourceOne(tmpResource)
}
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
let content = this.$refs.stepRef.getStepResource();
console.log(content);
},
//
deleteRow(rowIndex) {
const stepTableRef = this.$refs['stepTableRef'];
if (stepTableRef) {
stepTableRef.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
</style>

Loading…
Cancel
Save