邓宏 2 years ago
parent
commit
bb39392408
  1. 13
      pages/purchase/specs.vue

13
pages/purchase/specs.vue

@ -186,6 +186,7 @@
<view class="title_mast">采购数量</view> <view class="title_mast">采购数量</view>
<view class="input"> <view class="input">
<input placeholder="请输入采购数量" type="digit" v-model="formData.num"/> <input placeholder="请输入采购数量" type="digit" v-model="formData.num"/>
<text>{{dressingUnit}}</text>
</view> </view>
</view> </view>
@ -216,6 +217,7 @@ export default{
purchaseId:'', purchaseId:'',
specList:[[]], specList:[[]],
specStr:"", specStr:"",
dressingUnit:"",
show:false, show:false,
formData:{ formData:{
goodsName:"", goodsName:"",
@ -258,12 +260,16 @@ export default{
this.formData.supplier=val.supplier this.formData.supplier=val.supplier
var res=await request("/api/goods/queryGoodsSpecification",{ var res=await request("/api/goods/queryGoodsSpecification",{
params:{goodsName:this.formData.goodsName} params:{
goodsName:this.formData.goodsName,
supplier:this.formData.supplier,
}
}) })
if(res.statu){ if(res.statu){
this.specList=[res.data.map(v=>({label:v.goodsSpecification,value:v.goodsSpecification,id:v.id}))] this.specList=[res.data.map(v=>({label:v.goodsSpecification,value:v.goodsSpecification,id:v.id}))]
this.formData.goodsSpecification='' this.formData.goodsSpecification=''
this.specStr='' this.specStr=''
this.dressingUnit=''
}else{ }else{
uni.showModal({ uni.showModal({
title:"提示", title:"提示",
@ -276,9 +282,10 @@ export default{
var res=await request("/api/goods/stockShow?goodsSpecificationId",{ var res=await request("/api/goods/stockShow?goodsSpecificationId",{
params:{goodsSpecificationId:id} params:{goodsSpecificationId:id}
}) })
if(res.statu&&res.data){ if(res.data.packing&&res.data.heft){
this.specStr=`${res.data.packing}(${res.data.heft})` this.specStr=`${res.data.packing}(${res.data.heft})`
} }else{this.specStr=''}
this.dressingUnit=`${res.data.dressingUnit}`
}, },
toAdd(){ toAdd(){
uni.navigateTo({ uni.navigateTo({

Loading…
Cancel
Save