Browse Source

feat: [模板管理] YP002+前序表单

lkf
memorylkf 1 month ago
parent
commit
e54c9427f7
13 changed files with 346 additions and 8 deletions
  1. +8
    -0
      src/api/business/public/public.js
  2. +2
    -1
      src/components/Template/HandleFormItem.vue
  3. +29
    -1
      src/lang/en/template/yp.js
  4. +29
    -1
      src/lang/zh/template/yp.js
  5. +12
    -1
      src/utils/index.js
  6. +5
    -1
      src/views/business/comps/template/TemplateTable.vue
  7. +1
    -0
      src/views/business/comps/template/comps/lba/LBA004.vue
  8. +1
    -0
      src/views/business/comps/template/comps/lba/LBA005.vue
  9. +0
    -1
      src/views/business/comps/template/comps/lba/LBA006.vue
  10. +1
    -0
      src/views/business/comps/template/comps/lba/LBA007.vue
  11. +218
    -0
      src/views/business/comps/template/comps/yp/YP002.vue
  12. +8
    -2
      src/views/business/comps/template/dialog/SelectMixReagentDialog.vue
  13. +32
    -0
      src/views/business/comps/template/formConfig/formConfig.js

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

@ -139,3 +139,11 @@ export function public_jcbList(query) {
params: query params: query
}) })
} }
// 前序表单
export function public_qxFormFillList(query) {
return request({
url: '/system/business/public/qxFormFillList',
method: 'get',
params: query
})
}

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

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

+ 29
- 1
src/lang/en/template/yp.js View File

@ -1,4 +1,32 @@
//样品 //样品
export default { export default {
yp001: {} //用的SP001
yp001: {}, //用的SP001
yp002: {
swypyjjlbxx: 'Biological Sample Transfer Record Information',
qxbd: 'Related Earlier Form',
xzbd: '请选表单',
bdmc: 'Record Name',
cjr: 'Creator',
cjsj: 'Creation Date',
bdzt: 'Status',
qbjsxx: 'Sample Receiving Information',
jsdd: 'Receiving Location',
jsscftj: 'Storage Condition upon receipt',
jssj: 'Receiving Time',
hqsj: '获取时间',
jsqk: 'Receiving Status',
mcysl: 'Name and Quantity',
yz: 'Consistent',
byz: 'Inconsistent',
ypgzk: 'Sample Tube Condition',
zc: 'Normal',
yc: 'Abnormal',
zyhxx: 'Transfer Box Information',
kzyh: 'empty transfer box',
gyzyzh: 'Dosing Group Box',
qt: 'other',
jsbz: 'Comment on Receiving'
}
} }

+ 29
- 1
src/lang/zh/template/yp.js View File

@ -1,4 +1,32 @@
//样品 //样品
export default { export default {
yp001: {} //用的SP001
yp001: {}, //用的SP001
yp002: {
swypyjjlbxx: '生物样品移交记录表信息',
qxbd: '前序表单',
xzbd: '请选表单',
bdmc: '表单名称',
cjr: '创建人',
cjsj: '创建时间',
bdzt: '表单状态',
qbjsxx: '样品接收信息',
jsdd: '接收地点',
jsscftj: '接收时存放条件',
jssj: '接收时间',
hqsj: '获取时间',
jsqk: '接收情况',
mcysl: '名称与数量',
yz: '一致',
byz: '不一致',
ypgzk: '样品管状况',
zc: '正常',
yc: '异常',
zyhxx: '转运盒信息',
kzyh: '空转运盒',
gyzyzh: '给药组转运盒',
qt: '其他',
jsbz: '接收备注'
}
} }

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

