|
|
@ -182,7 +182,7 @@ |
|
|
|
<view class="tip" v-if="specStr">库存:{{specStr}}</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="card purchase" v-if="mode=='purchase'"> |
|
|
|
<view class="card purchase" v-if="intoPage=='purchase'"> |
|
|
|
<view class="title_mast">采购数量</view> |
|
|
|
<view class="input"> |
|
|
|
<input placeholder="请输入采购数量" type="digit" v-model="formData.num"/> |
|
|
@ -226,11 +226,11 @@ export default{ |
|
|
|
goodsDetail:{}, |
|
|
|
|
|
|
|
eventChannel:null, |
|
|
|
mode:"", |
|
|
|
intoPage:"", |
|
|
|
} |
|
|
|
}, |
|
|
|
async onLoad(options){ |
|
|
|
this.mode=options.mode |
|
|
|
this.intoPage=options.intoPage |
|
|
|
this.eventChannel=this.getOpenerEventChannel() |
|
|
|
this.eventChannel.on("detail", detail=>{ |
|
|
|
this.formData.goodsName=detail.goodsName |
|
|
@ -240,7 +240,7 @@ export default{ |
|
|
|
}) |
|
|
|
this.formData.goodsId=options.goodsId |
|
|
|
//从新增入库页面进入不需要搜索规格 |
|
|
|
if(this.mode=='purchase')this.setGoodsVal() |
|
|
|
if(this.intoPage=='purchase')this.setGoodsVal() |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
async setGoodsVal(val){ |
|
|
@ -290,7 +290,7 @@ export default{ |
|
|
|
if(!this.formData.goodsSpecification){ |
|
|
|
uni.showToast({title:"规格必选!",icon:"none"}) |
|
|
|
return false |
|
|
|
}else if(!this.formData.num>0 && this.mode=="purchase"){ |
|
|
|
}else if(!this.formData.num>0 && this.intoPage=="purchase"){ |
|
|
|
uni.showToast({title:"采购数量必填!",icon:"none"}) |
|
|
|
return false |
|
|
|
} |
|
|
|