luojie 3 months ago
parent
commit
418adb4fe6
20 changed files with 235 additions and 103 deletions
  1. +6
    -1
      src/components/Template/SelectTable.vue
  2. +4
    -1
      src/lang/en.js
  3. +23
    -2
      src/lang/en/template/gsp.js
  4. +4
    -1
      src/lang/zh.js
  5. +22
    -0
      src/lang/zh/template/gsp.js
  6. +16
    -18
      src/views/business/comps/template/comps/gsp/MJYLQSQD.vue
  7. +13
    -15
      src/views/business/comps/template/comps/gsp/SYWZPZJHB.vue
  8. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue
  9. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue
  10. +1
    -1
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue
  11. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue
  12. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue
  13. +107
    -34
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue
  14. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue
  15. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue
  16. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue
  17. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue
  18. +5
    -2
      src/views/business/comps/template/dialog/SelectReagentDialog.vue
  19. +4
    -4
      src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js
  20. +14
    -8
      src/views/business/comps/template/mixins/templateMixin.js

+ 6
- 1
src/components/Template/SelectTable.vue View File

@ -66,7 +66,11 @@ export default {
listApi:{ listApi:{
type: Function, type: Function,
default: () => {}, default: () => {},
}
},
studyFormId: {
type: String,
default: "",
},
}, },
data() { data() {
return { return {
@ -106,6 +110,7 @@ export default {
this.listParams[key] = ""; this.listParams[key] = "";
} }
this.listParams = {...this.listParams} this.listParams = {...this.listParams}
this.listParams.studyFormId = this.studyFormId || ''
}, },
async getList() { async getList() {
const res = await this.listApi(this.listParams); const res = await this.listApi(this.listParams);

+ 4
- 1
src/lang/en.js View File

@ -15,6 +15,8 @@ import template from './en/system/template'
import commonTemplate from './en/template/commonTemplate' import commonTemplate from './en/template/commonTemplate'
//色谱模板 //色谱模板
import sp from './en/template/sp' import sp from './en/template/sp'
//供试品模板
import gspmb from './en/template/gsp'
// 试验管理 // 试验管理
import study from './en/business/study/study' import study from './en/business/study/study'
@ -172,6 +174,7 @@ export default {
}, },
template: { template: {
common: commonTemplate, common: commonTemplate,
sp: sp
sp: sp,
gsp: gspmb
} }
} }

+ 23
- 2
src/lang/en/template/gsp.js View File

@ -2,12 +2,33 @@
export default { export default {
// 试验物质配制计划表 // 试验物质配制计划表
SYWZPZJHB: { SYWZPZJHB: {
title:
'试验物质配制计划表',
title:'试验物质配制计划表',
jhxx:'Plan Information',
tbsm:'Special Note',
lqsj:'领取时间',
fxsj:'分析时间',
sywz:'试验物质',
pzpl:'配置频率',
gyzjhzb:'给药剂量或组别',
pznd:'配制浓度',
pztj:'配制体积',
}, },
// 麻醉/精神药品配制/领取申请单 // 麻醉/精神药品配制/领取申请单
MJYLQSQD: { MJYLQSQD: {
title: '麻醉/精神药品配制/领取申请单', title: '麻醉/精神药品配制/领取申请单',
jbxx:'Basic Information',
qxzsyhbm:'请选择试验/部门',
sybhhbmmc:'试验编号或部门名称',
sd:'SD/部长',
sywzmc:'试验物质名称',
gyjl:'给药剂量',
xynd:'需要浓度',
xyl:'需要量',
xysj:'需要时间',
yjghsj:'预计归还时间',
dwzs:'动物种属',
dwpjtz:'动物平均体重',
dwsl:'动物数量',
}, },
} }

+ 4
- 1
src/lang/zh.js View File

