luojie 1 month ago
parent
commit
83401c7cac
11 changed files with 501 additions and 214 deletions
  1. +1
    -0
      src/App.vue
  2. +4
    -5
      src/views/business/comps/template/comps/dl/DL003.vue
  3. +54
    -90
      src/views/business/comps/template/comps/gsp/GSP002.vue
  4. +1
    -0
      src/views/business/comps/template/comps/gsp/GSP003.vue
  5. +54
    -94
      src/views/business/comps/template/comps/gsp/GSP004.vue
  6. +371
    -0
      src/views/business/comps/template/comps/pcr/PCR010.vue
  7. +2
    -0
      src/views/business/comps/template/mixins/templateMixin.js
  8. +6
    -17
      src/views/business/resource/gsp/comps/rkjl/Bj.vue
  9. +2
    -3
      src/views/business/resource/gsp/comps/rkjl/Xq.vue
  10. +3
    -3
      src/views/business/resource/gsp/comps/rkjl/Xz.vue
  11. +3
    -2
      src/views/business/resource/gsp/comps/rkjlList.vue

+ 1
- 0
src/App.vue View File

@ -382,6 +382,7 @@ th {
/** 基础信息设置tab **/
.edit-container {
padding: 10px 10px;
.edit-top {
background: #fff;

+ 4
- 5
src/views/business/comps/template/comps/dl/DL003.vue View File

@ -374,7 +374,6 @@ export default {
},
//
handleClickButton(_item, signData) {
console.log(this.refConf,888)
this.$refs.czInfoRef.updateFormData(
_item.subKey,
moment().format('YYYY/MM/DD HH:mm'),
@ -395,11 +394,11 @@ export default {
return await this.validFormFields(refNames)
},
getResource() {
const stepResource = this.$refs.yqsyTableRef.getStepResource()
// const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp
// this.resourceTmp = stepResource.sjResource || []
// this.yqResourceTmp = stepResource.yqResource || []
// return this.resourceTmp
},
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e

+ 54
- 90
src/views/business/comps/template/comps/gsp/GSP002.vue View File

@ -8,18 +8,18 @@
<div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.gspsywzInfo" :columns="gspColumns" :dataSource="resourceGsp" v-if="sn!='GSP002'"/>
<TableList label="template.common.gspsywzInfo" :columns="gspColumns" :dataSource="resourceGsp"
v-if="sn != 'GSP002'" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel v-if="sn=='GSP002'" label="template.common.operationSteps" />
<LineLabel v-if="sn=='GSP006'" label="template.gsp.GSP002.cbybdpz" />
<LineLabel v-if="sn=='GSP008'" label="template.gsp.GSP002.zlkz" />
<LineLabel v-if="sn=='GSP012'" label="template.gsp.GSP002.cbywdx" />
<LineLabel v-if="sn=='GSP013'" label="template.gsp.GSP002.lmd" />
<LineLabel v-if="sn=='GSP014'" label="template.gsp.GSP002.clhwdx" />
<!-- 平行配制区域 -->
<LineLabel v-if="sn == 'GSP002'" label="template.common.operationSteps" />
<LineLabel v-if="sn == 'GSP006'" label="template.gsp.GSP002.cbybdpz" />
<LineLabel v-if="sn == 'GSP008'" label="template.gsp.GSP002.zlkz" />
<LineLabel v-if="sn == 'GSP012'" label="template.gsp.GSP002.cbywdx" />
<LineLabel v-if="sn == 'GSP013'" label="template.gsp.GSP002.lmd" />
<LineLabel v-if="sn == 'GSP014'" label="template.gsp.GSP002.clhwdx" />
<div :label="$t('template.common.pxpz')"
v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs"
:key="'paralle_' + paralleIndex">
@ -269,7 +269,7 @@ export default {
headerSelectKey: 'actSolutionConcentrationUnit',
fillType: 'preFill',
headerOptions: this.getDictOptions('business_nddw'),
bodyDisabled: true,
bodyDisabled: this.fillType !== 'actFill',
bodyType: 'inputNumber',
bodySubType: 'inputNumber',
bodySubKey: 'actSolutionConcentrationPrecision',
@ -302,7 +302,7 @@ export default {
headerSelectKey: 'actSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: this.getDictOptions('business_tjdw'),
bodyDisabled: true,
bodyDisabled: this.fillType !== 'actFill',
bodyType: 'inputNumber',
bodySubType: 'inputNumber',
bodySubKey: 'actSolutionVolumePrecision',
@ -374,7 +374,7 @@ export default {
showWidth: 120,
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyDisabled: true,
bodyDisabled: this.fillType !== 'actFill',
compareTo: 'targetStartSolutionConcentration', //
},
{
@ -383,7 +383,7 @@ export default {
headerSelectKey: 'targetStartSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: this.getDictOptions('business_tjdw'),
width: 280,
width: 360,
showWidth: 120,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
@ -394,8 +394,7 @@ export default {
bodyPrecisionKey: 'targetStartSolutionVolumePrecision',
bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder',
bodyDisabled: true,
showBodySub: true,
bodyDisabled: this.fillType !== 'preFill',
showBodySub: this.fillType === 'preFill',
headerSelectTo: "actStartSolutionVolumeUnit",
},
@ -421,7 +420,7 @@ export default {
headerSelectKey: 'preDiluentVolumeUnit',
fillType: 'preFill',
headerOptions: this.getDictOptions('business_tjdw'),
width: 280,
width: 340,
showWidth: 120,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
@ -431,7 +430,7 @@ export default {
bodyMaxlength: 10,
bodyPrecisionKey: 'targetDiluentVolumePrecision',
bodySubPlaceholder: 'template.common.xswsPlaceholder',
bodyDisabled: true,
bodyDisabled: this.fillType !== 'preFill',
showBodySub: this.fillType === 'preFill',
headerSelectTo: "actDiluentVolumeUnit",
},
@ -625,25 +624,7 @@ export default {
showParalleConfig: true
});
},
//
handleAddLadder() {
//
if (!this.formData.ladderConfigs) {
this.$set(this.formData, 'ladderConfigs', []);
}
//
this.formData.ladderConfigs.push({
ladderStepData: [],
ladderTableFormData: [],
showLadderConfig: true
});
},
//
deleteLadderConfig(index) {
this.formData.ladderConfigs.splice(index, 1);
},
//
//
deleteParalleConfig(index) {
this.formData.paralleConfigs.splice(index, 1);
},
@ -662,11 +643,9 @@ export default {
tableRef[0].deleteRow(rowIndex);
}
},
//
onHandleTableBlur(type, configIndex, e) {
const { colKey = "", item, rowIndex } = e;
debugger
if (colKey === "targetStartSolutionConcentration" || colKey === "targetSolutionVolume" || colKey === "targetSolutionConcentration" || colKey === "targetStartSolutionVolumePrecision" || colKey === "targetDiluentVolumePrecision") {
if (type === "paralle") {
const volumne = item.targetStartSolutionConcentration || 0;
@ -678,7 +657,15 @@ export default {
if (type === "paralle") {
const targetAcSolution = item.targetAcSolution || 0;//
if (targetAcSolution) {
const volResult = this.updateSjmbrynd(item, targetAcSolution);
const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0];
//
const formData = tableRef.getFilledFormData();
const headerSelectFields = formData.headerSelectFields;
const p = {
targetStartSolutionUnit: formData.stepTableFormData[configIndex].targetStartSolutionConcentrationPrecision,
headerSelectFields
}
const volResult = this.updateSjmbrynd(item, targetAcSolution,p);
if (!volResult) {
return
}
@ -697,14 +684,21 @@ export default {
callback.prevent('浓度单位与预制不符,请重新选择或申请废止并重新预制。');
}
},
// table
// table
onTableRegentSubmit(type, configIndex, data) {
const { selectInfo, rowIndex, key, rowData } = data;
const { row, selectedId } = selectInfo;
if (key === "actStartSolutionCode") {//
const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0];
//
const formData = tableRef.getFilledFormData();
const headerSelectFields = formData.headerSelectFields;
const p = {
targetStartSolutionUnit: rowData.targetStartSolutionConcentrationPrecision,
headerSelectFields
}
if (tableRef) {
const volResult = this.updateSjmbrynd(rowData, row.nd);
const volResult = this.updateSjmbrynd(rowData, row.nd, p);
//code
tableRef.updateDataSourceByRowIndex(rowIndex, {
actStartSolutionCode: selectedId,
@ -720,53 +714,6 @@ export default {
}
}
},
//
onRegentSubmit(type, rowIndex, data) {
const { selectInfo, key } = data;
const { row } = selectInfo;
if (key) {
const packageRef = this.$refs[`paralleStepFormPackageRef_${rowIndex}`][0];
if (key === "subStartSolution") {
packageRef.updateFormData("targetAcSolution", row.nd);
packageRef.onValueChangeCompareTo("targetAcSolution", row.nd, "targetStartSolution");
this.updateTableNd(row, rowIndex);
}
}
},
updateRecord() {
this.$nextTick(() => {
EventBus.$emit('onModifyRecord', {
type: "fieldChanged",
newRecord: null,
resourceList: null,
},)
})
},
//table
updateTableNd(row, rowIndex) {
const { stepTableFormData = [] } = this.$refs[`ladderStepTableRef_${rowIndex}`][0].getFilledFormData();
const newData = JSON.parse(JSON.stringify(stepTableFormData));
//
newData.forEach((item, index) => {
let initNd = row.nd;//
if (index === 0) {
item.startSolutionCode = row.bh;
} else {
item.startSolutionCode = newData[index - 1].targetSolutionCode + newData[index - 1].subTargetSolutionCode;
initNd = newData[i - 1].actSolutionConcentration;
}
const volResult = this.updateSjmbrynd(item, initNd);
if (!volResult) {
return
}
item.actSolutionVolume = volResult.actVol;
item.actSolutionConcentration = volResult.actNd;
// stepTableRef
})
this.$refs[`ladderStepTableRef_${rowIndex}`][0].updateDataSource(newData);
},
//
async validFields() {
//
@ -792,7 +739,6 @@ export default {
const paralleFormData = this.$refs[`paralleStepFormPackageRef_${i}`][0].getFilledFormData();
const paralleTableFormData = this.$refs[`paralleStepTableRef_${i}`][0].getFilledFormData();
const paralleStepData = this.$refs[`paralleStepRef_${i}`][0].getFilledFormData();
paralleConfigsData.push({
...paralleFormData,
...paralleTableFormData,
@ -838,7 +784,7 @@ export default {
//resource
let tmpResource = []
if (this.fillType === "actFill") {
//
//
if (content.paralleConfigs && content.paralleConfigs.length > 0) {
for (let i = 0; i < content.paralleConfigs.length; i++) {
let paralleConfigs = content.paralleConfigs[i]
@ -909,6 +855,24 @@ export default {
yxzq: null,
yxzqdw: null,
})
//
tmpResource.push({
mc: null,
bh: stepTableFormData[j].actStartSolutionCode,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: 1,
syl: stepTableFormData[j].actStartSolutionVolume,
syldw: paralleConfigs.headerSelectFields.actStartSolutionVolumeUnit,
yxzq: null,
yxzqdw: null,
})
}
}
}

+ 1
- 0
src/views/business/comps/template/comps/gsp/GSP003.vue View File

@ -12,6 +12,7 @@
<!-- 基本信息 -->
<TableList label="template.common.gspsywzInfo" :columns="gspColumns" :dataSource="resourceGsp" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<!-- <TableList label="template.common.gyzjInfo" :columns="gyzjColumns" :dataSource="resourceGyzj" /> -->
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<!-- 存储条件 -->
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"

+ 54
- 94
src/views/business/comps/template/comps/gsp/GSP004.vue View File

@ -1,4 +1,4 @@
<!-- 验物质配制记录表平行稀释 -->
<!-- 配制记录表平行稀释 -->
<template>
<div>
<div class="detail-container">
@ -16,19 +16,18 @@
label="template.gsp.GSP003.calcConditionLabel" ref="calcConditionRef"
:formConfig="calcFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<!-- 平行配制区域 -->
<div :label="$t('template.common.pxpz')"
v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs"
:key="'paralle_' + paralleIndex">
<div class="template-form-item">
<div class="config-header-right">
<!-- <div class="config-header-right">
<el-button type="primary" v-if="fillType === 'preFill'" @click="handleAddParalle">{{
$t('template.common.addBtn') }}</el-button>
<el-button v-if="fillType === 'preFill' && formData.paralleConfigs.length > 1"
type="danger" @click="deleteParalleConfig(paralleIndex)">{{
$t('template.common.deleteBtn') }}</el-button>
</div>
</div> -->
<BaseInfoFormPackage @clickable="(e) => handleClickable('paralle', paralleIndex, e)"
:ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig"
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex"
@ -80,7 +79,7 @@ import { isCommonUnit } from "@/utils/conTools";
import moment from "moment";
import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
export default {
name: "GSP004",
name: "GSP002",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion },
mixins: [templateMixin],
props: {
@ -230,12 +229,10 @@ export default {
sfxyzjfx: {
label: 'template.gsp.GSP003.sfxyzjfx',
type: "select",
with:'100%',
span:1,
fillType: "actFill",
options: [
{label:'是',value:'是'},
{label:'否',value:'否'}
{ label: '是', value: '是' },
{ label: '否', value: '否' }
]
},
solution: {
@ -294,7 +291,7 @@ export default {
headerSelectKey: 'actSolutionConcentrationUnit',
fillType: 'preFill',
headerOptions: this.getDictOptions('business_nddw'),
bodyDisabled: true,
bodyDisabled: this.fillType !== 'actFill',
bodyType: 'inputNumber',
bodySubType: 'inputNumber',
bodySubKey: 'actSolutionConcentrationPrecision',
@ -327,7 +324,7 @@ export default {
headerSelectKey: 'actSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: this.getDictOptions('business_tjdw'),
bodyDisabled: true,
bodyDisabled: this.fillType !== 'actFill',
bodyType: 'inputNumber',
bodySubType: 'inputNumber',
bodySubKey: 'actSolutionVolumePrecision',
@ -342,7 +339,7 @@ export default {
{
label: 'template.sp.sp00456.mbryyxzq',
prop: 'targetSolutionCycle',
width: 280,
width: 360,
showWidth: 160,
fillType: 'preFill',
bodyType: 'inputNumber',
@ -399,7 +396,7 @@ export default {
showWidth: 120,
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyDisabled: true,
bodyDisabled: this.fillType !== 'actFill',
compareTo: 'targetStartSolutionConcentration', //
},
{
@ -408,7 +405,7 @@ export default {
headerSelectKey: 'targetStartSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: this.getDictOptions('business_tjdw'),
width: 280,
width: 360,
showWidth: 120,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
@ -419,8 +416,7 @@ export default {
bodyPrecisionKey: 'targetStartSolutionVolumePrecision',
bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder',
bodyDisabled: true,
showBodySub: true,
bodyDisabled: this.fillType !== 'preFill',
showBodySub: this.fillType === 'preFill',
headerSelectTo: "actStartSolutionVolumeUnit",
},
@ -446,7 +442,7 @@ export default {
headerSelectKey: 'preDiluentVolumeUnit',
fillType: 'preFill',
headerOptions: this.getDictOptions('business_tjdw'),
width: 280,
width: 340,
showWidth: 120,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
@ -456,7 +452,7 @@ export default {
bodyMaxlength: 10,
bodyPrecisionKey: 'targetDiluentVolumePrecision',
bodySubPlaceholder: 'template.common.xswsPlaceholder',
bodyDisabled: true,
bodyDisabled: this.fillType !== 'preFill',
showBodySub: this.fillType === 'preFill',
headerSelectTo: "actDiluentVolumeUnit",
},
@ -650,25 +646,7 @@ export default {
showParalleConfig: true
});
},
//
handleAddLadder() {
//
if (!this.formData.ladderConfigs) {
this.$set(this.formData, 'ladderConfigs', []);
}
//
this.formData.ladderConfigs.push({
ladderStepData: [],
ladderTableFormData: [],
showLadderConfig: true
});
},
//
deleteLadderConfig(index) {
this.formData.ladderConfigs.splice(index, 1);
},
//
//
deleteParalleConfig(index) {
this.formData.paralleConfigs.splice(index, 1);
},
@ -687,11 +665,9 @@ export default {
tableRef[0].deleteRow(rowIndex);
}
},
//
onHandleTableBlur(type, configIndex, e) {
const { colKey = "", item, rowIndex } = e;
debugger
if (colKey === "targetStartSolutionConcentration" || colKey === "targetSolutionVolume" || colKey === "targetSolutionConcentration" || colKey === "targetStartSolutionVolumePrecision" || colKey === "targetDiluentVolumePrecision") {
if (type === "paralle") {
const volumne = item.targetStartSolutionConcentration || 0;
@ -703,7 +679,15 @@ export default {
if (type === "paralle") {
const targetAcSolution = item.targetAcSolution || 0;//
if (targetAcSolution) {
const volResult = this.updateSjmbrynd(item, targetAcSolution);
const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0];
//
const formData = tableRef.getFilledFormData();
const headerSelectFields = formData.headerSelectFields;
const p = {
targetStartSolutionUnit: formData.stepTableFormData[configIndex].targetStartSolutionConcentrationPrecision,
headerSelectFields
}
const volResult = this.updateSjmbrynd(item, targetAcSolution, p);
if (!volResult) {
return
}
@ -722,14 +706,21 @@ export default {
callback.prevent('浓度单位与预制不符,请重新选择或申请废止并重新预制。');
}
},
// table
// table
onTableRegentSubmit(type, configIndex, data) {
const { selectInfo, rowIndex, key, rowData } = data;
const { row, selectedId } = selectInfo;
if (key === "actStartSolutionCode") {//
const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0];
//
const formData = tableRef.getFilledFormData();
const headerSelectFields = formData.headerSelectFields;
const p = {
targetStartSolutionUnit: rowData.targetStartSolutionConcentrationPrecision,
headerSelectFields
}
if (tableRef) {
const volResult = this.updateSjmbrynd(rowData, row.nd);
const volResult = this.updateSjmbrynd(rowData, row.nd, p);
//code
tableRef.updateDataSourceByRowIndex(rowIndex, {
actStartSolutionCode: selectedId,
@ -745,57 +736,10 @@ export default {
}
}
},
//
onRegentSubmit(type, rowIndex, data) {
const { selectInfo, key } = data;
const { row } = selectInfo;
if (key) {
const packageRef = this.$refs[`paralleStepFormPackageRef_${rowIndex}`][0];
if (key === "subStartSolution") {
packageRef.updateFormData("targetAcSolution", row.nd);
packageRef.onValueChangeCompareTo("targetAcSolution", row.nd, "targetStartSolution");
this.updateTableNd(row, rowIndex);
}
}
},
updateRecord() {
this.$nextTick(() => {
EventBus.$emit('onModifyRecord', {
type: "fieldChanged",
newRecord: null,
resourceList: null,
},)
})
},
//table
updateTableNd(row, rowIndex) {
const { stepTableFormData = [] } = this.$refs[`ladderStepTableRef_${rowIndex}`][0].getFilledFormData();
const newData = JSON.parse(JSON.stringify(stepTableFormData));
//
newData.forEach((item, index) => {
let initNd = row.nd;//
if (index === 0) {
item.startSolutionCode = row.bh;
} else {
item.startSolutionCode = newData[index - 1].targetSolutionCode + newData[index - 1].subTargetSolutionCode;
initNd = newData[i - 1].actSolutionConcentration;
}
const volResult = this.updateSjmbrynd(item, initNd);
if (!volResult) {
return
}
item.actSolutionVolume = volResult.actVol;
item.actSolutionConcentration = volResult.actNd;
// stepTableRef
})
this.$refs[`ladderStepTableRef_${rowIndex}`][0].updateDataSource(newData);
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef","storageConditionRef", "remarkRef"];
let refsToValidate = ["baseInfoRef", "remarkRef"];
//
if (this.formData.paralleConfigs && this.formData.paralleConfigs.length > 0) {
@ -809,7 +753,7 @@ export default {
},
getFilledFormData() {
const baseData = this.$refs.baseInfoRef.getFilledFormData();
const calcConditionData = this.$refs.calcConditionRef.getFilledFormData();
//
const paralleConfigsData = [];
if (this.formData.paralleConfigs && this.formData.paralleConfigs.length > 0) {
@ -817,7 +761,6 @@ export default {
const paralleFormData = this.$refs[`paralleStepFormPackageRef_${i}`][0].getFilledFormData();
const paralleTableFormData = this.$refs[`paralleStepTableRef_${i}`][0].getFilledFormData();
const paralleStepData = this.$refs[`paralleStepRef_${i}`][0].getFilledFormData();
paralleConfigsData.push({
...paralleFormData,
...paralleTableFormData,
@ -830,7 +773,6 @@ export default {
const remarkData = this.$refs.remarkRef.getFilledFormData();
return {
...baseData,
...calcConditionData,
paralleConfigs: paralleConfigsData,
...remarkData
}
@ -864,7 +806,7 @@ export default {
//resource
let tmpResource = []
if (this.fillType === "actFill") {
//
//
if (content.paralleConfigs && content.paralleConfigs.length > 0) {
for (let i = 0; i < content.paralleConfigs.length; i++) {
let paralleConfigs = content.paralleConfigs[i]
@ -935,6 +877,24 @@ export default {
yxzq: null,
yxzqdw: null,
})
//
tmpResource.push({
mc: null,
bh: stepTableFormData[j].actStartSolutionCode,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: 1,
syl: stepTableFormData[j].actStartSolutionVolume,
syldw: paralleConfigs.headerSelectFields.actStartSolutionVolumeUnit,
yxzq: null,
yxzqdw: null,
})
}
}
}

+ 371
- 0
src/views/business/comps/template/comps/pcr/PCR010.vue View File

@ -0,0 +1,371 @@
<!-- 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="primary" @click="downloadExcelTemplate">{{
$t('template.common.downloadTemplate') }}</el-button>
<el-button type="primary" @click="showImportExcelDialog">{{
$t('template.common.importTemplate')
}}</el-button>
</div>
<CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur"
:ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`"
: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> -->
<ImportExcelDialog ref="ImportExcelDialog" @onLoadData="onLoadExcelData" />
</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 { getPCR009Config } 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 getPCR009Config(this);
},
//
getFjFormConfig() {
return [
{
type: "attachment",
config: {
attTitle: {
label: 'template.pcr.pcr005.fj',
type: "attachment",
fillType: "actFill",
},
}
}
]
},
//
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.pcr009.clsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
stepFormConfig() {
return [
{
type: 'step',
config: {
yjry: {
label: 'template.pcr.pcr009.yjry',
type: 'input',
fillType: 'preFill',
subType: 'sj',
subKey: 'yjrybh',
subFillType: 'actFill',
maxlength: 20
},
bs: {
label: 'template.pcr.pcr009.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
},
}
}
]
},
},
data() {
return {
reagentType: null, // 1- 2-
formData: {},
currentSubKey: "",//key
currentType: "",//
currentRowIndex: "",//
};
},
mounted() {
const formData = this.getFormDataByTemplateData();
this.onHandleTableBlur()
},
methods: {
downloadExcelTemplate() {
this.exportExcel(['样品名称', '组织重'], 'PCR分析组织匀浆表-知组织重导入模板')
},
//
onSelectReagentSubmit(code, row) {
},
showImportExcelDialog() {
this.$refs.ImportExcelDialog.show()
},
onLoadExcelData(excelData) {
excelData.shift()
let list = []
excelData.forEach(item => {
list.push({
ypmc: item[0],
zzz: item[1],
targetStartSolutionVolumePrecision: 3
})
})
this.$refs.stepTableRef.addRows(list)
this.$refs.ImportExcelDialog.cancel()
setTimeout(() => {
this.justUpdateFilledFormData();
}, 100);
},
//
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 zzz = item.zzz * bs
//
const { total, unit } = subTj([zzz, content.yjyjry], [content.headerSelectFields.zzzUnit, content.yjyjryUnit])
let ysyjrybjrl = volumeConverter.convert(total + unit, 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>

+ 2
- 0
src/views/business/comps/template/mixins/templateMixin.js View File

@ -361,8 +361,10 @@ export default {
},
//统一校验form表单是否填写
async validFormFields(refArr = []) {
console.log(refArr,2121)
let result = {}
const refs = refArr.map((ref) => {
console.log(ref,312312321)
let refData = {}
if (this.$refs[ref][0]) {
refData = this.$refs[ref][0]?.getFormData() || {}

+ 6
- 17
src/views/business/resource/gsp/comps/rkjl/Bj.vue View File

@ -3,7 +3,6 @@
<!-- 编辑弹窗 -->
<el-dialog :title="$t('form.edit')" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div>
<el-row>
<!-- 名称 -->
<el-col :span="12">
@ -20,16 +19,16 @@
</el-row>
<el-row>
<!-- 规格 -->
<el-col :span="8">
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gsp.gg')" prop="gg">
<el-input type="text" v-model="form.gg" maxlength="50" :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
<!-- 规格单位 -->
<el-col :span="4">
<!-- <el-col :span="4">
<BusinessSelect v-model="form.ggdw"
dictType="business_nddw,business_zldw,business_tjdw"></BusinessSelect>
</el-col>
</el-col> -->
<!-- 入库时间 -->
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gsp.rksj')" prop="rksj">
@ -204,20 +203,10 @@ export default {
show(row) {
this.reset()
info({id: row.id}).then(response => {
this.form.id = response.data.id
this.form.mc = response.data.mc
this.form.ph = response.data.ph
this.form.gg = response.data.gg
this.form.ggdw = response.data.ggdw
this.form.rkl = response.data.rkl
this.form.rkdw = response.data.rkdw
this.form.rksj = response.data.rksj
this.form.cctj = response.data.cctj
this.form.zysx = response.data.zysx
this.form.qmyy = '编辑供试品入库记录'
console.log(this.form)
this.open = true
this.form = response.data
this.form.qmyy = this.$t('page.business.resource.gsp.bjgsprkjl'),
this.open = true
})
},
save() {

+ 2
- 3
src/views/business/resource/gsp/comps/rkjl/Xq.vue View File

@ -25,15 +25,14 @@
<el-input type="text" :value="form.mc" maxlength="50" disabled />
</div>
<div class="right">
<div class="left-title">{{ $t('page.business.resource.gsp.ph') }}</div>
<div class="right-title">{{ $t('page.business.resource.gsp.ph') }}</div>
<el-input type="text" :value="form.ph" maxlength="50" disabled />
</div>
</div>
<div class="pal">
<div class="left">
<div class="right-title">{{ $t('page.business.resource.gsp.gg') }}</div>
<div class="left-title">{{ $t('page.business.resource.gsp.gg') }}</div>
<el-input type="text" :value="form.gg" maxlength="50" disabled>
<template slot="append">{{ form.ggdw }}</template>
</el-input>
</div>
<div class="right">

+ 3
- 3
src/views/business/resource/gsp/comps/rkjl/Xz.vue View File

@ -20,16 +20,16 @@
</el-row>
<el-row>
<!-- 规格 -->
<el-col :span="8">
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gsp.gg')" prop="gg">
<el-input type="text" v-model="form.gg" maxlength="50" :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
<!-- 规格单位 -->
<el-col :span="4">
<!-- <el-col :span="4">
<BusinessSelect v-model="form.ggdw"
dictType="business_nddw,business_zldw,business_tjdw"></BusinessSelect>
</el-col>
</el-col> -->
<!-- 入库时间 -->
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gsp.rksj')" prop="rksj">

+ 3
- 2
src/views/business/resource/gsp/comps/rkjlList.vue View File

@ -92,7 +92,8 @@
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.gg')" align="center">
<template slot-scope="scope">
{{ scope.row.gg }} {{ scope.row.ggdw }}
{{ scope.row.gg }}
<!-- {{ scope.row.ggdw }} -->
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.gsp.rksj')" align="center" prop="rksj" width="150px"
@ -303,7 +304,7 @@ export default {
'&nbsp;' + value.ph +
'</td>' +
' <td>' +
value.gg + value.ggdw +
value.gg +
'</td>' +
' <td>' +
value.rksj +

Loading…
Cancel
Save