| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623 | 
							- <template>
 
- 	<view class="home_app_bgc">
 
- 		<u-navbar placeholder bgColor="#a9e3f1" leftIcon="" @rightClick="rightClick">
 
- 			<view class="u-nav-slot" slot="left">
 
- 				<view v-if="userInfo.dept">{{userInfo.dept.appName}}<span v-if="userInfo.dept.appName">-</span></view>智慧冰排管理系统
 
- 				<!-- <view v-if="userInfo.dept">{{userInfo.dept.appName}}<span v-if="userInfo.dept.appName">-</span></view>美克医疗-智慧冰排管理系统 -->
 
- 			</view>
 
- 			<view class="u-nav-slot" slot="right">
 
- 				<u-icon name="list-dot" size="30" color="#fff"></u-icon>
 
- 			</view>
 
- 		</u-navbar>
 
- 		<view class="column_center_card">
 
- 			<view class="mine_bg_card">
 
- 				<view class="card_mine">
 
- 					<view class="card_avatar" v-if="token != ''">
 
- 						<image class="mine_image" src="../static/portrait.png" mode=""></image>
 
- 						<view class="card_user_title">
 
- 							<view class="mine_phone">{{userInfo.username}}</view>
 
- 							<view class="mine_phone1">{{userInfo.nickName}}</view>
 
- 						</view>
 
- 					</view>
 
- 					<view class="card_avatar" v-else @click="login">
 
- 						<image class="mine_image" src="../static/portrait.png" mode=""></image>
 
- 						<view class="mine_title">登录/注册</view>
 
- 					</view>
 
- 				</view>
 
- 				<view class="order_card_home" v-if="!iceRaftManage">
 
- 					<view class="order_title_head" @click="getOperate('order',0)">
 
- 						<span>我的订单</span>
 
- 						<u-icon name="arrow-right-double" size="20" color="#000"></u-icon>
 
- 					</view>
 
- 					<view class="card_order">
 
- 						<view class="item_order" v-for="(item,index) in tableList" :key="index"
 
- 							@click="getOperate('order',index)">
 
- 							<view class="card_tab_image center_in"
 
- 								:style="{background: item.bgColor,backgroundColor:item.colorBg}">
 
- 								<span class="iconfont icon_image" :class="item.icon"></span>
 
- 							</view>
 
- 							<view class="order_title">{{item.title}}</view>
 
- 						</view>
 
- 					</view>
 
- 				</view>
 
- 				<view class="bp_Card_width" v-else>
 
- 					<view class="bpzs_cardil" @click="getOperate('manage')">
 
- 						<span class="iconfont image_bp icon-bingpaiguanli"></span>
 
- 						<span class="title_bpzsil">冰排追溯管理</span>
 
- 					</view>
 
- 					<view class="right_bpzs_card">
 
- 						<view class="bpcrk_cardil" @click="getOperate('enter','冰排入库')">
 
- 							<span class="iconfont image_cr icon-bingpairuku"></span>
 
- 							<span class="title_bpzsil">冰排入库</span>
 
- 						</view>
 
- 						<view class="bpcrk_cardil" @click="getOperate('out','冰排装箱')">
 
- 							<span class="iconfont image_cr icon-bingpaichuku"></span>
 
- 							<span class="title_bpzsil">冰排装箱</span>
 
- 						</view>
 
- 					</view>
 
- 				</view>
 
- 			</view>
 
- 			<view class="bp_Card_width" v-if="!iceRaftManage">
 
- 				<view class="bpzs_card" @click="getOperate('manage')">
 
- 					<span class="iconfont image_bp icon-bingpaiguanli"></span>
 
- 					<span class="title_bpzs">冰排追溯管理</span>
 
- 				</view>
 
- 				<view class="right_bpzs_card">
 
- 					<view class="bpcrk_card" @click="getOperate('enter','冰排入库')">
 
- 						<span class="iconfont image_cr icon-bingpairuku"></span>
 
- 						<span class="title_bpzs">冰排入库</span>
 
- 					</view>
 
