diff --git a/pages/purchase/newSpecs.vue b/pages/purchase/newSpecs.vue index e0976b4..7fcf2f4 100644 --- a/pages/purchase/newSpecs.vue +++ b/pages/purchase/newSpecs.vue @@ -60,10 +60,10 @@ 例如:肥料一袋50kg,录入规格则为50kg/袋 - + @@ -124,9 +124,9 @@ export default { if(!this.formData.num>0){ uni.showToast({title:"规格值必填!",icon:"none"}) return false - }else if(!this.formData.earlyValue>0){ - uni.showToast({title:"预警值必填!",icon:"none"}) - return false + // }else if(!this.formData.earlyValue>0){ + // uni.showToast({title:"预警值必填!",icon:"none"}) + // return false } return true }, diff --git a/pages/purchase/specs.vue b/pages/purchase/specs.vue index 4afce7c..b6583ee 100644 --- a/pages/purchase/specs.vue +++ b/pages/purchase/specs.vue @@ -188,6 +188,12 @@ {{dressingUnit}} + + 预警值 + + + {{dressingUnit}} + @@ -216,6 +222,7 @@ export default{ goodsName:"", goodsSpecification:"", num:"", + warning:"", specificationId:"", detailedType:"", @@ -239,8 +246,7 @@ export default{ this.formData.supplier=detail.supplier }) this.formData.goodsId=options.goodsId - //从新增入库页面进入不需要搜索规格 - if(this.intoPage=='purchase')this.setGoodsVal() + this.setGoodsVal() }, methods:{ async setGoodsVal(val){ diff --git a/pages/stock/agrWarehouse.vue b/pages/stock/agrWarehouse.vue index 2929d2d..06173fa 100644 --- a/pages/stock/agrWarehouse.vue +++ b/pages/stock/agrWarehouse.vue @@ -93,7 +93,8 @@ import request from '@/common/request' return{ fields:{ specName:{label:"规格", disabled:true, agr:true}, - number:{label:"入库数量", type:"digit",suffix:"袋", tip:""}, + 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}, inOutType:{label:"入库类型",type:"select",columns:[],value:[]}, @@ -104,6 +105,7 @@ import request from '@/common/request' formData:{ enterpriseId: this.$store.getters['userInfo'].companyId, specName:"", + warning:"", specId:"", number:"", warehouseId:"", @@ -117,6 +119,7 @@ import request from '@/common/request' }, rules:{ number:{required:true,type:"number", message:"入库数量必填!"}, + warning:{required:true,type:"number", message:"入库数量必填!"}, inOutBatchNo:{required:true, message:"入库批次号必填!"}, warehouseId:{required:true, message:"仓库必选!"}, inOutType:{required:true, message:"入库类型必选!"}, @@ -139,6 +142,7 @@ import request from '@/common/request' watch:{ specs(n){ this.fields.number.suffix=n.specs[2] + this.fields.warning.suffix=n.specs[2] if(n.num>0 && n.specs[0]){ this.fields.number.tip=`共计:${parseFloat(n.num)*parseFloat(n.specs[0])}${n.specs[1]}` }else{ @@ -180,6 +184,7 @@ import request from '@/common/request' }) } }, + //添加农资 toAddAgr(){ uni.navigateTo({ url:"/pages/purchase/agrProdList?intoPage=stock",