Browse Source

bug 修复

lilei 2 years ago
parent
commit
7229853ca6

+ 8 - 18
pages/index/index.vue

@@ -26,13 +26,13 @@
 				<view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 门店认证资料审核不通过,请重新提交审核!</view> <text class="text" @click="toKnow">知道了</text>
 				<view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 门店认证资料审核不通过,请重新提交审核!</view> <text class="text" @click="toKnow">知道了</text>
 			</view>
 			</view>
 			<!-- 名片 -->
 			<!-- 名片 -->
-			<view class="userCard flex align_center justify_between" @click="toUser">
+			<view class="userCard flex align_center justify_between">
 				<view class="userCard-info flex align_center justify_between">
 				<view class="userCard-info flex align_center justify_between">
 					<view>
 					<view>
 						<u-image shape='circle' v-if="!hasLogin" src="/static/def_personal_avatar.png" width="90" height="90"></u-image>
 						<u-image shape='circle' v-if="!hasLogin" src="/static/def_personal_avatar.png" width="90" height="90"></u-image>
 						<u-image shape='circle' v-else :src="avatarUrl||'/static/def_personal_avatar.png'" width="90" height="90"></u-image>
 						<u-image shape='circle' v-else :src="avatarUrl||'/static/def_personal_avatar.png'" width="90" height="90"></u-image>
 					</view>
 					</view>
-					<view class="user-info">
+					<view class="user-info" @click="toUser">
 						<view v-if="!hasLogin" style="font-size: 40rpx;">
 						<view v-if="!hasLogin" style="font-size: 40rpx;">
 							请点击登录
 							请点击登录
 						</view>
 						</view>
@@ -45,7 +45,7 @@
 						</view>
 						</view>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view>
+				<view @click="toUser">
 					<text v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'" class="user-rz">
 					<text v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'" class="user-rz">
 						{{storeApply&&storeApply.auditStatus=='WAIT'?'认证门店审核中':'认证成为门店'}}
 						{{storeApply&&storeApply.auditStatus=='WAIT'?'认证门店审核中':'认证成为门店'}}
 					</text>
 					</text>
@@ -76,7 +76,7 @@
 				:key="item.id" 
 				:key="item.id" 
 				:title="item.vinCode" 
 				:title="item.vinCode" 
 				:title-style="{fontSize:'1em'}" 
 				:title-style="{fontSize:'1em'}" 
-				:label="userInfo&&userInfo.sysUserFlag == '0' ? '' : (item.brandName +' '+item.modelName)">
+				:label="userInfo&&userInfo.sysUserFlag == '0' ? item.createDate : (item.brandName +' '+item.modelName)">
 					<text slot="icon"></text>
 					<text slot="icon"></text>
 				</u-cell-item>
 				</u-cell-item>
 				<view style="padding: 20upx;">
 				<view style="padding: 20upx;">
@@ -363,20 +363,10 @@
 				}
 				}
 			},
 			},
 			toChoosePart(item){
 			toChoosePart(item){
-				if(this.userInfo.sysUserFlag == '0'){
-					return
-				}
-				if(this.hasShelf){
-					item.text = item.modelInfo
-					uni.navigateTo({
-						url: "/pages/digitalShelf/choosePart?vinNumber="+item.vinCode+"&carList="+encodeURIComponent(JSON.stringify(item))
-					})
-				}else{
-					uni.showToast({
-						icon:'none',
-						title: '门店没有关联数字货架,无法使用此功能!'
-					})
-				}
+				item.text = item.modelInfo
+				uni.navigateTo({
+					url: "/pages/digitalShelf/choosePart?vinNumber="+item.vinCode+"&carList="+encodeURIComponent(JSON.stringify(item))
+				})
 			}
 			}
 		}
 		}
 	}
 	}

+ 6 - 4
pages/storeManage/addPerson.vue

@@ -29,7 +29,7 @@
 									<text @click="toAddRole()" style="color:#066cff;position: absolute;left:0;top:0.5rem;font-size:0.9rem;">新增岗位</text>
 									<text @click="toAddRole()" style="color:#066cff;position: absolute;left:0;top:0.5rem;font-size:0.9rem;">新增岗位</text>
 									选择岗位
 									选择岗位
 								</view>
 								</view>
