Browse Source

fix:[模板管理]优化

lkf
15881625488@163.com 2 months ago
parent
commit
3fcc5d98d9
4 changed files with 34 additions and 29 deletions
  1. +18
    -12
      src/views/business/comps/template/comps/sp/SP001.vue
  2. +13
    -9
      src/views/business/comps/template/comps/sp/SP003.vue
  3. +1
    -3
      src/views/business/comps/template/comps/sp/SP00456.vue
  4. +2
    -5
      src/views/business/study/comp/tbbd/Bj.vue

+ 18
- 12
src/views/business/comps/template/comps/sp/SP001.vue View File

@ -2,21 +2,23 @@
<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.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" v-if="resourceWz.length>0"/>
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz"
v-if="resourceWz.length > 0" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"
label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.common.bqdy') }}</el-button>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary" @click="printTag">{{
$t('template.common.bqdy') }}</el-button>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
</div>
@ -249,7 +251,7 @@ export default {
},
mounted() {
const formData = this.getFormDataByTemplateData();
if(!formData.targetCodeSn&& this.fillType === "actFill"){
if (!formData.targetCodeSn && this.fillType === "actFill") {
this.getCode(formData);
}
@ -268,8 +270,8 @@ export default {
getCode: debounce(async function (v) {
const result = await getLatestSn({
count: 1,
pre:v.targetCode,
type:1
pre: v.targetCode,
type: 1
})
if (result.code == 200) {
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn", result.data[0])
@ -282,6 +284,10 @@ export default {
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]);
return content;
},
getResource() {
let content = this.getFilledFormData();
//resource
let tmpResource = []
if (this.fillType === "actFill") {
@ -307,15 +313,15 @@ export default {
}
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp =uniqeResource(tmpResource,stepResource.sjResource||[])
this.yqResourceTmp = stepResource.yqResource||[]
return content;
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
let content =await this.$refs.stepRef.getFormData();
let content = await this.$refs.stepRef.getFormData();
console.log(content);
},
}
};

+ 13
- 9
src/views/business/comps/template/comps/sp/SP003.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"
@ -14,8 +15,7 @@
:formData="formData" /> -->
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPackage ref="stepFormPackageRef"
fieldItemLabel="template.common.operationSteps"
<BaseInfoFormPackage ref="stepFormPackageRef" fieldItemLabel="template.common.operationSteps"
@onRegentSubmit="onRegentSubmit" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<CustomTable fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@ -60,7 +60,7 @@ export default {
default: 'preFill',
},
},
computed: {
//
storageFormConfig() {
@ -428,8 +428,8 @@ export default {
methods: {
//
onRegentSubmit(data) {
const { selectInfo,key} = data;
const {row} = selectInfo;
const { selectInfo, key } = data;
const { row } = selectInfo;
if (key === "subStartSolution") {//table
this.$refs.stepFormPackageRef.updateFormData("targetAcSolution", row.nd);
this.updateStepTableData(row);
@ -470,7 +470,7 @@ export default {
if (fzList && fzList.length > 0) {
const list = fzList.map((item) => {
return {
bh: mybh + item.subCode,
bh: mybh + item.preCode + item.subCode,
kc: item.num,
kcdw: dw,
}
@ -537,7 +537,7 @@ export default {
} else {
// targetSolutionCode
// targetSolutionCode
newStepTableData[i].startSolutionCode = newStepTableData[i - 1].targetSolutionCode+newStepTableData[i - 1].subTargetSolutionCode;
newStepTableData[i].startSolutionCode = newStepTableData[i - 1].targetSolutionCode + newStepTableData[i - 1].subTargetSolutionCode;
initNd = newStepTableData[i - 1].actSolutionConcentration;
}
const volResult = this.updateSjmbrynd(item, initNd);
@ -553,6 +553,10 @@ export default {
},
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]);
return content;
},
getResource() {
let content = this.getFilledFormData();
let tmpResource = []
if (this.fillType === "actFill") {
let tableList = content.stepTableFormData
@ -653,7 +657,7 @@ export default {
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = stepResource.yqResource || []
return content;
return this.resourceTmp;
},
async onSave() {
// const formData = await this.getFormData();

+ 1
- 3
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -199,12 +199,11 @@ export default {
if (fzList && fzList.length > 0) {
const list = fzList.map((item) => {
return {
bh: mybh + item.subCode,
bh: mybh +item.preCode + item.subCode,
kc: item.num,
kcdw: dw,
}
})
debugger
let postData = {
studyId: this.formData.studyId,
studyFormId: this.formData.id,
@ -762,7 +761,6 @@ export default {
const stepResource = this.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = stepResource.yqResource || []
this.resourceTmp = tmpResource
return this.resourceTmp;
},

+ 2
- 5
src/views/business/study/comp/tbbd/Bj.vue View File

@ -655,12 +655,9 @@ export default {
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) {
if (resource.length > 0) {
that.$modal.loading()
studyFormFill_yjccFilter({ id: this.form.id, resource: JSON.stringify(tmp) }).then(response => {
studyFormFill_yjccFilter({ id: this.form.id, resource: JSON.stringify(resource) }).then(response => {
let tmpResource = JSON.parse(response.msg)
if (tmpResource.length > 0) {
that.resourceYj = tmpResource

Loading…
Cancel
Save