- 					<view class="bpcrk_card" @click="getOperate('out','冰排装箱')">
 
- 						<span class="iconfont image_cr icon-bingpaichuku"></span>
 
- 						<span class="title_bpzs">冰排装箱</span>
 
- 					</view>
 
- 				</view>
 
- 			</view>
 
- 			<view class="card_bottom_add" @click="getOperate('iceCold')" v-if="iceColdFlag">
 
- 				<view style="display: flex;align-items: center;">
 
- 					<span class="iconfont icon-binggui icon_bottom"></span>
 
- 					<span>冷冻柜管理</span>
 
- 				</view>
 
- 				<u-icon name="arrow-right" size="20"></u-icon>
 
- 			</view>
 
- 			<view class="card_bottom_add" @click="getOperate('incubator')">
 
- 				<view style="display: flex;align-items: center;">
 
- 					<span class="iconfont icon-incubator icon_bottom"></span>
 
- 					<span>保温箱管理</span>
 
- 				</view>
 
- 				<u-icon name="arrow-right" size="20"></u-icon>
 
- 			</view>
 
- 			<view class="card_bottom_add" @click="getOperate('iceRaft')">
 
- 				<view style="display: flex;align-items: center;">
 
- 					<span class="iconfont icon-bingpaiguanli icon_bottom"></span>
 
- 					<span>冰排管理</span>
 
- 				</view>
 
- 				<u-icon name="arrow-right" size="20"></u-icon>
 
- 			</view>
 
- 			<view class="card_bottom_add" @click="getOperate('add')" v-if="!iceRaftManage">
 
- 				<view style="display: flex;align-items: center;">
 
- 					<span class="iconfont icon-tianjiadingdan icon_bottom"></span>
 
- 					<span>添加订单</span>
 
- 				</view>
 
- 				<u-icon name="arrow-right" size="20"></u-icon>
 
- 			</view>
 
- 			<view class="card_bottom_add" @click="getOperate('book')" v-if="!iceRaftManage">
 
- 				<view style="display: flex;align-items: center;">
 
- 					<span class="iconfont icon-dizhibu icon_bottom"></span>
 
- 					<span>地址簿</span>
 
- 				</view>
 
- 				<u-icon name="arrow-right" size="20"></u-icon>
 
- 			</view>
 
- 			<view style="width: 100%;height: 100rpx;"></view>
 
- 		</view>
 
- 		<clh-popup position="right" round="0rpx" v-model="personalShow">
 
- 			<view :style="{paddingTop:height + 'px'}">
 
- 				<view class="head_mine">
 
- 					<view class="card_mine_message">
 
- 						<view class="card_rectangle">
 
- 							<view class="card_circle"></view>
 
- 							<view class="left_order_head" @click="getOperate('order',0)" v-if="!iceRaftManage">
 
- 								<!-- <u-icon name="order" size="30" color="#5ac725"></u-icon> -->
 
- 								<span class="iconfont icon_fast icon-quanbudingdan"></span>
 
- 							</view>
 
- 							<view class="right_exit_head" @click="getOperate('wait')">
 
- 								<!-- <u-icon name="edit-pen" size="30" color="#5ac725"></u-icon> -->
 
- 								<span class="iconfont icon_fast icon-bianji"></span>
 
- 							</view>
 
- 							<view class="card_content_area">
 
- 								<view class="card_name">姓名: <span>{{userInfo.username}}</span></view>
 
- 								<view class="card_name">账号: <span>{{userInfo.nickName}}</span></view>
 
- 							</view>
 
- 						</view>
 
- 					</view>
 
- 					<image class="card_mine_image" src="../static/portrait.png" mode=""></image>
 
- 				</view>
 
- 				<view class="classify_card" @click="getOperate('book')" v-if="!iceRaftManage">
 
- 					<span>地址簿</span>
 
- 					<u-icon name="arrow-right"></u-icon>
 
- 				</view>
 
- 				<view class="classify_card" @click="getOperate('password')">
 
- 					<span>修改密码</span>
 
- 					<u-icon name="arrow-right"></u-icon>
 
