diff --git a/src/api/business/public/public.js b/src/api/business/public/public.js index df14be5..293b126 100644 --- a/src/api/business/public/public.js +++ b/src/api/business/public/public.js @@ -51,3 +51,11 @@ export function public_animalSpeciesList(query) { params: query }) } +// 试剂列表 +export function public_sjList(query) { + return request({ + url: '/system/business/public/sjList', + method: 'get', + params: query + }) +} diff --git a/src/components/Template/SelectTable.vue b/src/components/Template/SelectTable.vue index 0d5ea80..8738b33 100644 --- a/src/components/Template/SelectTable.vue +++ b/src/components/Template/SelectTable.vue @@ -1,16 +1,17 @@ - +
@@ -60,7 +61,7 @@ export default { }, selectedCode: { type: String, - default: "code",//radio选中的值的字段 + default: "bh",//radio选中的值的字段 }, listApi:{ type: Function, @@ -79,35 +80,7 @@ export default { pageSize: 10, total: 0, }, - dataSource: [ - { - id: 1, - name: '试剂1', - code: 'R001', - sjnd: '100', - unit: 'mg/mL', - expireDate: '2023-12-31', - ss: '试验1', - }, - { - id: 2, - name: '试剂2', - code: 'R002', - sjnd: '200', - unit: 'mg/mL', - expireDate: '2024-06-30', - ss: '试验2', - }, - { - id: 3, - name: '试剂2', - code: 'R002', - sjnd: '200', - unit: 'mg/mL', - expireDate: '2024-06-30', - ss: '试验2', - }, - ] + dataSource: [] } }, watch: { @@ -119,10 +92,14 @@ export default { }, }, mounted() { - this.getList(); - this.initSearchForm(); + }, methods: { + show(){ + this.localSelectedId = '' + this.getList(); + this.initSearchForm(); + }, //初始化查询表单 initSearchForm() { for(let key in this.searchForm) { @@ -144,6 +121,10 @@ export default { this.pagination.pageNum = 1; this.getList(); }, + reset(){ + this.$refs.SearchSjRef.resetFields() + this.onSearch() + }, //分页大小切换 handleSizeChange(e) { this.$emit("pagination", {pageSize: e}); diff --git a/src/lang/en/business/resource/sj.js b/src/lang/en/business/resource/sj.js index 3a4db55..4da26f2 100644 --- a/src/lang/en/business/resource/sj.js +++ b/src/lang/en/business/resource/sj.js @@ -61,4 +61,9 @@ export default { jssj: 'Unlock', sqjy: 'Apply for Check-out', sdsj: 'Lock', + //选择试剂弹窗 + xzsj: 'Select Solution', + sjmc: 'Solution Name', + sjbh: 'Solution ID', + sjnd: 'Solution Concentration' } diff --git a/src/lang/zh.js b/src/lang/zh.js index 49ab884..9636376 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -14,7 +14,7 @@ import template from './zh/system/template' // 公共模板语言配置 import commonTemplate from './zh/template/commonTemplate' //色谱模板 -import sp from './en/template/sp' +import sp from './zh/template/sp' // 试验管理 import study from './zh/business/study/study' diff --git a/src/lang/zh/business/resource/sj.js b/src/lang/zh/business/resource/sj.js index cebb254..3a8fc69 100644 --- a/src/lang/zh/business/resource/sj.js +++ b/src/lang/zh/business/resource/sj.js @@ -62,4 +62,9 @@ export default { jssj: '解锁试剂', sqjy: '申请借阅', sdsj: '锁定试剂', + //选择试剂弹窗 + xzsj: '请选择试剂', + sjmc: '试剂名称', + sjbh: '试剂编号', + sjnd: '试剂浓度' } diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index e5f43d5..b52e133 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -1,9 +1,9 @@ @@ -35,6 +37,7 @@ import templateMixin from "../../mixins/templateMixin"; import CustomTable from '@/components/Template/CustomTable.vue'; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"; import SelectReagentDialog from "../../dialog/SelectReagentDialog.vue"; +import { public_studyList } from '@/api/business/public/public'; export default { name: "MJYLQSQD", @@ -173,18 +176,40 @@ export default { }, data() { return { - visible:false, + public_studyList:public_studyList, searchForm: { - symc: { - label:"试验名称", + name: { + label:this.$t('page.business.study.study.name'), }, - sybh: { - label:"试验编号", + sn: { + label:this.$t('page.business.study.study.sn'), }, - createUser: { - label:"创建人", + leaderName: { + label:this.$t('page.business.study.study.leader'), }, }, + columns:[ + { + prop: 'name', + label: 'page.business.study.study.name', + }, + { + prop: 'sn', + label: 'page.business.study.study.sn', + }, + { + prop: 'status', + label: 'page.business.study.study.status', + }, + { + prop: 'leaderName', + label: 'page.business.study.study.leader', + }, + { + prop: 'createTime', + label: 'page.business.study.study.createDate', + } + ] }; }, mounted() { @@ -192,15 +217,15 @@ export default { methods: { onDialogSubmit(selectedId,currentRow){ this.$refs.baseInfoRef.batchUpdateFormData({ - syNo: currentRow.syNo, - SD: currentRow.SD, + syNo: currentRow.sn, + SD: currentRow.leaderName, }); console.log(currentRow,"currentRow") - this.visible = false; + this.$refs.selectReagentDialogRef.onCancel() }, // 试验编号或部门名称点击事件 onClickSybh() { - this.visible = true; + this.$refs.selectReagentDialogRef.show() // this.$refs.baseInfoRef.setClickable("syNo", true); }, //获取已填写的表单数据 diff --git a/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue b/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue index 452e233..53961ec 100644 --- a/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue +++ b/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue @@ -32,8 +32,7 @@
+ ref="selectReagentDialogRef" > @@ -401,7 +400,6 @@ export default { }, data() { return { - selectReagentVisible: false, subSolutionVisible: false, currentSubKey: "",//当前点击的子项key stepTableDataSource: [], @@ -432,7 +430,7 @@ export default { } const {subKey = ""} = item; if(subKey === "subStartSolution" || subKey === "subSolution"){//起始源溶液点击事件 - this.selectReagentVisible = true; + this.$refs.selectReagentDialogRef.show() this.currentSubKey = subKey; } }, @@ -443,7 +441,7 @@ export default { this.updateStepTableData(row); } this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code); - this.selectReagentVisible = false; + this.$refs.selectReagentDialogRef.onCancel() }, //更新table数据 updateStepTableData(row){ diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue index 2754066..e64b4b6 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue @@ -17,7 +17,7 @@
+ :formData="formData" @clickable="handleJzClickable" />
+ + + @@ -59,10 +64,11 @@ 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" +import SelectReagentDialog from '../../../dialog/SelectReagentDialog.vue'; export default { name: "SWYPFXRYPZB", - components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion }, + components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion,SelectReagentDialog }, mixins: [templateMixin], props: { fillType: { @@ -203,7 +209,7 @@ export default { type: "input", fillType: "preFill", subType: "clickable", - subKey: "subSolution", + subKey: "subJz", subFillType: "actFill", maxlength: 20, }, @@ -217,8 +223,12 @@ export default { }, data() { return { + reagentType: "",//本表单特殊字段:选择试剂的类型1选择基质,2表格里面选择试剂 + + currentSubKey: "",//当前点击的子项key + rowIndex:0,//当前表格点击的行数 + resource: [], - resourceData1: [], sysjColumns: [ { label: 'template.common.reagentName', prop: "mc" },//名称 { label: 'template.common.reagentCode', prop: "bh" },//编号 @@ -250,15 +260,35 @@ export default { } }, methods: { + //点击基质选择 + handleJzClickable(obj){ + this.reagentType = 1//本表单特殊字段 + this.currentSubKey = obj.subKey; + this.$refs.selectReagentDialogRef.show() + }, + //选择试剂提交事件 + onSelectReagentSubmit(code,row){ + if(this.reagentType===1){ + this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code); + }else{ + this.$refs.tableRef.updateDataSourceByRowIndex(this.rowIndex,{ + [this.currentSubKey]: code, + }) + } + this.$refs.selectReagentDialogRef.onCancel() + }, //点击表格单元格 handleClickable(col, rowIndex) { + //本表单特殊字段 + this.reagentType = 2 + + this.rowIndex = rowIndex + this.currentSubKey = col.prop; console.log("clickable",rowIndex, col) if(col.prop === "sjry"){ - //调用对应弹窗的方法; + //调用对应弹窗的方法-多个点击的需要判断是哪个字段点击 + this.$refs.selectReagentDialogRef.show() } - this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex,{ - sjry: "我是填充进来的数据", - }) }, //获取目标溶液编号 async getCode(){ @@ -312,6 +342,7 @@ export default { tableRef.deleteRow(rowIndex); } }, + } }; diff --git a/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue b/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue index 749a0ca..9a69a07 100644 --- a/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue +++ b/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue @@ -82,8 +82,8 @@ - + @@ -146,7 +146,6 @@ export default { }, data() { return { - selectReagentVisible: false, subSolutionVisible: false, currentSubKey: "",//当前点击的子项key currentType: "",//当前点击的类型 @@ -255,7 +254,7 @@ export default { console.log(type, rowIndex, item, "handle") const { subKey = "" } = item; if (subKey === "subStartSolution" || subKey === "subSolution") {//起始源溶液点击事件 - this.selectReagentVisible = true; + this.$refs.selectReagentDialogRef.show() this.currentSubKey = subKey; this.currentType = type; this.currentRowIndex = rowIndex; @@ -277,7 +276,7 @@ export default { }); } // this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code); - this.selectReagentVisible = false; + this.$refs.selectReagentDialogRef.onCancel() }, //只做校验 async validFields() { diff --git a/src/views/business/comps/template/dialog/SelectReagentDialog.vue b/src/views/business/comps/template/dialog/SelectReagentDialog.vue index 259fe41..d89b7a2 100644 --- a/src/views/business/comps/template/dialog/SelectReagentDialog.vue +++ b/src/views/business/comps/template/dialog/SelectReagentDialog.vue @@ -1,5 +1,5 @@