diff --git a/components/logistiComptent/logistiCard/logistiCard.vue b/components/logistiComptent/logistiCard/logistiCard.vue index bd85982..e20890e 100644 --- a/components/logistiComptent/logistiCard/logistiCard.vue +++ b/components/logistiComptent/logistiCard/logistiCard.vue @@ -9,42 +9,34 @@

{{goodsInfo.user_name}}

联系方式 :{{goodsInfo.shop_phone}} 联系方式 :{{goodsInfo.user_phone}} + + - - - 商家地址 - - - 用户地址 - - - 订单编号 - - - 采购商品 - + + 商家地址 + {{goodsInfo.shop_address}} - - - {{goodsInfo.shop_address}} - - - {{goodsInfo.user_address}} - - - {{goodsInfo.order_sn}} - + + 用户地址 + {{goodsInfo.user_address}} + + + 订单编号 + {{goodsInfo.order_sn}} + + + 采购商品 - {{item.goods_name}} - X{{item.product_num}}{{item.goods_unit}} + {{item.goods_name}} + X{{item.product_num}}{{item.goods_unit}} + - + + + @@ -53,11 +45,9 @@ 联系方式 {{goodsInfo.user_phone}} + - 收货时间 {{goodsInfo.xd_time||"暂未收货"}} - - - 送达时间 {{pst_time||"暂未送达"}} + 送达时间 {{goodsInfo.ps_time||"暂未送达"}} 取货时间 {{goodsInfo.qh_time||"暂未取货"}} @@ -74,16 +64,17 @@ :closeOnClickOverlay="true"> --> - + - 扫码取货 已送达 查看详情 + @@ -103,6 +94,7 @@ flag: undefined, showPop: false, take_code: "", + showKeybord: false, // popContent: ["请确认已经收到货", "请确认已送达"] } }, @@ -122,6 +114,10 @@ } }, methods: { + test() { + // console.log(666) + uni.hideKeyboard() + }, goDetil() { let status = this.goodsInfo.status uni.navigateTo({ @@ -153,6 +149,9 @@ }, confirm() { + if (!this.take_code) { + return + } this.doneGood() this.showPop = false this.showMore() @@ -218,14 +217,7 @@ border-radius: 0 7px 0 7px; } - .goods_tit { - width: 60vw; - text-overflow: ellipsis; - overflow: hidden; - word-break: break-all; - white-space: nowrap; - } p { font-family: "PingFang SC-Medium"; @@ -240,35 +232,53 @@ } .content_box { - display: flex; - justify-content: space-between; margin: 15rpx 0; - .left { - flex: 1; - color: #999999; + view { + display: flex; + margin: 10rpx 0; + + text:first-child { + color: #999; + } } - .right { - flex: 4; + .products { + display: block; + + .tit { + color: #999; + + float: left; + margin: 0 + } .product { - margin: 10rpx 0; + width: 65vw; display: flex; justify-content: space-between; - } + margin-left: 18vw; + + + .left { + color: black; + width: 55vw; + margin: 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + } + - .icon_a { - /* transform: translateX(180deg); */ - transform: rotate(90deg); - display: inline-block; - /* font-family: ; */ } } + } + .cil_left { width: 30rpx; height: 30rpx; diff --git a/pages/logistics/deliveryDetil.vue b/pages/logistics/deliveryDetil.vue index b019e81..31d51ff 100644 --- a/pages/logistics/deliveryDetil.vue +++ b/pages/logistics/deliveryDetil.vue @@ -5,18 +5,25 @@ + - + + +

订单号: {{goodsDetil.logistics.order_sn}}

商户名称 {{goodsDetil.logistics.shop_name}} + + 联系电话 {{goodsDetil.logistics.shop_phone}} + {{goodsDetil.logistics.shop_address}} @@ -75,20 +82,45 @@ latitude: undefined, longitude: undefined, markers: [{ + id: 1, latitude: undefined, longitude: undefined, - iconPath: '@/static/images/daoru.png', //显示的图标 - width: 40, //宽 - height: 40, //高 - title: '商家位置', //标注点名 - alpha: 0.5, //透明度 - + iconPath: '../../static/tabs-icon/home-a.png', //显示的图标 }], - - } }, methods: { + // 唤起高德 + test() { + var packageName = 'com.autonavi.minimap'; + var main = plus.android.runtimeMainActivity(); + var packageManager = main.getPackageManager(); + var PackageManager = plus.android.importClass(packageManager) + var packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); + if (packageInfo) { + var Uri = plus.android.importClass("android.net.Uri"); + var url = + `amapuri://route/plan?sourceApplication=maxuslife+ + &sid=A&slat=36.702558&slon=116.876678&sname=我的位置&did=B&dlat=${this.markers[0].latitude}&dlon=${this.markers[0].longitude}&dname=${this.goodsDetil.logistics.shop_name}&dev=0&t=0`; + var Intent = plus.android.importClass('android.content.Intent'); + var intent = new Intent(); + intent.setAction(Intent.ACTION_VIEW); + intent.addCategory(Intent.CATEGORY_DEFAULT); + var uri = Uri.parse(url); + //将功能Scheme以URI的方式传入data + intent.setData(uri); + intent.setPackage("com.autonavi.minimap"); + var main = plus.android.runtimeMainActivity(); + main.startActivity(intent); + } else { + // alert('未安装' + packageName + '') + uni.showToast({ + title: `只支持高德地图`, + icon: 'none' + }) + } + console.log("唤醒高德线路规划") + }, showToast() { this.$refs.uToast.show({ type: 'success', @@ -107,7 +139,6 @@ }); }, showToast() { - // 6 this.$refs.uToast.show({ type: 'success', title: '成功主题(带图标)', @@ -120,7 +151,6 @@ uni.scanCode({ onlyFromCamera: true, success: function(res) { - console.log("扫码类容" + res.result) that.takeGood(res.result) } }); @@ -141,19 +171,19 @@ }) }, - // 取货{} - // takeGood() { - // takeGoods({ - // logistics_id: this.goodsDetil.logistics.id, - // order_id: this.goodsDetil.logistics.order_id, - // order_sn: 'wxo1691655309361543421' - // }).then(res => { - // this.$emit('showTost') - // this.$emit('getlist') - // }) - // }, - // 地图结束 + getLocation() { + uni.getLocation({ + type: 'wgs84', + success: function(res) { + console.log('当前位置的经度:' + res.longitude); + console.log('当前位置的纬度:' + res.latitude); + } + }); + + } + + }, onLoad(options) { getDetil({ @@ -168,7 +198,14 @@ this.showLoading = false }, 500) }) + + }, + + + + + } @@ -176,9 +213,20 @@ .map { height: 40vh; width: 100vw; + position: relative; + } + .map_btn { + width: 50px; + height: 50px; + + position: absolute; + bottom: 0px; + right: 0; + z-index: 9999999; + } .custom-style { width: 100%; @@ -196,6 +244,7 @@ transform: translateY(-5vh); padding: 5vh 3vw; box-sizing: border-box; + position: relative; .tit { font-weight: bold; diff --git a/pages/logistics/index.vue b/pages/logistics/index.vue index 14429ff..f15d27f 100644 --- a/pages/logistics/index.vue +++ b/pages/logistics/index.vue @@ -1,6 +1,5 @@