@ -15,6 +15,8 @@ import template from './zh/system/template'
import commonTemplate from './zh/template/commonTemplate' import commonTemplate from './zh/template/commonTemplate'
//色谱模板 //色谱模板
import sp from './zh/template/sp' import sp from './zh/template/sp'
//供试品模板
import gspmb from './zh/template/gsp'
// 试验管理 // 试验管理
import study from './zh/business/study/study' import study from './zh/business/study/study'
@ -167,6 +169,7 @@ export default {
}, },
template: { template: {
common: commonTemplate, common: commonTemplate,
sp: sp
sp: sp,
gsp: gspmb,
} }
} }

+ 22
- 0
src/lang/zh/template/gsp.js View File

@ -3,10 +3,32 @@ export default {
// 试验物质配制计划表 // 试验物质配制计划表
SYWZPZJHB: { SYWZPZJHB: {
title: '试验物质配制计划表', title: '试验物质配制计划表',
jhxx:'计划信息',
tbsm:'特别说明',
lqsj:'领取时间',
fxsj:'分析时间',
sywz:'试验物质',
pzpl:'配置频率',
gyzjhzb:'给药剂量或组别',
pznd:'配制浓度',
pztj:'配制体积',
}, },
// 麻醉/精神药品配制/领取申请单 // 麻醉/精神药品配制/领取申请单
MJYLQSQD: { MJYLQSQD: {
title: '麻醉/精神药品配制/领取申请单', title: '麻醉/精神药品配制/领取申请单',
jbxx:'基本信息',
qxzsyhbm:'请选择试验/部门',
sybhhbmmc:'试验编号或部门名称',
sd:'SD/部长',
sywzmc:'试验物质名称',
gyjl:'给药剂量',
xynd:'需要浓度',
xyl:'需要量',
xysj:'需要时间',
yjghsj:'预计归还时间',
dwzs:'动物种属',
dwpjtz:'动物平均体重',
dwsl:'动物数量',
}, },
} }

+ 16
- 18
src/views/business/comps/template/comps/gsp/MJYLQSQD.vue View File

