Browse Source

农资规格 修改异步搜索规格

master
邓宏 2 years ago
parent
commit
b417dcfb7a
  1. 6
      pages/purchase/specs.vue

6
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()
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=''

Loading…
Cancel
Save