- 				</view>
 
- 				<view class="btn_exit" @click="logOut">
 
- 					<u-button text="退出登录"></u-button>
 
- 				</view>
 
- 			</view>
 
- 		</clh-popup>
 
- 		<u-modal :show="logoutShow" showCancelButton :title="title" :content='content' @cancel="cancel"
 
- 			@confirm="confirm"></u-modal>
 
- 	</view>
 
- </template>
 
- <script>
 
- 	export default {
 
- 		data() {
 
- 			return {
 
- 				personalShow: false,
 
- 				token: '',
 
- 				userInfo: {},
 
- 				tableList: [{
 
- 					title: '全部',
 
- 					icon: 'icon-dingdan',
 
- 					colorBg: '#4bc7fc',
 
- 					bgColor: 'linear-gradient(to right, #84d4f6, #4bc7fc)',
 
- 				}, {
 
- 					title: '待配送',
 
- 					icon: 'icon-cancel',
 
- 					colorBg: '#9ddd54',
 
- 					bgColor: 'linear-gradient(to right, #b9f377, #9ddd54)',
 
- 				}, {
 
- 					title: '配送中',
 
- 					icon: 'icon-delivery',
 
- 					colorBg: '#4bc7fc',
 
- 					bgColor: 'linear-gradient(to right, #84d4f6, #4bc7fc)',
 
- 				}, {
 
- 					title: '已送达',
 
- 					icon: 'icon-yisongda',
 
- 					colorBg: '#1cc723',
 
- 					bgColor: 'linear-gradient(to right, #54ef5a, #1cc723)',
 
- 				}, {
 
- 					title: '已拒收',
 
- 					icon: 'icon-yiquxiao',
 
- 					colorBg: '#fe880e',
 
- 					bgColor: 'linear-gradient(to right, #f69f45, #fe880e)',
 
- 				}],
 
- 				logoutShow: false,
 
- 				title: '确定退出?',
 
- 				content: '退出登录后将无法查看运单,重新登录后即可查看',
 
- 				height: '',
 
- 				// 是否释冷
 
- 				iceColdFlag: true,
 
- 				// 是否只展示冰排管理
 
- 				iceRaftManage: false,
 
- 			}
 
- 		},
 
- 		onShow() {
 
- 			const arr = uni.getSystemInfoSync().statusBarHeight
 
- 			this.height = arr
 
- 			var token = this.$cache.getToken()
 
- 			this.token = token
 
- 			var userInfo = this.$cache.getCache('userInfo')
 
- 			if (token) {
 
- 				if (userInfo) {
 
- 					this.iceRaftManage = userInfo.dept.iceRaftManage
 
- 					if(this.iceRaftManage){
 
- 						this.content = '退出登录后将无法查看冰排、保温箱,重新登录后即可查看'
 
- 					}
 
- 					this.userInfo = userInfo
 
- 				} else {
 
- 					this.getUserInfo()
 
- 					this.userInfo = {}
 
- 				}
 
- 			} else {
 
- 				uni.redirectTo({
 
- 					url: '/pages/login'
 
- 				})
 
- 				this.userInfo = {}
 
- 			}
 
- 		},
 
- 		mounted() {},
 
- 		methods: {
 
- 			getUserInfo() {
 
- 				this.$api.get('/api/user/profile').then(res => {
 
- 					if (res.code == 200) {
 
- 						if (this.token) {
 
- 							this.userInfo = res.data.user
 
- 							this.iceRaftManage = res.data.user.dept.iceRaftManage
 
- 							this.$cache.setCache('userInfo', this.userInfo)
 
- 						}
 
- 					} else {
 
- 						this.$cache.removeToken()
 
- 						this.$cache.removeCache('userInfo')
 
- 						uni.showToast({
 
- 							title: '当前用户不存在',
 
- 							icon: 'none'
 
- 						});
 
- 					}
 
- 				})
 
- 			},
 
- 			rightClick() {
 
- 				this.personalShow = true
 
- 			},
 
- 			// 登录注册
 
- 			login() {
 
- 				uni.navigateTo({
 
- 					url: '/pages/login'
 
- 				});
 
- 			},
 
- 			getOperate(type, value) {
 
- 				if (this.token) {
 
- 					if (type == 'book') {
 
- 						uni.navigateTo({
 
- 							url: '/pages/order/addressBook'
 
- 						});
 
- 					} else if (type == 'add') {
 
- 						uni.navigateTo({
 
- 							url: '/pages/order/addWaybill?title=添加运单&type=1'
 
- 						});
 
- 					} else if (type == 'password') {
 
- 						uni.navigateTo({
 
- 							url: '/pages/mine/password'
 
- 						});
 
- 					} else if (['truck', 'unload', 'signfor', 'enter', 'out'].includes(type)) {
 
- 						uni.navigateTo({
 
- 							url: '/pages/order/delivery?id=' + type + '&title=' + value
 
- 						});
 
- 					} else if (type == 'manage') {
 
- 						uni.navigateTo({
 
- 							url: '/pages/home/IceManagement'
 
- 						});
 
- 					} else if (type == 'order') {
 
- 						uni.navigateTo({
 
- 							url: '/pages/order/index?current=' + value
 
- 						});
 
- 					} else if (type == 'incubator') {
 
- 						uni.navigateTo({
 
- 							url: '/pages/order/Incubator?detailsFlag=true'
 
- 						});
 
- 					} else if (type == 'iceRaft') {
 
- 						uni.navigateTo({
 
- 							url: '/pages/order/iceRaft'
 
- 						});
 
- 					} else if (type == 'iceCold') {
 
- 						uni.navigateTo({
 
- 							url: '/pages/order/iceCold?detailsFlag=true'
 
- 						});
 
- 					} else if (type == 'wait') {
 
- 						uni.$u.toast('敬请期待!')
 
- 					}
 
- 				} else {
 
- 					uni.$u.toast('请先登录')
 
- 				}
 
- 			},
 
- 			// 退出登录
 
- 			logOut() {
 
- 				if (this.token) {
 
- 					this.logoutShow = true
 
- 				} else {
 
- 					uni.$u.toast('请先登录')
 
- 				}
 
- 			},
 
- 			// 确定退出登录
 
- 			confirm() {
 
- 				this.$cache.removeToken()
 
- 				this.$cache.removeCache('userInfo')
 
- 				uni.redirectTo({
 
- 					url: '/pages/login'
 
- 				})
 
- 			},
 
- 			// 取消
 
- 			cancel() {
 
- 				this.logoutShow = false
 
- 			},
 
- 			close() {
 
- 				this.personalShow = false
 
- 			}
 
- 		}
 
- 	}
 
