-

{{ formData.bdmc }}

+

{{ formData.bdmc }}

-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -32,11 +48,18 @@ 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";
+import CustomTable from '@/components/Template/CustomTable.vue';
+import { EventBus } from "@/utils/eventBus";
+import { uniqeResource } from "@/utils/calUnitTools";
+import { debounce } from 'lodash-es'
+import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
export default {
- name: "DL020",
- components: { BaseInfoFormPackage, LineLabel, TableList, Step },
+ name: "DL017",
+ dicts: [
+ 'business_dl_qsxjbltj','business_tjdw'
+ ],
+ components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
@@ -84,10 +107,10 @@ export default {
},
{
type: "cellItem",
- label: 'template.dl.dl020.sydd',
+ label: 'template.dl.dl017.sydd',
config: {
- pre: {
- label: 'template.dl.dl020.sydd',
+ sydd: {
+ label: 'template.dl.dl017.sydd',
type: "input",
fillType: "actFill",
},
@@ -95,7 +118,7 @@ export default {
},
{
type: "cellItem",
- label: 'template.dl.dl020.czsj',
+ label: 'template.dl.dl017.czsj',
config: {
startDate: {
label: 'template.common.startTime',
@@ -109,20 +132,138 @@ export default {
}
]
},
- // 生物样品移交记录表信息
+ // 细胞信息
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
- span:1,
- label: 'template.dl.dl020.qxbd',
+ // span:1,
+ label: 'template.dl.dl017.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
+ bltj: {
+ label: 'template.dl.dl017.bltj',
+ type: 'select',
+ fillType: 'preFill',
+ options: this.getDictOptions('business_dl_qsxjbltj'),
+ otherCode: 'bltjOther',
+ },
}
+ }
+ ]
+ },
+ // 秋水仙碱加液情况
+ stepColumns() {
+ return [
+ {
+ label: "template.dl.dl017.jlzb",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },
+ {
+ label: "template.dl.dl017.xybh",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },{
+ label: "template.dl.dl017.sjqszqk",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },{
+ label: "template.dl.dl017.sjqcdqk",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },{
+ label: "template.dl.dl017.saqqtqk",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },{
+ label: "template.dl.dl017.ddpyy",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },{
+ label: "template.dl.dl017.xd",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },{
+ label: "template.dl.dl017.sj",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },{
+ label: "template.dl.dl017.ds",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },{
+ label: "template.dl.dl017.dy1gd",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },{
+ label: "template.dl.dl017.dy2gd",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },{
+ label: "template.dl.dl017.dy3gd",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },{
+ label: "template.dl.dl017.dy4gd",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
},
]
},
@@ -135,42 +276,80 @@ export default {
mounted() {
},
methods: {
- // 点击按钮
- // handleClickButton(item,signData){
- // this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
- // },
+ //选择table header下拉框也要更新体积
+ onHeaderSelectChange(data){
+ const {key, headerSelectFields,dataSource=[]} = data;
+ const keys = [
+ 'targetStartSolutionVolumeUnit',
+ 'targetDiluentVolumeUnit',
+ 'targetSolutionConcentrationUnit',
+ 'targetSolutionVolumeUnit',
+ ]
+ if(keys.includes(key)){
+ const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData();
+ const params = {
+ subTargetStartSolution,
+ headerSelectFields
+ }
+ this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
+ }
+ },
+ beforeSaveRecord(data){
+ const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
+ this.onCommonVerifyNdException(formFields,data);
+ },
+ configComplete(val) {
+ const { rowData, headerSelectFields } = val;
+ //计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积)
+ const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
+ let postData = {
+ mc: null,
+ bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
+ nd: rowData.actSolutionConcentration,//实际目标溶液浓度
+ nddw: headerSelectFields.actSolutionConcentrationUnit,
+ studySubjectId: this.formData.studySubjectId,
+ studyFormId:this.formData.id,
+ studyId:this.formData.studyId,
+ kc: total,
+ kcdw: unit,
+ }
+ this.configCompleteRequest(postData);
+ },
+ //分装回调
+ subPackageSubmit(data) {
+ const { fzsj, rowData, headerSelectFields } = data;
+ const { fzList = [], dw = "", mybh } = fzsj;
+ if (fzList && fzList.length > 0) {
+ const list = fzList.map((item) => {
+ return {
+ bh: mybh + item.preCode + item.subCode,
+ kc: item.num,
+ kcdw: dw,
+ }
+ })
+ let postData = {
+ studyId: this.formData.studyId,
+ studyFormId: this.formData.id,
+ bh: mybh,
+ nd: rowData.actSolutionConcentration || 0,
+ nddw: headerSelectFields.actSolutionConcentrationUnit,
+ studySubjectId: this.formData.studySubjectId,
+ studyFormId:this.formData.id,
+ list: list
+ }
+ this.subPackageRequest(postData);
+ }
+ },
//获取已填写的表单数据
- async getFilledFormData() {
- let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
- return content;
- // const baseData = this.$refs.baseInfoRef.getFilledFormData();
- // const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
- // const remarkData = this.$refs.remarkRef.getFilledFormData();
-
- // return {
- // ...baseData,
- // ...swypyjData,
- // ...remarkData,
- // }
+ getFilledFormData() {
+ return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])
},
//获取填写完成的表单数据
async getFormData() {
- //先校验再获取值
- const validFlag = await this.validFields();
- if (!validFlag) {
- return false;
- }
- let content = this.getFilledFormData();
- return content
- },
- //只做校验
- async validFields() {
- // 构建需要验证的引用数组
- let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
- return await this.validFormFields(refsToValidate);
+ let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]);
+ return content;
},
getResource() {
- // let content = this.getFilledFormData();
//使用的试剂、仪器
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
@@ -179,27 +358,18 @@ export default {
},
//保存
async onSave() {
- const formData = this.getStepResource();
- console.log(formData, "formData")
+ let content = await this.$refs.stepRef.getFormData();
+ console.log(content);
},
+ // 删除表格行
+ // deleteRow(rowIndex) {
+ // const tableRef = this.$refs['tableRef'];
+ // if (tableRef) {
+ // tableRef.deleteRow(rowIndex);
+ // }
+ // },
}
};
diff --git a/src/views/business/comps/template/comps/dl/DL018.vue b/src/views/business/comps/template/comps/dl/DL018.vue
index 02205f1..8476fd1 100644
--- a/src/views/business/comps/template/comps/dl/DL018.vue
+++ b/src/views/business/comps/template/comps/dl/DL018.vue
@@ -1,23 +1,39 @@
-
+
-

