luojie 2 months ago
parent
commit
c30f81c790
2 changed files with 76 additions and 58 deletions
  1. +51
    -31
      src/views/business/comps/template/comps/sp/SP00456.vue
  2. +25
    -27
      src/views/business/study/comp/tbbd/Bj.vue

+ 51
- 31
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -2,7 +2,8 @@
<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"
@ -15,8 +16,10 @@
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div v-if="fillType === 'preFill'" class="mt-20">
<el-button type="primary" @click="handleAddParalle">{{ $t('template.common.xzpxpz') }}</el-button>
<el-button type="primary" @click="handleAddLadder">{{ $t('template.common.xzjtpz') }}</el-button>
<el-button type="primary" @click="handleAddParalle">{{ $t('template.common.xzpxpz')
}}</el-button>
<el-button type="primary" @click="handleAddLadder">{{ $t('template.common.xzjtpz')
}}</el-button>
</div>
<!-- 阶梯配制区域 -->
@ -26,15 +29,17 @@
<div class="config-header">
<div>{{ $t('template.common.jtpz') }}</div>
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete"
@click="deleteLadderConfig(ladderIndex)">{{ $t('template.common.deleteBtn') }}</el-button>
@click="deleteLadderConfig(ladderIndex)">{{ $t('template.common.deleteBtn')
}}</el-button>
</div>
<BaseInfoFormPackage
@onRegentSubmit="(e) => onRegentSubmit('ladder', ladderIndex, e)"
<BaseInfoFormPackage @onRegentSubmit="(e) => onRegentSubmit('ladder', ladderIndex, e)"
:ref="`ladderStepFormPackageRef_${ladderIndex}`" :formConfig="ladderStepFormConfig"
:formData="ladderConfig" :fieldItemLabel="$t('template.common.jtpz')" :prefixKey="'ladder_' + ladderIndex" />
:formData="ladderConfig" :fieldItemLabel="$t('template.common.jtpz')"
:prefixKey="'ladder_' + ladderIndex" />
<CustomTable @blur="(e) => onHandleTableBlur('ladder', ladderIndex, e)"
:ref="`ladderStepTableRef_${ladderIndex}`" :showOperation="fillType === 'actFill'" :columns="ladderStepColumns"
:formData="ladderConfig" :prefixKey="'ladder_' + ladderIndex" :fieldItemLabel="$t('template.common.jtpz')">
:ref="`ladderStepTableRef_${ladderIndex}`" :showOperation="fillType === 'actFill'"
:columns="ladderStepColumns" :formData="ladderConfig"
:prefixKey="'ladder_' + ladderIndex" :fieldItemLabel="$t('template.common.jtpz')">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion @printTag="(e) => printTag(e, 'ladderConfigs', ladderIndex)"
@startConfig="(val) => startConfig(val, 'ladderConfigs', ladderIndex)"
@ -53,22 +58,27 @@
</div>
<!-- 平行配制区域 -->
<div :label="$t('template.common.pxpz')" v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs"
<div :label="$t('template.common.pxpz')"
v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs"
:key="'paralle_' + paralleIndex">
<div class="template-form-item">
<div class="config-header">
<div>{{ $t('template.common.pxpz') }}</div>
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete"
@click="deleteParalleConfig(paralleIndex)">{{ $t('template.common.deleteBtn') }}</el-button>
@click="deleteParalleConfig(paralleIndex)">{{ $t('template.common.deleteBtn')
}}</el-button>
</div>
<BaseInfoFormPackage @clickable="(e) => handleClickable('paralle', paralleIndex, e)"
:ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig"
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex" :fieldItemLabel="$t('template.common.pxpz')" />
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex"
:fieldItemLabel="$t('template.common.pxpz')" />
<CustomTable @blur="(e) => onHandleTableBlur('paralle', paralleIndex, e)"
:ref="`paralleStepTableRef_${paralleIndex}`" :showOperation="fillType === 'actFill'" :columns="paralleStepColumns"
:ref="`paralleStepTableRef_${paralleIndex}`" :showOperation="fillType === 'actFill'"
:columns="paralleStepColumns"
@onRegentSubmit="(data) => onTableRegentSubmit('paralle', paralleIndex, data)"
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex" :fieldItemLabel="$t('template.common.pxpz')">
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex"
:fieldItemLabel="$t('template.common.pxpz')">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion @printTag="(e) => printTag(e, 'paralleConfigs', paralleIndex)"
@startConfig="(val) => startConfig(val, 'paralleConfigs', paralleIndex)"
@ -181,7 +191,7 @@ export default {
}
},
methods: {
//
subPackageSubmit(data, configType, index) {
const { fzsj, rowData, headerSelectFields } = data;
@ -202,6 +212,8 @@ export default {
nd: rowData.actSolutionConcentration || 0,
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
list: list
}
this.subPackageRequest(postData);
@ -213,6 +225,8 @@ export default {
let postData = {
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
}
this.startConfigRequest(postData);
},
@ -227,6 +241,8 @@ export default {
nd: rowData.actSolutionConcentration,//
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
kc: total,
kcdw: unit,
}
@ -416,10 +432,10 @@ export default {
},
// table
onTableRegentSubmit(type, configIndex, data){
const { selectInfo,rowIndex,key,rowData } = data;
const { row,selectedId } = selectInfo;
if (key === "actStartSolutionCode") {//
onTableRegentSubmit(type, configIndex, data) {
const { selectInfo, rowIndex, key, rowData } = data;
const { row, selectedId } = selectInfo;
if (key === "actStartSolutionCode") {//
const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0];
if (tableRef) {
const volResult = this.updateSjmbrynd(rowData, row.nd);
@ -435,10 +451,10 @@ export default {
}
}
},
//
onRegentSubmit(type,rowIndex,data) {
const { selectInfo,key} = data;
onRegentSubmit(type, rowIndex, data) {
const { selectInfo, key } = data;
const { row } = selectInfo;
if (key) {
const ref = type === "ladder" ? "ladderStepFormPackageRef_" : "paralleStepFormPackageRef_"
@ -446,9 +462,9 @@ export default {
if (key === "subStartSolution") {
packageRef.updateFormData("targetAcSolution", row.nd);
packageRef.onValueChangeCompareTo("targetAcSolution", row.nd, "targetStartSolution");
this.updateTableNd(row,rowIndex);
this.updateTableNd(row, rowIndex);
}
}
}
},
updateRecord() {
this.$nextTick(() => {
@ -460,23 +476,23 @@ export default {
})
},
//table
updateTableNd(row,rowIndex) {
updateTableNd(row, rowIndex) {
const { stepTableFormData = [] } = this.$refs[`ladderStepTableRef_${rowIndex}`][0].getFilledFormData();
const newData = JSON.parse(JSON.stringify(stepTableFormData));
//
newData.forEach((item, index) => {
let initNd = row.nd;//
if(index ===0){
if (index === 0) {
item.startSolutionCode = row.bh;
}else{
item.startSolutionCode = newData[index - 1].targetSolutionCode+ newData[index - 1].subTargetSolutionCode;
} else {
item.startSolutionCode = newData[index - 1].targetSolutionCode + newData[index - 1].subTargetSolutionCode;
initNd = newData[i - 1].actSolutionConcentration;
}
const volResult = this.updateSjmbrynd(item, initNd);
if (!volResult) {
return
}
item.actSolutionVolume = volResult.actVol;
item.actSolutionConcentration = volResult.actNd;
// stepTableRef
@ -562,10 +578,14 @@ export default {
return false;
}
let content = this.getFilledFormData();
return content;
},
getResource() {
let content = this.getFilledFormData();
//resource
debugger
let tmpResource = []
if (this.fillType === "actFill") {
debugger
//
if (content.ladderConfigs && content.ladderConfigs.length > 0) {
for (let i = 0; i < content.ladderConfigs.length; i++) {
@ -744,7 +764,7 @@ export default {
this.yqResourceTmp = stepResource.yqResource || []
this.resourceTmp = tmpResource
return content;
return this.resourceTmp;
},
getStepResource() {
const sjResource = [], yqResource = [];

+ 25
- 27
src/views/business/study/comp/tbbd/Bj.vue View File

@ -645,32 +645,30 @@ export default {
},
async showYjcc() {
let that = this
let content = await that.$refs.templateTable.getFormData()
if (content) {
that.resetYjcc()
that.formYjcc.id = that.form.id
that.cclistYj = []
that.addCcYj()
let resource = that.$refs.templateTable.getResource()
let tmp = _.filter(resource, function (o) {
return o.type == null || o.type == 3 || o.type == 5 || o.type == 7
that.resetYjcc()
that.formYjcc.id = that.form.id
that.cclistYj = []
that.addCcYj()
that.$refs.templateTable.getFilledFormData()
let resource = that.$refs.templateTable.getResource()
let tmp = _.filter(resource, function (o) {
return o.type == null || o.type == 3 || o.type == 5 || o.type == 7
})
if (tmp.length > 0) {
that.$modal.loading()
studyFormFill_yjccFilter({ id: this.form.id, resource: JSON.stringify(tmp) }).then(response => {
let tmpResource = JSON.parse(response.msg)
if (tmpResource.length > 0) {
that.resourceYj = tmpResource
that.openYjcc = true
} else {
that.$modal.msgError("没有可存储的药剂")
}
}).finally(() => {
that.$modal.closeLoading()
})
if (tmp.length > 0) {
that.$modal.loading()
studyFormFill_yjccFilter({ id: this.form.id, resource: JSON.stringify(tmp) }).then(response => {
let tmpResource = JSON.parse(response.msg)
if (tmpResource.length > 0) {
that.resourceYj = tmpResource
that.openYjcc = true
} else {
that.$modal.msgError("没有可存储的药剂")
}
}).finally(() => {
that.$modal.closeLoading()
})
} else {
that.$modal.msgError("没有可存储的药剂")
}
} else {
that.$modal.msgError("没有可存储的药剂")
}
},
resetYjcc() {
@ -818,8 +816,8 @@ export default {
this.$modal.msgError("请选择要处置的药剂")
} else {
for (var i = 0; i < that.cclistYj.length; i++) {
if (!that.cclistYj[i].ccwz||that.cclistYj[i].ccwz=='') {
this.$modal.msgError('第'+(i+1) + "个存储,存储位置不能为空")
if (!that.cclistYj[i].ccwz || that.cclistYj[i].ccwz == '') {
this.$modal.msgError('第' + (i + 1) + "个存储,存储位置不能为空")
return
}
if (!that.cclistYj[i].cctj || that.cclistYj[i].cctj == '') {

Loading…
Cancel
Save