luojie 1 month ago
parent
commit
b6b1a3230d
13 changed files with 428 additions and 211 deletions
  1. +39
    -2
      src/components/Template/Step.vue
  2. +1
    -1
      src/components/Template/StepComponents/ry/fy.vue
  3. +101
    -1
      src/components/Template/StepComponents/ry/jd.vue
  4. +2
    -2
      src/components/Template/StepComponents/ry/lx.vue
  5. +91
    -0
      src/components/Template/StepComponents/swypfx/hhspe.vue
  6. +67
    -0
      src/components/Template/StepComponents/swypfx/jryp.vue
  7. +79
    -0
      src/components/Template/StepComponents/swypfx/zyfc.vue
  8. +5
    -0
      src/lang/en/template/pcr.js
  9. +5
    -0
      src/lang/zh/template/pcr.js
  10. +1
    -1
      src/utils/index.js
  11. +11
    -12
      src/views/business/comps/template/comps/pcr/PCR005.vue
  12. +8
    -121
      src/views/business/comps/template/comps/pcr/PCR007.vue
  13. +18
    -71
      src/views/business/comps/template/formConfig/PCRTableConfig.js

+ 39
- 2
src/components/Template/Step.vue View File

@ -103,6 +103,24 @@ import cl from './StepComponents/b/cl.vue';//表配置-称量
//-使- //-使-
//-使- //-使-
//
//-使-
//-使-
//-使-
import jryp from './StepComponents/swypfx/jryp.vue';//-
//-使-
import hhspe from './StepComponents/swypfx/hhspe.vue';//-SPE
//-SPE使-SPE
//-SPE使-SPE
//-SPE使-SPE
//-SPE使-SPE
import zyfc from './StepComponents/swypfx/zyfc.vue';//-
//-使-
//-使-
//-使-
//-使-
import { public_templateStepList } from '@/api/business/public/public'; import { public_templateStepList } from '@/api/business/public/public';
@ -223,6 +241,11 @@ export default {
// //
jrry_b, jrry_b,
cl, cl,
//
jryp,
hhspe,
zyfc
}, },
computed: { computed: {
stepComponentMap() { stepComponentMap() {
@ -280,8 +303,8 @@ export default {
// //
'jrry_b': 'jrry_b', 'jrry_b': 'jrry_b',
'cl': 'cl', 'cl': 'cl',
'lx_b': 'lx',
'cs_b': 'cs',
'lx_b': 'Lx',
'cs_b': 'Cs',
'hwhy_b': 'Hwhy', 'hwhy_b': 'Hwhy',
'zyhy_b': 'Zyhy', 'zyhy_b': 'Zyhy',
'wxhy_b': 'Wxhy', 'wxhy_b': 'Wxhy',
@ -298,6 +321,19 @@ export default {
'jd_b': 'Jd', 'jd_b': 'Jd',
'fy_b': 'Fy', 'fy_b': 'Fy',
'fr_b': 'Fr', 'fr_b': 'Fr',
//
'jd_swypfx': 'Jd',
'jryp': 'jryp',
'ysfy': 'Lx',
'hhspe': 'hhspe',
'phspe': 'hhspe',
'syspe': 'hhspe',
'lxspe': 'hhspe',
'xtspe': 'hhspe',
'zyfc': 'zyfc',
} }
} }
return this.componentMap return this.componentMap
@ -339,6 +375,7 @@ export default {
}, },
methods: { methods: {
getStepList(){ getStepList(){
debugger
public_templateStepList({templateId:this.templateData.templateId}).then(response => { public_templateStepList({templateId:this.templateData.templateId}).then(response => {
let options = [] let options = []
_.forEach(response.data,(item)=>{ _.forEach(response.data,(item)=>{

+ 1
- 1
src/components/Template/StepComponents/ry/fy.vue View File

@ -40,7 +40,7 @@ export default {
fillType: "preFill", fillType: "preFill",
}, },
text3: { text3: {
label: "实际条件为",
label: "实际设置条件为",
type: "text", type: "text",
}, },
sjtj: { sjtj: {

+ 101
- 1
src/components/Template/StepComponents/ry/jd.vue View File

@ -21,7 +21,107 @@ export default {
}, },
computed: { computed: {
formConfig() { formConfig() {
let config = [{
let config = this.sn==='jd_swypfx'?
[{
config: {
text1: {
label: "将上述样品预计放置于",
type: "text",
},
ccwz: {
type: "select",
options: this.getDictOptions("business_ccwz"),
fillType: "preFill",
otherCode: "ccwzOther",
},
text3: {
label: "实际放置于",
type: "text",
},
sjccwz: {
type: "select",
options: this.getDictOptions("business_ccwz"),
fillType: "actFill",
otherCode: "sjccwzOther",
compareTo: "ccwz",
},
text4: {
label: "位置,其环境条件预计为",
type: "text",
},
yjwd: {
type: "select",
options: this.getDictOptions("business_wddw"),
fillType: "preFill",
otherCode: "yjwdOther",
},
yjhj: {
type: "select",
options: this.getDictOptions("business_hjxx"),
fillType: "preFill",
otherCode: "yjhjOther",
},
text5: {
label: ",实际条件为",
type: "text",
},
sjwd: {
type: "select",
options: this.getDictOptions("business_wddw"),
fillType: "actFill",
otherCode: "sjwdOther",
compareTo: "yjwd",
},
sjhj: {
type: "select",
options: this.getDictOptions("business_hjxx"),
fillType: "actFill",
otherCode: "sjhjOther",
compareTo: "yjhj",
},
text6: {
label: ",放置",
type: "text",
},
sr1:{
type: "input",
fillType: "preFill",
},
text7:{
type:"text",
label:",解冻",
},
startDate: {
type: "input",
fillType: "actFill",
disabled: true,
},
button1:{
type:"button",
buttonName:"开始",
},
text8:{
type:"text",
label:",解冻",
},
endDate: {
type: "input",
fillType: "actFill",
disabled: true,
},
button2:{
type:"button",
buttonName:"结束",
},
text9: {
type: "text",
label: "。",
},
}
}]:
[{
config: { config: {
text1: { text1: {
label: "将", label: "将",

+ 2
- 2
src/components/Template/StepComponents/ry/lx.vue View File

@ -23,7 +23,7 @@ export default {
let config = [{ let config = [{
config: { config: {
text1: { text1: {
label: "使用离心机",
label: this.sn==='ysfy'?"使用恒温混匀仪":"使用离心机",
type: "text", type: "text",
}, },
yq: { yq: {
@ -110,7 +110,7 @@ export default {
fillType: "preFill", fillType: "preFill",
}, },
text8: { text8: {
label: ",进行离心。离心",
label: this.sn==='ysfy'?",进行衍生反应,反应":",进行离心。离心",
type: "text", type: "text",
}, },
startDate: { startDate: {

+ 91
- 0
src/components/Template/StepComponents/swypfx/hhspe.vue View File

@ -0,0 +1,91 @@
<!-- 活化SPE -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_hhspe" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'hhsep',
},
},
components: {
StepFormPackage
},
computed: {
formConfig() {
return [{
config: {
text1: {
label: "使用",
type: "text",
},
ytrq: {
fillType: "preFill",
type: "input",
},
sjrqcz: {
fillType: "actFill",
type: "yq",
},
text2: {
label: this.sn==='syspe'?"向预先活化平衡好的固相萃取版中加入":"向固相萃取版中加入",
type: "text",
},
srry: {
fillType: "preFill",
type: "input",
},
sjrq:{
fillType: "actFill",
type: "sj",
ylCode: "sjsr2",
dwCode: "sjsrdw2",
},
text3:{
label: this.sn==='syspe'?"样品,预计加入":"溶液,预计加入",
type: "text",
},
ytsr1:{
fillType: "preFill",
type: "inputNumber",
},
tjxz:{
fillType: "preFill",
type: "select",
selectTo: "sjsrdw2",
options:this.getDictOptions('business_tjdw'),
},
text4:{
label: ",实际加入",
type: "text",
},
sjsr2:{
fillType: "actFill",
type: "inputNumber",
compareTo:"ytsr1",
copyFrom:"ytsr1"
},
sjsrdw2:{
fillType: "preFill",
type: "select",
options: this.getDictOptions('business_tjdw'),
},
text5:{
label: this.sn==='phspe'?"进行平衡。":this.sn==='syspe'?"进行上样。":this.sn==='lxspe'?"进行淋洗,弃去淋洗液。":this.sn==='xtspe'?"进行洗脱,收集洗脱液。":"进行活化。",
type: "text",
}
}
}]
}
},
}
</script>
<style lang="scss" scoped></style>

+ 67
- 0
src/components/Template/StepComponents/swypfx/jryp.vue View File

@ -0,0 +1,67 @@
<!-- 加入样品 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_jryp" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
components: {
StepFormPackage
},
computed: {
formConfig() {
return [{
config: {
text1: {
label: "使用移液器",
type: "text",
},
sjrqcz: {
fillType: "actFill",
type: "yq",
},
text2: {
label: "仪器,预计加入样品",
type: "text",
},
ytsr1:{
fillType: "preFill",
type: "inputNumber",
},
tjxz:{
fillType: "preFill",
type: "select",
selectTo: "sjsrdw2",
options:this.getDictOptions('business_tjdw'),
},
text4:{
label: ",实际加入样品",
type: "text",
},
sjsr2:{
fillType: "actFill",
type: "inputNumber",
compareTo:"ytsr1",
copyFrom:"ytsr1"
},
sjsrdw2:{
fillType: "preFill",
type: "select",
options: this.getDictOptions('business_tjdw'),
},
text5:{
label: "。",
type: "text",
}
}
}]
}
},
}
</script>
<style lang="scss" scoped></style>

+ 79
- 0
src/components/Template/StepComponents/swypfx/zyfc.vue View File

@ -0,0 +1,79 @@
<!-- 转移分层 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_zyfc" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
components: {
StepFormPackage
},
computed: {
formConfig() {
return [{
config: {
text1: {
label: "使用",
type: "text",
},
ytyq: {
fillType: "preFill",
type: "input",
},
sjrqcz: {
fillType: "actFill",
type: "yq",
},
text2: {
label: "转移",
type: "text",
},
shang:{
fillType: "preFill",
type: "input",
},
text3: {
label: "层清液,预计转移",
type: "text",
},
ytsr1:{
fillType: "preFill",
type: "inputNumber",
},
tjxz:{
fillType: "preFill",
type: "select",
selectTo: "sjsrdw2",
options:this.getDictOptions('business_tjdw'),
},
text4:{
label: ",实际转移",
type: "text",
},
sjsr2:{
fillType: "actFill",
type: "inputNumber",
compareTo:"ytsr1",
copyFrom:"ytsr1"
},
sjsrdw2:{
fillType: "preFill",
type: "select",
options: this.getDictOptions('business_tjdw'),
},
text5:{
label: "至容器中。",
type: "text",
}
}
}]
}
},
}
</script>
<style lang="scss" scoped></style>

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

@ -49,6 +49,11 @@ export default {
}, },
pcr007: { pcr007: {
dztpbh: '电子天平编号', dztpbh: '电子天平编号',
ypmc: '样品名称',
cyqypgsjyjtjtj: '采样前样品管试剂预计添加体积',
cyqypgsjsjtjtj: '采样前样品管试剂实际添加体积',
cygzl: '采集管重量',
czsj: '称重时间',
clpbh: 'Analysis Batch Number', clpbh: 'Analysis Batch Number',
ypmc: '样品名称', ypmc: '样品名称',
ypcsnd: '样品初始浓度', ypcsnd: '样品初始浓度',

+ 5
- 0
src/lang/zh/template/pcr.js View File

@ -48,6 +48,11 @@ export default {
}, },
pcr007: { pcr007: {
dztpbh: '电子天平编号', dztpbh: '电子天平编号',
ypmc: '样品名称',
cyqypgsjyjtjtj: '采样前样品管试剂预计添加体积',
cyqypgsjsjtjtj: '采样前样品管试剂实际添加体积',
cygzl: '采集管重量',
czsj: '称重时间',
clpbh: 'Analysis Batch Number', clpbh: 'Analysis Batch Number',
ypmc: '样品名称', ypmc: '样品名称',
ypcsnd: '样品初始浓度', ypcsnd: '样品初始浓度',

+ 1
- 1
src/utils/index.js View File

@ -441,7 +441,7 @@ export function isValueEmpty(value) {
if (Array.isArray(value) && value.length === 0) { if (Array.isArray(value) && value.length === 0) {
return true return true
} }
if (Object.keys(value).length === 0 && typeof value === 'object') {
if (Object.keys(value).length === 0 && typeof value=='object') {
return true; return true;
} }
return false return false

+ 11
- 12
src/views/business/comps/template/comps/pcr/PCR005.vue View File

@ -26,10 +26,11 @@
<CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur" <CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur"
:ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`" :ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`"
:showOperation="fillType === 'preFill'"
fieldItemLabel="template.common.operationSteps"> fieldItemLabel="template.common.operationSteps">
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns" <TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"></TableOpertaion>
@deleteRow="(rowIndex) => deleteRow(rowIndex)" ></TableOpertaion>
</template> </template>
</CustomTable> </CustomTable>
</div> </div>
@ -43,8 +44,6 @@
</div> </div>
</div> </div>
</div> </div>
<SelectReagentDialog @submit="onSelectReagentSubmit" ref="selectReagentDialogRef">
</SelectReagentDialog>
<!-- <button @click="onSave">保存</button> --> <!-- <button @click="onSave">保存</button> -->
<ImportExcelDialog ref="ImportExcelDialog" @onLoadData="onLoadExcelData" /> <ImportExcelDialog ref="ImportExcelDialog" @onLoadData="onLoadExcelData" />
</div> </div>
@ -177,11 +176,11 @@ export default {
type: "cellItem", type: "cellItem",
label: 'template.pcr.pcr005.clpbh', label: 'template.pcr.pcr005.clpbh',
config: { config: {
act: {
clpbh: {
label: '', label: '',
type: "input", type: "input",
fillType: "actFill", fillType: "actFill",
otherCode: "preOther",
otherCode: "clpbh",
} }
} }
}, },
@ -237,7 +236,7 @@ export default {
}, },
methods: { methods: {
downloadExcelTemplate() { downloadExcelTemplate() {
this.exportExcel(['样品名称', '样品初始浓度', '稀释倍数', '预设样品吸样体积'])
this.exportExcel(['样品名称', '样品初始浓度', '稀释倍数', '预设样品吸样体积'], 'PCR分析样品处理表导入模板')
}, },
// //
onSelectReagentSubmit(code, row) { onSelectReagentSubmit(code, row) {
@ -310,15 +309,15 @@ export default {
}, },
// //
getFilledFormData() { getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"])
return this.getFilledFormDataByRefs(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "fjRef", "remarkRef"])
}, },
async getFormData() { async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]);
let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "fjRef", "remarkRef"]);
return content; return content;
}, },
getResource() { getResource() {
let content = this.getFilledFormData(); let content = this.getFilledFormData();
console.log(content)
//resource //resource
let tmpResource = [] let tmpResource = []
if (this.fillType === "actFill") { if (this.fillType === "actFill") {
@ -333,7 +332,7 @@ export default {
tmpResource.push({ tmpResource.push({
mc: null, mc: null,
bh: item.startSolutionCode,
bh: content.subSolution,
ph: null, ph: null,
ndz: null, ndz: null,
nd: null, nd: null,
@ -342,10 +341,10 @@ export default {
sxrq: null, sxrq: null,
kc: null, kc: null,
kcdw: null, kcdw: null,
syl: item.actStartSolutionVolume,
syl: item.ysxsyxytj,
type: 1, type: 1,
elnType: this.product, elnType: this.product,
syldw: content.headerSelectFields.actStartSolutionVolumeUnit,
syldw: content.headerSelectFields.sjxsyxytjUnit,
yxzq: null, yxzq: null,
yxzqdw: null, yxzqdw: null,
}) })

+ 8
- 121
src/views/business/comps/template/comps/pcr/PCR007.vue View File

@ -26,6 +26,7 @@
<CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur" <CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur"
:ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`" :ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`"
:showOperation="fillType === 'preFill'"
fieldItemLabel="template.common.operationSteps"> fieldItemLabel="template.common.operationSteps">
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns" <TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns"
@ -35,16 +36,11 @@
</div> </div>
<Step ref="stepRef" :formData="formData.stepData"></Step> <Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.pcr.pcr005.fj" label="template.pcr.pcr005.fj"
ref="fjRef" :formConfig="getFjFormConfig" :formData="formData" />
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" <BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div> </div>
</div> </div>
</div> </div>
<SelectReagentDialog @submit="onSelectReagentSubmit" ref="selectReagentDialogRef">
</SelectReagentDialog>
<!-- <button @click="onSave">保存</button> --> <!-- <button @click="onSave">保存</button> -->
<ImportExcelDialog ref="ImportExcelDialog" @onLoadData="onLoadExcelData" /> <ImportExcelDialog ref="ImportExcelDialog" @onLoadData="onLoadExcelData" />
</div> </div>
@ -63,7 +59,7 @@ import { EventBus } from "@/utils/eventBus";
import { volumeConverter } from "@/utils/volConverter";// import { volumeConverter } from "@/utils/volConverter";//
import { convertConcentration } from "@/utils/conConverter";// import { convertConcentration } from "@/utils/conConverter";//
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import { getPCR005Config } from "../../formConfig/PCRTableConfig.js";
import { getPCR007Config } from "../../formConfig/PCRTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue" import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools"; import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
import ImportExcelDialog from '../../dialog/ImportExcelDialog' import ImportExcelDialog from '../../dialog/ImportExcelDialog'
@ -79,7 +75,7 @@ export default {
}, },
computed: { computed: {
tableStepColumns() { tableStepColumns() {
return getPCR005Config(this);
return getPCR007Config(this);
}, },
// //
getFjFormConfig() { getFjFormConfig() {
@ -151,43 +147,8 @@ export default {
} }
}, },
{ {
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.pcr005.clpbh',
config: {
act: {
label: '',
type: "input",
fillType: "actFill",
otherCode: "preOther",
}
}
},
{
type: "cellItem", type: "cellItem",
label: 'template.common.configurationTime',
label: 'template.pcr.pcr007.czsj',
config: { config: {
startDate: { startDate: {
label: 'template.common.startTime', label: 'template.common.startTime',
@ -208,14 +169,10 @@ export default {
type: 'step', type: 'step',
config: { config: {
solution: { solution: {
labelWidth: 80,
labelWidth: 100,
label: 'template.pcr.pcr007.dztpbh', label: 'template.pcr.pcr007.dztpbh',
type: 'input',
fillType: 'preFill',
subType: 'sj',
subKey: 'subSolution',
subFillType: 'actFill',
maxlength: 20
type: 'yq',
fillType: 'actFill',
}, },
} }
} }
@ -237,7 +194,7 @@ export default {
}, },
methods: { methods: {
downloadExcelTemplate() { downloadExcelTemplate() {
this.exportExcel(['样品名称', '样品初始浓度', '稀释倍数', '预设样品吸样体积'])
this.exportExcel(['样品名称', '样品初始浓采样前样品管试剂预计添加体积度'], 'PCR分析采集管称重记录表导入模板')
}, },
// //
onSelectReagentSubmit(code, row) { onSelectReagentSubmit(code, row) {
@ -253,10 +210,6 @@ export default {
list.push({ list.push({
ypmc: item[0], ypmc: item[0],
ypcsnd: item[1], ypcsnd: item[1],
sxbs: item[2],
ysypxytj: item[3],
targetDiluentVolumePrecision: 3,
actSolutionVolumePrecision: 3
}) })
}) })
this.$refs.stepTableRef.addRows(list) this.$refs.stepTableRef.addRows(list)
@ -265,48 +218,8 @@ export default {
}, },
// //
onHandleTableBlur() { onHandleTableBlur() {
let content = this.getFilledFormData();
//
let ysypxytjUnit = content.headerSelectFields.ysypxytjUnit
let ysxsyxytjUnit = content.headerSelectFields.ysxsyxytjUnit
let ypzndUnit = content.headerSelectFields.ypzndUnit
let ypcsndUnit = content.headerSelectFields.ypcsndUnit
if (this.fillType === "preFill") {
let tableList = content.stepTableFormData
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
let item = tableList[i]
if (
isValueEmpty(ysypxytjUnit) ||
isValueEmpty(ysxsyxytjUnit) ||
isValueEmpty(item.sxbs) ||
isValueEmpty(item.ysypxytj) ||
isValueEmpty(item.actSolutionVolumePrecision) ||
isValueEmpty(item.ypcsnd)
) {
continue;
}
// (-1)*
let ysxsyxytj = (item.sxbs - 1) * item.ysypxytj
ysxsyxytj = volumeConverter.convert(ysxsyxytj + ysypxytjUnit, ysxsyxytjUnit).toFixed(
item.actSolutionVolumePrecision
)
tableList[i].ysxsyxytj = ysxsyxytj
// /
let ypznd = (item.ypcsnd) / item.sxbs
ypznd = convertConcentration.convert(ypznd + ypcsndUnit, ypzndUnit).toFixed(
item.targetDiluentVolumePrecision
)
tableList[i].ypznd = ypznd
}
}
this.$refs.stepTableRef.updateDataSource(tableList);
}
}, },
// //
getFilledFormData() { getFilledFormData() {
@ -325,31 +238,6 @@ export default {
let tableList = content.stepTableFormData let tableList = content.stepTableFormData
if (tableList && tableList.length > 0) { if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) { for (let i = 0; i < tableList.length; i++) {
//
let item = tableList[i]
console.log('表格item:' + JSON.stringify(item))
//使
tmpResource.push({
mc: null,
bh: item.startSolutionCode,
ph: null,
ndz: null,
nd: null,
nddw: null,
ly: 'ELN配制',
sxrq: null,
kc: null,
kcdw: null,
syl: item.actStartSolutionVolume,
type: 1,
elnType: this.product,
syldw: content.headerSelectFields.actStartSolutionVolumeUnit,
yxzq: null,
yxzqdw: null,
})
} }
} }
} }
@ -365,7 +253,6 @@ export default {
// //
async onSave() { async onSave() {
let content = this.$refs.stepRef.getStepResource(); let content = this.$refs.stepRef.getStepResource();
console.log(content);
}, },
// //

+ 18
- 71
src/views/business/comps/template/formConfig/PCRTableConfig.js View File

@ -632,6 +632,7 @@ export const getPCR005Config = ($this) => {
fillType: 'preFill', fillType: 'preFill',
headerSelectKey: 'sjypxytjUnit', headerSelectKey: 'sjypxytjUnit',
headerOptions: $this.getDictOptions('business_tjdw'), headerOptions: $this.getDictOptions('business_tjdw'),
copyFrom: 'ysypxytj', //复制哪个字段
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyMaxlength: 10, bodyMaxlength: 10,
@ -666,6 +667,7 @@ export const getPCR005Config = ($this) => {
fillType: 'preFill', fillType: 'preFill',
headerSelectKey: 'sjxsyxytjUnit', headerSelectKey: 'sjxsyxytjUnit',
headerOptions: $this.getDictOptions('business_tjdw'), headerOptions: $this.getDictOptions('business_tjdw'),
copyFrom: 'ysxsyxytj', //复制哪个字段
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyMaxlength: 10, bodyMaxlength: 10,
@ -699,7 +701,7 @@ export const getPCR005Config = ($this) => {
export const getPCR007Config = ($this) => { export const getPCR007Config = ($this) => {
return [ return [
{ {
label: 'template.pcr.pcr005.ypmc',
label: 'template.pcr.pcr007.ypmc',
prop: 'ypmc', prop: 'ypmc',
width: 280, width: 280,
bodyType: 'input', bodyType: 'input',
@ -708,105 +710,50 @@ export const getPCR007Config = ($this) => {
bodyFillType: 'preFill', bodyFillType: 'preFill',
}, },
{ {
label: 'template.pcr.pcr005.ypcsnd',
prop: 'ypcsnd',
width: 280,
showWidth: 180,
fillType: 'preFill',
headerSelectKey: 'ypcsndUnit',
headerOptions: $this.getDictOptions('business_nddw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
},
{
label: 'template.pcr.pcr005.sxbs',
prop: 'sxbs',
width: 280,
showWidth: 180,
fillType: 'preFill',
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
},
{
label: 'template.pcr.pcr005.ysypxytj',
prop: 'ysypxytj',
label: 'template.pcr.pcr007.cyqypgsjyjtjtj',
prop: 'cyqypgsjyjtjtj',
width: 280, width: 280,
showWidth: 180, showWidth: 180,
fillType: 'preFill', fillType: 'preFill',
headerSelectKey: 'ysypxytjUnit',
headerSelectKey: 'cyqypgsjyjtjtjUnit',
headerOptions: $this.getDictOptions('business_tjdw'), headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'preFill', bodyFillType: 'preFill',
bodyMaxlength: 10, bodyMaxlength: 10,
}, },
{ {
label: 'template.pcr.pcr005.sjypxytj',
prop: 'sjypxytj',
label: 'template.pcr.pcr007.cyqypgsjsjtjtj',
prop: 'cyqypgsjsjtjtj',
width: 280, width: 280,
showWidth: 180, showWidth: 180,
fillType: 'preFill', fillType: 'preFill',
headerSelectKey: 'sjypxytjUnit',
headerSelectKey: 'cyqypgsjsjtjtjUnit',
headerOptions: $this.getDictOptions('business_tjdw'), headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
copyFrom: 'cyqypgsjyjtjtj', //复制哪个字段
bodyMaxlength: 10, bodyMaxlength: 10,
}, },
{ {
label: 'template.pcr.pcr005.ysxsyxytj',
prop: 'ysxsyxytj',
width: 280,
showWidth: 180,
fillType: 'preFill',
headerSelectKey: 'ysxsyxytjUnit',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyDisabled: true,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
bodySubType: 'inputNumber',
bodySubKey: 'actSolutionVolumePrecision',
subPrecision: 0,
bodyFillType: 'preFill',
bodySubFillType: 'preFill',
showBodySub: $this.fillType === 'preFill',
bodyPrecisionKey: 0,
bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder',
},
{
label: 'template.pcr.pcr005.sjxsyxytj',
prop: 'sjxsyxytj',
label: 'template.pcr.pcr007.cygzl',
prop: 'cygzl',
width: 280, width: 280,
showWidth: 180, showWidth: 180,
fillType: 'preFill', fillType: 'preFill',
headerSelectKey: 'sjxsyxytjUnit',
headerSelectKey: 'cygzlUnit',
headerOptions: $this.getDictOptions('business_tjdw'), headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodySubType: 'button',
bodySubButtonName: 'form.hqz',
bodyMaxlength: 10, bodyMaxlength: 10,
},
{
label: 'template.pcr.pcr005.ypznd',
prop: 'ypznd',
width: 280,
showWidth: 180,
fillType: 'preFill',
headerSelectKey: 'ypzndUnit',
headerOptions: $this.getDictOptions('business_nddw'),
bodyDisabled: true,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
bodySubType: 'inputNumber',
bodySubKey: 'targetDiluentVolumePrecision', bodySubKey: 'targetDiluentVolumePrecision',
bodyPrecisionKey: 'targetDiluentVolumePrecision', bodyPrecisionKey: 'targetDiluentVolumePrecision',
bodySubFillType: 'preFill',
bodySubFillType: 'actFill',
subPrecision: 0, subPrecision: 0,
showBodySub: $this.fillType === 'preFill',
showBodySub: $this.fillType === 'actFill',
bodyMaxlength: 10, bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder', bodySubPlaceholder: 'template.common.xswsPlaceholder',
},
}
] ]
} }

Loading…
Cancel
Save