@ -3,21 +3,19 @@
<div> <div>
<div class="detail-container"> <div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc || <div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc ||
$t('template.gsp.SYWZPZJHB.title') }}<img src="@/assets/images/detail-title.png" /></div>
$t('template.gsp.MJYLQSQD.title') }}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content"> <div class="detail-content">
<div class="content"> <div class="content">
<LineLabel label="基本信息" />
<LineLabel label="template.gsp.MJYLQSQD.jbxx" />
<div class="template-form-item"> <div class="template-form-item">
<BaseInfoFormPcakge @clickable="onClickSybh" ref="baseInfoRef" :formConfig="baseInfoFormConfig" <BaseInfoFormPcakge @clickable="onClickSybh" ref="baseInfoRef" :formConfig="baseInfoFormConfig"
:formData="formData" /> :formData="formData" />
</div> </div>
<BaseInfoFormPcakge label="备注" ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
<BaseInfoFormPcakge label="template.common.remark" ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div> </div>
</div> </div>
</div> </div>
<SelectReagentDialog type="MJYLQSQD" selectedCode="sn" title="请选择试验/部门" :searchForm="searchForm"
<SelectReagentDialog type="MJYLQSQD" selectedCode="sn" title="template.gsp.MJYLQSQD.qxzsyhbm" :searchForm="searchForm"
:columns="columns" @submit="onDialogSubmit" :listApi="public_studyList" ref="selectReagentDialogRef"> :columns="columns" @submit="onDialogSubmit" :listApi="public_studyList" ref="selectReagentDialogRef">
</SelectReagentDialog> </SelectReagentDialog>
</div> </div>
@ -74,7 +72,7 @@ export default {
type: "textarea", type: "textarea",
fillType: "actFill", fillType: "actFill",
span: 1, span: 1,
placeholder: "请输入备注",
placeholder: "template.common.remarkPlaceholder",
maxlength: 1000, maxlength: 1000,
rows: 5 rows: 5
} }
@ -89,60 +87,60 @@ export default {
type: "step", type: "step",
config: { config: {
syNo: { syNo: {
label: "试验编号或部门名称",
label: "template.gsp.MJYLQSQD.sybhhbmmc",
type: "clickable", type: "clickable",
fillType: "actFill", fillType: "actFill",
}, },
SD: { SD: {
label: "SD/部长",
label: "template.gsp.MJYLQSQD.sd",
type: "input", type: "input",
fillType: "actFill", fillType: "actFill",
}, },
sywzmc: { sywzmc: {
label: "试验物质名称",
label: "template.gsp.MJYLQSQD.sywzmc",
type: "select", type: "select",
fillType: "actFill", fillType: "actFill",
otherCode: "sywzmcOther", otherCode: "sywzmcOther",
options: this.getDictOptions('business_sywzmc'), options: this.getDictOptions('business_sywzmc'),
}, },
gyjl: { gyjl: {
label: "给药剂量",
label: "template.gsp.MJYLQSQD.gyjl",
type: "select", type: "select",
fillType: "actFill", fillType: "actFill",
otherCode: "gyjlOther", otherCode: "gyjlOther",
options: this.getDictOptions('business_gyjl'), options: this.getDictOptions('business_gyjl'),
}, },
xynd: { xynd: {
label: "需要浓度",
label: "template.gsp.MJYLQSQD.xynd",
type: "select", type: "select",
fillType: "actFill", fillType: "actFill",
otherCode: "xyndOther", otherCode: "xyndOther",
options: this.getDictOptions('business_gynd'), options: this.getDictOptions('business_gynd'),
}, },
xyl: { xyl: {
label: "需要量",
label: "template.gsp.MJYLQSQD.xyl",
type: "inputNumber", type: "inputNumber",
fillType: "actFill", fillType: "actFill",
}, },
xysj: { xysj: {
label: "需要时间",
label: "template.gsp.MJYLQSQD.xysj",
type: "dateTime", type: "dateTime",
fillType: "actFill", fillType: "actFill",
}, },
yjghsj: { yjghsj: {
label: "预计归还时间",
label: "template.gsp.MJYLQSQD.yjghsj",
type: "dateTime", type: "dateTime",
fillType: "actFill", fillType: "actFill",
}, },
dwzs: { dwzs: {
label: "动物种属",
label: "template.gsp.MJYLQSQD.dwzs",
type: "select", type: "select",
fillType: "actFill", fillType: "actFill",
otherCode: "dwzsOther", otherCode: "dwzsOther",
options: this.getDictOptions('business_dwzs'), options: this.getDictOptions('business_dwzs'),
}, },
dwpjtz: { dwpjtz: {
label: "动物平均体重",
label: "template.gsp.MJYLQSQD.dwpjtz",
type: "input", type: "input",
fillType: "actFill", fillType: "actFill",
subType: "select", subType: "select",
@ -151,7 +149,7 @@ export default {
subOptions: this.getDictOptions('business_dwtz'), subOptions: this.getDictOptions('business_dwtz'),
}, },
dwsl: { dwsl: {
label: "动物数量",
label: "template.gsp.MJYLQSQD.dwsl",
type: "input", type: "input",
fillType: "actFill", fillType: "actFill",
subType: "select", subType: "select",

+ 13
- 15
src/views/business/comps/template/comps/gsp/SYWZPZJHB.vue View File

@ -6,9 +6,9 @@
src="@/assets/images/detail-title.png" /></div> src="@/assets/images/detail-title.png" /></div>
<div class="detail-content"> <div class="detail-content">
<div class="content"> <div class="content">
<BaseInfoFormPcakge label="试验基本信息" ref="baseInfoRef" :formConfig="baseInfoFormConfig"
<BaseInfoFormPcakge label="template.common.baseInfo" ref="baseInfoRef" :formConfig="baseInfoFormConfig"
:formData="formData" /> :formData="formData" />
<LineLabel label="计划信息" />
<LineLabel label="template.gsp.SYWZPZJHB.jhxx" />
<div class="template-form-item"> <div class="template-form-item">
<BaseInfoFormPcakge ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur" <BaseInfoFormPcakge ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" /> :formData="formData" />
@ -19,11 +19,9 @@
</template> </template>
</CustomTable> </CustomTable>
</div> </div>
<BaseInfoFormPcakge label="特别说明" ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
<BaseInfoFormPcakge label="template.gsp.SYWZPZJHB.tbsm" ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div> </div>
</div> </div>
<!-- <button @click="onSave">保存</button> -->
</div> </div>
</div> </div>
</template> </template>
@ -76,7 +74,7 @@ export default {
type: "textarea", type: "textarea",
fillType: "actFill", fillType: "actFill",
span: 1, span: 1,
placeholder: "请输入特别说明",
placeholder: "template.common.remarkPlaceholder",
maxlength: 1000, maxlength: 1000,
rows: 5 rows: 5
} }
@ -91,12 +89,12 @@ export default {
type: "cardItem", type: "cardItem",
config: { config: {
studyMc: { studyMc: {
label: "试验名称",
label: "template.common.testName",
type: "input", type: "input",
disabled: true, disabled: true,
}, },
studySn: { studySn: {
label: "试验编号",
label: "template.common.testNumber",
type: "input", type: "input",
disabled: true, disabled: true,
}, },
@ -112,22 +110,22 @@ export default {
type: "step", type: "step",
config: { config: {
drawTime: { drawTime: {
label: "领取时间",
label: "template.gsp.SYWZPZJHB.lqsj",
type: "dateTime", type: "dateTime",
fillType: "actFill", fillType: "actFill",
}, },
analyzeTime: { analyzeTime: {
label: "分析时间",
label: "template.gsp.SYWZPZJHB.fxsj",
type: "dateTime", type: "dateTime",
fillType: "actFill", fillType: "actFill",
}, },
testSubstance: { testSubstance: {
label: "试验物质",
label: "template.gsp.SYWZPZJHB.sywz",
type: "input", type: "input",
fillType: "actFill", fillType: "actFill",
}, },
configFrequency: { configFrequency: {
label: "配置频率",
label: "template.gsp.SYWZPZJHB.pzpl",
type: "input", type: "input",
fillType: "actFill", fillType: "actFill",
}, },
@ -139,7 +137,7 @@ export default {
stepColumns() { stepColumns() {
return [ return [
{ {
label: "给药剂量或组别",
label: "template.gsp.SYWZPZJHB.gyzjhzb",
prop: "startSolutionCode", prop: "startSolutionCode",
width: 280, width: 280,
bodyType: "input", bodyType: "input",
@ -147,7 +145,7 @@ export default {
bodyMaxlength: 10, bodyMaxlength: 10,
}, },
{ {
label: "配制浓度",
label: "template.gsp.SYWZPZJHB.pznd",
prop: "preparationConcentration", prop: "preparationConcentration",
width: 280, width: 280,
headerSelectKey: "preparationConcentrationUnit", headerSelectKey: "preparationConcentrationUnit",
@ -159,7 +157,7 @@ export default {
bodyMaxlength: 10, bodyMaxlength: 10,
}, },
{ {
label: "配制体积",
label: "template.gsp.SYWZPZJHB.pztj",
prop: "preparationVolume", prop: "preparationVolume",
width: 280, width: 280,
headerSelectKey: "preparationVolumeUnit", headerSelectKey: "preparationVolumeUnit",

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){ handleJzClickable(obj){
this.reagentType = 1// this.reagentType = 1//
this.currentSubKey = obj.subKey; this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}, },
// //
onSelectReagentSubmit(code,row){ onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col) console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){ if(col.prop === "sjry"){
//- //-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
} }
}, },
// //

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){ handleJzClickable(obj){
this.reagentType = 1// this.reagentType = 1//
this.currentSubKey = obj.subKey; this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}, },
// //
onSelectReagentSubmit(code,row){ onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col) console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){ if(col.prop === "sjry"){
//- //-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
} }
}, },
// //

+ 1
- 1
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue View File

@ -279,7 +279,7 @@ export default {
console.log("clickable",rowIndex, col) console.log("clickable",rowIndex, col)
if(col.prop === "sjry" || col.prop === "kbjzbh"){ if(col.prop === "sjry" || col.prop === "kbjzbh"){
//- //-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
} }
}, },
// //

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){ handleJzClickable(obj){
this.reagentType = 1// this.reagentType = 1//
this.currentSubKey = obj.subKey; this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}, },
// //
onSelectReagentSubmit(code,row){ onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col) console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){ if(col.prop === "sjry"){
//- //-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
} }
}, },
// //

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){ handleJzClickable(obj){
this.reagentType = 1// this.reagentType = 1//
this.currentSubKey = obj.subKey; this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}, },
// //
onSelectReagentSubmit(code,row){ onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col) console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){ if(col.prop === "sjry"){
//- //-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
} }
}, },
// //

+ 107
- 34
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue View File

@ -235,6 +235,7 @@ export default {
subKey: "subGzy", subKey: "subGzy",
subFillType: "actFill", subFillType: "actFill",
maxlength: 20, maxlength: 20,
labelWidth: 80,
}, },
} }
}, },
@ -249,6 +250,7 @@ export default {
subKey: "subXsy", subKey: "subXsy",
subFillType: "actFill", subFillType: "actFill",
maxlength: 20, maxlength: 20,
labelWidth: 80,
}, },
} }
}, },
@ -290,8 +292,8 @@ export default {
formData: { formData: {
immediate: true, immediate: true,
handler(v) { handler(v) {
if (!v.targetCodeSn && this.fillType === "actFill") {
this.getCode();
if (this.fillType === "actFill") {
this.getCode(v);
} }
} }
} }
@ -301,12 +303,12 @@ export default {
handleJzClickable(obj) { handleJzClickable(obj) {
this.reagentType = 1// this.reagentType = 1//
this.currentSubKey = obj.subKey; this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}, },
handleRongyeClickable(obj) { handleRongyeClickable(obj) {
this.reagentType = 2// this.reagentType = 2//
this.currentSubKey = obj.subKey; this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}, },
// //
onSelectReagentSubmit(code, row) { onSelectReagentSubmit(code, row) {
@ -348,24 +350,65 @@ export default {
} }
}, },
// //
async getCode() {
const { stepTableFormData = [] } = v;
if (stepTableFormData && stepTableFormData.length > 0 && !stepTableFormData[0].bhCode) {
async getCode(v) {
//
const {stepTableFormData = []} = v;
if(stepTableFormData && stepTableFormData.length>0 && !stepTableFormData[0].bhCode){
const result = await getLatestSn({ const result = await getLatestSn({
count: stepTableFormData.length, count: stepTableFormData.length,
}) })
if (result.code == 200) {
if (stepTableFormData.length === 0) {
this.$refs.tableRef.updateDataSourceByRowIndex(0, {
[bhCode]: result.data,
if(result.code == 200){
if(stepTableFormData.length===1){
this.$refs.tableRef.updateDataSourceByRowIndex(0,{
bhCode: result.data,
})
}else{
for(let i=0;i<stepTableFormData.length;i++){
this.$refs.tableRef.updateDataSourceByRowIndex(i,{
bhCode: result.data[i],
})
}
}
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
setTimeout(() => {
debugger
EventBus.$emit('onModifyRecord', params,)
}, 10);
}
}
//
const {stepTableFormData_1 = []} = v;
if(stepTableFormData_1 && stepTableFormData_1.length>0 && !stepTableFormData_1[0].bhCode){
const result = await getLatestSn({
count: stepTableFormData_1.length,
})
if(result.code == 200){
if(stepTableFormData_1.length===1){
this.$refs.rongyeTableRef.updateDataSourceByRowIndex(0,{
bhCode: result.data,
}) })
} else {
for (let i = 0; i < stepTableFormData.length; i++) {
this.$refs.tableRef.updateDataSourceByRowIndex(i, {
}else{
for(let i=0;i<stepTableFormData_1.length;i++){
this.$refs.rongyeTableRef.updateDataSourceByRowIndex(i,{
bhCode: result.data[i], bhCode: result.data[i],
}) })
} }
} }
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
setTimeout(() => {
debugger
EventBus.$emit('onModifyRecord', params,)
}, 10);
} }
} }
}, },
@ -376,29 +419,59 @@ export default {
async getFormData() { async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef", "stepRef", let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef", "stepRef",
"rongyeTableRef", "rongyeStepFormPackageRef", "remarkRef"]); "rongyeTableRef", "rongyeStepFormPackageRef", "remarkRef"]);
console.log(content)
console.log(content)
//resource //resource
let tmpResource = [] let tmpResource = []
//
tmpResource.push({
mc: content.targetName,
bh: content.targetCode + content.targetCodeSn,
ph: '',
nd: content.targetActConcentration + content.targetActConcentrationUnit,
source: 'ELN配制',
sxrq: content.expireDate,
ndz: content.targetActConcentration,
nddw: content.targetActConcentrationUnit,
kc: content.targetActVolume,
kcdw: content.targetActVolumeUnit,
syl: null,
syldw: content.targetActVolumeUnit,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
//使
this.resource = tmpResource
let tableList = content.stepTableFormData
if(tableList && tableList.length>0){
for(let i=0;i<tableList.length;i++){
//
let item = tableList[i]
tmpResource.push({
mc: null,
bh: item.bh+item.bhCode,
ph: null,
nd: item.hhwznd + content.headerSelectFields.hhwzndUnit,
source: 'ELN配制',
sxrq: null,
ndz: item.hhwznd,
nddw: content.headerSelectFields.hhwzndUnit,
kc: item.sjjzxql+item.sjryxql,//todo -
kcdw: content.headerSelectFields.sjryxqlUnit || content.headerSelectFields.sjjzxqlUnit,//todo --
syl: null,
syldw:content.headerSelectFields.sjryxqlUnit || content.headerSelectFields.sjjzxqlUnit,//todo --,
yxzq:null,
yxzqdw:null,
})
}
}
tableList = content.stepTableFormData_1
if(tableList && tableList.length>0){
for(let i=0;i<tableList.length;i++){
//
let item = tableList[i]
tmpResource.push({
mc: null,
bh: item.bh+item.bhCode,
ph: null,
nd: item.hhwznd + content.headerSelectFields.hhwzndUnit,
source: 'ELN配制',
sxrq: null,
ndz: item.hhwznd,
nddw: content.headerSelectFields.hhwzndUnit,
kc: item.sjryxql+item.sjgzyxql + item.sjxsyxql,//todo -
kcdw: content.headerSelectFields.sjryxqlUnit || content.headerSelectFields.sjjzxqlUnit,//todo --
syl: null,
syldw:content.headerSelectFields.sjryxqlUnit || content.headerSelectFields.sjjzxqlUnit,//todo --,
yxzq:null,
yxzqdw:null,
})
}
}
//使
this.resource=tmpResource
return content; return content;
}, },
async onSave() { async onSave() {

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){ handleJzClickable(obj){
this.reagentType = 1// this.reagentType = 1//
this.currentSubKey = obj.subKey; this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}, },
// //
onSelectReagentSubmit(code,row){ onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col) console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){ if(col.prop === "sjry"){
//- //-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
} }
}, },
// //

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){ handleJzClickable(obj){
this.reagentType = 1// this.reagentType = 1//
this.currentSubKey = obj.subKey; this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}, },
// //
onSelectReagentSubmit(code,row){ onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col) console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){ if(col.prop === "sjry"){
//- //-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
} }
}, },
// //

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){ handleJzClickable(obj){
this.reagentType = 1// this.reagentType = 1//
this.currentSubKey = obj.subKey; this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}, },
// //
onSelectReagentSubmit(code,row){ onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col) console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){ if(col.prop === "sjry"){
//- //-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
} }
}, },
// //

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){ handleJzClickable(obj){
this.reagentType = 1// this.reagentType = 1//
this.currentSubKey = obj.subKey; this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}, },
// //
onSelectReagentSubmit(code,row){ onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col) console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){ if(col.prop === "sjry"){
//- //-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
} }
}, },
// //

