浏览代码

fix:首页面数据加载+出库入库样式修改

sunChengjie 1 年之前
父节点
当前提交
86cb5f6fda

+ 50 - 51
src/pages/components/HomePage.vue

@@ -1,50 +1,48 @@
 <template>
-	<div>
-		<div class="content">
-			<div class="sm">
-				<!-- <van-search v-model="value" @search="onSearch" placeholder="点击搜索单号" /> -->
-				<van-search v-model="value" placeholder="点击搜索单号" />
-				<img @click="wxScanCode()" src="@/assets/user/u4.png" alt="">
+	<div class="content">
+		<div class="sm">
+			<!-- <van-search v-model="value" @search="onSearch" placeholder="点击搜索单号" /> -->
+			<van-search v-model="value" placeholder="点击搜索单号" />
+			<img @click="wxScanCode()" src="@/assets/user/u4.png" alt="">
+		</div>
+		<!-- 显示 -->
+		<div class="echarts1">
+			<div id="myChart1"></div>
+			<div id="myChart2"></div>
+		</div>
+		<!-- 图标 -->
+		<div class="icon">
+			<div class="icon-box">
+				<router-link to="storage">
+					<div style="">
+						<img src="@/assets/user/u32.png" alt="">
+					</div>
+					<p>快件入库</p>
+				</router-link>
+			</div>
+			<div class="icon-box">
+				<router-link to="Removal">
+					<div style="">
+						<img src="@/assets/user/u35.png" alt="">
+					</div>
+					<p>快件出库</p>
+				</router-link>
 			</div>
-			<!-- 显示 -->
-			<div class="echarts1">
-				<div id="myChart1"></div>
-				<div id="myChart2"></div>
+			<div class="icon-box">
+				<router-link to="DeliveryInquiry">
+					<div style="">
+						<img src="@/assets/user/u38.png" alt="">
+					</div>
+					<p>派件查询</p>
+				</router-link>
 			</div>
-			<!-- 图标 -->
-			<div class="icon">
-				<div class="icon-box">
-					<router-link to="storage">
-						<div style="">
-							<img src="@/assets/user/u32.png" alt="">
-						</div>
-						<p>快件入库</p>
-					</router-link>
-				</div>
-				<div class="icon-box">
-					<router-link to="Removal">
-						<div style="">
-							<img src="@/assets/user/u35.png" alt="">
-						</div>
-						<p>快件出库</p>
-					</router-link>
-				</div>
-				<div class="icon-box">
-					<router-link to="DeliveryInquiry">
-						<div style="">
-							<img src="@/assets/user/u38.png" alt="">
-						</div>
-						<p>派件查询</p>
-					</router-link>
-				</div>
-				<div class="icon-box">
-					<router-link to="SignA">
-						<div style="">
-							<img src="@/assets/user/u41.png" alt="">
-						</div>
-						<p>派件签收</p>
-					</router-link>
-				</div>
+			<div class="icon-box">
+				<router-link to="SignA">
+					<div style="">
+						<img src="@/assets/user/u41.png" alt="">
+					</div>
+					<p>派件签收</p>
+				</router-link>
 			</div>
 		</div>
 	</div>
@@ -84,7 +82,6 @@ export default {
 		}
 	},
 	created: function () {
-		this.getUser()
 	},
 	async mounted() {
 		// 数据图表
@@ -317,11 +314,11 @@ export default {
 
 	},
 
-	async getUser() {
-		const res = await getSysUserInfoByUserIdAPI({ userId: localStorage.getItem("userId") })
-		this.$store.state.user = res.sysUserInfo
-		console.log(this.$store.state.user, 'this.$state.state.user')
-	}
+	// async getUser() {
+	// 	const res = await getSysUserInfoByUserIdAPI({ userId: localStorage.getItem("userId") })
+	// 	this.$store.state.user = res.sysUserInfo
+	// 	console.log(this.$store.state.user, 'this.$state.state.user')
+	// }
 
 
 }
