Browse Source

新增入库 新增仓库表单

master
邓宏 2 years ago
parent
commit
ac1720368a
  1. 18
      pages/stock/agrWarehouse.vue

18
pages/stock/agrWarehouse.vue

@ -95,15 +95,18 @@ import request from '@/common/request'
specName:{label:"规格", disabled:true, agr:true},
number:{label:"入库数量", type:"digit",suffix:"袋", tip:"",agr:true},
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},
inOutType:{label:"入库类型",type:"select",columns:[],value:[]},
operateTime:{label:"入库时间",type:"calendar"},
pic:{label:"单据、凭证图片",type:"upImg",value:''},
remark:{label:"备注",type:"textarea"},
},
formData:{
enterpriseId: this.$store.getters['userInfo'].companyId,
specName:"",
specId:"",
number:"",
wareHouseId:"",
inOutBatchNo:'',
inOutType:"",
operateTime:"",
@ -113,6 +116,7 @@ import request from '@/common/request'
rules:{
number:{required:true,type:"number", message:"入库数量必填!"},
inOutBatchNo:{required:true, message:"入库批次号必填!"},
wareHouseId:{required:true, message:"仓库必选!"},
inOutType:{required:true, message:"入库类型必选!"},
operateTime:{required:true, message:"入库时间必选!"},
},
@ -146,6 +150,7 @@ import request from '@/common/request'
},
methods:{
async init(){
//
var res=await request("/common/api/dict/queryDictItemByDictCode",{
method:"post",
params:{dictCode:"in_type"}
@ -159,6 +164,19 @@ import request from '@/common/request'
showCancel:false,
})
}
//
var res=await request("/api/WarehouseManageApi/queryWarehouseByBaseId",{
params:{baseId: this.$store.state.plantBaseInfoId}
})
if(res.statu){
this.fields.wareHouseId.columns=[res.data]
}else{
uni.showModal({
title:"提示",
content:res.msg||"获取仓库选项失败!",
showCancel:false,
})
}
},
toAddAgr(){
uni.navigateTo({

Loading…
Cancel
Save