Browse Source

Merge branch 'master' into ouqian

ouqian
ouqian 1 month ago
parent
commit
2a98501c69
10 changed files with 1071 additions and 371 deletions
  1. +7
    -7
      src/components/Template/BaseInfoFormPackage.vue
  2. +1
    -1
      src/components/Template/mixins/stepMixins.js
  3. +84
    -1
      src/lang/en/template/dl.js
  4. +84
    -2
      src/lang/zh/template/dl.js
  5. +135
    -59
      src/views/business/comps/template/comps/dl/DL016.vue
  6. +236
    -66
      src/views/business/comps/template/comps/dl/DL017.vue
  7. +216
    -66
      src/views/business/comps/template/comps/dl/DL018.vue
  8. +171
    -66
      src/views/business/comps/template/comps/dl/DL019.vue
  9. +1
    -14
      src/views/business/comps/template/comps/dl/DL020.vue
  10. +136
    -89
      src/views/business/comps/template/comps/dl/DL021.vue

+ 7
- 7
src/components/Template/BaseInfoFormPackage.vue View File

@ -89,8 +89,8 @@
type="select" :item="sItem" v-model="formFields[key]" @copy="onCopy(sItem, key)"
@change="(e, type) => onSelectChange(key, e, type)" :error="errors[key]"
@update:error="errors[key] = false" :orange-bg="orangeBgFields[key]" />
<div v-show="isShowOther(formFields[key])" class="flex flex1">
<div class="other-title" v-if="isShowOtherTitle(sItem)">{{ sItem.otherLabel ? $t(sItem.otherLabel) :
<div v-show="isShowOther(formFields[key])" class="flex flex1 ml-10">
<div class="other-title" v-if="isShowOtherLabel(sItem)">{{ sItem.otherLabel ? $t(sItem.otherLabel) :
$t("template.common.other") }}</div>
<div class="flex">
<HandleFormItem :field-item-label="fieldItemLabel"
@ -191,8 +191,8 @@
@copy="onCopy(sItem, key)" @change="(e, type) => onSelectChange(key, e, type)"
:error="errors[key]" @update:error="errors[key] = false"
:orange-bg="orangeBgFields[key]" />
<div v-show="isShowOther(formFields[key])" class="flex flex1">
<div class="other-title" v-if="isShowOtherTitle(sItem)">{{ sItem.otherLabel ? $t(sItem.otherLabel) :
<div v-show="isShowOther(formFields[key])" class="flex flex1 ml-10">
<div class="other-title" v-if="isShowOtherLabel(sItem)">{{ sItem.otherLabel ? $t(sItem.otherLabel) :
$t("template.common.other") }}</div>
<div class="flex">
<HandleFormItem :field-item-label="fieldItemLabel"
@ -240,8 +240,8 @@
@onRegentSubmit="(data, inputValue) => onRegentSubmit(data, inputValue, sItem.subKey, sItem)"
:error="errors[sItem.subKey]" @update:error="errors[sItem.subKey] = false"
:value="formFields[sItem.subKey]" />
<div v-show="isShowOther(formFields[sItem.subKey])" class="flex flex1">
<div class="other-title" v-if="isShowOtherTitle(sItem)">{{ sItem.otherLabel ? $t(sItem.otherLabel) :
<div v-show="isShowOther(formFields[sItem.subKey])" class="flex flex1 ml-10">
<div class="other-title" v-if="isShowOtherLabel(sItem)">{{ sItem.otherLabel ? $t(sItem.otherLabel) :
$t("template.common.other") }}</div>
<div class="flex flex1">
<HandleFormItem :field-item-label="fieldItemLabel"
@ -408,7 +408,7 @@ export default {
this.formFields[key] = e;
},
//
isShowOtherTitle(sItem){
isShowOtherLabel(sItem){
if (sItem.hasOwnProperty("showOtherLabel")) {
return sItem.showOtherLabel
}

+ 1
- 1
src/components/Template/mixins/stepMixins.js View File

@ -28,4 +28,4 @@ export default {
this.$refs.stepFormPackageRef.resetRecord();
},
},
}
}

+ 84
- 1
src/lang/en/template/dl.js View File

@ -103,6 +103,78 @@ export default {
...common,
hyqk: 'Medium Change Status'
},
dl016: {
xbxx:'细胞信息',
sydd:'实验地点',
czsj:'操作时间',
qxbd: '前序表单',
dlbz: '备注',
czbz: '操作步骤',
qcxjjyqk:'秋水仙碱加液情况',
bltj:'暴露条件',
jlzb:'剂量组别',
xybh:'悬液编号',
qsxjjrl:'秋水仙碱加入量',
},
dl017: {
xbxx:'细胞信息',
sydd:'实验地点',
czsj:'操作时间',
qxbd: '前序表单',
dlbz: '备注',
czbz: '操作步骤',
qcxjjyqk:'秋水仙碱加液情况',
bltj:'暴露条件',
jlzb:'剂量组别',
xybh:'悬液编号',
sjqszqk:'收集前生长情况',
sjqcdqk:'收集前沉淀情况',
saqqtqk:'收集前其他情况',
ddpyy:'倒掉培养液',
xd:'洗涤',
sj:'收集',
ds:'低渗',
dy1gd:'第一次固定',
dy2gd:'第二次固定',
dy3gd:'第三次固定',
dy4gd:'第四次固定',
},
dl018: {
xbxx:'细胞信息',
sydd:'实验地点',
czsj:'操作时间',
qxbd: '前序表单',
dlbz: '备注',
czbz: '操作步骤',
xbczqk:'细胞操作情况',
bltj:'暴露条件',
jlzb:'剂量组别',
xybh:'悬液编号',
rsks:'染色开始',
rsjs:'染色结束',
zs:'左上(个)',
ys:'右上(个)',
zy:'左下(个)',
yx:'右下(个)',
tj:'体积(mL)',
},
dl019: {
xbxx:'细胞信息',
sydd:'实验地点',
czsj:'操作时间',
qxbd: '前序表单',
dlbz: '备注',
czbz: '操作步骤',
xbczqk:'细胞操作情况',
bltj:'暴露条件',
jlzb:'剂量组别',
xybh:'悬液编号',
bplsh1:'玻片流水号',
bplsh2:'玻片流水号',
},
dl020: {
swdljlbxx: 'Toxicology Record Information',
xbxx:'Cell Information',
@ -111,5 +183,16 @@ export default {
qxbd: 'Previous Form',
dlbz: 'Remarks',
czbz: 'Operation Steps',
}
},
dl021: {
xbxx:'细胞信息',
czsj:'操作时间',
dlbz: '备注',
gcqk: '观察情况',
jlzb:'剂量组别',
xybh:'悬液编号',
bplsh1:'玻片流水号',
bplsh2:'玻片流水号',
},
}

+ 84
- 2
src/lang/zh/template/dl.js View File

@ -103,13 +103,95 @@ export default {
...common,
hyqk: '换液情况'
},
dl016: {
xbxx:'细胞信息',
sydd:'实验地点',
czsj:'操作时间',
qxbd: '前序表单',
dlbz: '备注',
czbz: '操作步骤',
qcxjjyqk:'秋水仙碱加液情况',
bltj:'暴露条件',
jlzb:'剂量组别',
xybh:'悬液编号',
qsxjjrl:'秋水仙碱加入量',
},
dl017: {
xbxx:'细胞信息',
sydd:'实验地点',
czsj:'操作时间',
qxbd: '前序表单',
dlbz: '备注',
czbz: '操作步骤',
qcxjjyqk:'秋水仙碱加液情况',
bltj:'暴露条件',
jlzb:'剂量组别',
xybh:'悬液编号',
sjqszqk:'收集前生长情况',
sjqcdqk:'收集前沉淀情况',
saqqtqk:'收集前其他情况',
ddpyy:'倒掉培养液',
xd:'洗涤',
sj:'收集',
ds:'低渗',
dy1gd:'第一次固定',
dy2gd:'第二次固定',
dy3gd:'第三次固定',
dy4gd:'第四次固定',
},
dl018: {
xbxx:'细胞信息',
sydd:'实验地点',
czsj:'操作时间',
qxbd: '前序表单',
dlbz: '备注',
czbz: '操作步骤',
xbczqk:'细胞操作情况',
bltj:'暴露条件',
jlzb:'剂量组别',
xybh:'悬液编号',
rsks:'染色开始',
rsjs:'染色结束',
zs:'左上(个)',
ys:'右上(个)',
zy:'左下(个)',
yx:'右下(个)',
tj:'体积(mL)',
},
dl019: {
xbxx:'细胞信息',
sydd:'实验地点',
czsj:'操作时间',
qxbd: '前序表单',
dlbz: '备注',
czbz: '操作步骤',
xbczqk:'细胞操作情况',
bltj:'暴露条件',
jlzb:'剂量组别',
xybh:'悬液编号',
bplsh1:'玻片流水号',
bplsh2:'玻片流水号',
},
dl020: {
swdljlbxx: '毒理记录表信息',
xbxx:'细胞信息',
sydd:'实验地点',
czsj:'操作时间',
qxbd: '前序表单',
dlbz: '备注',
czbz: '操作步骤',
}
},
dl021: {
xbxx:'细胞信息',
czsj:'操作时间',
dlbz: '备注',
gcqk: '观察情况',
jlzb:'剂量组别',
xybh:'悬液编号',
bplsh1:'玻片流水号',
bplsh2:'玻片流水号',
},
}

+ 135
- 59
src/views/business/comps/template/comps/dl/DL016.vue View File

@ -11,26 +11,26 @@
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.dl.dl016.qcxjjyqk" />
<CustomTable
:ref="`tableRef`"
:columns="tableColumns"
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>
</template>
</CustomTable>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl016.xbxx" label="template.dl.dl016.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl016.zbbz" />
<LineLabel label="template.dl.dl016.qcxjjyqk" />
<CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord"
:showAddRow="false" :showOperation="fillType === 'actFill'"
ref="stepTableRef" :columns="stepColumns" :formData="formData">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion @startConfig="startConfig" @configComplete="configComplete"
@printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType"
:row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow">
</TableOpertaion>
</template>
</CustomTable>
<LineLabel label="template.dl.dl016.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
@ -56,6 +56,9 @@ import TableOpertaionDelete from "@/components/Template/operation/TableOpertaion
export default {
name: "DL016",
dicts: [
'business_dl_qsxjbltj','business_tjdw'
],
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
props: {
@ -106,7 +109,7 @@ export default {
type: "cellItem",
label: 'template.dl.dl016.sydd',
config: {
pre: {
sydd: {
label: 'template.dl.dl016.sydd',
type: "input",
fillType: "actFill",
@ -129,56 +132,65 @@ export default {
}
]
},
//
//
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.dl.dl016.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
pre: {
label: 'template.dl.dl016.preFill',
type: "select",
fillType: "preFill",
bltj: {
label: 'template.dl.dl016.bltj',
type: 'select',
fillType: 'preFill',
options: this.getDictOptions('business_dl_qsxjbltj'),
otherCode: "preOther",
otherCode: 'bltjOther',
},
}
},
}
]
},
//
tableColumns() {
return [{
label: 'template.dl.dl016.zbdx',
prop: 'zbdx',
bodyType: 'input',
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 50,
},{
label: 'template.dl.dl016.yjzbs',
prop: 'yjzbs',
bodyType: 'inputNumber',
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 10,
},{
label: 'template.dl.dl016.sjzbs',
prop: 'sjzbs',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
width: 280,
bodyMaxlength: 10,
copyFrom:'yjzbs',
compareTo:'yjzbs'
}]
//
stepColumns() {
return [
{
label: "template.dl.dl016.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.dl016.xybh",
prop: "startSolutionCode",
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},
{
label: "template.dl.dl016.qsxjjrl",
prop: "startSolutionCode",
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
}
]
},
},
data() {
@ -189,13 +201,77 @@ export default {
mounted() {
},
methods: {
//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);
}
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "tableRef", "stepRef", "remarkRef"])
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])
},
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "tableRef", "stepRef", "remarkRef"]);
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]);
return content;
},
getResource() {
@ -211,12 +287,12 @@ export default {
console.log(content);
},
//
deleteRow(rowIndex) {
const tableRef = this.$refs['tableRef'];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
},
// deleteRow(rowIndex) {
// const tableRef = this.$refs['tableRef'];
// if (tableRef) {
// tableRef.deleteRow(rowIndex);
// }
// },
}
};
</script>