-								<view style="padding-top: 1rem;" v-if="roleList.length">
+								<view style="padding:1rem;min-height: 15rem;" v-if="roleList.length">
 									<u-radio-group wrap v-model="formData.roleIds" @change="radioGroupChange">
 									<u-radio-group wrap v-model="formData.roleIds" @change="radioGroupChange">
 										<u-radio 
 										<u-radio 
 											v-for="(item, index) in roleList" :key="item.id" 
 											v-for="(item, index) in roleList" :key="item.id" 
@@ -50,8 +50,8 @@
 					</evanFormItem>
 					</evanFormItem>
 				</evanForm>
 				</evanForm>
 			</view>
 			</view>
-			<view class="form-footer-btn flex align_center justify_between">
-				<u-button shape="circle"  @click="delPerson()" :custom-style="{width:'300rpx' }">删除</u-button>
+			<view class="form-footer-btn flex align_center justify_center">
+				<u-button shape="circle" v-if="isEdit" @click="delPerson()" :custom-style="{width:'300rpx',marginRight:'20rpx' }">删除</u-button>
 				<u-button shape="circle" type="info" :custom-style="{ background: '#066cff', color: '#fff',width:'300rpx' }" @click="save('formData')">保存</u-button>
 				<u-button shape="circle" type="info" :custom-style="{ background: '#066cff', color: '#fff',width:'300rpx' }" @click="save('formData')">保存</u-button>
 			</view>
 			</view>
 	</view>
 	</view>
@@ -75,7 +75,7 @@
 				formData:{
 				formData:{
 					name: '',
 					name: '',
 					sex: '1',
 					sex: '1',
-					mobile: ''
+					mobile: '',
 				},
 				},
 				ruleValidate: {
 				ruleValidate: {
 					name: [{ required: true, message: '请输入员工姓名'}],
 					name: [{ required: true, message: '请输入员工姓名'}],
@@ -123,6 +123,8 @@
 					this.formData = Object.assign({},this.formData,data)
 					this.formData = Object.assign({},this.formData,data)
 				}else{
 				}else{
 					this.isEdit = false
 					this.isEdit = false
+					this.formData.workFlag =  '1'
+					this.formData.userType =  '1'
 				}
 				}
 				uni.setNavigationBarTitle({
 				uni.setNavigationBarTitle({
 					title: !!data ? "编辑员工" : '新增员工'
 					title: !!data ? "编辑员工" : '新增员工'

+ 4 - 2
pages/storeManage/roleSetting/addRole.vue

@@ -5,8 +5,10 @@
 				<evan-form-item label="岗位名称:" prop="name">
 				<evan-form-item label="岗位名称:" prop="name">
 					<u-input class="form-input" :maxlength="30" style="width: 100%;" placeholder="请填写岗位名称(最多30个字符)" v-model="formData.name" />
 					<u-input class="form-input" :maxlength="30" style="width: 100%;" placeholder="请填写岗位名称(最多30个字符)" v-model="formData.name" />
 				</evan-form-item>
 				</evan-form-item>
-				<view class="role-box flex">
-					<view style="color: #666;padding-top:0.5rem;"><text style="color:red;margin-right: 0.5rem;">*</text> 岗位权限:</view>
+				<view class="role-box">
+					<view style="color: #666;padding:0.5rem 0;">
+						<text style="color:red;margin-right: 0.5rem;">*</text> 岗位权限:
+					</view>
 					<view style="flex-grow: 1;">
 					<view style="flex-grow: 1;">
 						<roleAuthSet ref="roleSet"></roleAuthSet>
 						<roleAuthSet ref="roleSet"></roleAuthSet>
 					</view>
 					</view>

+ 23 - 4
pages/storeManage/roleSetting/roleAuthSet.vue

@@ -1,6 +1,13 @@
 <template>
 <template>
 	<view class="auth_page">
 	<view class="auth_page">
 		<view class="auth_list">
 		<view class="auth_list">
+			<view class="leve_0">
+				<view class="leve_1">
+					<label @click="checkAll()">
+						<checkbox :checked="checkedAll" /> {{checkedAll?'取消全部':'全部'}}
+					</label>
+				</view>
+			</view>
 			<view class="leve_0" v-if="authList.length" v-for="(item,index) in authList" :key="item.id">
 			<view class="leve_0" v-if="authList.length" v-for="(item,index) in authList" :key="item.id">
 				<view class="leve_1">
 				<view class="leve_1">
 					<label @click="checkParent(item)">
 					<label @click="checkParent(item)">
@@ -29,7 +36,8 @@
 				menuData: {},
 				menuData: {},
 				authList: [], // app 权限菜单
 				authList: [], // app 权限菜单
 				checkedIds: [[],[],[]], // 已选的ids
 				checkedIds: [[],[],[]], // 已选的ids
-				loading: false
+				loading: false,
+				checkedAll: false
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
@@ -40,14 +48,15 @@
 			  getMenuList({id: this.id}).then(res => {
 			  getMenuList({id: this.id}).then(res => {
 			    if (res.status == 200) {
 			    if (res.status == 200) {
 			       _this.menuData = res.data
 			       _this.menuData = res.data
+				   _this.authList = _this.menuData.allMenuList[0].children
 			       if (_this.menuData.role&&_this.menuData.role.menuIds) {
 			       if (_this.menuData.role&&_this.menuData.role.menuIds) {
 			         const arr = _this.menuData.role.menuIds.split(',')
 			         const arr = _this.menuData.role.menuIds.split(',')
 			         // 勾选已选的
 			         // 勾选已选的
 			         _this.findLeaf(_this.menuData.allMenuList, arr)
 			         _this.findLeaf(_this.menuData.allMenuList, arr)
-					 _this.getIds(_this.menuData.allMenuList[0].children,0)
+					 _this.getIds(_this.authList,0)
+					 // 是否全选
+					 _this.checkedAll = arr.length == _this.authList.length
 			       }
 			       }
-				   // app 菜单
-				   _this.authList = _this.menuData.allMenuList[0].children
 			    }
 			    }
 				console.log(_this.menuData,'_this.menuData')
 				console.log(_this.menuData,'_this.menuData')
 			  })
 			  })
@@ -83,6 +92,13 @@
 				 }
 				 }
 			   }
 			   }
 			},
 			},
