diff --git a/pages/purchase/specs.vue b/pages/purchase/specs.vue index de051c6..6f73e6a 100644 --- a/pages/purchase/specs.vue +++ b/pages/purchase/specs.vue @@ -186,6 +186,7 @@ 采购数量 + {{dressingUnit}} @@ -216,6 +217,7 @@ export default{ purchaseId:'', specList:[[]], specStr:"", + dressingUnit:"", show:false, formData:{ goodsName:"", @@ -258,12 +260,16 @@ export default{ this.formData.supplier=val.supplier var res=await request("/api/goods/queryGoodsSpecification",{ - params:{goodsName:this.formData.goodsName} + params:{ + goodsName:this.formData.goodsName, + supplier:this.formData.supplier, + } }) if(res.statu){ this.specList=[res.data.map(v=>({label:v.goodsSpecification,value:v.goodsSpecification,id:v.id}))] this.formData.goodsSpecification='' this.specStr='' + this.dressingUnit='' }else{ uni.showModal({ title:"提示", @@ -276,9 +282,10 @@ export default{ var res=await request("/api/goods/stockShow?goodsSpecificationId",{ params:{goodsSpecificationId:id} }) - if(res.statu&&res.data){ + if(res.data.packing&&res.data.heft){ this.specStr=`${res.data.packing}(${res.data.heft})` - } + }else{this.specStr=''} + this.dressingUnit=`${res.data.dressingUnit}` }, toAdd(){ uni.navigateTo({