From b417dcfb7a76c37e2444a1269dfd545b74d235d8 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Fri, 19 May 2023 18:45:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=9C=E8=B5=84=E8=A7=84=E6=A0=BC=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=82=E6=AD=A5=E6=90=9C=E7=B4=A2=E8=A7=84?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/purchase/specs.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pages/purchase/specs.vue b/pages/purchase/specs.vue index 4306c16..bbb1b1c 100644 --- a/pages/purchase/specs.vue +++ b/pages/purchase/specs.vue @@ -213,7 +213,7 @@ import request from '@/common/request' export default{ data(){ return{ - specList:[[]], + specList:[], specStr:"", dressingUnit:"", show:false, @@ -239,11 +239,14 @@ export default{ async onLoad(options){ this.intoPage=options.intoPage this.eventChannel=this.getOpenerEventChannel() - this.eventChannel.on("detail", detail=>{ - this.formData.goodsName=detail.goodsName - this.formData.detailedType=detail.detailedType - this.formData.detailedParentName=detail.detailedParentName - this.formData.supplier=detail.supplier + await new Promise(resolve=>{ + this.eventChannel.on("detail", detail=>{ + this.formData.goodsName=detail.goodsName + this.formData.detailedType=detail.detailedType + this.formData.detailedParentName=detail.detailedParentName + this.formData.supplier=detail.supplier + resolve() + }) }) this.formData.goodsId=options.goodsId this.setGoodsVal() @@ -258,6 +261,7 @@ export default{ } }) if(res.statu){ + console.log(res.data,'---111----') this.specList=[res.data.map(v=>({label:v.goodsSpecification,value:v.goodsSpecification,id:v.id}))] this.formData.goodsSpecification='' this.specStr=''