Browse Source

农资出库 添加领用人选项

master
邓宏 1 year ago
parent
commit
da9f24c49c
  1. 23
      pages/stock/list.vue

23
pages/stock/list.vue

@ -165,6 +165,10 @@
</view>
</d-form>
<d-form :label="`${({in:'入',out:'出'})[mode]}库类型`" field="inOutType" required type="select" :columns="inOutType.list" :value="inOutType.value" @select="inOutType.value=$event.map(v=>v.value);formData.inOutType=inOutType.value.slice(-1)[0]"/>
<!-- 出库类型为领用出库 -->
<block v-if="formData.inOutType=='out01'">
<d-form label="领用人" type="select" :columns="[reciveuser]" :value="[formData.reciveUserId]" @select="formData.reciveUserId=$event[0].value;formData.reciveUser=$event[0].label" required field="reciveUserId"/>
</block>
<!-- 农资出库出库类型为损坏出库 -->
<block v-if="formData.substanceType==1&&formData.inOutType=='out02'">
<d-form label="采购单价" type='digit' v-model="formData.price" required field="price"/>
@ -214,6 +218,7 @@ export default{
packWeightList:[],
processMode:[],//
damageReason:[],//
reciveuser:[],//
formData:{
inInventoryBatch:"",
inOutType:"",
@ -231,6 +236,9 @@ export default{
buyerType:"",
buyerAddress:"",
reciveUserId:"",
reciveUser:"",
price:"",
processMode:"",
@ -263,6 +271,8 @@ export default{
buyerType:{required:true,message:"交易类型必选!",trigger:['blur','change']},
buyerAddress:{required:true,message:"收货地址必填!",trigger:['blur','change']},
reciveUserId:{required:true,message:"请选择领用人!",trigger:['blur','change']},
price:{required:true, type:"number", message:"请输入采购单价!",tigger:['blur','change']},
processMode:{required:true, message:"请输入处理方式!",tigger:['blur','change']},
@ -388,6 +398,19 @@ export default{
showCancel:false,
})
}
//
var res=await request("/api/plantPlot/queryBaseUserByBaseId",{
params:{baseId: this.$store.state.baseInfo.id}
})
if(res.statu){
this.reciveuser=res.data
}else{
uni.showModal({
title:"提示",
content:res.msg||"获取领用人选项失败!",
showCancel:false,
})
}
},
submit(){
this.$refs.form.validate().then(async valid=>{

Loading…
Cancel
Save