- </script>
 
- <style lang="scss">
 
- 	.home_app_bgc {
 
- 		background-image: linear-gradient(#a9e3f1, #a9e3f1, #f3f4f6);
 
- 	}
 
- 	// page {
 
- 	// 	background-image: linear-gradient(#a9e3f1, #a9e3f1, #f3f4f6);
 
- 	// }
 
- 	.column_center_card {
 
- 		display: flex;
 
- 		flex-direction: column;
 
- 		align-items: center;
 
- 	}
 
- 	.mine_bg_card {
 
- 		width: 95%;
 
- 		border-radius: 10rpx;
 
- 		background-image: url(../static/task/mine.jpg);
 
- 		background-repeat: no-repeat;
 
- 		background-position: center top;
 
- 		background-size: cover;
 
- 		background-attachment: scroll;
 
- 		// background-color: #fff;
 
- 		// background-image: linear-gradient(#7edfe4, #ffffff);
 
- 	}
 
- 	.card_mine {
 
- 		padding: 0rpx 20rpx;
 
- 		border-bottom: 1rpx solid #f4f4f5;
 
- 	}
 
- 	.mine_image {
 
- 		width: 100rpx;
 
- 		height: 100rpx;
 
- 		border-radius: 50%;
 
- 	}
 
- 	.mine_phone {
 
- 		margin-left: 20rpx;
 
- 		font-size: 35rpx;
 
- 		color: #fff;
 
- 	}
 
- 	.mine_phone1 {
 
- 		margin-left: 20rpx;
 
- 		font-size: 30rpx;
 
- 		color: #f4f4f5;
 
- 	}
 
- 	.mine_title {
 
- 		margin-left: 20rpx;
 
- 		font-size: 40rpx;
 
- 		font-weight: bold;
 
- 	}
 
- 	.card_avatar {
 
- 		display: flex;
 
- 		align-items: center;
 
- 		padding-top: 30rpx;
 
- 		padding-bottom: 30rpx;
 
- 	}
 
- 	.order_title_head {
 
- 		display: flex;
 
- 		align-items: center;
 
- 		span {
 
- 			color: #000;
 
- 			font-weight: bold;
 
- 			font-size: 30rpx;
 
- 			padding: 15rpx 0rpx 8rpx 20rpx;
 
- 		}
 
- 	}
 
- 	.order_card_home {
 
- 		margin: 20rpx;
 
- 		padding-bottom: 20rpx;
 
- 		border-radius: 10rpx;
 
- 		background-color: rgba(255, 255, 255, 0.5);
 
- 	}
 
- 	.card_order {
 
- 		position: relative;
 
- 		margin-top: 20rpx;
 
- 		display: flex;
 
- 		justify-content: space-around;
 
- 	}
 
- 	.item_order {
 
- 		display: flex;
 
- 		flex-direction: column;
 
- 		align-items: center;
 
- 	}
 
- 	.card_tab_image {
 
- 		width: 80rpx;
 
- 		height: 80rpx;
 
- 		border-radius: 50%;
 
- 	}
 
- 	.order_title {
 
- 		color: #000;
 
- 		margin-top: 6rpx;
 
- 		font-size: 25rpx;
 
- 	}
 
- 	.icon_image {
 
- 		color: #fff;
 
- 		font-size: 37rpx;
 
- 	}
 
- 	.bp_Card_width {
 
- 		display: flex;
 
- 		width: calc(100% - 40rpx);
 
- 		margin: 20rpx;
 
- 	}
 
- 	.bpzs_card {
 
- 		display: flex;
 
- 		align-items: center;
 
- 		flex-direction: column;
 
- 		justify-content: center;
 
- 		width: 45%;
 
- 		height: 300rpx;
 
- 		// background-color: #fff;
 
- 		border-radius: 10rpx;
 
- 		background-image: linear-gradient(-225deg, #7edfe4 0%, #ffffff 48%, #7edfe4 100%);
 
- 	}
 
- 	.bpzs_cardil {
 
- 		display: flex;
 
- 		align-items: center;
 
- 		flex-direction: column;
 
- 		justify-content: center;
 
- 		width: 45%;
 
- 		height: 300rpx;
 
- 		border-radius: 10rpx;
 
- 		background-image: linear-gradient(-225deg, rgba(126, 223, 228, .6) 0%, rgba(255, 255, 255, .6) 48%, rgba(126, 223, 228, .6) 100%);
 
- 	}
 
- 	.image_bp {
 
- 		font-size: 70px;
 
- 		color: #19be6b;
 
- 		margin-bottom: 10rpx;
 
- 	}
 
- 	.title_bpzs {
 
- 		font-size: 36rpx;
 
- 		color: #19be6b;
 
- 	}
 
- 	.title_bpzsil {
 
- 		font-size: 36rpx;
 
- 		color: #019d48;
 
- 	}
 
- 	.right_bpzs_card {
 
- 		display: flex;
 
- 		width: 55%;
 
- 		flex-direction: column;
 
- 		justify-content: space-between;
 
- 		align-items: flex-end;
 
- 	}
 
- 	.bpcrk_card {
 
- 		display: flex;
 
- 		align-items: center;
 
- 		justify-content: center;
 
- 		width: 97%;
 
- 		height: 145rpx;
 
- 		border-radius: 10rpx;
 
- 		background-image: linear-gradient(-225deg, #7edfe4 0%, #ffffff 48%, #7edfe4 100%);
 
- 	}
 
- 	.bpcrk_cardil {
 
- 		display: flex;
 
- 		align-items: center;
 
- 		justify-content: center;
 
- 		width: 97%;
 
- 		height: 145rpx;
 
- 		border-radius: 10rpx;
 
- 		background-image: linear-gradient(-225deg, rgba(126, 223, 228, .6) 0%, rgba(255, 255, 255, .6) 48%, rgba(126, 223, 228, .6) 100%);
 
- 	}
 
- 	.image_cr {
 
- 		margin-right: 20rpx;
 
- 		font-size: 30px;
 
- 		color: #19be6b;
 
- 	}
 
- 	.card_bottom_add {
 
- 		display: flex;
 
- 		justify-content: space-between;
 
- 		align-items: center;
 
- 		width: calc(100% - 80rpx);
 
- 		margin: 10rpx 20rpx;
 
- 		padding: 30rpx 20rpx;
 
- 		border-radius: 10rpx;
 
- 		background-color: rgba(255, 255, 255, 0.5);
 
- 	}
 
- 	.icon_bottom {
 
- 		font-size: 40rpx;
 
- 		margin-right: 10rpx;
 
- 	}
 
- 	.head_mine {
 
- 		position: relative;
 
- 		height: 378rpx;
 
- 		margin-bottom: 10rpx;
 
- 	}
 
- 	.card_mine_image {
 
- 		position: absolute;
 
- 		width: 125rpx;
 
- 		height: 125rpx;
 
- 		border-radius: 50%;
 
- 		top: 68rpx;
 
- 		left: calc(50% - 59rpx);
 
- 	}
 
- 	.card_mine_message {
 
- 		position: absolute;
 
- 		top: 0;
 
- 		left: 0;
 
- 		right: 0;
 
- 		bottom: 0;
 
- 		overflow: hidden;
 
- 		margin-top: 130rpx;
 
- 		border-bottom: 1rpx solid #f4f4f5;
 
- 		padding: 0rpx 50rpx 30rpx 50rpx;
 
- 	}
 
- 	.card_rectangle {
 
- 		position: relative;
 
- 		width: 100%;
 
- 		height: 200rpx;
 
- 		border: 2rpx solid #5ac725;
 
- 	}
 
- 	.card_circle {
 
- 		position: absolute;
 
- 		top: -73rpx;
 
- 		left: calc(50% - 70rpx);
 
- 		width: 140rpx;
 
- 		height: 140rpx;
 
- 		border-radius: 50%;
 
- 		background-color: #fff;
 
- 		border: 2rpx solid #5ac725;
 
- 	}
 
- 	.left_order_head {
 
- 		position: absolute;
 
- 		top: 10rpx;
 
- 		left: 10rpx;
 
- 	}
 
- 	.icon_fast {
 
- 		font-size: 45rpx;
 
- 		color: #5ac725;
 
- 	}
 
- 	.right_exit_head {
 
- 		position: absolute;
 
- 		top: 12rpx;
 
- 		right: 10rpx;
 
- 	}
 
- 	.card_content_area {
 
- 		position: absolute;
 
- 		top: 80rpx;
 
- 		left: 20rpx;
 
- 		right: 0;
 
- 		bottom: 0;
 
- 		display: flex;
 
- 		flex-direction: column;
 
- 	}
 
- 	.card_name {
 
- 		margin-top: 10rpx;
 
- 		font-size: 30rpx;
 
- 		span {
 
- 			margin-left: 10rpx;
 
- 		}
 
- 	}
 
- 	.classify_card {
 
- 		display: flex;
 
- 		align-items: center;
 
- 		justify-content: space-between;
 
- 		padding: 20rpx;
 
- 	}
 
- 	.btn_exit {
 
- 		position: absolute;
 
- 		bottom: 30rpx;
 
- 		left: 30rpx;
 
- 		right: 30rpx;
 
- 		padding-bottom: env(safe-area-inset-bottom);
 
- 	}
 
- </style>
 
 
  |