+ 236
- 66
src/views/business/comps/template/comps/dl/DL017.vue View File

@ -1,23 +1,39 @@
<!-- 生物样品接收记录 -->
<!-- 生物分析生物样品采集管制备 -->
<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.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
<BaseInfoFormPackage fieldItemLabel="template.dl.dl017.xbxx" label="template.dl.dl017.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
<LineLabel label="template.dl.dl017.qcxjjyqk" />
<CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord"
:showAddRow="false" :showOperation="fillType === 'actFill'"
ref="stepTableRef" :columns="stepColumns" :formData="formData">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion @startConfig="startConfig" @configComplete="configComplete"
@printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType"
:row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow">
</TableOpertaion>
</template>
</CustomTable>
<LineLabel label="template.dl.dl017.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
@ -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);
// }
// },
}
};
</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>

+ 216
- 66
src/views/business/comps/template/comps/dl/DL018.vue View File

@ -1,23 +1,39 @@
<!-- 生物样品接收记录 -->
<!-- 生物分析生物样品采集管制备 -->
<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.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
<BaseInfoFormPackage fieldItemLabel="template.dl.dl018.xbxx" label="template.dl.dl018.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
<LineLabel label="template.dl.dl018.xbczqk" />
<CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord"
:showAddRow="false" :showOperation="fillType === 'actFill'"
ref="stepTableRef" :columns="stepColumns" :formData="formData">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion @startConfig="startConfig" @configComplete="configComplete"
@printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType"
:row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow">
</TableOpertaion>
</template>
</CustomTable>
<LineLabel label="template.dl.dl018.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
@ -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);
// }
// },
}
};
</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>