{{ formData.bdmc }}

+

{{ formData.bdmc }}

-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -32,11 +48,18 @@ 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";
+import CustomTable from '@/components/Template/CustomTable.vue';
+import { EventBus } from "@/utils/eventBus";
+import { uniqeResource } from "@/utils/calUnitTools";
+import { debounce } from 'lodash-es'
+import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
export default {
- name: "DL020",
- components: { BaseInfoFormPackage, LineLabel, TableList, Step },
+ name: "DL018",
+ dicts: [
+ 'business_dl_qsxjbltj','business_tjdw'
+ ],
+ components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
@@ -84,10 +107,10 @@ export default {
},
{
type: "cellItem",
- label: 'template.dl.dl020.sydd',
+ label: 'template.dl.dl018.sydd',
config: {
- pre: {
- label: 'template.dl.dl020.sydd',
+ sydd: {
+ label: 'template.dl.dl018.sydd',
type: "input",
fillType: "actFill",
},
@@ -95,7 +118,7 @@ export default {
},
{
type: "cellItem",
- label: 'template.dl.dl020.czsj',
+ label: 'template.dl.dl018.czsj',
config: {
startDate: {
label: 'template.common.startTime',
@@ -109,21 +132,119 @@ export default {
}
]
},
- // 生物样品移交记录表信息
+ // 细胞信息
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
- span:1,
- label: 'template.dl.dl020.qxbd',
+ // span:1,
+ label: 'template.dl.dl018.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
+ bltj: {
+ label: 'template.dl.dl018.bltj',
+ type: 'select',
+ fillType: 'preFill',
+ options: this.getDictOptions('business_dl_qsxjbltj'),
+ otherCode: 'bltjOther',
+ },
}
+ }
+ ]
+ },
+ // 秋水仙碱加液情况
+ stepColumns() {
+ return [
+ {
+ label: "template.dl.dl018.jlzb",
+ prop: "targetSolutionCode",
+ bodyType: "input",
+ bodySubType: "span",
+ bodySubKey: "subTargetSolutionCode",
+ bodyFillType: "preFill",
+ width: 140,
+ myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],//分装的母液编号字段
+ maxVolumeField: "actSolutionVolume",//分装的最大量字段
+ maxVolumeFieldUnit: "actSolutionVolumeUnit",//分装的最大量单位字段
+ // maxVolumeField: "targetSolutionVolume,targetDiluentVolume",//分装的最大量字段
+ // maxVolumeFieldUnit: "targetSolutionVolumeUnit,targetDiluentVolumeUnit",//分装的最大量单位字段
+ },
+ {
+ label: "template.dl.dl018.xybh",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },
+ {
+ label: "template.dl.dl018.rsks",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },
+ {
+ label: "template.dl.dl018.rsjs",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },
+ {
+ label: "template.dl.dl018.zs",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },
+ {
+ label: "template.dl.dl018.ys",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },
+ {
+ label: "template.dl.dl018.zy",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },
+ {
+ label: "template.dl.dl018.yx",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
},
+ {
+ label: "template.dl.dl018.tj",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ }
]
},
},
@@ -135,42 +256,80 @@ export default {
mounted() {
},
methods: {
- // 点击按钮
- // handleClickButton(item,signData){
- // this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
- // },
+ //选择table header下拉框也要更新体积
+ onHeaderSelectChange(data){
+ const {key, headerSelectFields,dataSource=[]} = data;
+ const keys = [
+ 'targetStartSolutionVolumeUnit',
+ 'targetDiluentVolumeUnit',
+ 'targetSolutionConcentrationUnit',
+ 'targetSolutionVolumeUnit',
+ ]
+ if(keys.includes(key)){
+ const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData();
+ const params = {
+ subTargetStartSolution,
+ headerSelectFields
+ }
+ this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
+ }
+ },
+ beforeSaveRecord(data){
+ const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
+ this.onCommonVerifyNdException(formFields,data);
+ },
+ configComplete(val) {
+ const { rowData, headerSelectFields } = val;
+ //计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积)
+ const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
+ let postData = {
+ mc: null,
+ bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
+ nd: rowData.actSolutionConcentration,//实际目标溶液浓度
+ nddw: headerSelectFields.actSolutionConcentrationUnit,
+ studySubjectId: this.formData.studySubjectId,
+ studyFormId:this.formData.id,
+ studyId:this.formData.studyId,
+ kc: total,
+ kcdw: unit,
+ }
+ this.configCompleteRequest(postData);
+ },
+ //分装回调
+ subPackageSubmit(data) {
+ const { fzsj, rowData, headerSelectFields } = data;
+ const { fzList = [], dw = "", mybh } = fzsj;
+ if (fzList && fzList.length > 0) {
+ const list = fzList.map((item) => {
+ return {
+ bh: mybh + item.preCode + item.subCode,
+ kc: item.num,
+ kcdw: dw,
+ }
+ })
+ let postData = {
+ studyId: this.formData.studyId,
+ studyFormId: this.formData.id,
+ bh: mybh,
+ nd: rowData.actSolutionConcentration || 0,
+ nddw: headerSelectFields.actSolutionConcentrationUnit,
+ studySubjectId: this.formData.studySubjectId,
+ studyFormId:this.formData.id,
+ list: list
+ }
+ this.subPackageRequest(postData);
+ }
+ },
//获取已填写的表单数据
- async getFilledFormData() {
- let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
- return content;
- // const baseData = this.$refs.baseInfoRef.getFilledFormData();
- // const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
- // const remarkData = this.$refs.remarkRef.getFilledFormData();
-
- // return {
- // ...baseData,
- // ...swypyjData,
- // ...remarkData,
- // }
+ getFilledFormData() {
+ return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])
},
//获取填写完成的表单数据
async getFormData() {
- //先校验再获取值
- const validFlag = await this.validFields();
- if (!validFlag) {
- return false;
- }
- let content = this.getFilledFormData();
- return content
- },
- //只做校验
- async validFields() {
- // 构建需要验证的引用数组
- let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
- return await this.validFormFields(refsToValidate);
+ let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]);
+ return content;
},
getResource() {
- // let content = this.getFilledFormData();
//使用的试剂、仪器
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
@@ -179,27 +338,18 @@ export default {
},
//保存
async onSave() {
- const formData = this.getStepResource();
- console.log(formData, "formData")
+ let content = await this.$refs.stepRef.getFormData();
+ console.log(content);
},
+ // 删除表格行
+ // deleteRow(rowIndex) {
+ // const tableRef = this.$refs['tableRef'];
+ // if (tableRef) {
+ // tableRef.deleteRow(rowIndex);
+ // }
+ // },
}
};
diff --git a/src/views/business/comps/template/comps/dl/DL019.vue b/src/views/business/comps/template/comps/dl/DL019.vue
index 02205f1..44fb85c 100644
--- a/src/views/business/comps/template/comps/dl/DL019.vue
+++ b/src/views/business/comps/template/comps/dl/DL019.vue
@@ -1,23 +1,39 @@
-
+
-

