邓宏 2 years ago
parent
commit
72269908dd
  1. 2
      pages/home/index.vue
  2. 4
      pages/massif/index.vue
  3. 24
      pages/warehouse/info.vue

2
pages/home/index.vue

@ -244,7 +244,7 @@
<view style="display:flex;"> <view style="display:flex;">
<view class="card mana"> <view class="card mana">
<view class="title"> <view class="title">
<text class="plant-dikuaimianji"/> 种植管理 <text class="more" @click="$u.route({type:'switchTab',url:'pages/massif/index'})">更多>></text> <text class="plant-dikuaimianji"/> 地块管理 <text class="more" @click="$u.route({type:'switchTab',url:'pages/massif/index'})">更多>></text>
</view> </view>
<view class="item" v-for="(v,k) in massif.plotList||[]" :key="k"> <view class="item" v-for="(v,k) in massif.plotList||[]" :key="k">
<text class="over">{{v.plotName}}</text> <text>{{v.realityArea}}</text> <text class="over">{{v.plotName}}</text> <text>{{v.realityArea}}</text>

4
pages/massif/index.vue

@ -78,7 +78,7 @@
</style> </style>
<template> <template>
<view class="container flex"> <view class="container flex">
<d-navbar style="--bg:#10C176;--c:#fff;" text="种植管理"> <d-navbar style="--bg:#10C176;--c:#fff;" text="地块管理">
<text class="plant-xinjian" slot="right" @click="toInfo"/> <text class="plant-xinjian" slot="right" @click="toInfo"/>
</d-navbar> </d-navbar>
@ -99,7 +99,7 @@
<view class="btns" @click.stop=''> <view class="btns" @click.stop=''>
<text class="plant-xiugai" @click.stop="reDetail(v.id)">修改</text> <text class="plant-xiugai" @click.stop="reDetail(v.id)">修改</text>
<text class="plant-shanchu" @click.stop="del(k)">删除</text> <text class="plant-shanchu" @click.stop="del(k)">删除</text>
<text class="plant-xinzeng" @click.stop="$u.route({url:'pages/massif/mana/index',params:{id:v.id}})">地块管理</text> <text class="plant-xinzeng" @click.stop="$u.route({url:'pages/massif/mana/index',params:{id:v.id}})">种植管理</text>
</view> </view>
</view> </view>
</view> </view>

24
pages/warehouse/info.vue

@ -33,8 +33,8 @@ import request from '@/common/request.js'
warehouseVolume:{label:"仓库容量(㎡)", type:"digit",placeholder:"请输入仓库容量"}, warehouseVolume:{label:"仓库容量(㎡)", type:"digit",placeholder:"请输入仓库容量"},
goodsType:{label:"存储物品类型",type:"select",columns:[],value:[]}, goodsType:{label:"存储物品类型",type:"select",columns:[],value:[]},
warehouseType:{label:"仓库类型",type:"select",columns:[],value:[]}, warehouseType:{label:"仓库类型",type:"select",columns:[],value:[]},
contactPeople:{label:"基地管理员", disabled:this.$store.getters['userInfo'].roleCode=="baseAdmin"}, // contactPeople:{label:"", disabled:this.$store.getters['userInfo'].roleCode=="baseAdmin"},
contactNumber:{label:"管理员联系方式", disabled:this.$store.getters['userInfo'].roleCode=="baseAdmin"}, // contactNumber:{label:"", disabled:this.$store.getters['userInfo'].roleCode=="baseAdmin"},
warehousePic:{label:"仓库图片",type:"upImg",num:3}, warehousePic:{label:"仓库图片",type:"upImg",num:3},
}, },
formData:{ formData:{
@ -44,8 +44,8 @@ import request from '@/common/request.js'
warehouseVolume:"", warehouseVolume:"",
goodsType:'', goodsType:'',
warehouseType:"", warehouseType:"",
contactPeople:"", // contactPeople:"",
contactNumber:"", // contactNumber:"",
warehousePic:[], warehousePic:[],
baseId: this.$store.state.baseInfo.id, baseId: this.$store.state.baseInfo.id,
}, },
@ -56,12 +56,12 @@ import request from '@/common/request.js'
warehouseVolume:{required:true, message:"仓库容量必填!", type:"number", trigger:["blur","change"]}, warehouseVolume:{required:true, message:"仓库容量必填!", type:"number", trigger:["blur","change"]},
goodsType:{required:true, message:"存储物品类型必填!", trigger:["blur","change"]}, goodsType:{required:true, message:"存储物品类型必填!", trigger:["blur","change"]},
warehouseType:{required:true, message:"仓库类型必选!", trigger:["blur","change"]}, warehouseType:{required:true, message:"仓库类型必选!", trigger:["blur","change"]},
contactPeople:{required:true, message:"基地管理员必填!", trigger:["blur","change"]}, // contactPeople:{required:true, message:"", trigger:["blur","change"]},
contactNumber:{required:true, validator(rule,val,call){ // contactNumber:{required:true, validator(rule,val,call){
if(!val)call(new Error("管理员联系方式必填!")); // if(!val)call(new Error(""));
else if(!/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(val))call(new Error("请输入正确联系方式格式!")) // else if(!/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(val))call(new Error(""))
else call(); // else call();
}, trigger:["blur","change"]}, // }, trigger:["blur","change"]},
warehousePic:{required:true, validator(rule,val,call){ warehousePic:{required:true, validator(rule,val,call){
if(!this.fields.warehousePic)call(new Error("仓库图片必选!")) if(!this.fields.warehousePic)call(new Error("仓库图片必选!"))
else call() else call()
@ -80,8 +80,8 @@ import request from '@/common/request.js'
this.fields.warehouseType.value=[e.warehouseType] this.fields.warehouseType.value=[e.warehouseType]
this.fields.goodsType.value=[e.goodsType] this.fields.goodsType.value=[e.goodsType]
}else if(this.$store.getters['userInfo'].roleCode=="baseAdmin"){ }else if(this.$store.getters['userInfo'].roleCode=="baseAdmin"){
this.formData.contactPeople=this.$store.getters['userInfo'].realname // this.formData.contactPeople=this.$store.getters['userInfo'].realname
this.formData.contactNumber=this.$store.getters['userInfo'].phone // this.formData.contactNumber=this.$store.getters['userInfo'].phone
} }
}) })
}, },

Loading…
Cancel
Save