Explorar el Código

快件出库+生成批次+首页扫描调试完成

sunChengjie hace 11 meses
padre
commit
ed4e1094a7

+ 2 - 1
config/dev.env.js

@@ -4,5 +4,6 @@ const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
-  VUE_APP_BASE_API:"'http://47.101.145.23/tianzong'"
+  // VUE_APP_BASE_API: "'http://47.101.145.23/tianzong'"
+  VUE_APP_BASE_API: "'/api'"
 })

+ 7 - 1
config/index.js

@@ -9,7 +9,13 @@ module.exports = {
     // Paths
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',
-    proxyTable: {},
+    proxyTable: {
+      '/tianzong': {
+        target: `https://tianzong.info666.com`,
+        changeOrigin: true, //开启代理  
+        pathRewrite: { '/api': '/' } //这里重写路径/run就代理到对应地址
+      },
+    },
 
     // Various Dev Server settings
     host: 'localhost', // can be overwritten by process.env.HOST

+ 23 - 2
src/api/index.js

@@ -1,8 +1,29 @@
 import request from '../utils/request';
 
-export  function solicLogin(data,config) {
+// 登录
+export function solicLogin(data, config) {
     return request({
-        url: '/appSysUser/solic_login',
+        url: '/tianzong/appSysUser/solic_login',
+        method: 'post',
+        data: data,
+        ...config
+    })
+}
+
+// 首页-扫码
+export function appFindYourShipment(data, config) {
+    return request({
+        url: '/tianzong/express/appFindYourShipment',
+        method: 'post',
+        data: data,
+        ...config
+    })
+}
+
+// 快递出库-扫码
+export function appDeliveryPersonDeliveries(data, config) {
+    return request({
+        url: '/tianzong/express/appDeliveryPersonDeliveries',
         method: 'post',
         data: data,
         ...config

+ 9 - 2
src/pages/components/HomePage.vue

@@ -3,7 +3,7 @@
 		<div class="content">
 			<div class="sm">
 				<van-search v-model="value" @search="onSearch" placeholder="点击搜索单号" />
-				<img @click="wxScanCode()" src="@/assets/user/u4.png" alt="">
+				<img @click="wxScanCodeA()" src="@/assets/user/u4.png" alt="">
 			</div>
 			<!-- 显示 -->
 			<div class="echarts1">
@@ -50,6 +50,7 @@
 </template>
 
 <script>
+import { appFindYourShipment } from '../../api/index'
 import {
 	Toast,
 	Dialog
@@ -82,6 +83,7 @@ export default {
 	created: function () {
 		this.isLogin();
 		this.getData()
+
 	},
 	mounted() {
 		// 页面加载完成唤醒微信扫一扫
@@ -268,9 +270,14 @@ export default {
 				})
 
 		},
-		sys() {
 
+		async wxScanCodeA() {
+			const res = await appFindYourShipment({ expressNo: 'SF202303221917' }, { emulateJSON: true })
+			console.log(res, '+++++++++==')
+			this.$store.state.shipment = res
+			this.$router.push('ScannerResult')
 		},
+
 		//打印面单
 		print() {
 			Toast('该功能正在开发中,敬请期待!');

+ 5 - 4
src/pages/components/Waitsent.vue

@@ -17,14 +17,15 @@
                         <div class="batch-middel-text-style">楼层:</div>
                         <div class="batch-middel-text-style">座位号:</div>
                         <div style="display: flex;" class="batch-middel-text-style">联系方式:138XXXX1234 <van-button
-                                style="margin-top: -5px; border-radius: 6px;" type="info" size="mini">拨打</van-button>
+                                style="margin-top: -5px; border-radius: 6px;" type="info" plain
+                                size="mini">拨打</van-button>
                         </div>
                     </div>
-                    <div style="display: flex; padding-top: 5px;">
-                        <van-button style="width: 100px; border-radius: 6px;" size="small" type="info"
+                    <div style="display: flex; justify-content:space-around; padding-top: 5px;">
+                        <van-button style="width: 100px; border-radius: 6px;" size="small" plain type="info"
                             @click="onReceiving">签收
                         </van-button>
-                        <van-button style="width: 100px; border-radius: 6px;" size="small" type="danger"
+                        <van-button style="width: 100px; border-radius: 6px;" size="small" plain type="danger"
                             @click="onSureRetention">设为滞留</van-button>
                     </div>
                 </div>

+ 97 - 90
src/pages/forgetpassword.vue

@@ -9,13 +9,13 @@
 			</div> -->
 			<div class="item">
 				<van-cell-group>
-			       <van-field v-model="password" type="password"  placeholder="请输入密码" />
-			    </van-cell-group>
+					<van-field v-model="password" type="password" placeholder="请输入密码" />
+				</van-cell-group>
 			</div>
 			<div class="item">
 				<van-cell-group>
-			       <van-field v-model="password2" type="password"  placeholder="请再次输入密码" />
-			    </van-cell-group>
+					<van-field v-model="password2" type="password" placeholder="请再次输入密码" />
+				</van-cell-group>
 			</div>
 			<div class="btn">
 				<van-button type="primary" @click="save()" color="#00c4b8">保存</van-button>
@@ -29,102 +29,109 @@
 </template>
 
 <script>
-	import {Toast,Dialog} from 'vant'
-	export default{
-		
-		data(){
-			return{
-				titlename:"修改密码",
-				name:"",
-				password:"",
-				password2:"",
-				yzm:"",
-				userId:"",
+import { Toast, Dialog } from 'vant'
+export default {
+
+	data() {
+		return {
+			titlename: "修改密码",
+			name: "",
+			password: "",
+			password2: "",
+			yzm: "",
+			userId: "",
+		}
+	},
+	created: function () {
+		this.isLogin();
+		this.userId = localStorage.getItem('userId');
+	},
+	methods: {
+		save() {
+			if (this.password == '' || this.password == undefined) {
+				Toast('请输入密码!');
+				return;
+			}
+			if (this.password2 == '' || this.password2 == undefined) {
+				Toast('请再次输入密码!');
+				return;
 			}
-		},
-		created:function(){
-			this.isLogin();
-			this.userId = localStorage.getItem('userId');
-		},
-		methods:{
-			save(){
-				if(this.password == '' || this.password == undefined){
-					Toast('请输入密码!');
-					return;
-				}
-				if(this.password2 == '' || this.password2 == undefined){
-					Toast('请再次输入密码!');
-					return;
-				}
-				if(this.password2 != this.password){
-					Toast('两次输入密码不相同!');
-					return;
-				}
-				//交互
-				this.$http.post(this.$store.state.host + "/appSysUser/LJYforgetPassword", {
-						userId: this.userId,
-						password:this.password
-					}, {
-						emulateJSON: true
-					})
-					.then(res => {
-						//发送成功
-						if (res.body.msg == 'success') {
-							localStorage.removeItem("userId");
-							this.$router.push({path:'/'});
-						}else{
-							Toast('修改失败!');
-						}
-				
-						//if()
-					}, res => {
-						//发送失败
-					})
-				
-				
+			if (this.password2 != this.password) {
+				Toast('两次输入密码不相同!');
+				return;
 			}
+			//交互
+			this.$http.post('http://192.168.31.47:8080/tianzong' + "/appSysUser/LJYforgetPassword", {
+				userId: this.userId,
+				password: this.password
+			}, {
+				emulateJSON: true
+			})
+				.then(res => {
+					//发送成功
+					if (res.body.msg == 'success') {
+						localStorage.removeItem("userId");
+						this.$router.push({ path: '/' });
+					} else {
+						Toast('修改失败!');
+					}
+
+					//if()
+				}, res => {
+					//发送失败
+				})
+
+
 		}
 	}
+}
 </script>
 <style scoped lang="less">
-	.content{
-		.loginimg{
-			width:3.48rem;
-			margin: 0 auto;
-			display: block;
-			padding: 2.15rem .8rem;
+.content {
+	.loginimg {
+		width: 3.48rem;
+		margin: 0 auto;
+		display: block;
+		padding: 2.15rem .8rem;
+	}
+
+	.login {
+		width: 5.8rem;
+		margin: 0.3rem auto 0px;
+
+		.item {
+			border: .01rem solid #bfbfbf;
+			border-radius: .1rem;
+			margin-bottom: .3rem;
+			background: white;
+			overflow: hidden;
+			color: #999999;
 		}
-		.login{
-			width: 5.8rem;
-			margin: 0.3rem auto 0px;
-			.item{
-				border: .01rem solid #bfbfbf;
-				border-radius: .1rem;
-				margin-bottom: .3rem;
-				background: white;
-				overflow: hidden;
-				color: #999999;
-			}
-			.item:nth-of-type(3){
-				margin-bottom: .2rem;
+
+		.item:nth-of-type(3) {
+			margin-bottom: .2rem;
+		}
+
+		.btn {
+			button {
+				width: 100%;
 			}
-			.btn{
-				button{
-					width: 100%;
-				}
+		}
+
+		.register {
+			font-size: .24rem;
+			display: flex;
+			justify-content: space-between;
+			margin-top: .2rem;
+
+			a {
+				color: #999999;
 			}
-			.register{
-				font-size: .24rem;
-				display: flex;
-				justify-content: space-between;
-				margin-top: .2rem;
-				a{
-					color: #999999;
-				}
-				a:nth-of-type(1){
-					color: #02bfb3;
-				}
+
+			a:nth-of-type(1) {
+				color: #02bfb3;
 			}
 		}
 	}
+}
 </style>

+ 3 - 2
src/pages/login.vue

@@ -58,13 +58,14 @@ export default {
 				return;
 			}
 			// this.$http.post(this.$store.state.host+"/appSysUser/solic_login",{USERNAME:this.name,PASSWORD:this.password},{emulateJSON:true})
-			const res = await solicLogin({ USERNAME: this.name, PASSWORD: this.password },{emulateJSON:true})
-			console.log(res,'res')
+			const res = await solicLogin({ USERNAME: this.name, PASSWORD: this.password }, { emulateJSON: true })
+			console.log(res, 'res')
 
 			if (res.result == 'success') {
 				//localStorage
 				localStorage.setItem("userId", res.userId);
 				localStorage.setItem("roomId", res.roomId);
+				localStorage.setItem("courierId", res.userId);
 				this.$router.push({ path: '/' });
 			} else {
 				Toast('登录失败!');

+ 4 - 3
src/pages/my.vue

@@ -9,8 +9,8 @@
 				<img src="../assets/images/foot_icon1.png" alt="">
 			</template>
 			<div>
-				<p>姓名:{{ user.NAME }}</p>
-				<p>{{ user.PHONE }}</p>
+				<p>姓名:{{ user.expressName }}</p>
+				<p>{{ user.expressPhone }}</p>
 			</div>
 			<img style="width: 100%;border-radius: 0px;margin-top: .4rem;" src="../assets/images/my_banner.png" alt="">
 		</div>
@@ -57,7 +57,8 @@ export default {
 		loginout() {
 			localStorage.removeItem("userId");
 			localStorage.removeItem("openid");
-			// window.location.href ='http://47.101.145.23/wuliu/ljy/';
+			window.location.href = 'http://localhost:8080/#/';
+
 			// 配置一下  环境
 		},
 

+ 13 - 19
src/pages/new/batched.vue

@@ -6,18 +6,7 @@
             <div class="number">xxxxxxxxx</div>
             <div class="wenzi">批次内包含以下快件:</div>
             <div class="middle-box">
-                <div class="middle-box-little">xxxxxxxxxxx x</div>
-                <div class="middle-box-little">xxxxxxxxxxx x</div>
-                <div class="middle-box-little">xxxxxxxxxxx x</div>
-                <div class="middle-box-little">xxxxxxxxxxx x</div>
-                <div class="middle-box-little">xxxxxxxxxxx x</div>
-                <div class="middle-box-little">xxxxxxxxxxx x</div>
-                <div class="middle-box-little">xxxxxxxxxxx x</div>
-                <div class="middle-box-little">xxxxxxxxxxx x</div>
-                <div class="middle-box-little">xxxxxxxxxxx x</div>
-                
-                <div class="middle-box-little">xxxxxxxxxxx x</div>
-               
+                <van-cell v-for="(item, index) in list" :key="index" :value="item" />
             </div>
         </div>
         <div class="bottom">
@@ -31,20 +20,26 @@
 <script>
 export default {
     name: 'batched',
+    props: ['isRemoval'],
     data() {
         return {
-            titlename: '快件出库'
-
+            titlename: '快件出库',
+            list: ['11111', '2222222222', '55555555555', '6666666666'],
         };
     },
-    methods:{
+    mounted() {
+        console.log(this.isRemoval, '456')
+    },
+    methods: {
         // 返回
         onBack() {
-            this.$router.go(-1)
+            console.log(this.isRemoval, '456')
+            // this.$router.go(-1)
+            this.$emit('isRemoval', true);
         },
         // 创建新批次
         newBatch() {
-            this.$router.go(-1)
+            this.$router.go('Removal')
         },
         // 回首页
         backHome() {
@@ -62,8 +57,7 @@ export default {
 
 .container {
     background-color: #fff;
-    height: 620px;
-    padding: 0 20px;
+    padding: 0 20px 20px 20px;
 
     .number {
         font-size: 20px;

+ 54 - 15
src/pages/new/removal.vue

@@ -1,40 +1,79 @@
 <template>
-    <div class="container">
-        <back :title="titlename"></back>
-        <van-search v-model="keyWorld" placeholder="请输入手机单号" />
-        <img @click="onImg" src="@/assets/user/u4.png" alt="">
-        <div style="padding: 12px;" v-if="show">
-            <div>已添加快件:</div>
-            <div v-for="item in codes" :key="item">
-                <div>{{ item }}</div>
-                <div>x</div>
+    <div>
+        <div class="container" v-if="isRemoval">
+            <back :title="titlename"></back>
+            <van-search v-model="keyWorld" placeholder="请输入手机单号" />
+            <img @click="onImg" src="@/assets/user/u4.png" alt="">
+            <div style="padding: 12px;" v-if="show">
+                <div style="margin-bottom: 10px;">已添加快件:</div>
+                <van-cell-group v-for="item in codes" :key="item">
+                    <van-cell :title="item">
+                        <!-- 使用 right-icon 插槽来自定义右侧图标 -->
+                        <template #right-icon>
+                            <van-icon name="delete-o" @click="onDelete" class="delete" />
+                        </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 :isRemoval="isRemoval" @isRemoval="iemoval" v-else></Batched>
     </div>
 </template>
 
 <script>
+import { appDeliveryPersonDeliveries } from '../../api';
+import { Toast } from 'vant'
+import Batched from './batched.vue'
 export default {
     name: 'Removal',
+    components: {
+        Batched
+    },
+    mounted() {
+        console.log(localStorage.getItem('courierId'), '+=====================')
+
+    },
     data() {
         return {
             titlename: "快件出库",
-            codes: [],
-            keyWorld: ""
+            codes: ['SF676444932923', 'SF23123123123', 'SF202303221917'],
+            keyWorld: "",
+            isRemoval: true
         };
     },
     methods: {
         onImg() {
             // 调用
+
             this.callback(Math.random())
         },
         callback(code) {
-            this.codes.push(code)
+            if (this.codes.length < 15) {
+                this.codes.push(code)
+            } else {
+                Toast('扫描上限15条');
+            }
         },
         // 生成批次
-        onBatch() {
-            this.$router.push('Batched')
+        async onBatch() {
+            this.isRemoval = false
+
+            let data = {
+                deliveryPeopleId: localStorage.getItem('courierId'), //派送员id
+                deliveryId: this.codes.join(','),    //快件单号
+                dispatchBatchNo: '202403261971'    //批次号
+            }
+            const res = await appDeliveryPersonDeliveries({ ...data }, { emulateJSON: true })
+            console.log(res, 'res')
+        },
+        onDelete(qwe) {
+            console.log('123', qwe)
+        },
+        iemoval(value) {
+            console.log(value)
+            this.isRemoval = value
         }
     },
     computed: {

+ 45 - 0
src/pages/new/scannerResult.vue

@@ -0,0 +1,45 @@
+<template>
+    <div class="container">
+        <van-cell-group>
+            <van-cell title="快递单号" :value="list.dispatchNo" />
+            <van-cell title="快递公司" :value="list.expressCompany" />
+            <van-cell title="收件人姓名" :value="list.recipient" />
+            <van-cell title="收件人手机号码" :value="list.phone" />
+            <van-cell title="收件人部门" :value="list.departmentId" />
+            <van-cell title="所属收发室" :value="list.mailRoom" />
+            <van-cell title="收件人楼层" :value="list.shelfInformation" />
+            <!-- <van-cell title="收件人姓名" value="内容" /> -->
+            <van-cell title="收件人座位" :value="list.sendSeat" />
+            <van-cell title="快件类型" :value="list.expressType" />
+            <van-cell title="快件数量" :value="list.expressQuantity" />
+            <van-cell title="快件状态" :value="list.isIncludeChldren == 1 ? '待派送' : '已派送'" />
+            <van-cell title="货架信息" :value="list.shelfInformation" />
+            <van-cell title="是否到付" :value="list.isPayOnDelivery" />
+            <van-cell title="到付费用" :value="list.payMoney" />
+            <van-cell title="快递备注" :value="list.remark" />
+        </van-cell-group>
+
+        <van-button type="primary" size="large" @click="backHome">返回首页</van-button>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'scannerResult',
+    props: ['shipment'],
+    data() {
+        return {
+            list: {}
+        };
+    },
+    created() {
+        this.list = this.$store.state.shipment.data
+        console.log('this.list', this.list)
+    },
+    methods: {
+        backHome() {
+            this.$router.push('/')
+        }
+    },
+};
+</script>

+ 6 - 12
src/pages/new/storage.vue

@@ -3,16 +3,16 @@
         <div class="container">
             <back :title="titlename"></back>
             <van-form @submit="onSubmit">
-                <van-field v-model="object.a"  name="快递单号" label="快递单号" placeholder="快递单号"
-                    :rules="[{ required: true, message: '请填写快递单号' }]" />
+                <van-field v-model="object.a" name="快递单号" label="快递单号" placeholder="快递单号"
+                    :rules="[{ required: true }]" />
 
-                <van-field readonly clickable name="picker" label="快递公司" :value="value" placeholder="请选择快递公司"
+                <van-field readonly clickable name="快递公司" label="快递公司" :value="value" placeholder="请选择快递公司"
                     @click="showPicker = true" />
                 <van-popup v-model="showPicker" position="bottom">
                     <van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false" />
                 </van-popup>
 
-                <van-field v-model="object.b" name="手机号码" label="收件人手机号" placeholder="请输入收件人手机号码"
+                <van-field v-model="object.b" name="手机号码" label="收件人手机号" placeholder="请输入收件人手机号码"
                     :rules="[{ required: true, message: '' }]" />
 
                 <van-field v-model="object.username" name="收件人姓名" label="收件人姓名" placeholder="请输入收件人姓名"
@@ -33,7 +33,7 @@
                     <van-picker show-toolbar :columns="floors" @confirm="onFloor" @cancel="floor = false" />
                 </van-popup>
 
-                <van-field v-model="object.set" name="收件人座位" label="收件人座位" placeholder="请输入收件人座位"
+                <van-field v-model="object.set" name="set" label="收件人座位" placeholder="请输入收件人座位"
                     :rules="[{ required: true, message: '' }]" />
 
                 <van-field name="radio" label="快件类型">
@@ -60,18 +60,12 @@
                             <van-checkbox v-model="checkbox" @change="onCheckboxChange" shape="square" /><span>到付</span>
                         </template>
                     </van-field>
-                    <van-field :disabled="isdisabled" label="快递公司" style="margin-left: -245px;" v-model="object.e"
-                        name="到付备注" placeholder="请输入到付备注" />
+                    <van-field :disabled="isdisabled" v-model="object.e" name="到付备注" placeholder="请输入到付备注" />
                 </div>
 
                 <van-field v-model="object.f" label="快递备注" name="快递备注" placeholder="请输入快递备注"
                     :rules="[{ required: true, message: '' }]" />
 
-
-
-
-
-
                 <div style=" display: flex; justify-content: space-between; background-color: #fff;  padding: 10px 0;">
                     <van-button size="small" style="border-radius: 5px; width: 190px;" block type="info"
                         native-type="submit">保存/打印小标签并添加下一个</van-button>

+ 60 - 51
src/pages/personinfomation.vue

@@ -2,13 +2,17 @@
 	<div>
 		<back :title="titlename"></back>
 		<!-- 表单 -->
-		<van-form >
-		  <van-field v-model="user.USERNAME" readonly type=""       name="用户名" label="用户名" placeholder="用户名" :rules="[{ required: false}]"/>
-		  <van-field v-model="user.NAME"     readonly type=""       name="姓名"   label="姓名"   placeholder="姓名"   :rules="[{ required: false}]"/>
-		  <van-field v-model="user.ROLE_ID"  readonly type=""       name="角色"   label="角色"   placeholder="角色"   :rules="[{ required: false}]"/>
-		  <van-field v-model="user.ROLE_IDS" readonly type=""       name="公司"   label="公司"   placeholder="公司"   :rules="[{ required: false}]"/>
-      <van-field v-model="user.PHONE"    readonly type="number" name="手机号" label="手机号" placeholder="手机号"  :rules="[{ required: false}]"/>
-		  <!-- <div style="margin: 16px;">
+		<van-form>
+			<van-field v-model="user.expressPhone" readonly type="" name="用户名" label="用户名" placeholder="用户名"
+				:rules="[{ required: false }]" />
+			<van-field v-model="user.expressName" readonly type="" name="姓名" label="姓名" placeholder="姓名"
+				:rules="[{ required: false }]" />
+			<!-- <van-field v-model="user.ROLE_ID"  readonly type=""       name="角色"   label="角色"   placeholder="角色"   :rules="[{ required: false}]"/> -->
+			<van-field v-model="user.company" readonly type="" name="公司" label="公司" placeholder="公司"
+				:rules="[{ required: false }]" />
+			<van-field v-model="user.expressPhone" readonly type="number" name="手机号" label="手机号" placeholder="手机号"
+				:rules="[{ required: false }]" />
+			<!-- <div style="margin: 16px;">
 		    <van-button round block type="info" native-type="submit">保存</van-button>
 		  </div> -->
 		</van-form>
@@ -16,55 +20,60 @@
 </template>
 
 <script>
-	import { Form,Toast,Field } from 'vant'
-	export default{
-		data(){
-			return {
-				titlename:"个人信息",
-				user:{},
-				userId:'',
-				departmenList:[],
-				show:false
-			}
-		},
-		created:function() {
-			this.userId = localStorage.getItem("userId");
-			this.getUser();
-		},
-		methods:{
+import { Form, Toast, Field } from 'vant'
+export default {
+	data() {
+		return {
+			titlename: "个人信息",
+			user: {},
+			userId: '',
+			departmenList: [],
+			show: false
 		}
+	},
+	created: function () {
+		this.userId = localStorage.getItem("userId");
+		this.getUser();
+	},
+	methods: {
 	}
+}
 </script>
 
 <style lang="less" scoped>
-	/deep/.van-form{
-	  .van-button--info{
-	    background-color: #00c4b8;
-	    border: 1px solid #00c4b8;
-	    border-radius: 5px;
-	  }
-	  .m .van-field__label::before{
-		  content:"*";
-		  color: red;
-	  }
-	  .van-cell{
-	    font-size: .26rem;
-	    }
-	  .textarea{
-	    font-size: .26rem;
-	    padding: 10px 16px;
-	    color: #646566;
-	    textarea{
-	      width: 98%;
-	      height: 150px;
-	      border-color: #e5e5e5;
-	      color: #999999;
-	      margin-top: 16px;
-	      padding: 10px 1%;
-	    }
-	  }
+/deep/.van-form {
+	.van-button--info {
+		background-color: #00c4b8;
+		border: 1px solid #00c4b8;
+		border-radius: 5px;
 	}
-	/deep/.van-field__control{
-	  text-align: right;
+
+	.m .van-field__label::before {
+		content: "*";
+		color: red;
+	}
+
+	.van-cell {
+		font-size: .26rem;
+	}
+
+	.textarea {
+		font-size: .26rem;
+		padding: 10px 16px;
+		color: #646566;
+
+		textarea {
+			width: 98%;
+			height: 150px;
+			border-color: #e5e5e5;
+			color: #999999;
+			margin-top: 16px;
+			padding: 10px 1%;
+		}
 	}
+}
+
+/deep/.van-field__control {
+	text-align: right;
+}
 </style>

+ 189 - 180
src/router/index.js

@@ -12,6 +12,7 @@ import SignA from '@/pages/new/sign'
 import Combine from '@/pages/new/combine'
 import SureCombine from '@/pages/new/sureCombine'
 import Batched from '@/pages/new/batched'
+import ScannerResult from '@/pages/new/scannerResult'
 import Addper from '@/pages/addper'
 import Box from '@/pages/box'
 import Pjpc from '@/pages/pjpc'
@@ -32,185 +33,193 @@ Vue.use(Router)
 
 export default new Router({
 	routes: [{ //登录
-			path: '/Login',
-			name: 'Login',
-			component: Login
-		},
-		{ //密钥
-			path: '/Key',
-			name: 'Key',
-			component: Key,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-			},
-		{ //邮件收发室
-			path: '/Sign',
-			name: 'Sign',
-			component: Sign,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-    { //邮件收发室
-    	path: '/Sign2',
-    	name: 'Sign2',
-    	component: Sign2,
-    	meta: {
-    		needLogin: true //需要加校检判断的路由
-    	}
-    },
-    { //我的
-    	path: '/My',
-    	name: 'My',
-    	component: My,
-    	meta: {
-    		needLogin: true //需要加校检判断的路由
-    	}
-    },
-    { //个人信息
-    	path: '/Personinfomation',
-    	name: 'Personinfomation',
-    	component: Personinfomation,
-    	meta: {
-    		needLogin: true //需要加校检判断的路由
-    	}
-    },
-    { //修改密码
-    	path: '/Forgetpassword',
-    	name: 'Forgetpassword',
-    	component: Forgetpassword,
-    	meta: {
-    		needLogin: true //需要加校检判断的路由
-    	}
-    },
-		{ //邮件收发室
-			path: '/',
-			name: 'Email',
-			component: Email,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //快件查询
-			path: '/Kjsearch',
-			name: 'Kjsearch',
-			component: Kjsearch,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-    { //首页查询
-    	path: '/Sysearch',
-    	name: 'Sysearch',
-    	component: Sysearch,
-    	meta: {
-    		needLogin: true //需要加校检判断的路由
-    	}
-    },
-		{ //快件查询详情
-			path: '/Kjsearchinfo',
-			name: 'Kjsearchinfo',
-			component: Kjsearchinfo,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //寄件查询
-			path: '/Jjsearch',
-			name: 'Jjsearch',
-			component: Jjsearch,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //收件登记
-			path: '/Sjdj',
-			name: 'Sjdj',
-			component: Sjdj,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //快件入库
-			path: '/Storage',
-			name: 'Storage',
-			component: Storage,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //快件出库
-			path: '/Removal',
-			name: 'Removal',
-			component: Removal,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //派件查询
-			path: '/DeliveryInquiry',
-			name: 'DeliveryInquiry',
-			component: DeliveryInquiry,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //派件签收
-			path: '/SignA',
-			name: 'SignA',
-			component: SignA,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //合并签收
-			path: '/Combine',
-			name: 'Combine',
-			component: Combine,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //确认派件签收
-			path: '/SureCombine',
-			name: 'SureCombine',
-			component: SureCombine,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //生成批次号
-			path: '/Batched',
-			name: 'Batched',
-			component: Batched,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //新增收件人
-			path: '/Addper',
-			name: 'Addper',
-			component: Addper,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //柜子
-			path: '/Box',
-			name: 'Box',
-			component: Box,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
-		{ //派件批次
-			path: '/Pjpc',
-			name: 'Pjpc',
-			component: Pjpc,
-			meta: {
-				needLogin: true //需要加校检判断的路由
-			}
-		},
+		path: '/Login',
+		name: 'Login',
+		component: Login
+	},
+	{ //密钥
+		path: '/Key',
+		name: 'Key',
+		component: Key,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //邮件收发室
+		path: '/Sign',
+		name: 'Sign',
+		component: Sign,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //邮件收发室
+		path: '/Sign2',
+		name: 'Sign2',
+		component: Sign2,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //我的
+		path: '/My',
+		name: 'My',
+		component: My,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //个人信息
+		path: '/Personinfomation',
+		name: 'Personinfomation',
+		component: Personinfomation,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //修改密码
+		path: '/Forgetpassword',
+		name: 'Forgetpassword',
+		component: Forgetpassword,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //邮件收发室
+		path: '/',
+		name: 'Email',
+		component: Email,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //快件查询
+		path: '/Kjsearch',
+		name: 'Kjsearch',
+		component: Kjsearch,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //首页查询
+		path: '/Sysearch',
+		name: 'Sysearch',
+		component: Sysearch,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //快件查询详情
+		path: '/Kjsearchinfo',
+		name: 'Kjsearchinfo',
+		component: Kjsearchinfo,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //寄件查询
+		path: '/Jjsearch',
+		name: 'Jjsearch',
+		component: Jjsearch,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //收件登记
+		path: '/Sjdj',
+		name: 'Sjdj',
+		component: Sjdj,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //快件入库
+		path: '/Storage',
+		name: 'Storage',
+		component: Storage,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //快件出库
+		path: '/Removal',
+		name: 'Removal',
+		component: Removal,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //派件查询
+		path: '/DeliveryInquiry',
+		name: 'DeliveryInquiry',
+		component: DeliveryInquiry,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //派件签收
+		path: '/SignA',
+		name: 'SignA',
+		component: SignA,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //合并签收
+		path: '/Combine',
+		name: 'Combine',
+		component: Combine,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //确认派件签收
+		path: '/SureCombine',
+		name: 'SureCombine',
+		component: SureCombine,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //生成批次号
+		path: '/Batched',
+		name: 'Batched',
+		component: Batched,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //扫描结果页面
+		path: '/ScannerResult',
+		name: 'ScannerResult',
+		component: ScannerResult,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //新增收件人
+		path: '/Addper',
+		name: 'Addper',
+		component: Addper,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //柜子
+		path: '/Box',
+		name: 'Box',
+		component: Box,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
+	{ //派件批次
+		path: '/Pjpc',
+		name: 'Pjpc',
+		component: Pjpc,
+		meta: {
+			needLogin: true //需要加校检判断的路由
+		}
+	},
 	]
 })

+ 85 - 85
src/script/common.js

@@ -1,48 +1,47 @@
 export default {
-	install(Vue){
-		Vue.prototype.getOpenid = function(page) {
-        var host='http://47.101.145.23/tianzong';
-        //var host='http://localhost:8080/tianzong';
-		    if (localStorage.getItem("openid") != 'undefined' && localStorage.getItem("openid") != null)
-		      return;
-		    var code = this.getUrlParam("code");
-		    if (code == 'undefined' || code == null || code == "") {
-		      //alert("参数异常,请返回首页重试");
-		      this.urlredirect(page);
-		      return;
-		    }
-		    this.$http.post(host + "/weixin/getWxUserInfo", {
-		        code: code,
-			userId:localStorage.getItem("userId")
-		      }, {
-		        emulateJSON: true
-		      })
-		      .then(res => {
-		        //发送成功
-			console.log(res);
+	install(Vue) {
+		Vue.prototype.getOpenid = function (page) {
+			var host = 'http://47.101.145.23/tianzong';
+			// var host = 'http://192.168.31.47:8080/tianzong';
+			if (localStorage.getItem("openid") != 'undefined' && localStorage.getItem("openid") != null)
+				return;
+			var code = this.getUrlParam("code");
+			if (code == 'undefined' || code == null || code == "") {
+				//alert("参数异常,请返回首页重试");
+				this.urlredirect(page);
+				return;
+			}
+			this.$http.post(host + "/weixin/getWxUserInfo", {
+				code: code,
+				userId: localStorage.getItem("userId")
+			}, {
+				emulateJSON: true
+			})
+				.then(res => {
+					//发送成功
+					console.log(res);
 
-		        if (res.body.code == '0') {
-		          localStorage.setItem("openid", res.body.openId);
-		          localStorage.setItem("headimgurl", res.body.headimgurl);
-		          //this.$store.commit("getId",res.body.data)
-		        } else {
-		          //console.log(res);
-		          this.urlredirect(page);
-		        }
+					if (res.body.code == '0') {
+						localStorage.setItem("openid", res.body.openId);
+						localStorage.setItem("headimgurl", res.body.headimgurl);
+						//this.$store.commit("getId",res.body.data)
+					} else {
+						this.urlredirect(page);
+					}
 
-		        //if()
-		      }, res => {
-		        //发送失败
-		      })
+					//if()
+				}, res => {
+					//发送失败
+				})
 
-		  }
+		}
 
-		Vue.prototype.urlredirect=function(page) {
-		  var host='http://47.101.145.23/wuliu/ljy/';
-		  window.location.href =
-		    "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx3d3b98cc26425f40&redirect_uri=" + host + page + "&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect";
+		Vue.prototype.urlredirect = function (page) {
+			var host = 'http://47.101.145.23/wuliu/ljy/';
+			window.location.href =
+				"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx3d3b98cc26425f40&redirect_uri=" + host + page + "&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect";
 		}
-		Vue.prototype.getUrlParam = function(name) {
+		Vue.prototype.getUrlParam = function (name) {
 			var vars = [],
 				hash;
 			var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
@@ -54,65 +53,66 @@ export default {
 			return decodeURIComponent(vars[name]);
 		}
 
-    Vue.prototype.getUser=function(){
-    	this.$http.post(this.$store.state.host+"/personal/getSysUserInfoByUserId.do",{userId:this.userId},{emulateJSON:true})
-    		.then(res=>{
-    				//发送成功
-    				if(res.body.msg=='success'){
-    					this.user=res.body.sysUserInfo;
-              console.log("getUser:" + res.body.sysUserInfo)
-    				}
-    	},res=>{
-    				 //发送失败
-    	})
-    }
+		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 => {
+					//发送失败
+				})
+		}
 		//快递公司列表
-		Vue.prototype.getLogisticsList=function(){
-			this.$http.post(this.$store.state.host+"/sendMail/getLogisticsList.do",{},{emulateJSON:true})
-				.then(res=>{
+		Vue.prototype.getLogisticsList = function () {
+			this.$http.post(this.$store.state.host + "/sendMail/getLogisticsList.do", {}, { emulateJSON: true })
+				.then(res => {
 					//发送成功
-					if(res.body.msg=='success'){
+					if (res.body.msg == 'success') {
 						this.columns = res.body.list
-						for(var i=0;i<this.columns.length;i++){
+						for (var i = 0; i < this.columns.length; i++) {
 							this.columns[i].text = this.columns[i].expressCompany
 						}
 					}
-			},res=>{
-					 //发送失败
-			})
+				}, res => {
+					//发送失败
+				})
+		}
+		//成本中心列表
+		Vue.prototype.getCostCenterList = function () {
+			this.$http.post(this.$store.state.host + "/sendMail/getCostCenterList.do", { mailRoomId: this.mailRoomId }, { emulateJSON: true })
+				.then(res => {
+					//发送成功
+					if (res.body.msg == 'success') {
+						this.costCenterList = res.body.list
+						for (var i = 0; i < this.columns.length; i++) {
+							this.columns[i].text = this.columns[i].expressCompany
+						}
+					}
+				}, res => {
+					//发送失败
+				})
 		}
-    //成本中心列表
-    Vue.prototype.getCostCenterList=function(){
-    	this.$http.post(this.$store.state.host+"/sendMail/getCostCenterList.do",{mailRoomId:this.mailRoomId},{emulateJSON:true})
-    		.then(res=>{
-    			//发送成功
-    			if(res.body.msg=='success'){
-    				this.costCenterList = res.body.list
-    				for(var i=0;i<this.columns.length;i++){
-    					this.columns[i].text = this.columns[i].expressCompany
-    				}
-    			}
-    	},res=>{
-    			 //发送失败
-    	})
-    }
 
 		//登录判断
-		Vue.prototype.isLogin=function(){
-			this.$http.post(this.$store.state.host+"/appSysUser/isLogin.do",{
-				},{emulateJSON:true})
-				.then(res=>{
+		Vue.prototype.isLogin = function () {
+			this.$http.post(this.$store.state.host + "/appSysUser/isLogin.do", {
+			}, { emulateJSON: true })
+				.then(res => {
 					console.log(res.body)
 					//发送成功
-					if(res.body.msg=='success'){
-            console.log("isLogin=Y")
-					}else{
-            //本地 注释  服务器 放开
+					if (res.body.msg == 'success') {
+						console.log("isLogin=Y")
+					} else {
+						//本地 注释  服务器 放开
 						//localStorage.clear();
 					}
-			},res=>{
-					 //发送失败
-			})
+				}, res => {
+					//发送失败
+				})
 		}
 	}
 

+ 12 - 7
src/store/store.js

@@ -4,17 +4,22 @@ import Vuex from 'vuex'
 Vue.use(Vuex)
 
 const store = new Vuex.Store({
-	state: {
-    //服务器用
-    host: "http://47.101.145.23/tianzong",
-    //本地用
-    //host:"http://localhost:8080/tianzong",
+	state: {
+		//服务器用
+		host: "http://47.101.145.23/tianzong",
+		//本地用
+		//host:"http://localhost:8080/tianzong",
 		regEmail: "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$",
-		regPhone: "^(1[3-9])\\d{9}$"
+		regPhone: "^(1[3-9])\\d{9}$",
+		shipment: {},//扫描单号后的结果
+
 	},
 	mutations: {
-
+		getShipment(state, data) {
+			state.saveAllList = data
+		}
 	},
+
 	actions: {
 
 	}

+ 20 - 21
src/utils/request.js

@@ -1,38 +1,37 @@
 // api/request.js  
-import axios from 'axios';  
+import axios from 'axios';
 import qs from "qs"
 // 创建请求实例  
-const instance = axios.create({  
+const instance = axios.create({
   // baseURL: 'http://47.101.145.23/tianzong', // 设置接口基础路径  
-  baseURL: process.env.VUE_APP_BASE_API, // 设置接口基础路径  
   timeout: 5000 // 设置请求超时时间  
-});  
+});
 
 // 设置请求拦截器  
-instance.interceptors.request.use(  
-  config => {  
-    if(config.emulateJSON){
+instance.interceptors.request.use(
+  config => {
+    if (config.emulateJSON) {
       config.headers["Content-Type"] = "application/x-www-form-urlencoded;charset=UTF-8"
     }
     // 在请求发送前进行一些操作,如设置请求头、处理请求参数等  
-    return config;  
-  },  
-  error => {  
+    return config;
+  },
+  error => {
     // 对请求错误进行处理  
-    return Promise.reject(error);  
-  }  
-);  
+    return Promise.reject(error);
+  }
+);
 
 // 设置响应拦截器  
-instance.interceptors.response.use(  
-  response => {  
+instance.interceptors.response.use(
+  response => {
     // 对接口返回的数据进行处理,如统一处理错误码、格式化数据等  
-    return response.data;  
-  },  
-  error => {  
+    return response.data;
+  },
+  error => {
     // 对响应错误进行处理  
-    return Promise.reject(error);  
-  }  
-);  
+    return Promise.reject(error);
+  }
+);
 
 export default instance;