+ 5
- 2
src/views/business/comps/template/dialog/SelectReagentDialog.vue View File

@ -14,6 +14,7 @@
<SelectTable v-if = "isShowTable" ref="selectSjRef" :columns="columns" <SelectTable v-if = "isShowTable" ref="selectSjRef" :columns="columns"
:selectedId="selectedId" :selectedId="selectedId"
:searchForm="searchForm" :searchForm="searchForm"
:studyFormId = "studyFormId"
:listApi="listApi" :listApi="listApi"
:selectedCode="selectedCode" :selectedCode="selectedCode"
@radioSelect="handleSelect"/> @radioSelect="handleSelect"/>
@ -106,6 +107,7 @@ export default {
bzList:[], bzList:[],
depart:"", depart:"",
studyFormId:''//studyFormId
} }
}, },
computed: { computed: {
@ -127,15 +129,16 @@ export default {
} }
}, },
methods: { methods: {
show(){
show(studyFormId){
this.visible = true this.visible = true
this.studyFormId = studyFormId
this.showTableData() this.showTableData()
if(this.type === 'MJYLQSQD'){ if(this.type === 'MJYLQSQD'){
this.getBzList() this.getBzList()
} }
}, },
getBzList(){ getBzList(){
public_bzList(this.searchForm).then(response => {
public_bzList().then(response => {
this.bzList = response.data this.bzList = response.data
}); });
}, },

+ 4
- 4
src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js View File

@ -178,8 +178,8 @@ export const getSWYPFXFFXYPZBBTQHSLTableConfig = ($this, selectKey) => {
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyMaxlength: 10, bodyMaxlength: 10,
bodyCompareTo: 'yjjzxql',
copyFrom: 'yjjzxql'
bodyCompareTo: 'yjgzyxql',
copyFrom: 'yjgzyxql'
}, },
{ {
label: 'template.sp.sp009.yjxsyxql', label: 'template.sp.sp009.yjxsyxql',
@ -202,8 +202,8 @@ export const getSWYPFXFFXYPZBBTQHSLTableConfig = ($this, selectKey) => {
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyMaxlength: 10, bodyMaxlength: 10,
bodyCompareTo: 'yjjzxql',
copyFrom: 'yjjzxql'
bodyCompareTo: 'yjxsyxql',
copyFrom: 'yjxsyxql'
}, },
{ {
label: 'template.sp.sp008.hhwznd', label: 'template.sp.sp008.hhwznd',

+ 14
- 8
src/views/business/comps/template/mixins/templateMixin.js View File

@ -44,7 +44,8 @@ export default {
templateSn, templateSn,
startDate, startDate,
bdmc, bdmc,
endDate
endDate,
id
} = v } = v
if (v.resource) { if (v.resource) {
//试验试剂信息 //试验试剂信息
@ -60,7 +61,8 @@ export default {
templateSn, templateSn,
startDate, startDate,
bdmc, bdmc,
endDate
endDate,
id
} }
} else { } else {
this.formData = { this.formData = {
@ -71,7 +73,8 @@ export default {
templateSn, templateSn,
startDate, startDate,
bdmc, bdmc,
endDate
endDate,
id
} }
} }
const { effectivePeriod, effectivePeriodUnit, expireDate } = const { effectivePeriod, effectivePeriodUnit, expireDate } =
@ -164,15 +167,18 @@ export default {
if (validFormData) { if (validFormData) {
validFormData.forEach((item) => { validFormData.forEach((item) => {
for (const [key, value] of Object.entries(item)) { for (const [key, value] of Object.entries(item)) {
let index = 0;
let index = 0
// 如果当前键是可能重复的字段,且结果对象中已经存在该键,则添加索引后缀 // 如果当前键是可能重复的字段,且结果对象中已经存在该键,则添加索引后缀
if ((key === 'headerSelectFields' || key === 'stepTableFormData') && result.hasOwnProperty(key)) {
if (
(key === 'headerSelectFields' || key === 'stepTableFormData') &&
result.hasOwnProperty(key)
) {
// 为重复字段生成带索引的键名,从1开始(因为第一个组件不需要后缀) // 为重复字段生成带索引的键名,从1开始(因为第一个组件不需要后缀)
const newKey = `${key}_${++index}`;
result[newKey] = value;
const newKey = `${key}_${++index}`
result[newKey] = value
} else { } else {
// 正常合并其他字段 // 正常合并其他字段
result[key] = value;
result[key] = value
} }
} }
}) })

Loading…
Cancel
Save