luojie 2 months ago
parent
commit
643c6c4ab3
27 changed files with 1347 additions and 199 deletions
  1. +8
    -0
      src/api/business/public/public.js
  2. +2
    -1
      src/components/Template/HandleFormItem.vue
  3. +1
    -0
      src/lang/en/template/commonTemplate.js
  4. +4
    -0
      src/lang/en/template/gsp.js
  5. +17
    -1
      src/lang/en/template/lba.js
  6. +1
    -0
      src/lang/zh/template/commonTemplate.js
  7. +4
    -0
      src/lang/zh/template/gsp.js
  8. +17
    -1
      src/lang/zh/template/lba.js
  9. +8
    -1
      src/views/business/comps/template/TemplateTable.vue
  10. +163
    -51
      src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue
  11. +473
    -0
      src/views/business/comps/template/comps/gsp/GSP003.vue
  12. +2
    -1
      src/views/business/comps/template/comps/lba/LBA002.vue
  13. +460
    -0
      src/views/business/comps/template/comps/lba/LBA004.vue
  14. +1
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP008.vue
  15. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP009.vue
  16. +1
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP010.vue
  17. +1
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP011.vue
  18. +1
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP012.vue
  19. +1
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP013.vue
  20. +1
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP014.vue
  21. +1
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP015.vue
  22. +1
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP016.vue
  23. +1
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP017.vue
  24. +1
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP018.vue
  25. +8
    -2
      src/views/business/comps/template/dialog/SelectMixReagentDialog.vue
  26. +165
    -137
      src/views/business/comps/template/formConfig/formConfig.js
  27. +2
    -2
      src/views/business/comps/template/mixins/templateMixin.js

+ 8
- 0
src/api/business/public/public.js View File

@ -131,3 +131,11 @@ export function public_saveSimpleLog(query) {
params: query
})
}
// 检测板
export function public_jcbList(query) {
return request({
url: '/system/business/public/jcbList',
method: 'get',
params: query
})
}

+ 2
- 1
src/components/Template/HandleFormItem.vue View File