{{ formData.bdmc }}

+

{{ formData.bdmc }}

-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -32,11 +48,18 @@ 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";
+import CustomTable from '@/components/Template/CustomTable.vue';
+import { EventBus } from "@/utils/eventBus";
+import { uniqeResource } from "@/utils/calUnitTools";
+import { debounce } from 'lodash-es'
+import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
export default {
- name: "DL020",
- components: { BaseInfoFormPackage, LineLabel, TableList, Step },
+ name: "DL019",
+ dicts: [
+ 'business_dl_qsxjbltj','business_tjdw'
+ ],
+ components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
@@ -84,10 +107,10 @@ export default {
},
{
type: "cellItem",
- label: 'template.dl.dl020.sydd',
+ label: 'template.dl.dl019.sydd',
config: {
- pre: {
- label: 'template.dl.dl020.sydd',
+ sydd: {
+ label: 'template.dl.dl019.sydd',
type: "input",
fillType: "actFill",
},
@@ -95,7 +118,7 @@ export default {
},
{
type: "cellItem",
- label: 'template.dl.dl020.czsj',
+ label: 'template.dl.dl019.czsj',
config: {
startDate: {
label: 'template.common.startTime',
@@ -109,21 +132,74 @@ export default {
}
]
},
- // 生物样品移交记录表信息
+ // 细胞信息
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
- span:1,
- label: 'template.dl.dl020.qxbd',
+ // span:1,
+ label: 'template.dl.dl019.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
+ bltj: {
+ label: 'template.dl.dl019.bltj',
+ type: 'select',
+ fillType: 'preFill',
+ options: this.getDictOptions('business_dl_qsxjbltj'),
+ otherCode: 'bltjOther',
+ },
}
+ }
+ ]
+ },
+ // 秋水仙碱加液情况
+ stepColumns() {
+ return [
+ {
+ label: "template.dl.dl019.jlzb",
+ prop: "targetSolutionCode",
+ bodyType: "input",
+ bodySubType: "span",
+ bodySubKey: "subTargetSolutionCode",
+ bodyFillType: "preFill",
+ width: 140,
+ myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],//分装的母液编号字段
+ maxVolumeField: "actSolutionVolume",//分装的最大量字段
+ maxVolumeFieldUnit: "actSolutionVolumeUnit",//分装的最大量单位字段
+ // maxVolumeField: "targetSolutionVolume,targetDiluentVolume",//分装的最大量字段
+ // maxVolumeFieldUnit: "targetSolutionVolumeUnit,targetDiluentVolumeUnit",//分装的最大量单位字段
},
+ {
+ label: "template.dl.dl019.xybh",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },
+ {
+ label: "template.dl.dl019.bplsh1",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ },
+ {
+ label: "template.dl.dl019.bplsh2",
+ prop: "startSolutionCode",
+ width: 180,
+ bodyType: "input",
+ bodyFillType: "actFill",
+ bodyMaxlength: 10,
+ bodyDisabled: true,
+ }
]
},
},
@@ -135,42 +211,80 @@ export default {
mounted() {
},
methods: {
- // 点击按钮
- // handleClickButton(item,signData){
- // this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
- // },
+ //选择table header下拉框也要更新体积
+ onHeaderSelectChange(data){
+ const {key, headerSelectFields,dataSource=[]} = data;
+ const keys = [
+ 'targetStartSolutionVolumeUnit',
+ 'targetDiluentVolumeUnit',
+ 'targetSolutionConcentrationUnit',
+ 'targetSolutionVolumeUnit',
+ ]
+ if(keys.includes(key)){
+ const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData();
+ const params = {
+ subTargetStartSolution,
+ headerSelectFields
+ }
+ this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
+ }
+ },
+ beforeSaveRecord(data){
+ const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
+ this.onCommonVerifyNdException(formFields,data);
+ },
+ configComplete(val) {
+ const { rowData, headerSelectFields } = val;
+ //计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积)
+ const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
+ let postData = {
+ mc: null,
+ bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
+ nd: rowData.actSolutionConcentration,//实际目标溶液浓度
+ nddw: headerSelectFields.actSolutionConcentrationUnit,
+ studySubjectId: this.formData.studySubjectId,
+ studyFormId:this.formData.id,
+ studyId:this.formData.studyId,
+ kc: total,
+ kcdw: unit,
+ }
+ this.configCompleteRequest(postData);
+ },
+ //分装回调
+ subPackageSubmit(data) {
+ const { fzsj, rowData, headerSelectFields } = data;
+ const { fzList = [], dw = "", mybh } = fzsj;
+ if (fzList && fzList.length > 0) {
+ const list = fzList.map((item) => {
+ return {
+ bh: mybh + item.preCode + item.subCode,
+ kc: item.num,
+ kcdw: dw,
+ }
+ })
+ let postData = {
+ studyId: this.formData.studyId,
+ studyFormId: this.formData.id,
+ bh: mybh,
+ nd: rowData.actSolutionConcentration || 0,
+ nddw: headerSelectFields.actSolutionConcentrationUnit,
+ studySubjectId: this.formData.studySubjectId,
+ studyFormId:this.formData.id,
+ list: list
+ }
+ this.subPackageRequest(postData);
+ }
+ },
//获取已填写的表单数据
- async getFilledFormData() {
- let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
- return content;
- // const baseData = this.$refs.baseInfoRef.getFilledFormData();
- // const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
- // const remarkData = this.$refs.remarkRef.getFilledFormData();
-
- // return {
- // ...baseData,
- // ...swypyjData,
- // ...remarkData,
- // }
+ getFilledFormData() {
+ return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])
},
//获取填写完成的表单数据
async getFormData() {
- //先校验再获取值
- const validFlag = await this.validFields();
- if (!validFlag) {
- return false;
- }
- let content = this.getFilledFormData();
- return content
- },
- //只做校验
- async validFields() {
- // 构建需要验证的引用数组
- let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
- return await this.validFormFields(refsToValidate);
+ let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]);
+ return content;
},
getResource() {
- // let content = this.getFilledFormData();
//使用的试剂、仪器
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
@@ -179,27 +293,18 @@ export default {
},
//保存
async onSave() {
- const formData = this.getStepResource();
- console.log(formData, "formData")
+ let content = await this.$refs.stepRef.getFormData();
+ console.log(content);
},
+ // 删除表格行
+ // deleteRow(rowIndex) {
+ // const tableRef = this.$refs['tableRef'];
+ // if (tableRef) {
+ // tableRef.deleteRow(rowIndex);
+ // }
+ // },
}
};
diff --git a/src/views/business/comps/template/comps/dl/DL020.vue b/src/views/business/comps/template/comps/dl/DL020.vue
index 02205f1..3a2a510 100644
--- a/src/views/business/comps/template/comps/dl/DL020.vue
+++ b/src/views/business/comps/template/comps/dl/DL020.vue
@@ -86,7 +86,7 @@ export default {
type: "cellItem",
label: 'template.dl.dl020.sydd',
config: {
- pre: {
+ sydd: {
label: 'template.dl.dl020.sydd',
type: "input",
fillType: "actFill",
@@ -135,23 +135,10 @@ export default {
mounted() {
},
methods: {
- // 点击按钮
- // handleClickButton(item,signData){
- // this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
- // },
//获取已填写的表单数据
async getFilledFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
return content;
- // const baseData = this.$refs.baseInfoRef.getFilledFormData();
- // const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
- // const remarkData = this.$refs.remarkRef.getFilledFormData();
-
- // return {
- // ...baseData,
- // ...swypyjData,
- // ...remarkData,
- // }
},
//获取填写完成的表单数据
async getFormData() {
diff --git a/src/views/business/comps/template/comps/dl/DL021.vue b/src/views/business/comps/template/comps/dl/DL021.vue
index 02205f1..8322937 100644
--- a/src/views/business/comps/template/comps/dl/DL021.vue
+++ b/src/views/business/comps/template/comps/dl/DL021.vue
@@ -1,23 +1,33 @@
-
+
-

{{ formData.bdmc }}

+

{{ formData.bdmc }}

@@ -32,11 +42,15 @@ 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";
+import CustomTable from '@/components/Template/CustomTable.vue';
+import { EventBus } from "@/utils/eventBus";
+import { uniqeResource } from "@/utils/calUnitTools";
+import { debounce } from 'lodash-es'
+import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
export default {
- name: "DL020",
- components: { BaseInfoFormPackage, LineLabel, TableList, Step },
+ name: "DL021",
+ components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
@@ -84,18 +98,7 @@ export default {
},
{
type: "cellItem",
- label: 'template.dl.dl020.sydd',
- config: {
- pre: {
- label: 'template.dl.dl020.sydd',
- type: "input",
- fillType: "actFill",
- },
- }
- },
- {
- type: "cellItem",
- label: 'template.dl.dl020.czsj',
+ label: 'template.dl.dl021.czsj',
config: {
startDate: {
label: 'template.common.startTime',
@@ -109,23 +112,38 @@ export default {
}
]
},
- // 生物样品移交记录表信息
- swypyjInfoFormConfig() {
- return [
- {
- type: "cellItem",
- config: {
- qxbd: {
- span:1,
- label: 'template.dl.dl020.qxbd',
- type: 'qxbd',
- fillType: 'actFill',
- filledCodes:['bdmc','bdbh'],
- },
- }
- },
- ]
+ // 样本信息
+ tableColumns() {
+ return [{
+ label: 'template.dl.dl021.bpbh',
+ prop: 'cyd',
+ bodyType: 'input',
+ bodyFillType: 'actFill',
+ width: 100,
+ bodyMaxlength: 50,
+ },{
+ label: 'template.dl.dl021.gcxps',
+ prop: 'dwbh',
+ bodyType: 'checkboxTag',
+ bodyFillType: 'actFill',
+ bodySubType:"button",
+ bodySubFillType:"preFill",
+ bodySubButtonName:"template.common.importTemplate",
+ bodySubKey:"exportBtn",
+ showBodySub:this.fillType === "preFill",
+ width: 280,
+ bodyMaxlength: 10,
+ },{
+ label: 'template.dl.dl021.zqxxbs',
+ prop: 'ypsl',
+ bodyType: 'input',
+ bodyDisabled: true,
+ bodyFillType: 'actFill',
+ width: 80,
+ bodyMaxlength: 10,
+ }]
},
+
},
data() {
return {
@@ -135,42 +153,80 @@ export default {
mounted() {
},
methods: {
- // 点击按钮
- // handleClickButton(item,signData){
- // this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
- // },
+ //选择table header下拉框也要更新体积
+ onHeaderSelectChange(data){
+ const {key, headerSelectFields,dataSource=[]} = data;
+ const keys = [
+ 'targetStartSolutionVolumeUnit',
+ 'targetDiluentVolumeUnit',
+ 'targetSolutionConcentrationUnit',
+ 'targetSolutionVolumeUnit',
+ ]
+ if(keys.includes(key)){
+ const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData();
+ const params = {
+ subTargetStartSolution,
+ headerSelectFields
+ }
+ this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
+ }
+ },
+ beforeSaveRecord(data){
+ const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
+ this.onCommonVerifyNdException(formFields,data);
+ },
+ configComplete(val) {
+ const { rowData, headerSelectFields } = val;
+ //计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积)
+ const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
+ let postData = {
+ mc: null,
+ bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
+ nd: rowData.actSolutionConcentration,//实际目标溶液浓度
+ nddw: headerSelectFields.actSolutionConcentrationUnit,
+ studySubjectId: this.formData.studySubjectId,
+ studyFormId:this.formData.id,
+ studyId:this.formData.studyId,
+ kc: total,
+ kcdw: unit,
+ }
+ this.configCompleteRequest(postData);
+ },
+ //分装回调
+ subPackageSubmit(data) {
+ const { fzsj, rowData, headerSelectFields } = data;
+ const { fzList = [], dw = "", mybh } = fzsj;
+ if (fzList && fzList.length > 0) {
+ const list = fzList.map((item) => {
+ return {
+ bh: mybh + item.preCode + item.subCode,
+ kc: item.num,
+ kcdw: dw,
+ }
+ })
+ let postData = {
+ studyId: this.formData.studyId,
+ studyFormId: this.formData.id,
+ bh: mybh,
+ nd: rowData.actSolutionConcentration || 0,
+ nddw: headerSelectFields.actSolutionConcentrationUnit,
+ studySubjectId: this.formData.studySubjectId,
+ studyFormId:this.formData.id,
+ list: list
+ }
+ this.subPackageRequest(postData);
+ }
+ },
//获取已填写的表单数据
- async getFilledFormData() {
- let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
- return content;
- // const baseData = this.$refs.baseInfoRef.getFilledFormData();
- // const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
- // const remarkData = this.$refs.remarkRef.getFilledFormData();
-
- // return {
- // ...baseData,
- // ...swypyjData,
- // ...remarkData,
- // }
+ getFilledFormData() {
+ return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])
},
//获取填写完成的表单数据
async getFormData() {
- //先校验再获取值
- const validFlag = await this.validFields();
- if (!validFlag) {
- return false;
- }
- let content = this.getFilledFormData();
- return content
- },
- //只做校验
- async validFields() {
- // 构建需要验证的引用数组
- let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
- return await this.validFormFields(refsToValidate);
+ let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]);
+ return content;
},
getResource() {
- // let content = this.getFilledFormData();
//使用的试剂、仪器
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
@@ -179,27 +235,18 @@ export default {
},
//保存
async onSave() {
- const formData = this.getStepResource();
- console.log(formData, "formData")
+ let content = await this.$refs.stepRef.getFormData();
+ console.log(content);
},
+ // 删除表格行
+ // deleteRow(rowIndex) {
+ // const tableRef = this.$refs['tableRef'];
+ // if (tableRef) {
+ // tableRef.deleteRow(rowIndex);
+ // }
+ // },
}
};