@@ -402,9 +399,11 @@ export default {
 				justify-content: center;
 				align-items: center;
 				flex-direction: column;
-				&:link{
+
+				&:link {
 					color: #000;
 				}
+
 				div {
 					background-color: #00c4b8;
 					width: 1.8rem;

+ 2 - 2
src/pages/components/Waitsent.vue

@@ -25,8 +25,8 @@
                                 <div class="batch-middel-text-style">楼层:{{ unfold.floor }}</div>
                                 <div class="batch-middel-text-style">座位号:{{ unfold.sendSeat }}</div>
                                 <div style="display: flex;" class="batch-middel-text-style">联系方式:{{ unfold.phone }}
-                                    <van-button style="margin-top: -5px; border-radius: 6px;" type="info" plain
-                                        size="mini">拨打</van-button>
+                                    <a :href="'tel:' + unfold.phone" style="margin-top: -5px; border-radius: 6px;"
+                                        type="info" plain size="mini">拨打</a>
                                 </div>
                             </div>
                             <div style="display: flex; justify-content:space-around; padding-top: 5px;">

+ 10 - 3
src/pages/email.vue

@@ -9,6 +9,7 @@
 
 import HomePage from './components/HomePage.vue'
 import My from './components/My.vue'
+import { getSysUserInfoByUserIdAPI } from '../api/index'
 export default {
 	name: 'email',
 	components: {
@@ -20,14 +21,20 @@ export default {
 			active: 0,
 		}
 	},
+	mounted() {
+		this.getUser()
+	},
 	methods: {
 		my() {
 			this.$router.push('My')
+		},
+		async getUser() {
+			const res = await getSysUserInfoByUserIdAPI({ userId: localStorage.getItem("userId") })
+			this.$store.state.user = res.sysUserInfo
+			console.log(this.$store.state.user, 'this.$state.state.user')
 		}
 	}
 }
 </script>
 
-<style scoped lang="less">
-
-</style>
+<style scoped lang="less"></style>

+ 2 - 1
src/pages/my.vue

@@ -43,7 +43,7 @@ export default {
 		};
 	},
 	created: function () {
-		
+
 		this.userId = localStorage.getItem("userId");
 		console.log('userId:' + this.userId);
 		// this.getUser();
@@ -56,6 +56,7 @@ export default {
 		loginout() {
 			localStorage.removeItem("userId");
 			localStorage.removeItem("openid");
+			this.$router.push('/Login')
 
 			// 配置一下  环境
 		},

+ 7 - 8
src/pages/new/batched.vue

@@ -1,11 +1,10 @@
 <template>
-    <div>
-
-        <div class="container">
+    <div class="container">
+        <div>
             <div>批次号生成</div>
             <div class="number">{{ BatDispatchBatchNo }}</div>
             <div class="wenzi">批次内包含以下快件:</div>
-            <div class="middle-box">
+            <div class="middle-box" style="">
                 <van-cell v-for="(item, index) in list" :key="index" :value="item" />
             </div>
         </div>
@@ -56,8 +55,9 @@ export default {
 }
 
 .container {
+    height: 100vh;
     background-color: #fff;
-    padding: 0 20px 20px 20px;
+    padding: 0 20px;
 
     .number {
         font-size: 20px;
@@ -70,9 +70,8 @@ export default {
     }
 
     .middle-box {
-        display: flex;
-        flex-wrap: wrap;
-        margin-top: 10px;
+        height: 72vh;
+        overflow-y: auto;
 
         &-little {
             width: 40%;

+ 21 - 6
src/pages/new/removal.vue

@@ -3,7 +3,7 @@
         <div class="container" v-if="isRemoval">
             <van-search v-model="keyWorld" @search="onSearch" placeholder="请输入快递单号" />
             <img @click="onImg" src="@/assets/user/u4.png" alt="">
-            <div style="padding: 12px;" v-if="show">
+            <div class="middelBox" style="height: calc(100vh - 79px);overflow-y: auto;" v-if="show">
                 <div style="margin-bottom: 10px;">已添加快件:</div>
                 <van-cell-group v-for="item in codes" :key="item">
                     <van-cell :title="item">
@@ -13,9 +13,8 @@
                         </template>
                     </van-cell>
                 </van-cell-group>
-
-                <van-button @click="onBatch" class="build" type="info">生成批次</van-button>
             </div>
+            <van-button @click="onBatch" class="build" type="info">生成批次</van-button>
         </div>
         <Batched :codesList="codesList" :BatDispatchBatchNo="BatDispatchBatchNo" :isRemoval="isRemoval"
             @isRemoval="iemoval" v-else></Batched>
@@ -67,8 +66,17 @@ export default {
             });
         },
         onSearch() {
-            console.log('123')
+            if (this.keyWorld == '') {
+                return Toast('快递单号不能为空')
+            }
+            if (this.codes.some((item) => this.keyWorld == item)) {
+                Toast('您输入的单号以重复,请重新输入')
+                this.keyWorld = ''
+                return
+            }
+
             this.callback(this.keyWorld)
+            this.keyWorld = ''
         },
         callback(code) {
             if (this.codes.length < 15) {
@@ -79,6 +87,9 @@ export default {
         },
         // 生成批次
         async onBatch() {
+            if (this.codes.length < 1) {
+                return Toast('数据不能为空生成批次')
+            }
             let data = {
                 deliveryPeopleId: localStorage.getItem('courierId'), //派送员id
                 deliveryId: this.codes.join(','),    //快件单号
@@ -119,14 +130,18 @@ export default {
 
 .container {
     background-color: #fff;
-    height: 660px;
+    height: 100vh;
 
     img {
         position: fixed;
         height: 20px;
         width: 20px;
         right: 22px;
-        top: 20px;
+        top: 18px;
+    }
+
+    .middelBox {
+        padding: 12px;
     }
 }
 

+ 44 - 36
src/pages/new/storage.vue

@@ -1,12 +1,11 @@
 <template>
     <div>
         <div class="container">
-            <van-form @submit="onSubmit">
-                <div style="display: flex; justify-content: space-between; background-color: #fff;">
+            <van-form class="formStyle" @submit="onSubmit">
+                <div class="formStyle-top">
                     <van-field style="width: 100%;" v-model="object.expressNo" name="expressNo" label="快递单号"
                         placeholder="快递单号" :rules="[{ required: true }]" />
-                    <img style="width: .4rem;height: .4rem ;margin-top: 10px; margin-right: 0.3rem;"
-                        @click="wxScanCodeB()" src="@/assets/user/u4.png" alt="">
+                    <img class="formStyle-top-img" @click="wxScanCodeB()" src="@/assets/user/u4.png" alt="">
 
                 </div>
 
@@ -71,14 +70,12 @@
         </div>
 
         <!-- 输入手机号后弹出 -->
-        <van-popup v-model="phoneShow" :style="{ height: '100%', width: '100%', }">
-            <div style="overflow: scroll; height: 100%; width: 100%;">
-                <div style="display: flex; justify-content: space-between;">
-                    <van-search style="width: 100%;" v-model="searchKey" placeholder="请输入搜索关键词" />
-                    <van-icon style="margin-top: 15px; margin-right: 10px" @click="searchCrux" name="search"
-                        color="#1989fa" size="20" />
-                </div>
-
+        <van-popup v-model="phoneShow" class="popupStyle">
+            <div class="popupStyle-top">
+                <van-search style="width: 100%;" @search="searchCrux" v-model="searchKey" placeholder="请输入搜索关键词" />
+                <van-icon class="popupStyle-top-icon" @click="searchCrux" name="search" color="#1989fa" size="20" />
+            </div>
+            <div style="height: calc(100vh - 105px); overflow-y: auto;">
                 <van-cell-group class="vanPopup" @click="onGroup(item)" v-for="(item, index) in searchKeyList"
                     :key="index" inset>
                     <van-cell :value="item.phone" />
@@ -90,13 +87,12 @@
                     <van-cell title="收发室Id" :value="item.ROOM_ID" style="display: none;" />
                     <van-cell title="收件人userID" :value="item.USER_ID" style="display: none;" /> -->
                 </van-cell-group>
+            </div>
 
-                <div style="height: 60px; width: 100%; background-color: #fff;"></div>
 
-                <van-button class="goback" @click="phoneShow = false" type="info">
-                    退出
-                </van-button>
-            </div>
+            <van-button class="goback" @click="phoneShow = false" type="info">
+                退出
+            </van-button>
         </van-popup>
     </div>
 </template>
@@ -167,9 +163,7 @@ export default {
         // 搜索关键
         async searchCrux() {
             const res = await appGetEmployeeInfoByPhone({ inquire: this.searchKey }, { emulateJSON: true })
-
             this.searchKeyList = res.employeeInfo
-            console.log(res, '123123123123')
         },
         // 点击group
         onGroup(item) {
@@ -305,32 +299,31 @@ export default {
 }
 
 .container {
-    height: 100%;
+    height: 100vh;
 
     background-color: #f2f2f2;
 
+    .formStyle {
 
+        &-top {
+            display: flex;
+            justify-content: space-between;
+            background-color: #fff;
 
-    .little-box {
-        background-color: #fff;
-        margin-top: 2px;
-
-        /deep/ .van-field {
-            padding: 0;
-            margin-top: 6px;
-        }
-
-        .text {
-            padding-top: 10px;
-            font-size: 12px;
+            &-img {
+                width: .4rem;
+                height: .4rem;
+                margin-top: 10px;
+                margin-right: 0.3rem;
+            }
         }
 
-        .text1 {
-            padding-top: 0px;
-            font-size: 12px;
-        }
     }
 
+
+
+
+
 }
 
 .vanPopup {
@@ -347,4 +340,19 @@ export default {
         border: none;
     }
 }
+
+.popupStyle {
+    height: 100vh;
+    width: 100vw;
+
+    &-top {
+        display: flex;
+        justify-content: space-between;
+
+        &-icon {
+            margin-top: 15px;
+            margin-right: 10px
+        }
+    }
+}
 </style>

+ 104 - 109
src/pages_bak/my.vue

@@ -1,15 +1,15 @@
 <template>
-	<div class="body">
+  <div class="body">
     <!-- 选择类型 -->
     <!--  -->
     <div class="head">
-		<img src="../assets/images/foot_icon1.png" alt="">
-		<div>
-			<p>昵称:32132</p>
-			<p>1232323</p>
-		</div>
-		<img style="width: 100%;border-radius: 0px;margin-top: .4rem;" src="../assets/images/my_banner.png" alt="">
-	</div>
+      <img src="../assets/images/foot_icon1.png" alt="">
+      <div>
+        <p>昵称:32132</p>
+        <p>1232323</p>
+      </div>
+      <img style="width: 100%;border-radius: 0px;margin-top: .4rem;" src="../assets/images/my_banner.png" alt="">
+    </div>
     <div class="list">
       <router-link to="/Personinfomation">
         <img src="../assets/images/my_icon1.png" alt="">
@@ -38,120 +38,115 @@
     </div>
     <!-- 底部 -->
     <tabbar></tabbar>
-	</div>
+  </div>
 
 </template>
 
 <script>
 export default {
-    data() {
-      return {
-        titlename:"公司变更",
-        openid:"",
-        user:[]
-      };
-    },
-    created:function(){
-       this.openid = this.$store.state.openId
-       console.log(this.openid)
-       //this.openid = '123'
-    },
-    methods:{
-      //跳转
-      getUser(){
-        this.$http.post(this.$store.state.host+"/interface/getUser",{openid:this.openid},{emulateJSON:true})
-        .then(res=>{
-          //发送成功
-          if(res.body.code==0){
-            this.user=res.body.userPd;
-            console.log(this.user);
-          }
+  data() {
+    return {
+      titlename: "公司变更",
+      openid: "",
+      user: []
+    };
+  },
+  created: function () {
+    this.openid = this.$store.state.openId
+    console.log(this.openid)
+    //this.openid = '123'
+  },
+  methods: {
 
-          //if()
-        },res=>{
-           //发送失败
-        })
-      },
 
-    }
-  };
+  }
+};
 </script>
 
 <style lang="less" scoped>
-  body{
-    background: #fbfbfb;
-  }
-  .body{
-	  .head{
-		  padding:.43rem .38rem;
-		  font-size: .24rem;
-		  color: #999;
-		  display: flex;
-		  background: white;
-		  flex-wrap: wrap;
-		  position: relative;
-		  img{
-			  width: 1.48rem;
-			  height: 1.48rem;
-			  border-radius: 50%;
-			  margin-right: .4rem;
-		  }
-		  div{
-			  p:nth-of-type(1){
-				  font-size: .36rem;
-				  font-weight: bold;
-				  color: #333;
-				  margin-bottom: .2rem;
-				  padding-top: .3rem;
-			  }
-		  }
-		  div:after{
-			  content: "";
-			  display: block;
-			  width: .2rem;
-			  height: .2rem;
-			  border-left: .01rem solid #333;
-			  border-top: .01rem solid #333;
-			  transform: rotate(135deg);
-			  position: absolute;
-			  right: .38rem;
-			  top: 1rem;
-		  }
-	  }
-    .list{
-      background: white;
-      margin-top: .36rem;
-      border-radius: .05rem;
-      a{
-        font-size: .3rem;
+body {
+  background: #fbfbfb;
+}
+
+.body {
+  .head {
+    padding: .43rem .38rem;
+    font-size: .24rem;
+    color: #999;
+    display: flex;
+    background: white;
+    flex-wrap: wrap;
+    position: relative;
+
+    img {
+      width: 1.48rem;
+      height: 1.48rem;
+      border-radius: 50%;
+      margin-right: .4rem;
+    }
+
+    div {
+      p:nth-of-type(1) {
+        font-size: .36rem;
         font-weight: bold;
-        display: block;
         color: #333;
-        padding:.3rem .4rem;
-        border-bottom:1px solid #f4f3f3;
-		position: relative;
-        img{
-          width: .4rem;
-          height: .4rem;
-        }
-        span{
-          position: relative;
-          top: -.075rem;
-          margin-left: .3rem;
-        }
+        margin-bottom: .2rem;
+        padding-top: .3rem;
+      }
+    }
+
+    div:after {
+      content: "";
+      display: block;
+      width: .2rem;
+      height: .2rem;
+      border-left: .01rem solid #333;
+      border-top: .01rem solid #333;
+      transform: rotate(135deg);
+      position: absolute;
+      right: .38rem;
+      top: 1rem;
+    }
+  }
+
+  .list {
+    background: white;
+    margin-top: .36rem;
+    border-radius: .05rem;
+
+    a {
+      font-size: .3rem;
+      font-weight: bold;
+      display: block;
+      color: #333;
+      padding: .3rem .4rem;
+      border-bottom: 1px solid #f4f3f3;
+      position: relative;
+
+      img {
+        width: .4rem;
+        height: .4rem;
+      }
+
+      span {
+        position: relative;
+        top: -.075rem;
+        margin-left: .3rem;
       }
-	  a:after{
-		  content: "";
-		  display: block;
-		  width: .2rem;
-		  height: .2rem;
-		  border-left: .01rem solid #b8b8b8;
-		  border-top: .01rem solid #b8b8b8;
-		  transform: rotate(135deg);
-		  position: absolute;
-		  right: .4rem;
-		  top: .4rem;
-	  }
+    }
+
+    a:after {
+      content: "";
+      display: block;
+      width: .2rem;
+      height: .2rem;
+      border-left: .01rem solid #b8b8b8;
+      border-top: .01rem solid #b8b8b8;
+      transform: rotate(135deg);
+      position: absolute;
+      right: .4rem;
+      top: .4rem;
     }
   }
+}
 </style>

+ 12 - 12
src/script/common.js

@@ -53,19 +53,19 @@ export default {
 			return decodeURIComponent(vars[name]);
 		}
 
-		Vue.prototype.getUser = function () {
-			this.$http.post('https://tianzong.info666.com/tianzong' + "/personal/getSysUserInfoByUserId.do", { userId: this.userId }, { emulateJSON: true })
-				.then(res => {
-					//发送成功
-					if (res.body.msg == 'success') {
-						this.user = res.body.sysUserInfo;
+		// Vue.prototype.getUser = function () {
+		// 	this.$http.post('https://tianzong.info666.com/tianzong' + "/personal/getSysUserInfoByUserId.do", { userId: this.userId }, { emulateJSON: true })
+		// 		.then(res => {
+		// 			//发送成功
+		// 			if (res.body.msg == 'success') {
+		// 				this.user = res.body.sysUserInfo;
 
-						console.log(res.body.sysUserInfo.id, 'id')
-					}
-				}, res => {
-					//发送失败
-				})
-		}
+		// 				console.log(res.body.sysUserInfo.id, 'id')
+		// 			}
+		// 		}, res => {
+		// 			//发送失败
+		// 		})
+		// }
 		//快递公司列表
 		Vue.prototype.getLogisticsList = function () {
 			this.$http.post(this.$store.state.host + "/sendMail/getLogisticsList.do", {}, { emulateJSON: true })