+ 171
- 66
src/views/business/comps/template/comps/dl/DL019.vue View File

@ -1,23 +1,39 @@
<!-- 生物样品接收记录 -->
<!-- 生物分析生物样品采集管制备 -->
<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.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
<BaseInfoFormPackage fieldItemLabel="template.dl.dl019.xbxx" label="template.dl.dl019.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
<LineLabel label="template.dl.dl019.xbczqk" />
<CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord"
:showAddRow="false" :showOperation="fillType === 'actFill'"
ref="stepTableRef" :columns="stepColumns" :formData="formData">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion @startConfig="startConfig" @configComplete="configComplete"
@printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType"
:row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow">
</TableOpertaion>
</template>
</CustomTable>
<LineLabel label="template.dl.dl019.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
@ -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);
// }
// },
}
};
</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
- 14
src/views/business/comps/template/comps/dl/DL020.vue View File

@ -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() {

+ 136
- 89
src/views/business/comps/template/comps/dl/DL021.vue View File

@ -1,23 +1,33 @@
<!-- 生物样品接收记录 -->
<!-- 生物分析生物样品采集管制备 -->
<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.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl021.gcqk" />
<CustomTable
:ref="`tableRef`"
:columns="tableColumns"
:formData="formData"
operationWidth = "80px"
:prefixKey = "`table`"
fieldItemLabel = "template.dl.dl021.gcqk"
@clickButton="handleClickButton"
@onCheckboxTagChange="onCheckboxTagChange"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>
</template>
</CustomTable>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
@ -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);
// }
// },
}
};
</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>

Loading…
Cancel
Save