+			// 全选
+			checkAll(){
+				this.authList.map(item => {
+					this.$set(item, 'checked', !this.checkedAll)
+				})
+				this.checkedAll = !this.checkedAll
+			},
 			// 选择一级菜单
 			// 选择一级菜单
 			checkParent(item){
 			checkParent(item){
 				console.log(item)
 				console.log(item)
@@ -92,6 +108,9 @@
 					})
 					})
 				}
 				}
 				this.$set(item, 'checked', !item.checked)
 				this.$set(item, 'checked', !item.checked)
+				// 是否全选
+				const checkNums = this.authList.filter(item => item.checked)
+				this.checkedAll = checkNums.length == this.authList.length
 			},
 			},
 			// 选择复选框
 			// 选择复选框
 			checkboxChange(e){
 			checkboxChange(e){

+ 4 - 14
pages/vinRecord/vinRecord.vue

@@ -100,20 +100,10 @@
 				}
 				}
 			},
 			},
 			toChoosePart(item){
 			toChoosePart(item){
-				if(this.userInfo.sysUserFlag == '0'){
-					return
-				}
-				if(this.hasShelf){
-					item.text = item.modelInfo
-					uni.navigateTo({
-						url: "/pages/digitalShelf/choosePart?vinNumber="+item.vinCode+"&carList="+encodeURIComponent(JSON.stringify(item))
-					})
-				}else{
-					uni.showToast({
-						icon:'none',
-						title: '门店没有关联数字货架,无法使用此功能!'
-					})
-				}
+				item.text = item.modelInfo
+				uni.navigateTo({
+					url: "/pages/digitalShelf/choosePart?vinNumber="+item.vinCode+"&carList="+encodeURIComponent(JSON.stringify(item))
+				})
 			}
 			}
 		}
 		}
 	}
 	}

+ 1 - 0
store/index.js

@@ -84,6 +84,7 @@ const store = new Vuex.Store({
 			uni.removeStorageSync('token')
 			uni.removeStorageSync('token')
 			uni.removeStorageSync('userInfo')
 			uni.removeStorageSync('userInfo')
 			uni.removeStorageSync('permCodes')
 			uni.removeStorageSync('permCodes')
+			state.vuex_storeShelf = null
 			state.vuex_userInfo = null
 			state.vuex_userInfo = null
 			state.vuex_permCodes = null
 			state.vuex_permCodes = null
         },
         },