diff --git a/src/App.vue b/src/App.vue index 904a002..8601d19 100644 --- a/src/App.vue +++ b/src/App.vue @@ -375,6 +375,7 @@ export default { background: #ffffff; padding: 10px 10px; margin-top: 10px; + width: 100%; display: flex; justify-content: center; .content-right { diff --git a/src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue b/src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue index 3c28c43..4698be6 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue @@ -2,28 +2,30 @@ @@ -101,13 +103,13 @@ export default { label: this.$t('template.common.methodCode'), type: "input", fillType: "preFill", - maxlength:50 + maxlength: 50 }, versionNum: { label: this.$t('template.common.versionNumber'), type: "input", fillType: "actFill", - maxlength:50 + maxlength: 50 }, } @@ -159,7 +161,7 @@ export default { label: this.$t('template.common.targetSolutionName'), type: "input", fillType: "preFill", - maxlength:50 + maxlength: 50 }, targetCode: { label: this.$t('template.common.targetSolutionCode'), @@ -167,7 +169,7 @@ export default { subType: "span", fillType: "preFill", subKey: "targetCode1", - maxlength:20 + maxlength: 20 }, targetPreConcentration: { label: this.$t('template.common.targetPreConcentration'), @@ -176,7 +178,7 @@ export default { subKey: "targetPreConcentrationUnit", fillType: "preFill", subOptions: this.getDictOptions('business_nddw'), - maxlength:10 + maxlength: 10 }, targetActConcentration: { label: this.$t('template.common.targetActConcentration'), @@ -188,7 +190,7 @@ export default { subFillType: "preFill", subOptions: this.getDictOptions('business_nddw'), copyFrom: "targetPreConcentration",//复制哪个字段 - maxlength:10 + maxlength: 10 }, targetPreVolume: { label: this.$t('template.common.targetPreVolume'), @@ -197,7 +199,7 @@ export default { subKey: "targetPreVolumeUnit", subOptions: this.getDictOptions('business_tjdw'), fillType: "preFill", - maxlength:10 + maxlength: 10 }, targetActVolume: { label: this.$t('template.common.targetActVolume'), @@ -209,7 +211,7 @@ export default { subOptions: this.getDictOptions('business_tjdw'), compareTo: "targetPreVolume",//与哪个字段比较 copyFrom: "targetPreVolume",//复制哪个字段 - maxlength:10 + maxlength: 10 }, effectivePeriod: { label: this.$t('template.common.effectivePeriod'), @@ -218,7 +220,7 @@ export default { subKey: "effectivePeriodUnit", fillType: "preFill", subOptions: this.getDictOptions('business_yxqdw'), - maxlength:10 + maxlength: 10 }, expireDate: { label: this.$t('template.common.expireDate'), @@ -234,12 +236,12 @@ export default { resource: [], resourceData1: [], sysjColumns: [ - { label: this.$t('template.common.reagentName'), prop: "reagentName" }, - { label: this.$t('template.common.reagentCode'), prop: "reagentCode" }, - { label: this.$t('template.common.reagentNo'), prop: "reagentNo" }, - { label: this.$t('template.common.concentration'), prop: "concentration" }, - { label: this.$t('template.common.source'), prop: "source" }, - { label: this.$t('template.common.reagentExpireDate'), prop: "expireDate" }, + { label: this.$t('template.common.reagentName'), prop: "mc" },//名称 + { label: this.$t('template.common.reagentCode'), prop: "bh" },//编号 + { label: this.$t('template.common.reagentNo'), prop: "ph" },//批号 试剂,供试品才有 + { label: this.$t('template.common.concentration'), prop: "nd" },//浓度 + { label: this.$t('template.common.source'), prop: "source" },//来源 + { label: this.$t('template.common.reagentExpireDate'), prop: "sxrq" },//失效日期 ], yqsColumns: [ { label: this.$t('template.common.instrumentName'), prop: "instrumentName" }, @@ -251,18 +253,44 @@ export default { }; }, mounted() { - + }, methods: { async getFormData() { - return await this.validFormFields(["baseInfoRef", "storageConditionRef","stepFormPackageRef","stepRef","remarkRef"]); + let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]); + //生成resource todo 已经提交,再次编辑需要合并,通过编号关联 + // type(1:试剂;3:供试品;5:给药制剂;7:麻精药),syl(使用量)syldw(使用量单位) + let tmpResource = [] + + //配置的试剂 + tmpResource.push({ + mc: content.targetName, + bh: content.targetCode, + ph: '', + nd: content.targetActConcentration + content.targetActConcentrationUnit, + source: '配置', + type: 1, + + sxrq: content.expireDate, + ndz: content.targetActConcentration, + nddw: content.targetActConcentrationUnit, + kc: content.targetActVolume, + kcdw: content.targetActVolumeUnit, + syl: null, + syldw: content.targetActVolumeUnit, + }) + //使用的试剂 + this.resource=tmpResource + + console.log(this.resource, "resource") + return content; }, async onSave() { const formData = await this.getFormData(); - + console.log(formData, "formData") }, - + } }; diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js index 158d914..691ad47 100644 --- a/src/views/business/comps/template/mixins/templateMixin.js +++ b/src/views/business/comps/template/mixins/templateMixin.js @@ -16,7 +16,7 @@ export default { let n = { ...v }; this.formData =n; if(v.resource){//试验试剂信息 - this.resource = v.resource; + this.resource = JSON.parse(v.resource); } if (v.bdnr) { this.formData = { ...n, ...JSON.parse(v.bdnr) }; @@ -35,8 +35,8 @@ export default { } }, mounted() { - this.setTemplateStatus("actFill"); - // this.setTemplateStatus(this.fillType); + // this.setTemplateStatus("actFill"); + this.setTemplateStatus(this.fillType); }, unmounted() { this.setTemplateStatus(""); diff --git a/src/views/business/study/comp/tbbd/Bj.vue b/src/views/business/study/comp/tbbd/Bj.vue index f333006..fd100ee 100644 --- a/src/views/business/study/comp/tbbd/Bj.vue +++ b/src/views/business/study/comp/tbbd/Bj.vue @@ -89,6 +89,7 @@ 处置 + {{ formApprove.resource }} @@ -229,12 +230,14 @@ export default { } }, async showApprove() { - let content = await this.$refs.templateTable.getFormData() + let that=this + let content = await that.$refs.templateTable.getFormData() if (content) { - this.form.bdnr = JSON.stringify(content) - this.resetApprove() - this.formApprove.id = this.form.id - this.openApprove = true + that.resetApprove() + that.formApprove.id = that.form.id + that.formApprove.bdnr = JSON.stringify(content) + that.formApprove.resource = JSON.stringify(that.$refs.templateTable.getResource()) + that.openApprove = true } }, resetApprove() {