|
@@ -1,283 +1,201 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <!-- <van-nav-bar
|
|
|
- :title="titlename"
|
|
|
- left-text="返回"
|
|
|
- left-arrow
|
|
|
- @click-left="onClickLeft"
|
|
|
- /> -->
|
|
|
<back :title="titlename"></back>
|
|
|
<div class="content">
|
|
|
- <p>寄件查询</p>
|
|
|
<div class="jjlist">
|
|
|
<div class="listinfo">
|
|
|
<div class="list_top">
|
|
|
<div class="list_top_left">
|
|
|
<img src="../assets/images/ad_icon1.png" alt="">
|
|
|
- <div>
|
|
|
- <p><template v-if="expressInfo.expressInfo == 1">顺丰</template>
|
|
|
- <template v-if="expressInfo.expressInfo == 2">中通</template>
|
|
|
- <template v-if="expressInfo.expressInfo == 3">DHL</template>
|
|
|
- <template v-if="expressInfo.expressInfo == 4">EMS</template>
|
|
|
- <template v-if="expressInfo.expressInfo == 5">同城</template>
|
|
|
- <template v-if="expressInfo.expressInfo == 6">京东</template> {{expressInfo.expressNo}}</p>
|
|
|
- <p>{{expressInfo.sender}} {{expressInfo.senderPhone}}</p>
|
|
|
- <p>{{expressInfo.recordDate|dateFormat}}</p>
|
|
|
+
|
|
|
+ <div v-if="mailDetail.type == 1">
|
|
|
+ <p>{{ ObjectVlaue.withoutOrder }}</p>
|
|
|
+ <p>{{ ObjectVlaue.addresseeName }} {{ ObjectVlaue.addresseePhone }}</p>
|
|
|
+ <p>{{ ObjectVlaue.addresseeProvince }} {{ ObjectVlaue.addresseeCity
|
|
|
+ }} {{ ObjectVlaue.addresseeCounty }}</p>
|
|
|
+ </div>
|
|
|
+ <div v-if="mailDetail.type == 2">
|
|
|
+ <p>{{ ObjectVlaue.inside_num }}</p>
|
|
|
+ <p>{{ ObjectVlaue.addressee_name }} {{ ObjectVlaue.addressee_phone }}</p>
|
|
|
+ <p>{{ ObjectVlaue.create_time }} </p>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <p>
|
|
|
- <template v-if="expressInfo.auditSt == 1">审核中</template>
|
|
|
- <template v-if="expressInfo.auditSt == 2">审核通过</template>
|
|
|
- <template v-if="expressInfo.auditSt == 3">审核拒绝</template>
|
|
|
- </p>
|
|
|
</div>
|
|
|
- <!-- <div class="fast">
|
|
|
- <p @click="showTxm">条形码</p>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="info">
|
|
|
- <img style="margin: 0 auto;display: block;" id="barcode"/>
|
|
|
-
|
|
|
- <p>秘钥:{{expressInfo.collectKey}}</p>
|
|
|
- <p>部门:{{expressInfo.costCenterName}}</p>
|
|
|
- <!-- <p>座位:{{expressInfo.sendSeat}}</p> -->
|
|
|
- <!-- <p>智能柜:{{expressInfo.cabinet}}</p> -->
|
|
|
- <p>快件类型:{{expressInfo.expressType}}</p>
|
|
|
- <p>收件人:{{expressInfo.receiver}}</p>
|
|
|
- <p>收件人手机:{{expressInfo.receiverPhone}}</p>
|
|
|
- <p>收件人地址:{{expressInfo.receiveAddress}}</p>
|
|
|
- <!-- <p>是否私人件:<template v-if="expressInfo.mainType == '个人件'">是</template><template v-else>否</template>
|
|
|
- </p>
|
|
|
- <p>是否问题件:{{expressInfo.isProblem}}</p>
|
|
|
- <p>是否已派件:<template v-if="expressInfo.expressStatus == 1">否</template><template v-if="expressInfo.expressStatus == 2">是</template>
|
|
|
- </p> -->
|
|
|
- <p>备注:{{expressInfo.remark}}</p>
|
|
|
- <img style="width: 4rem;height: 4rem;margin: 0 auto;display: block;" id="image" :src="qrcode">
|
|
|
- <div class="pjinfo" v-for="item in routeList">
|
|
|
- <p>{{item.acceptTime}} 【{{item.remark}}】 {{item.acceptAddress}}</p>
|
|
|
- </div>
|
|
|
+ <div class="info" v-if="mailDetail.type == 1">
|
|
|
+ <img style="margin: 0 auto;display: block;" id="barcode" />
|
|
|
+ <p>部门:{{ ObjectVlaue.addresseeAddress }}</p>
|
|
|
+ <p>收件人:{{ ObjectVlaue.addresseeName }}</p>
|
|
|
+ <p>收件人手机:{{ ObjectVlaue.addresseePhone }}</p>
|
|
|
+ <p>快件类型:{{ ObjectVlaue.expressType === 1 ? '文件' : '物品' }}</p>
|
|
|
+ <p>数量:{{ ObjectVlaue.expressNum }}</p>
|
|
|
+ <p>重量:{{ ObjectVlaue.expressWeight }}</p>
|
|
|
+ <p>省:{{ ObjectVlaue.addresseeProvince }}</p>
|
|
|
+ <p>市:{{ ObjectVlaue.addresseeCity }}</p>
|
|
|
+ <p>区:{{ ObjectVlaue.addresseeCounty }}</p>
|
|
|
+ <p>备注:{{ ObjectVlaue.expressRemark }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="info" v-if="mailDetail.type == '2'">
|
|
|
+ <img style="margin: 0 auto;display: block;" id="barcode" />
|
|
|
+ <p>部门:{{ ObjectVlaue.addressee_dept_name }}</p>
|
|
|
+ <p>收件人:{{ ObjectVlaue.addressee_name }}</p>
|
|
|
+ <p>收件人手机:{{ ObjectVlaue.addressee_phone }}</p>
|
|
|
+ <p>创建时间{{ ObjectVlaue.create_time }}</p>
|
|
|
+ <p>快件类型:{{ ObjectVlaue.express_type === 1 ? '文件' : '物品' }}</p>
|
|
|
+ <p>座位:{{ ObjectVlaue.addressee_seat_no }}</p>
|
|
|
+ <p>备注:{{ ObjectVlaue.express_remark }}</p>
|
|
|
</div>
|
|
|
- <van-popup v-model="txmShow">
|
|
|
- <van-image width="380" height="250" :src="txmUrl" />
|
|
|
- </van-popup>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import JsBarcode from 'jsbarcode'
|
|
|
- import QRCode from 'qrcode'
|
|
|
- import {Toast,Dialog} from 'vant'
|
|
|
- export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- titlename: "查快递",
|
|
|
- userId:'',
|
|
|
- id:'',
|
|
|
- expressInfo:{},
|
|
|
- qrcode:"",
|
|
|
- routeList:[],//路由信息
|
|
|
- txmShow:false,
|
|
|
- txmUrl:''
|
|
|
- }
|
|
|
- },
|
|
|
- created:function(){
|
|
|
- this.isLogin();
|
|
|
- this.userId = localStorage.getItem("userId");
|
|
|
- //获取参数
|
|
|
- this.id = this.$route.query.id
|
|
|
- this.getData();
|
|
|
+import { Toast, Dialog } from 'vant'
|
|
|
+import { findWithoutInfoById, findInsideInfoById } from '../api/index'
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ titlename: "查快递",
|
|
|
+ item: {},
|
|
|
+ mailDetail: {},//传过来的数据
|
|
|
+ id: '',
|
|
|
+ ObjectVlaue: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created: function () {
|
|
|
+ this.mailDetail = this.$route.query.mailDetail
|
|
|
+ this.id = this.mailDetail.id
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ if (this.mailDetail.type === '1') {
|
|
|
+ this.getFindWithoutInfoById()
|
|
|
+ } else if (this.mailDetail.type === '2') {
|
|
|
+ this.getFindInsideInfoById()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async getFindWithoutInfoById() {
|
|
|
+ const res = await findWithoutInfoById({ id: this.id })
|
|
|
+ this.ObjectVlaue = res.floorInfoById
|
|
|
+ console.log(res)
|
|
|
},
|
|
|
- methods:{
|
|
|
- showTxm(){
|
|
|
- // if(this.expressInfo.expressInfo == 2){
|
|
|
- // window.location.href = this.txmUrl;
|
|
|
- // }else{
|
|
|
- // this.txmShow = true;
|
|
|
- // }
|
|
|
- //无需判断
|
|
|
- this.txmShow = true;
|
|
|
- },
|
|
|
- makeQRCode(obj) {
|
|
|
- QRCode.toDataURL(obj).then(imgData => {
|
|
|
- if(imgData) {
|
|
|
- //console.log(imgData)
|
|
|
- this.qrcode=imgData
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- makeBarcode(obj){
|
|
|
- JsBarcode("#barcode",obj, {
|
|
|
- format: "CODE128", //选择要使用的条形码类型
|
|
|
- width: 2, //设置条之间的宽度
|
|
|
- height: 60, //高度
|
|
|
- displayValue: true, //是否在条形码下方显示文字
|
|
|
- text: obj, //覆盖显示的文本
|
|
|
- //fontOptions: "bold italic", //使文字加粗体或变斜体
|
|
|
- //font: "fantasy", //设置文本的字体
|
|
|
- textAlign: "center", //设置文本的水平对齐方式
|
|
|
- textPosition: "top", //设置文本的垂直位置
|
|
|
- textMargin: 1, //设置条形码和文本之间的间距
|
|
|
- fontSize: 16, //设置文本的大小
|
|
|
- //background: "#eee", //设置条形码的背景
|
|
|
- lineColor: "black", //设置条和文本的颜色。
|
|
|
- margin: 2 //设置条形码周围的空白边距
|
|
|
- });
|
|
|
- },
|
|
|
- onClickLeft(){
|
|
|
- this.$router.push({path:"/Search",query:{type:1}})
|
|
|
- },
|
|
|
- getData(){
|
|
|
- Toast.loading({
|
|
|
- message: '加载中...',
|
|
|
- forbidClick: true,
|
|
|
- duration:0
|
|
|
- });
|
|
|
- this.$http.post(this.$store.state.host+"/sendMail/getMailDetailById.do",{id:this.id},{emulateJSON:true})
|
|
|
- .then(res=>{
|
|
|
- //发送成功
|
|
|
- if(res.body.msg=='success'){
|
|
|
- this.expressInfo = res.body.mailInfo
|
|
|
- this.txmUrl = this.$store.state.host + "/" + res.body.mailInfo.sheetPdfPath
|
|
|
- this.makeQRCode(this.expressInfo.expressNo)
|
|
|
- this.makeBarcode(this.expressInfo.expressNo)
|
|
|
- this.getMailRoute()
|
|
|
- }
|
|
|
- Toast.clear()
|
|
|
- },res=>{
|
|
|
- //发送失败
|
|
|
- Toast("网络错误!")
|
|
|
- })
|
|
|
- Toast.clear()
|
|
|
- },
|
|
|
- //查询快递路由信息
|
|
|
- getMailRoute(){
|
|
|
- Toast.loading({
|
|
|
- message: '加载中...',
|
|
|
- forbidClick: true,
|
|
|
- duration:0
|
|
|
- });
|
|
|
- this.$http.post(this.$store.state.host+"/mailRoute/getMailRoute.do",{expressInfo:this.expressInfo.expressInfo,
|
|
|
- expressNo:this.expressInfo.expressNo},{emulateJSON:true})
|
|
|
- .then(res=>{
|
|
|
- //发送成功
|
|
|
- if(res.body.msg=='success'){
|
|
|
- this.routeList = res.body.routeList
|
|
|
- //console.log(res.body)
|
|
|
- }
|
|
|
- Toast.clear()
|
|
|
- },res=>{
|
|
|
- //发送失败
|
|
|
- Toast("网络错误!")
|
|
|
- })
|
|
|
- Toast.clear()
|
|
|
- }
|
|
|
+ async getFindInsideInfoById() {
|
|
|
+ const res = await findInsideInfoById({ id: this.id })
|
|
|
+ this.ObjectVlaue = res.floorInfoById
|
|
|
+ console.log(res)
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
- .content {
|
|
|
- padding: .2rem .33rem;
|
|
|
+.content {
|
|
|
+ padding: .2rem .33rem;
|
|
|
+ font-size: .3rem;
|
|
|
+
|
|
|
+ >p {
|
|
|
font-size: .3rem;
|
|
|
- >p{
|
|
|
- font-size: .3rem;
|
|
|
- text-align: center;
|
|
|
- margin-bottom: .2rem;
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: .2rem;
|
|
|
+ }
|
|
|
+
|
|
|
+ .info {
|
|
|
+ padding: .4rem;
|
|
|
+ background: white;
|
|
|
+ line-height: 200%;
|
|
|
+ color: #666666;
|
|
|
+
|
|
|
+ .pjinfo {
|
|
|
+ margin-top: .1rem;
|
|
|
+ border-top: .01rem solid #f0efef;
|
|
|
+ padding-top: .1rem;
|
|
|
}
|
|
|
- .info {
|
|
|
- padding: .4rem;
|
|
|
+ }
|
|
|
+
|
|
|
+ .jjlist {
|
|
|
+ font-size: .3rem;
|
|
|
+ color: #999999;
|
|
|
+
|
|
|
+ .listinfo {
|
|
|
background: white;
|
|
|
- line-height: 200%;
|
|
|
- color: #666666;
|
|
|
+ padding: .33rem .33rem .2rem;
|
|
|
+ border-radius: .05rem;
|
|
|
+ margin-bottom: .2rem;
|
|
|
+ position: relative;
|
|
|
|
|
|
- .pjinfo {
|
|
|
- margin-top: .1rem;
|
|
|
- border-top: .01rem solid #f0efef;
|
|
|
- padding-top: .1rem;
|
|
|
- }
|
|
|
- }
|
|
|
+ .list_top {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
- .jjlist {
|
|
|
- font-size: .3rem;
|
|
|
- color: #999999;
|
|
|
+ .list_top_left {
|
|
|
+ img {
|
|
|
+ display: inline-block;
|
|
|
+ width: .9rem;
|
|
|
+ height: .9rem;
|
|
|
+ position: relative;
|
|
|
+ top: -.1rem;
|
|
|
+ }
|
|
|
|
|
|
- .listinfo {
|
|
|
- background: white;
|
|
|
- padding: .33rem .33rem .2rem;
|
|
|
- border-radius: .05rem;
|
|
|
- margin-bottom: .2rem;
|
|
|
- position: relative;
|
|
|
- .list_top {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
+ div {
|
|
|
+ width: 4rem;
|
|
|
+ margin-left: .2rem;
|
|
|
+ display: inline-block;
|
|
|
+ line-height: 150%;
|
|
|
|
|
|
- .list_top_left {
|
|
|
- img {
|
|
|
- display: inline-block;
|
|
|
- width: .9rem;
|
|
|
- height: .9rem;
|
|
|
- position: relative;
|
|
|
- top: -.1rem;
|
|
|
+ p:nth-of-type(1) {
|
|
|
+ font-size: .3rem;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333;
|
|
|
}
|
|
|
|
|
|
- div {
|
|
|
- width: 4rem;
|
|
|
- margin-left: .2rem;
|
|
|
- display: inline-block;
|
|
|
- line-height: 150%;
|
|
|
|
|
|
- p:nth-of-type(1) {
|
|
|
- font-size: .3rem;
|
|
|
- font-weight: bold;
|
|
|
- color: #333;
|
|
|
- }
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- p:nth-of-type(3) {
|
|
|
- font-size: .2rem;
|
|
|
- }
|
|
|
+ p:nth-of-type(3) {
|
|
|
+ font-size: .2rem;
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- >p {
|
|
|
- font-size: .24rem;
|
|
|
- color: #f5693d;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
+ >p {
|
|
|
+ font-size: .24rem;
|
|
|
+ color: #f5693d;
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
|
- .fast{
|
|
|
- //background: url(../assets/images/status.png) no-repeat center;
|
|
|
- background-color: #00c4b8;
|
|
|
- background-size: 100% 100%;
|
|
|
- color: white;
|
|
|
- position: absolute;
|
|
|
- bottom: 0px;
|
|
|
- right: 0px;
|
|
|
- width: 1.1rem;
|
|
|
- height: .5rem;
|
|
|
- text-align: center;
|
|
|
- line-height: .5rem;
|
|
|
- font-size: .2rem;
|
|
|
- }
|
|
|
-
|
|
|
}
|
|
|
+
|
|
|
+ .fast {
|
|
|
+ //background: url(../assets/images/status.png) no-repeat center;
|
|
|
+ background-color: #00c4b8;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ color: white;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0px;
|
|
|
+ right: 0px;
|
|
|
+ width: 1.1rem;
|
|
|
+ height: .5rem;
|
|
|
+ text-align: center;
|
|
|
+ line-height: .5rem;
|
|
|
+ font-size: .2rem;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- /deep/ .van-nav-bar__content{
|
|
|
- .van-nav-bar__title{
|
|
|
- font-size: 16px;
|
|
|
- }
|
|
|
- }
|
|
|
- /deep/.van-icon-arrow-left::before{
|
|
|
- color: #333;
|
|
|
- font-size: 16px;
|
|
|
- }
|
|
|
- /deep/.van-nav-bar__text{
|
|
|
- color: #333 !important;
|
|
|
- font-size: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .van-nav-bar__content {
|
|
|
+ .van-nav-bar__title {
|
|
|
+ font-size: 16px;
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+/deep/.van-icon-arrow-left::before {
|
|
|
+ color: #333;
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/.van-nav-bar__text {
|
|
|
+ color: #333 !important;
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
</style>
|