@ -203,7 +203,7 @@ export default {
visible: false,//
checkboxValue: this.getChecked(),//
uuid: getuuid(), // EventBus
regentType: ['sj', 'gsp', 'mix', 'xj', 'xb', 'gyzj', 'mjy', 'yq'], ////
regentType: ['sj', 'gsp', 'mix', 'xj', 'xb', 'gyzj', 'mjy', 'yq','jcb'], ////
selectRegentInfo: {},////
fileList: [],//
uploadFileUrl: process.env.VUE_APP_BASE_API + "/file/upload",
@ -352,6 +352,7 @@ export default {
mjy: "5",//
xj: "9",//
xb: "11",//
jcb: "13",//
}
params = {
...params,

+ 1
- 0
src/lang/en/template/commonTemplate.js View File

@ -46,6 +46,7 @@ export default {
// 按钮
saveBtn: 'Save',
addBtn: 'Add',
deleteBtn: 'Delete',
// 错误提示

+ 4
- 0
src/lang/en/template/gsp.js View File

@ -31,5 +31,9 @@ export default {
// 毒麻药品配制记录表
DMYPPZJLB:{
},
GSP003:{
calcConditionLabel:'计算公式',
sfxyzjfx:'是否需要制剂分析'
}
}

+ 17
- 1
src/lang/en/template/lba.js View File

@ -4,10 +4,26 @@ export default {
lba002: {
cztj: 'Work Condition',
czsj: 'Work Time',
jcbmc: 'Analysis Plate Name'
jcbmc: 'Analysis Plate Name',
cjr: 'Creator',
cjsj: 'Creation Date'
},
lba003: {
jclc: 'Testing Process',
fj: 'Attachment'
},
lba004: {
xbxx: 'Analysis Plate Information',
ypxx: 'Sample Information',
xszj: '稀释组件',
xz: 'Add',
sc: 'Delete',
jzmc: '基质名称',
xh: '序号',
xsbs: '稀释倍数',
ysypjrz: '预设样品加入值',
sjypjrz: '实际样品加入值',
ysjzjrz: '预设基质加入值',
sjjzjrz: '实际基质加入值'
}
}

+ 1
- 0
src/lang/zh/template/commonTemplate.js View File

@ -46,6 +46,7 @@ export default {
// 按钮
addBtn: '新增',
saveBtn: '保存',
deleteBtn: '刪除',

+ 4
- 0
src/lang/zh/template/gsp.js View File

@ -31,5 +31,9 @@ export default {
// 毒麻药品配制记录表
DMYPPZJLB:{
},
GSP003:{
calcConditionLabel:'计算公式',
sfxyzjfx:'是否需要制剂分析'
}
}

+ 17
- 1
src/lang/zh/template/lba.js View File

@ -4,10 +4,26 @@ export default {
lba002: {
cztj: '操作条件',
czsj: '操作时间',
jcbmc: '检测板名称'
jcbmc: '检测板名称',
cjr: '创建人',
cjsj: '创建时间'
},
lba003: {
jclc: '检测流程',
fj: '附件'
},
lba004: {
xbxx: '选板信息',
ypxx: '样品信息',
xszj: '稀释组件',
xz: '新增',
sc: '删除',
jzmc: '基质名称',
xh: '序号',
xsbs: '稀释倍数',
ysypjrz: '预设样品加入值',
sjypjrz: '实际样品加入值',
ysjzjrz: '预设基质加入值',
sjjzjrz: '实际基质加入值'
}
}

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

@ -41,6 +41,7 @@ import SP017 from "./comps/sp/SWYPFXFFXYPZBB/SP017.vue";
import SP018 from "./comps/sp/SWYPFXFFXYPZBB/SP018.vue";
import Demo from "./comps/sp/Demo.vue";
//
import GSP003 from "./comps/gsp/GSP003.vue";
////
import SYWZPZJHB from "./comps/gsp/SYWZPZJHB.vue";
@ -55,6 +56,7 @@ import PCR002 from "./comps/pcr/PCR002.vue";
// LBA001-使SP001
import LBA002 from "./comps/lba/LBA002.vue";
import LBA003 from "./comps/lba/LBA003.vue";
import LBA004 from "./comps/lba/LBA004.vue";
//ADA
// ADA001-使SP001
@ -72,13 +74,15 @@ export default {
////
MJYLQSQD, SYWZPZJHB, DMYPPZJLB,
//
GSP003,
//
SP001, SP003, SP00456,SP007, SP008, SP009, SP010, SP011, SP012, SP013, SP014, SP015, SP016, SP017, SP018,
// PCR
PCR002,
//LBA
LBA002,
LBA003
LBA003,
LBA004
},
props: {
sn: {
@ -123,6 +127,8 @@ export default {
'SP017': 'SP017',
'SP018': 'SP018',
//
'GSP001': 'DMYPPZJLB',
'GSP003': 'GSP003',
////
'SYWZPZJHB': 'SYWZPZJHB',
'MJYLQSQD': 'MJYLQSQD',
@ -134,6 +140,7 @@ export default {
'LBA001': 'SP001',
'LBA002': 'LBA002',
'LBA003': 'LBA003',
'LBA004': 'LBA004',
//ADA
'ADA001': 'SP001',
'ADA002': 'LBA002',

+ 163
- 51
src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue View File

@ -2,31 +2,49 @@
<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-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.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<!-- 存储条件 -->
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"
label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.common.bqdy') }}</el-button>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
<!-- 操作步骤 -->
<div v-for="(formConfig, ladderIndex) in formData.formConfigs" :key="'ladder_' + ladderIndex">
<div class="template-form-item">
<div class="config-header-right">
<el-button v-if="fillType === 'preFill'" type="primary" @click="handleAddFormConfig">{{
$t('template.common.addBtn') }}</el-button>
<el-button v-if="fillType === 'preFill' && formData.formConfigs.length > 1"
type="danger" @click="handleDeleteFormConfig(ladderIndex)">{{
$t('template.common.deleteBtn')
}}</el-button>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.common.bqdy') }}</el-button>
</div>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps"
:ref="`formConfigStepFormPackageRef_${ladderIndex}`" :formConfig="stepFormConfig"
:formData="formConfig" />
<Step class="mt-0 s-container" :ref="`formStepRef_${ladderIndex}`"
:formData="formConfig.stepData" :fieldItemLabel="$t('template.common.jtpz')"
:prefixKey="'form_' + ladderIndex"></Step>
</div>
</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>
@ -41,6 +59,7 @@ import { getLatestSn } from '@/api/template';
import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es'
import { duplicateResource, getExpireDate } from "@/utils/index.js";
export default {
name: "DMYPPZJLB",
@ -249,13 +268,32 @@ export default {
},
mounted() {
const formData = this.getFormDataByTemplateData();
if(!formData.targetCodeSn&& this.fillType === "actFill"){
if (!formData.targetCodeSn && this.fillType === "actFill") {
this.getCode(formData);
} else {
if (!this.formData.formConfigs) {
this.$set(this.formData, 'formConfigs', []);
this.formData.formConfigs.push({
formConfigs: [],
});
}
}
},
methods: {
//
//
handleAddFormConfig() {
if (!this.formData.formConfigs) {
this.$set(this.formData, 'formConfigs', []);
}
this.formData.formConfigs.push({
formConfigs: [],
});
},
//
handleDeleteFormConfig(index) {
this.formData.formConfigs.splice(index, 1);
},
//todo
printTag() {
const printConfig = this.getBasePrintConfig();
const { storageCondition, targetCodeSn } = this.formData;
@ -264,58 +302,123 @@ export default {
EventBus.$emit('showTagPrintDialog', { printConfig })
},
//
//
getCode: debounce(async function (v) {
const result = await getLatestSn({
count: 1,
pre:v.targetCode,
type:1
})
if (result.code == 200) {
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn", result.data[0])
if (this.formData.formConfigs && this.formData.formConfigs.length > 0) {
for (let i = 0; i < this.formData.formConfigs.length; i++) {
let item = this.formData.formConfigs[i]
const result = await getLatestSn({
count: 1,
pre: item.targetCode,
type: 1
})
if (result.code == 200) {
this.$refs[`formConfigStepFormPackageRef_${i}`][0].updateFormData("targetCodeSn", result.data[0])
}
}
}
}, 100),
//
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
const baseData = this.$refs.baseInfoRef.getFilledFormData();
const conditionData = this.$refs.storageConditionRef.getFilledFormData();
const formConfigsData = [];
if (this.formData.formConfigs && this.formData.formConfigs.length > 0) {
for (let i = 0; i < this.formData.formConfigs.length; i++) {
const formData = this.$refs[`formConfigStepFormPackageRef_${i}`][0].getFilledFormData();
const stepData = this.$refs[`formStepRef_${i}`][0].getFilledFormData();
if(this.formData.startDate&&formData.effectivePeriod&&formData.effectivePeriodUnit){
formData.expireDate=getExpireDate(this.formData.startDate, formData.effectivePeriod, formData.effectivePeriodUnit)
}
formConfigsData.push({
...formData,
...stepData,
});
}
}
const remarkData = this.$refs.remarkRef.getFilledFormData();
return {
...baseData,
...conditionData,
formConfigs: formConfigsData,
...remarkData
}
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "storageConditionRef", "remarkRef"];
if (this.formData.formConfigs && this.formData.formConfigs.length > 0) {
for (let i = 0; i < this.formData.formConfigs.length; i++) {
refsToValidate.push(`formConfigStepFormPackageRef_${i}`);
refsToValidate.push(`formStepRef_${i}`);
}
}
return await this.validFormFields(refsToValidate);
},
//
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]);
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content;
},
//使
getResource() {
let content = this.getFilledFormData();
//resource
let tmpResource = []
if (this.fillType === "actFill") {
//
tmpResource.push({
mc: content.targetName,
bh: content.targetCode + content.targetCodeSn,
ph: '',
ndz: content.targetActConcentration + content.targetActConcentrationUnit,
nd: content.targetActConcentration,
nddw: content.targetActConcentrationUnit,
ly: 'ELN配制',
sxrq: content.expireDate,
kc: content.targetActVolume,
kcdw: content.targetActVolumeUnit,
syl: null,
type: null,
elnType: this.product,
syldw: content.targetActVolumeUnit,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
let tableList = content.formConfigs
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
let item = tableList[i]
tmpResource.push({
mc: item.targetName,
bh: item.targetCode + item.targetCodeSn,
ph: '',
ndz: item.targetActConcentration + item.targetActConcentrationUnit,
nd: item.targetActConcentration,
nddw: item.targetActConcentrationUnit,
ly: 'ELN配制',
sxrq: item.expireDate,
kc: item.targetActVolume,
kcdw: item.targetActVolumeUnit,
syl: null,
type: null,
elnType: this.product,
syldw: item.targetActVolumeUnit,
yxzq: item.effectivePeriod,
yxzqdw: item.effectivePeriodUnit,
})
}
}
}
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp =uniqeResource(tmpResource,stepResource.sjResource||[])
this.yqResourceTmp = stepResource.yqResource||[]
return content;
const stepResource = this.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = stepResource.yqResource || []
debugger
return this.resourceTmp;
},
//
async onSave() {
let content =await this.$refs.stepRef.getFormData();
console.log(content);
//使
getStepResource() {
const sjResource = [], yqResource = [];
if (this.formData.formConfigs && this.formData.formConfigs.length > 0) {
for (let i = 0; i < this.formData.formConfigs.length; i++) {
const paralleResource = this.$refs[`formStepRef_${i}`][0].getStepResource();
sjResource.push(...paralleResource.sjResource);
yqResource.push(...paralleResource.yqResource);
}
}
//
const { sj, yq } = duplicateResource(sjResource, yqResource)
return { sjResource: sj, yqResource: yq };
},
}
};
@ -328,4 +431,13 @@ export default {
.print-btn {
margin-bottom: 20px;
}
.config-header-right {
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
text-align: right;
width: 100%;
}
</style>

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

@ -0,0 +1,473 @@
<!-- 试验物质配制记录表 -->
<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.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<!-- 存储条件 -->
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"
label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<!-- 计算公式 -->
<BaseInfoFormPackage fieldItemLabel="template.gsp.GSP003.calcConditionLabel"
label="template.gsp.GSP003.calcConditionLabel" ref="calcConditionRef"
:formConfig="calcFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<!-- 操作步骤 -->
<div v-for="(formConfig, ladderIndex) in formData.formConfigs" :key="'ladder_' + ladderIndex">
<div class="template-form-item">
<div class="config-header-right">
<el-button v-if="fillType === 'preFill'" type="primary" @click="handleAddFormConfig">{{
$t('template.common.addBtn') }}</el-button>
<el-button v-if="fillType === 'preFill' && formData.formConfigs.length > 1"
type="danger" @click="handleDeleteFormConfig(ladderIndex)">{{
$t('template.common.deleteBtn')
}}</el-button>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.common.bqdy') }}</el-button>
</div>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps"
:ref="`formConfigStepFormPackageRef_${ladderIndex}`" :formConfig="stepFormConfig"
:formData="formConfig" />
<Step class="mt-0 s-container" :ref="`formStepRef_${ladderIndex}`"
:formData="formConfig.stepData" :fieldItemLabel="$t('template.common.jtpz')"
:prefixKey="'form_' + ladderIndex"></Step>
</div>
</div>
<!-- 备注 -->
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
</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";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es'
import { duplicateResource, getExpireDate } from "@/utils/index.js";
export default {
name: "GSP003",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
//
calcFormConfig() {
return [
{
type: "cardItem",
config: {
calcFormConfig: {
label: 'template.gsp.GSP003.calcConditionLabel',
type: "input",
fillType: "preFill",
maxlength: 50
},
}
}
];
},
//
storageFormConfig() {
return [
{
type: "step",
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,
},
methodCode: {
label: 'template.common.methodCode',
type: "input",
fillType: "preFill",
maxlength: 50
},
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
prepend: "V",
maxlength: 50
},
}
},
{
type: "conditionItem",
label: 'template.common.testConfigurationConditions',
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.common.configurationTime',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
stepFormConfig() {
return [
{
type: "step",
config: {
sfxyzjfx: {
label: 'template.gsp.GSP003.sfxyzjfx',
type: "select",
with:'100%',
fillType: "actFill",
options: [
{label:'是',value:'是'},
{label:'否',value:'否'}
]
},
targetName: {
label: 'template.common.targetSolutionName',
type: "input",
fillType: "preFill",
maxlength: 50
},
targetCode: {
label: 'template.common.targetSolutionCode',
type: "input",
subType: "span",
fillType: "preFill",
subKey: "targetCodeSn",
maxlength: 20
},
targetPreConcentration: {
label: 'template.common.targetPreConcentration',
type: "inputNumber",
subType: "select",
subKey: "targetPreConcentrationUnit",
fillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
selectTo: "targetActConcentrationUnit",//
},
targetActConcentration: {
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: 'template.common.targetPreVolume',
type: "inputNumber",
subType: "select",
subKey: "targetPreVolumeUnit",
subOptions: this.getDictOptions('business_tjdw'),
fillType: "preFill",
maxlength: 10,
selectTo: "targetActVolumeUnit",//
},
targetActVolume: {
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: 'template.common.effectivePeriod',
type: "inputNumber",
subType: "select",
subKey: "effectivePeriodUnit",
fillType: "preFill",
subOptions: this.getDictOptions('business_yxqdw'),
maxlength: 10
},
expireDate: {
label: 'template.common.expireDate',
type: "input",
},
}
}
]
},
},
data() {
return {
formData: {}
};
},
mounted() {
const formData = this.getFormDataByTemplateData();
if (!formData.targetCodeSn && this.fillType === "actFill") {
this.getCode(formData);
} else {
if (!this.formData.formConfigs) {
this.$set(this.formData, 'formConfigs', []);
this.formData.formConfigs.push({
formConfigs: [],
});
}
}
},
methods: {
//
handleAddFormConfig() {
if (!this.formData.formConfigs) {
this.$set(this.formData, 'formConfigs', []);
}
this.formData.formConfigs.push({
formConfigs: [],
});
},
//
handleDeleteFormConfig(index) {
this.formData.formConfigs.splice(index, 1);
},
//todo
printTag() {
const printConfig = this.getBasePrintConfig();
const { storageCondition, targetCodeSn } = this.formData;
printConfig["存储条件"] = storageCondition;
printConfig["编号"] = targetCodeSn;
EventBus.$emit('showTagPrintDialog', { printConfig })
},
//
getCode: debounce(async function (v) {
if (this.formData.formConfigs && this.formData.formConfigs.length > 0) {
for (let i = 0; i < this.formData.formConfigs.length; i++) {
let item = this.formData.formConfigs[i]
const result = await getLatestSn({
count: 1,
pre: item.targetCode,
type: 1
})
if (result.code == 200) {
this.$refs[`formConfigStepFormPackageRef_${i}`][0].updateFormData("targetCodeSn", result.data[0])
}
}
}
}, 100),
//
getFilledFormData() {
const baseData = this.$refs.baseInfoRef.getFilledFormData();
const conditionData = this.$refs.storageConditionRef.getFilledFormData();
const formConfigsData = [];
if (this.formData.formConfigs && this.formData.formConfigs.length > 0) {
for (let i = 0; i < this.formData.formConfigs.length; i++) {
const formData = this.$refs[`formConfigStepFormPackageRef_${i}`][0].getFilledFormData();
const stepData = this.$refs[`formStepRef_${i}`][0].getFilledFormData();
if(this.formData.startDate&&formData.effectivePeriod&&formData.effectivePeriodUnit){
formData.expireDate=getExpireDate(this.formData.startDate, formData.effectivePeriod, formData.effectivePeriodUnit)
}
formConfigsData.push({
...formData,
...stepData,
});
}
}
const remarkData = this.$refs.remarkRef.getFilledFormData();
return {
...baseData,
...conditionData,
formConfigs: formConfigsData,
...remarkData
}
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "storageConditionRef", "remarkRef"];
if (this.formData.formConfigs && this.formData.formConfigs.length > 0) {
for (let i = 0; i < this.formData.formConfigs.length; i++) {
refsToValidate.push(`formConfigStepFormPackageRef_${i}`);
refsToValidate.push(`formStepRef_${i}`);
}
}
return await this.validFormFields(refsToValidate);
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content;
},
//使
getResource() {
let content = this.getFilledFormData();
//resource
let tmpResource = []
if (this.fillType === "actFill") {
let tableList = content.formConfigs
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
let item = tableList[i]
tmpResource.push({
mc: item.targetName,
bh: item.targetCode + item.targetCodeSn,
ph: '',
ndz: item.targetActConcentration + item.targetActConcentrationUnit,
nd: item.targetActConcentration,
nddw: item.targetActConcentrationUnit,
ly: 'ELN配制',
sxrq: item.expireDate,
kc: item.targetActVolume,
kcdw: item.targetActVolumeUnit,
syl: null,
type: null,
elnType: this.product,
syldw: item.targetActVolumeUnit,
yxzq: item.effectivePeriod,
yxzqdw: item.effectivePeriodUnit,
})
}
}
}
//使
const stepResource = this.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = stepResource.yqResource || []
debugger
return this.resourceTmp;
},
//使
getStepResource() {
const sjResource = [], yqResource = [];
if (this.formData.formConfigs && this.formData.formConfigs.length > 0) {
for (let i = 0; i < this.formData.formConfigs.length; i++) {
const paralleResource = this.$refs[`formStepRef_${i}`][0].getStepResource();
sjResource.push(...paralleResource.sjResource);
yqResource.push(...paralleResource.yqResource);
}
}
//
const { sj, yq } = duplicateResource(sjResource, yqResource)
return { sjResource: sj, yqResource: yq };
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-right {
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
text-align: right;
width: 100%;
}
</style>

+ 2
- 1
src/views/business/comps/template/comps/lba/LBA002.vue View File

@ -21,8 +21,9 @@
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }" v-if="fillType!='actFill'">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>
</template>
</CustomTable>

+ 460
- 0
src/views/business/comps/template/comps/lba/LBA004.vue View File

@ -0,0 +1,460 @@
<!-- 配体结合分析处理记录表 -->
<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.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" v-if="resourceWz.length>0"/>
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.lba.lba004.xbxx" />
<CustomTable
:isBorder="false"
@blur="onHandleTableBlur"
:ref="`jcbRef`"
:columns="jcbColumns"
:formData="formData"
:prefixKey = "`jcb`"
fieldItemLabel = "template.lba.lba004.xbxx"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteJcbRow" ></TableOpertaionDelete>
</template>
</CustomTable>
<BaseInfoFormPackage fieldItemLabel="template.lba.lba004.ypxx" label="template.lba.lba004.ypxx"
ref="fjRef" :formConfig="getFjFormConfig" :formData="formData" />
<LineLabel label="template.lba.lba004.xszj" />
<!-- 平行配制区域 -->
<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-end" v-if="fillType === 'preFill'">
<el-button type="primary" @click="handleAddParalle(false)">{{ $t('template.lba.lba004.xz')}}</el-button>
<el-button type="danger" plain @click="deleteParalleConfig(paralleIndex)">{{ $t('template.lba.lba004.sc')}}</el-button>
</div>
<BaseInfoFormPackage @clickable="(e) => handleClickable('paralle', paralleIndex, e)"
:ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig"
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex"
:fieldItemLabel="$t('template.lba.lba004.xszj')" />
<!-- <CustomTable @blur="(e) => onHandleTableBlur('paralle', paralleIndex, e)"
:ref="`paralleStepTableRef_${paralleIndex}`" :showOperation="fillType === 'actFill' || fillType === 'preFill'"
:columns="paralleStepColumns"
@onRegentSubmit="(data) => onTableRegentSubmit('paralle', paralleIndex, data)"
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex"
:fieldItemLabel="$t('template.lba.lba004.xszj')">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="(rowIndex) => deleteRow(rowIndex, 'paralle', paralleIndex)" ></TableOpertaionDelete>
</template>
</CustomTable> -->
<CustomTable
:ref="`paralleStepTableRef_${paralleIndex}`" :showOperation="fillType === 'preFill'"
:columns="paralleStepColumns"
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex"
:fieldItemLabel="$t('template.lba.lba004.xszj')">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="(rowIndex) => deleteRow(rowIndex, 'paralle', paralleIndex)" ></TableOpertaionDelete>
</template>
</CustomTable>
<Step class="mt-0 s-container" :ref="`paralleStepRef_${paralleIndex}`"
:formData="paralleConfig.paralleStepData" :fieldItemLabel="$t('template.lba.lba004.xszj')"
:prefixKey="'paralle' + paralleIndex"></Step>
</div>
</div>
<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";
import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es';
import CustomTable from '@/components/Template/CustomTable.vue';
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
export default {
name: "LBA004",
components: { BaseInfoFormPackage, LineLabel, TableList, Step,CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
//
jcbColumns() {
return [{
label: 'template.lba.lba002.jcbmc',
prop: 'jcb',
bodyType: 'input',
bodyFillType: 'preFill',
width: 280,
},{
prop: 'jcbBh',
bodyType: 'jcb',
bodyFillType: 'actFill',
width: 280
}]
},
//
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,
},
methodCode: {
label: 'template.common.methodCode',
type: "input",
fillType: "preFill",
maxlength: 50
},
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
prepend: "V",
maxlength: 50
},
}
},
{
type: "conditionItem",
label: 'template.lba.lba002.cztj',
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.lba.lba002.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
getFjFormConfig() {
return [
{
type: "attachment",
config: {
attTitle: {
label: 'template.lba.lba003.fj',
type: "attachment",
fillType: "actFill",
},
}
}
]
},
paralleStepFormConfig(){
return [
{
type: 'step',
config: {
jz: {
label: 'template.lba.lba004.jzmc',
type: 'input',
fillType: 'preFill',
subType: 'sj',
subKey: 'jzCode',
subFillType: 'actFill',
maxlength: 20
}
}
}
]
},
paralleStepColumns(){
return [
{
label: 'template.lba.lba004.xsbs',
prop: 'xsbs',
width: 150,
showWidth: 120,
bodyType: 'input',
bodyFillType: 'preFill'
},
{
label: 'template.lba.lba004.ysypjrz',
prop: 'ysypjrz',
width: 250,
showWidth: 120,
fillType: 'preFill',
bodyType: 'inputNumber',
bodyFillType: 'preFill',
headerSelectKey: 'ysypjrzUnit',
headerSelectTo: 'sjypjrzUnit',
headerOptions: this.getDictOptions('business_tjdw'),
},
{
label: 'template.lba.lba004.sjypjrz',
prop: 'sjypjrz',
width: 250,
showWidth: 120,
fillType: 'preFill',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
compareTo: 'ysypjrz',
copyFrom: 'ysypjrz',
headerSelectKey: 'sjypjrzUnit',
headerOptions: this.getDictOptions('business_tjdw'),
},
{
label: 'template.lba.lba004.ysjzjrz',
prop: 'ysjzjrz',
width: 250,
showWidth: 120,
fillType: 'preFill',
bodyType: 'inputNumber',
bodyFillType: 'preFill',
headerSelectKey: 'ysjzjrzUnit',
headerSelectTo: 'sjjzjrzUnit',
headerOptions: this.getDictOptions('business_tjdw'),
},
{
label: 'template.lba.lba004.sjjzjrz',
prop: 'sjjzjrz',
width: 250,
showWidth: 120,
fillType: 'preFill',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
compareTo: 'ysjzjrz',
copyFrom: 'ysjzjrz',
headerSelectKey: 'sjjzjrzUnit',
headerOptions: this.getDictOptions('business_tjdw'),
}
]
}
},
data() {
return {
formData: {}
};
},
mounted() {
if(this.fillType === "preFill"){
this.handleAddParalle(true);
}
if(this.fillType === "actFill"){
this.getCode(formData);
}
},
methods: {
//
getFilledFormData() {
const baseData = this.$refs.baseInfoRef.getFilledFormData();
const jcbData = this.$refs.jcbRef.getFilledFormData();
const fjData = this.$refs.fjRef.getFilledFormData();
const remarkData = this.$refs.remarkRef.getFilledFormData();
//
const paralleConfigsData = [];
if (this.formData.paralleConfigs && this.formData.paralleConfigs.length > 0) {
for (let i = 0; i < this.formData.paralleConfigs.length; i++) {
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,
paralleStepData: paralleStepData.stepData,
showParalleConfig: true
});
}
}
return {
...baseData,
...jcbData,
...fjData,
...remarkData,
paralleConfigs: paralleConfigsData,
}
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef","jcbRef","fjRef", "remarkRef"];
//
if (this.formData.paralleConfigs && this.formData.paralleConfigs.length > 0) {
for (let i = 0; i < this.formData.paralleConfigs.length; i++) {
refsToValidate.push(`paralleStepFormPackageRef_${i}`);
refsToValidate.push(`paralleStepTableRef_${i}`);
refsToValidate.push(`paralleStepRef_${i}`);
}
}
return await this.validFormFields(refsToValidate);
},
getResource() {
let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
},
//
handleAddParalle(init) {
if(init){
if (!this.formData.paralleConfigs) {
this.$set(this.formData, 'paralleConfigs', []);
}
}else{
//
if (!this.formData.paralleConfigs) {
this.$set(this.formData, 'paralleConfigs', []);
}
//
this.formData.paralleConfigs.push({
paralleStepData: [],
paralleTableFormData: [],
showParalleConfig: true
});
}
},
//
deleteParalleConfig(index) {
if(this.formData.paralleConfigs.length===1){
// this.$message.error("1");
return;
}
this.formData.paralleConfigs.splice(index, 1);
},
deleteJcbRow(rowIndex){
const jcbRef = this.$refs['jcbRef'];
if (jcbRef) {
jcbRef.deleteRow(rowIndex);
}
},
//
deleteRow(rowIndex, type, configIndex = 0) {
//
if (type === 'ladder') {
const tableRef = this.$refs[`ladderStepTableRef_${configIndex}`];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
} else if (type === 'paralle') {
const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`];
if (tableRef) {
tableRef[0].deleteRow(rowIndex);
}
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

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

@ -25,6 +25,7 @@
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/SP009.vue View File

@ -18,7 +18,7 @@
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
<CustomTable @blur="onHandleTableBlur" :ref="`tableRef`" :columns="tableStepColumns"
<CustomTable @blur="onHandleTableBlur" :ref="`tableRef`" :columns="tableStepColumns" :showOperation="fillType === 'preFill'"
:formData="formData" :prefixKey="`table`"
fieldItemLabel="template.common.operationSteps">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
@ -37,7 +37,7 @@
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps"
ref="rongyeStepFormPackageRef" :formConfig="rongyeStepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<CustomTable @blur="onHandleTableBlur" :ref="`rongyeTableRef`" :columns="rongyeTableStepColumns"
<CustomTable @blur="onHandleTableBlur" :ref="`rongyeTableRef`" :columns="rongyeTableStepColumns" :showOperation="fillType === 'preFill'"
:formData="{stepTableFormData:formData.stepTableFormData_1,headerSelectFields:formData.headerSelectFields_1}" :prefixKey="`rongyeTable`"
fieldItemLabel="template.common.operationSteps">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">

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

@ -25,6 +25,7 @@
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion

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

@ -25,6 +25,7 @@
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion

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

@ -25,6 +25,7 @@
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion

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

@ -23,6 +23,7 @@
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion

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

@ -25,6 +25,7 @@
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion

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

@ -25,6 +25,7 @@
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion

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

@ -25,6 +25,7 @@
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion

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

@ -25,6 +25,7 @@
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion

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

@ -25,6 +25,7 @@
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion

+ 8
- 2
src/views/business/comps/template/dialog/SelectMixReagentDialog.vue View File

@ -25,8 +25,8 @@
<script>
import SelectTable from '@/components/Template/SelectTable.vue';
import SelectDept from "@/views/business/comps/select/SelectDept";
import { public_sjList, public_gyzjList, public_gspList, public_xbList } from '@/api/business/public/public';
import { getSjSearchForm, getSjColumns, getGyzjSearchForm, getGyzjColumns, getGspSearchForm, getGspColumns, getXbSearchForm, getXbColumns } from '@/views/business/comps/template/formConfig/formConfig.js';
import { public_sjList, public_gyzjList, public_gspList, public_xbList,public_jcbList } from '@/api/business/public/public';
import { getSjSearchForm, getSjColumns, getGyzjSearchForm, getGyzjColumns, getGspSearchForm, getGspColumns, getXbSearchForm, getXbColumns,getJcbSearchForm,getJcbColumns } from '@/views/business/comps/template/formConfig/formConfig.js';
import { EventBus } from "@/utils/eventBus";
const typeMap = {
'1': {
@ -53,6 +53,12 @@ const typeMap = {
listApi: public_gyzjList,
title:"选择给药制剂"
},
"13": {
searchForm: getJcbSearchForm(),
columns: getJcbColumns(),
listApi: public_jcbList,
title:"请选择检测板"
},
}
export default {
components: {

+ 165
- 137
src/views/business/comps/template/formConfig/formConfig.js View File

@ -1,165 +1,193 @@
// 试剂列表查询表单
export const getSjSearchForm = () => {
return {
mc: {
label: 'page.business.resource.sj.sjmc',
},
bh: {
label: 'page.business.resource.sj.sjbh',
},
studyName: {
label: 'page.business.resource.sj.sssy',
},
return {
mc: {
label: 'page.business.resource.sj.sjmc'
},
bh: {
label: 'page.business.resource.sj.sjbh'
},
studyName: {
label: 'page.business.resource.sj.sssy'
}
}
}
// 供试品列表查询表单
export const getGspSearchForm = () => {
return {
mc: {
label: '名称/代号',
},
bh: {
label: 'page.business.resource.sj.sjbh',
},
ph: {
label: '物质批号',
},
return {
mc: {
label: '名称/代号'
},
bh: {
label: 'page.business.resource.sj.sjbh'
},
ph: {
label: '物质批号'
}
}
}
// 给药制剂列表查询表单
export const getGyzjSearchForm = () => {
return {
mc: {
label: 'page.business.resource.sj.sjmc',
},
bh: {
label: 'page.business.resource.sj.sjbh',
},
studyMc: {
label: 'page.business.resource.sj.sssy',
},
return {
mc: {
label: 'page.business.resource.sj.sjmc'
},
bh: {
label: 'page.business.resource.sj.sjbh'
},
studyMc: {
label: 'page.business.resource.sj.sssy'
}
}
}
// 细胞列表查询表单
export const getXbSearchForm = () => {
return {
mc: {
label: 'page.business.resource.sj.mc',
},
bh: {
label: 'page.business.resource.sj.bh',
},
studyMc: {
label: 'page.business.resource.sj.sssy',
},
return {
mc: {
label: 'page.business.resource.sj.mc'
},
bh: {
label: 'page.business.resource.sj.bh'
},
studyMc: {
label: 'page.business.resource.sj.sssy'
}
}
}
// 试剂列表表格列
export const getSjColumns = () => {
return [
{
prop: 'mc',
label: 'page.business.resource.sj.sjmc',
},
{
prop: 'bh',
label: 'page.business.resource.sj.sjbh',
},
{
prop: 'nd',
label: 'page.business.resource.sj.sjnd',
},
{
prop: 'nddw',
label: 'page.business.resource.gsp.nddw',
},
{
prop: 'sxr',
label: 'page.business.resource.sj.sxr',
},
{
prop: 'studyName',
label: 'page.business.resource.sj.sssy',
},
]
return [
{
prop: 'mc',
label: 'page.business.resource.sj.sjmc'
},
{
prop: 'bh',
label: 'page.business.resource.sj.sjbh'
},
{
prop: 'nd',
label: 'page.business.resource.sj.sjnd'
},
{
prop: 'nddw',
label: 'page.business.resource.gsp.nddw'
},
{
prop: 'sxr',
label: 'page.business.resource.sj.sxr'
},
{
prop: 'studyName',
label: 'page.business.resource.sj.sssy'
}
]
}
// 供试品列表表格列
export const getGspColumns = () => {
return [
{
prop: 'mc',
label: '名称/代号',
},
{
prop: 'bh',
label: 'page.business.resource.sj.sjbh',
},
{
prop: 'yxq',
label: '有效期',
},
{
prop: 'ph',
label: '物质批号',
},
]
return [
{
prop: 'mc',
label: '名称/代号'
},
{
prop: 'bh',
label: 'page.business.resource.sj.sjbh'
},
{
prop: 'yxq',
label: '有效期'
},
{
prop: 'ph',
label: '物质批号'
}
]
}
// 给药制剂列表表格列
export const getGyzjColumns = () => {
return [
{
prop: 'mc',
label: 'page.business.resource.sj.sjmc',
},
{
prop: 'bh',
label: 'page.business.resource.sj.sjbh',
},
{
prop: 'nd',
label: 'page.business.resource.sj.sjnd',
},
{
prop: 'nddw',
label: 'page.business.resource.gsp.nddw',
},
{
prop: 'sxr',
label: 'page.business.resource.sj.sxr',
},
{
prop: 'studyName',
label: 'page.business.resource.sj.sssy',
},
]
return [
{
prop: 'mc',
label: 'page.business.resource.sj.sjmc'
},
{
prop: 'bh',
label: 'page.business.resource.sj.sjbh'
},
{
prop: 'nd',
label: 'page.business.resource.sj.sjnd'
},
{
prop: 'nddw',
label: 'page.business.resource.gsp.nddw'
},
{
prop: 'sxr',
label: 'page.business.resource.sj.sxr'
},
{
prop: 'studyName',
label: 'page.business.resource.sj.sssy'
}
]
}
// 细胞列表表格列
export const getXbColumns = () => {
return [
{
prop: 'mc',
label: '名称',
},
{
prop: 'bh',
label: '编号',
},
{
prop: 'tj',
label: '体积',
},
{
prop: 'ly',
label: '来源',
},
{
prop: 'sxr',
label: 'page.business.resource.sj.sxr',
},
{
prop: 'studyName',
label: 'page.business.resource.sj.sssy',
},
]
}
return [
{
prop: 'mc',
label: '名称'
},
{
prop: 'bh',
label: '编号'
},
{
prop: 'tj',
label: '体积'
},
{
prop: 'ly',
label: '来源'
},
{
prop: 'sxr',
label: 'page.business.resource.sj.sxr'
},
{
prop: 'studyName',
label: 'page.business.resource.sj.sssy'
}
]
}
// 检测板查询表单
export const getJcbSearchForm = () => {
return {
bh: {
label: 'template.lba.lba002.jcbmc'
},
cjr: {
label: 'template.lba.lba002.cjr'
}
}
}
// 检测板列表表格列
export const getJcbColumns = () => {
return [
{
prop: 'bh',
label: 'template.lba.lba002.jcbmc'
},
{
prop: 'createTime',
label: 'template.lba.lba002.cjsj'
},
{
prop: 'cjr',
label: 'template.lba.lba002.cjr'
}
]
}

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

@ -58,9 +58,9 @@ export default {
this.resource = _.filter(JSON.parse(v.resource), function (o) {
return o.type == 1 || o.elnType == 1
})
//试验物资信息 供试品、给药制剂
//试验物资信息 供试品、给药制剂、麻精药
this.resourceWz = _.filter(JSON.parse(v.resource), function (o) {
return o.type == 3 || o.type == 7 || o.elnType == 3 || o.elnType == 7
return o.type == 3 || o.type == 5 || o.type == 7 || o.elnType == 3|| o.elnType == 5 || o.elnType == 7
})
}
if (v.yqResource) {

Loading…
Cancel
Save