@ -549,6 +549,17 @@ export function duplicateResource(sj, yq) {
//是不是试剂/仪器等弹窗类型 //是不是试剂/仪器等弹窗类型
export function isRegent(item, fieldCode = 'type') { export function isRegent(item, fieldCode = 'type') {
const type = item[fieldCode] const type = item[fieldCode]
const typeList = ['sj', 'gsp', 'mix', 'xj', 'xb', 'gyzj', 'mjy', 'yq', 'jcb']
const typeList = [
'sj',
'gsp',
'mix',
'xj',
'xb',
'gyzj',
'mjy',
'yq',
'jcb',
'qxbd'
]
return typeList.includes(type) return typeList.includes(type)
} }

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

@ -69,6 +69,7 @@ import LBA007 from "./comps/lba/LBA007.vue";
// //
// YP001-使SP001 // YP001-使SP001
import YP002 from "./comps/yp/YP002.vue";
export default { export default {
name: "TemplateTable", name: "TemplateTable",
@ -89,7 +90,9 @@ export default {
LBA004, LBA004,
LBA005, LBA005,
LBA006, LBA006,
LBA007
LBA007,
//
YP002
}, },
props: { props: {
sn: { sn: {
@ -174,6 +177,7 @@ export default {
'ADA006': 'LBA006', 'ADA006': 'LBA006',
// //
'YP001': 'SP001', 'YP001': 'SP001',
'YP002': 'YP002',
} }
} }
return this.componentMap || "Demo" return this.componentMap || "Demo"

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

@ -113,6 +113,7 @@ export default {
bodyType: 'input', bodyType: 'input',
bodyFillType: 'preFill', bodyFillType: 'preFill',
width: 280, width: 280,
bodyMaxlength:20
},{ },{
label: '', label: '',
prop: 'jcbBh', prop: 'jcbBh',

+ 1
- 0
src/views/business/comps/template/comps/lba/LBA005.vue View File

@ -173,6 +173,7 @@ export default {
bodyType: 'input', bodyType: 'input',
bodyFillType: 'preFill', bodyFillType: 'preFill',
width: 280, width: 280,
bodyMaxlength:20
},{ },{
label: '', label: '',
prop: 'jcbBh', prop: 'jcbBh',

+ 0
- 1
src/views/business/comps/template/comps/lba/LBA006.vue View File

@ -156,7 +156,6 @@ export default {
label: 'template.lba.lba006.jcb', label: 'template.lba.lba006.jcb',
type: 'jcb', type: 'jcb',
fillType: 'actFill', fillType: 'actFill',
maxlength: 20
}, },
jg: { jg: {
label: 'template.lba.lba006.jg', label: 'template.lba.lba006.jg',

+ 1
- 0
src/views/business/comps/template/comps/lba/LBA007.vue View File

@ -173,6 +173,7 @@ export default {
bodyType: 'input', bodyType: 'input',
bodyFillType: 'preFill', bodyFillType: 'preFill',
width: 280, width: 280,
bodyMaxlength:20
},{ },{
label: '', label: '',
prop: 'jcbBh', prop: 'jcbBh',

+ 218
- 0
src/views/business/comps/template/comps/yp/YP002.vue View File

@ -0,0 +1,218 @@
<!-- 生物样品接收记录表 -->
<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" />
<BaseInfoFormPackage fieldItemLabel="template.yp.yp002.swypyjjlbxx" label="template.yp.yp002.swypyjjlbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" />
<BaseInfoFormPackage fieldItemLabel="template.yp.yp002.qbjsxx" label="template.yp.yp002.qbjsxx"
ref="ypjsInfoRef" :formConfig="ypjsInfoFormConfig" :formData="formData" />
<BaseInfoFormPackage fieldItemLabel="template.yp.yp002.jsbz" label="template.yp.yp002.jsbz"
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 moment from "moment";
export default {
name: "YP002",
components: { BaseInfoFormPackage, LineLabel, TableList, Step },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
//
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,
},
}
},
]
},
//
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.yp.yp002.qxbd',
type: 'qxbd',
fillType: 'actFill',
// span:1,
// label: 'template.yp.yp002.jsdd',
// type: 'input',
// fillType: 'actFill',
},
}
},
]
},
//
ypjsInfoFormConfig() {
return [
{
type: "cellItem",
label: 'template.yp.yp002.jsdd',
config: {
jsdd: {
span:1,
label: 'template.yp.yp002.jsdd',
type: 'input',
fillType: 'actFill',
maxlength: 200
},
}
},
{
type: "cellItem",
label: 'template.yp.yp002.jsscftj',
config: {
jsdd: {
label: 'template.yp.yp002.jsscftj',
type: 'input',
fillType: 'actFill',
maxlength: 200
},
}
},
{
type: "cellItem",
label: 'template.yp.yp002.jssj',
config: {
jsdd: {
label: 'template.yp.yp002.jssj',
type: 'input',
fillType: 'actFill',
maxlength: 200
},
}
}
]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
getFilledFormData() {
const baseData = this.$refs.baseInfoRef.getFilledFormData();
const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
const ypjsData = this.$refs.ypjsInfoRef.getFilledFormData();
const remarkData = this.$refs.remarkRef.getFilledFormData();
return {
...baseData,
...swypyjData,
...ypjsData,
...remarkData,
}
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "ypjsInfoRef", "remarkRef"];
return await this.validFormFields(refsToValidate);
},
getResource() {
let content = this.getFilledFormData();
//使
this.resourceTmp = []
this.yqResourceTmp = []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
},
}
};
</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>

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

@ -25,8 +25,8 @@
<script> <script>
import SelectTable from '@/components/Template/SelectTable.vue'; import SelectTable from '@/components/Template/SelectTable.vue';
import SelectDept from "@/views/business/comps/select/SelectDept"; import SelectDept from "@/views/business/comps/select/SelectDept";
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 { public_sjList, public_gyzjList, public_gspList, public_xbList,public_jcbList,public_qxFormFillList } from '@/api/business/public/public';
import { getSjSearchForm, getSjColumns, getGyzjSearchForm, getGyzjColumns, getGspSearchForm, getGspColumns, getXbSearchForm, getXbColumns,getJcbSearchForm,getJcbColumns,getQxbdSearchForm,getQxbdColumns } from '@/views/business/comps/template/formConfig/formConfig.js';
import { EventBus } from "@/utils/eventBus"; import { EventBus } from "@/utils/eventBus";
const typeMap = { const typeMap = {
'1': { '1': {
@ -59,6 +59,12 @@ const typeMap = {
listApi: public_jcbList, listApi: public_jcbList,
title:"请选择检测板" title:"请选择检测板"
}, },
"15": {
searchForm: getQxbdSearchForm(),
columns: getQxbdColumns(),
listApi: public_qxFormFillList,
title:"请选择前序表单"
},
} }
export default { export default {
components: { components: {

+ 32
- 0
src/views/business/comps/template/formConfig/formConfig.js View File

@ -191,3 +191,35 @@ export const getJcbColumns = () => {
} }
] ]
} }
// 前序表单查询表单
export const getQxbdSearchForm = () => {
return {
bdmc: {
label: 'template.yp.yp002.bdmc'
},
userMc: {
label: 'template.yp.yp002.cjr'
}
}
}
// 前序表单列表表格列
export const getQxbdColumns = () => {
return [
{
prop: 'bdmc',
label: 'template.yp.yp002.bdmc'
},
{
prop: 'userMc',
label: 'template.yp.yp002.cjr'
},
{
prop: 'createTime',
label: 'template.yp.yp002.cjsj'
},
{
prop: 'bdzt',
label: 'template.yp.yp002.bdzt'
}
]
}

Loading…
Cancel
Save