Browse Source

农资入库 修改仓库下拉选接口

master
邓宏 2 years ago
parent
commit
879439a618
  1. 2
      pages/massif/plant_info.vue
  2. 11
      pages/stock/agrWarehouse.vue

2
pages/massif/plant_info.vue

@ -11,7 +11,7 @@
<button slot="right" class="cu-btn round" @click="submit">提交</button>
</d-navbar>
<u-form class="card inline" :model="formData" :rules="rules" ref="form" labelWidth="auto">
<u-form class="card inline" errorType="toast" :model="formData" :rules="rules" ref="form" labelWidth="auto">
<d-form
v-for="(v,k) in fields"
:key="k"

11
pages/stock/agrWarehouse.vue

@ -93,7 +93,7 @@ import request from '@/common/request'
return{
fields:{
specName:{label:"规格", disabled:true, agr:true},
warning:{label:"预值",type:"digit",suffix:"",agr:true},
warning:{label:"预值",type:"digit",suffix:"",agr:true},
number:{label:"入库数量", type:"digit",suffix:"", tip:""},
inOutBatchNo:{label:"入库批次号",agr:true, btnText:"生成", btnFun:()=>this.formData.inOutBatchNo=`RK${new Date().format('yyyyMMdd')}${new Date().getTime()}`},
warehouseId:{label:"选择仓库", type:"select",columns:[],value:[],agr:true},
@ -171,11 +171,14 @@ import request from '@/common/request'
})
}
//
var res=await request("/api/WarehouseManageApi/queryWarehouseByBaseId",{
params:{baseId: this.$store.state.plantBaseInfoId}
var res=await request("/api/plantHarvest/getWarehouse",{
params:{
plantBaseId:this.$store.state.plantBaseInfoId,
type:1,//1 2
}
})
if(res.statu){
this.fields.warehouseId.columns=[res.data]
this.fields.warehouseId.columns=[res.data.map(v=>({label:v.warehouseName,value:v.id}))]
}else{
uni.showModal({
title:"提示",

Loading…
Cancel
Save