Browse Source

feat:[模板管理][生物样品分析方法学样品制备表-Recovery]

lkf
HanLong 3 months ago
parent
commit
57cd053b41
4 changed files with 352 additions and 14 deletions
  1. +12
    -0
      src/views/business/comps/template/TemplateTable.vue
  2. +323
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue
  3. +1
    -1
      src/views/business/resource/gsp/comps/gsp/XqExport.vue
  4. +16
    -13
      src/views/business/study/comp/wzlb/sjList.vue

+ 12
- 0
src/views/business/comps/template/TemplateTable.vue View File

@ -17,8 +17,12 @@ import SWYPBQGZYZBB from "./comps/sp/SWYPBQGZYZBB.vue";
import SWYPNBGZYZBB from "./comps/sp/SWYPNBGZYZBB.vue";
//-10
import ZQDYJMD from "./comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue";
<<<<<<< HEAD
import QXWDX from "./comps/sp/SWYPFXFFXYPZBB/QXWDX.vue";
import CBYHGZYWDX from "./comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue";
=======
import Recovery from "./comps/sp/SWYPFXFFXYPZBB/Recovery.vue";
>>>>>>> a9295db (feat:[模板管理][生物样品分析方法学样品制备表(Recovery)])
import Demo from "./comps/sp/Demo.vue";
//
import SYWZPZJHB from "./comps/gy/SYWZPZJHB.vue";
@ -28,7 +32,11 @@ export default {
name: "TemplateTable",
components: {
MJYLQSQD, SYWZPZJHB,
<<<<<<< HEAD
SP001, SWYPFXRYPZB, Demo, SWYPFXCBYPZB, SWYPBQGZYZBB, SWYPNBGZYZBB,ZQDYJMD,QXWDX,CBYHGZYWDX
=======
SP001, SWYPFXRYPZB, Demo, SWYPFXCBYPZB, SWYPBQGZYZBB, SWYPNBGZYZBB,ZQDYJMD,Recovery
>>>>>>> a9295db (feat:[模板管理][生物样品分析方法学样品制备表(Recovery)])
},
props: {
sn: {
@ -58,8 +66,12 @@ export default {
'SP003': 'SWYPBQGZYZBB',
'SP004': 'SWYPNBGZYZBB',
'SP008': 'ZQDYJMD',
<<<<<<< HEAD
'SP010': 'QXWDX',
'SP011': 'CBYHGZYWDX',
=======
'SP009': 'Recovery',
>>>>>>> a9295db (feat:[模板管理][生物样品分析方法学样品制备表(Recovery)])
'SYWZPZJHB': 'SYWZPZJHB',
'MJYLQSQD': 'MJYLQSQD',
}

+ 323
- 0
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue View File

@ -0,0 +1,323 @@
<!-- 生物样品分析方法学样品制备表(Recovery) -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.templateMc ||
'生物样品分析方法学样品制备表(Recovery)' }}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPcakge fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" ref="baseInfoRef"
:formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns"
:dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqsColumns"
:dataSource="resource" />
<BaseInfoFormPcakge fieldItemLabel="template.common.storageCondition" label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<CustomTable
@blur="onHandleTableBlur"
:ref="`tableRef`"
:columns="tableStepColumns"
:formData="formData"
:prefixKey = "`table`"
@clickable="handleClickable"
fieldItemLabel = "这个是什么"
>
<template slot="operation" slot-scope="{ row, rowIndex}">
<TableOpertaion
:fillType="fillType"
:row="row"
:rowIndex="rowIndex"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"
></TableOpertaion>
</template>
</CustomTable>
</div>
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPcakge 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 BaseInfoFormPcakge from "@/components/Template/BaseInfoFormPcakge";
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 {getSWYPFXFFXYPZBBTableConfig} from "../../../formConfig/SWYPFXFFXYPZBBTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
export default {
name: "SWYPFXRYPZB",
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
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,
},
methodCode: {
label: 'template.common.methodCode',
type: "input",
fillType: "preFill",
maxlength: 50
},
versionNum: {
label: 'template.common.versionNumber',
type: "input",
fillType: "actFill",
maxlength: 50
},
//
clpbg: {
label: 'template.common.clpbh',
type: "input",
fillType: "actFill",
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,
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "cellItem",
label: 'template.common.rqcz',
config: {
rqcz: {
type: "input",
fillType: "actFill",
maxlength: 50
},
}
},
{
type: "cellItem",
label: 'template.common.clsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
stepFormConfig() {
return [
{
type: "step",
config: {
jz: {
label: 'template.common.xzjz',
type: "input",
fillType: "preFill",
subType: "clickable",
subKey: "subSolution",
subFillType: "actFill",
maxlength: 20,
},
}
}
]
},
tableStepColumns() {
return getSWYPFXFFXYPZBBTableConfig(this);
},
},
data() {
return {
resource: [],
resourceData1: [],
sysjColumns: [
{ label: 'template.common.reagentName', prop: "mc" },//
{ label: 'template.common.reagentCode', prop: "bh" },//
{ label: 'template.common.reagentNo', prop: "ph" },//
{ label: 'template.common.concentration', prop: "nd" },//
{ label: 'template.common.source', prop: "source" },//
{ label: 'template.common.reagentExpireDate', prop: "sxrq" },//
],
yqsColumns: [
{ label: 'template.common.instrumentName', prop: "instrumentName" },
{ label: 'template.common.instrumentModel', prop: "instrumentModel" },
{ label: 'template.common.instrumentCode', prop: "instrumentCode" },
{ label: 'template.common.nextTestDate', prop: "nextTestDate" },
],
formData: {}
};
},
mounted() {
},
watch: {
formData: {
immediate: true,
handler(v) {
if(!v.targetCodeSn && this.fillType === "actFill"){
this.getCode();
}
}
}
},
methods: {
//
handleClickable(col, rowIndex) {
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//
}
this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex,{
sjry: "我是填充进来的数据",
})
},
//
async getCode(){
const result = await getLatestSn({
count: 1,
})
if(result.code == 200){
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn",result.data)
}
},
//
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef","stepRef", "remarkRef"])
},
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef","tableRef" ,"stepRef", "remarkRef"]);
//resource
let tmpResource = []
debugger
//
tmpResource.push({
mc: content.targetName,
bh: content.targetCode+content.targetCodeSn,
ph: '',
nd: content.targetActConcentration + content.targetActConcentrationUnit,
source: 'ELN配制',
sxrq: content.expireDate,
ndz: content.targetActConcentration,
nddw: content.targetActConcentrationUnit,
kc: content.targetActVolume,
kcdw: content.targetActVolumeUnit,
syl: null,
syldw:content.targetActVolumeUnit,
yxzq:content.effectivePeriod,
yxzqdw:content.effectivePeriodUnit,
})
//使
this.resource=tmpResource
return content;
},
async onSave() {
const formData = await this.getFilledFormData();
console.log(formData, "formData")
},
//
deleteRow(rowIndex) {
const tableRef = this.$refs['tableRef'];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
</style>

+ 1
- 1
src/views/business/resource/gsp/comps/gsp/XqExport.vue View File

@ -10,7 +10,7 @@
<!-- 基本信息 -->
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> 基本信息</div>
<div class="subtitle"> {{ $t('page.business.resource.gsp.mc') }}</div>
</div>
<div class="pal">
<div class="left">

+ 16
- 13
src/views/business/study/comp/wzlb/sjList.vue View File

@ -67,22 +67,25 @@
</el-table-column>
<el-table-column :label="$t('form.operate')" fixed="right" align="center"
class-name="small-padding fixed-width" width="250px">
<template slot-scope="scope">
<!-- 详情 -->
<el-button type="text" @click="handleXq(scope.row)" v-hasPermi="['business:studyMjy:xq', 'business:nonTrialMjy:xq', 'business:drugMjy:xq']">{{
$t('page.business.resource.mjy.detail') }}</el-button>
<template v-if="scope.row.syghzt == 1">
<!-- 处置 -->
<el-button type="text" @click="handleCz(scope.row)" v-hasPermi="['business:studyMjy:czyj', 'business:nonTrialMjy:czyj', 'business:drugMjy:czyj']">{{
<template slot-scope="scope">
<!-- 详情 -->
<template
v-if="scope.row.zjzt == 1 || scope.row.zjzt == 5 || (scope.row.zjzt == 9 && scope.row.jyzt == 5)">
<el-button type="text" @click="handleXq(scope.row)" v-hasPermi="['business:resource:sj:xq']">{{
$t('page.business.resource.sj.detail') }}</el-button>
</template>
<!-- 处置 -->
<template v-if="scope.row.zjzt == 1">
<el-button type="text" @click="handleCz(scope.row)" v-hasPermi="['business:resource:sj:cz']">{{
$t('page.business.resource.sj.cz') }}</el-button>
</template>
<template v-if="scope.row.zjzt == 1">
<!-- 编辑 -->
<el-button type="text" @click="handleBj(scope.row)"
v-hasPermi="['business:studyMjy:bj', 'business:nonTrialMjy:bj', 'business:drugMjy:bj']">{{
$t('form.edit') }}</el-button>
<el-button type="text" @click="handleBj(scope.row)" v-hasPermi="['business:resource:sj:bj']">{{
$t('form.edit') }}</el-button>
<!-- 修改库存 -->
<el-button type="text" @click="handleXgkc(scope.row)"
v-hasPermi="['business:studyMjy:xgkc', 'business:nonTrialMjy:xgkc', 'business:drugMjy:xgkc']">{{
$t('page.business.resource.sj.xgkc') }}</el-button>
<el-button type="text" @click="handleXgkc(scope.row)" v-hasPermi="['business:resource:sj:xgkc']">{{
$t('page.business.resource.sj.xgkc') }}</el-button>
</template>
</template>
</el-table-column>

Loading…
Cancel
Save