物流板块页面完善

This commit is contained in:
THK3121 2023-08-09 09:11:05 +08:00
parent 8e88c21e94
commit 84c9fee1e1
12 changed files with 2738 additions and 1139 deletions

16
api/logistics.js Normal file
View File

@ -0,0 +1,16 @@
import oahttp from "@/utils/logistics.js";
/**
* 订单列表
*/
export const getList = (data) => oahttp.get('/courierLstData', data)
// 订单详情
export const getDetil = (data) => oahttp.get('/lstDetail', data)
// 取货
export const takeGoods = (data) => oahttp.post('/takeGoods', data)
// 送达
export const doneDelivery = (data) => oahttp.post('/doneDelivery', data)
/**
* 更新商机
*/
export const informationOpportunityUpdate = (data) => oahttp.post('/information/opportunity_update', data)

View File

@ -0,0 +1,72 @@
<template>
<view class="card" @click="goDetil(goodsInfo.id)">
<u-button type="primary" class="custom-style" style="background-color: #34A853;"
v-if='goodsInfo.status==0'>待取货</u-button>
<u-button type="primary" class="custom-style" v-if='goodsInfo.status==1'>待送货</u-button>
<p>{{goodsInfo.shop_name}}</p>
<view class="address">地址:&nbsp;&nbsp;{{goodsInfo.shop_address}}</view>
<view class="date">日期:&nbsp;&nbsp;{{goodsInfo.create_time}}</view>
</view>
</template>
<script>
import {
navigateTo
} from '../../../libs/uniApi'
export default {
props: ['goodsInfo'],
data() {
return {
}
},
mounted() {
console.log(this.goodsInfo)
},
methods: {
goDetil(id) {
uni.navigateTo({
url: `/pages/logistics/deliveryDetil?id=${id}`,
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss" scoped>
.card {
width: 92vw;
height: AUTO;
background-color: #fff;
border-radius: 1vw;
position: relative;
padding: 2vh 2vw;
margin: 0 0 20rpx 0;
.custom-style {
border: 0;
width: 20vw;
position: absolute;
top: 0;
right: 0;
height: 4vh;
border-radius: 0 7px 0 7px;
}
P {
font-size: 32rpx;
font-weight: bold;
}
.address {
font-weight: bold;
margin: 15rpx 0;
}
}
</style>

View File

@ -0,0 +1,264 @@
<template>
<view class="order">
<!-- <u-notify message="成功" duration="2000" show="true"></u-notify> -->
<view v-if='goodsInfo.status !==2'>
<view class="" @click="goDetil">
<p>{{goodsInfo.shop_name}}</p>
<view class='phone'>联系方式 :{{goodsInfo.shop_phone}} </view>
<view class="content_box">
<view class="left">
<view class="">
商家地址
</view>
<view style="margin: 20rpx 0;">
订单编号
</view>
<view class="">
采购商品
</view>
</view>
<view class="right">
<view class="goods_tit">
{{goodsInfo.shop_address}}
</view>
<view style="margin: 20rpx 0;">
{{goodsInfo.order_sn}}
</view>
<view class='product' v-for="(item,index) in list" :key="index">
<text class="goods_tit">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text>
</view>
</view>
</view>
</view>
<view class="icon" @click='getMore' v-if="flag">
<image style="width: 70rpx;height: 70rpx;text-align: center;" src="@/static/img/logistics/more.png"
alt="">
</view>
</view>
<view v-else class='finishOrder' @click="goDetil">
<view>
<text style="color:#999">订单编号</text> <text> {{goodsInfo.order_sn}}</text>
</view>
<view class="phone">
<text style="color:#999">联系方式</text> {{goodsInfo.user_phone}}
</view>
<view style="margin: 20rpx 0;">
<text style="color:#999">收货时间</text> {{goodsInfo.xd_time||"无"}}
</view>
<view style="margin: 20rpx 0;">
<text style="color:#999">送达时间</text> {{goodsInfo.pc_time||"无"}}
</view>
<view style="margin: 20rpx 0;">
<text style="color:#999">取货时间</text> {{goodsInfo.qh_time||"无"}}
</view>
</view>
<view class="total">
共计{{goodsInfo.product_count}}件商品
</view>
<view class="cil_left">
</view>
<view class="cil_right">
</view>
<u-modal :show="showPop" @confirm="confirm" :content="popContent[goodsInfo.status]" @close="showPop=false"
:closeOnClickOverlay="true"></u-modal>
<u-button type="primary" @click="showPop = true" v-if='goodsInfo.status==0'>已取货</u-button>
<u-button type="primary" @click="showPop = true" style="background-color: #34A853;border: none;"
v-if='goodsInfo.status==1'>已送达</u-button>
<u-button type="primary" @click="goDetil" style="background-color: red;border:none"
v-if='goodsInfo.status==2'>查看详情</u-button>
</view>
</template>
<script scoped>
import {
takeGoods,
doneDelivery
} from "@/api/logistics.js"
export default {
props: ['goodsInfo'],
data() {
return {
tost: 0,
list: [],
flag: undefined,
showPop: false,
popContent: ["请确认已经收到货", "请确认已送达"]
}
},
methods: {
goDetil() {
let status = this.goodsInfo.status
uni.navigateTo({
url: `/pages/logistics/${status==0?"deliveryDetil":"logisticDetil"}?id=${this.goodsInfo.id}`
})
},
//
takeGood() {
takeGoods({
user_id: this.goodsInfo.courier_id,
logistics_id: this.goodsInfo.id
})
},
async confirm() {
await this.goodsInfo.status == 0 ? this.takeGood() : this.doneGood()
this.showPop = false
this.tost = true
this.$emit('getlist')
},
//
doneGood() {
doneDelivery({
user_id: this.goodsInfo.courier_id,
// user_id: 167,
logistics_id: this.goodsInfo.id
})
},
showMore() {
if (this.goodsInfo.products.length <= 3) {
this.list = this.goodsInfo.products
} else {
this.flag = true
for (let i = 0; i < 3; i++) {
this.list.push(this.goodsInfo.products[i])
}
}
},
getMore() {
if (this.flag) {
for (let i = 3; i < this.goodsInfo.products.length; i++) {
this.list.push(this.goodsInfo.products[i])
}
this.flag = false
}
}
},
mounted() {
this.showMore()
}
}
</script>
<style lang='scss' scoped>
.order {
position: relative;
background-color: white;
margin: 20rpx 0;
border-radius: 15rpx;
height: auto;
padding: 2vh 3vw;
box-sizing: border-box;
.custom-style {
border: 0;
width: 25vw;
position: absolute;
top: 0;
right: 0;
height: 4vh;
border-radius: 0 7px 0 7px;
}
.goods_tit {
width: 60vw;
color: red;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
white-space: nowrap;
}
p {
font-family: "PingFang SC-Medium";
font-size: 32rpx;
font-weight: bold;
}
.phone {
color: #999999;
padding: 10rpx 0;
border-bottom: 1px dashed blue;
}
.content_box {
display: flex;
justify-content: space-between;
margin: 15rpx 0;
.left {
flex: 1;
color: #999999;
}
.right {
flex: 4;
.product {
margin: 10rpx 0;
display: flex;
justify-content: space-between;
}
.icon_a {
/* transform: translateX(180deg); */
transform: rotate(90deg);
display: inline-block;
/* font-family: ; */
}
}
}
.cil_left {
width: 30rpx;
height: 30rpx;
background-color: #F5F5F5;
border-radius: 30rpx;
position: absolute;
top: 110rpx;
left: -15rpx;
}
.cil_right {
width: 30rpx;
height: 30rpx;
background-color: #F5F5F5;
border-radius: 30rpx;
position: absolute;
top: 110rpx;
right: -15rpx;
}
.total {
text-align: right;
color: #3274F9;
font-weight: bold;
font-size: 32rpx;
margin: 20rpx 0;
}
.icon {
text-align: center;
}
}
.finishOrder {
text {
display: inline-block;
margin-right: 30rpx
}
}
</style>

View File

@ -1,144 +1,160 @@
{
"name" : "供销综合平台",
"appid" : "__UNI__B5B1EDD",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {
"Payment" : {},
"Barcode" : {},
"Camera" : {}
},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios" : {
"dSYMs" : false
},
/* SDK */
"sdkConfigs" : {
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wx4789d9f1b50390ba",
"UniversalLinks" : ""
}
},
"ad" : {}
},
"splashscreen" : {
"useOriginalMsgbox" : true
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* */
"quickapp" : {},
"h5" : {
"devServer" : {
"proxy" : {
"baseUrlTest/adminapi" : {
"target" : "https://worker-task.lihaink.cn",
"changeOrigin" : true,
"pathRewrite" : {
"^/baseUrlTest/adminapi" : "/adminapi"
}
},
"baseUrlTest/api" : {
"target" : "https://worker-task.lihaink.cn",
"changeOrigin" : true,
"pathRewrite" : {
"^/baseUrlTest/api" : "/api"
}
}
}
}
},
/* */
"mp-weixin" : {
"appid" : "wx6e14cb98394e36bc",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2"
}
"name": "供销综合平台",
"appid": "__UNI__B5B1EDD",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
/* 5+App */
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* */
"modules": {
"Payment": {},
"Barcode": {},
"Camera": {},
"Maps": {}
},
/* */
"distribute": {
/* android */
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios": {
"dSYMs": false
},
/* SDK */
"sdkConfigs": {
"payment": {
"weixin": {
"__platform__": ["ios", "android"],
"appid": "wx4789d9f1b50390ba",
"UniversalLinks": ""
}
},
"ad": {},
"maps": {
"amap": {
"appkey_ios": "0799f37420c0784f1e6cba230a68bdb1",
"appkey_android": "0799f37420c0784f1e6cba230a68bdb1"
}
}
},
"splashscreen": {
"useOriginalMsgbox": true
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* */
"quickapp": {},
"h5": {
"devServer": {
"proxy": {
"baseUrlTest/adminapi": {
"target": "https://worker-task.lihaink.cn",
"changeOrigin": true,
"pathRewrite": {
"^/baseUrlTest/adminapi": "/adminapi"
}
},
"baseUrlTest/api": {
"target": "https://worker-task.lihaink.cn",
"changeOrigin": true,
"pathRewrite": {
"^/baseUrlTest/api": "/api"
}
}
}
},
"sdkConfigs": {
"maps": {
"amap": {
"key": "275cd3601b1b2d6414f6c988e7911664",
"securityJsCode": "d2d7c56801819e8bdf71b8a71846f235",
"serviceHost": ""
}
}
}
},
/* */
"mp-weixin": {
"appid": "wx6e14cb98394e36bc",
"setting": {
"urlCheck": false
},
"usingComponents": true
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false
},
"vueVersion": "2"
}

View File

@ -1,484 +1,521 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/oaHome/oaHome",
"style": {
"navigationBarTitleText": "首页",
"enablePullDownRefresh": true,
"app-plus": {
"titleNView": false
}
}
},
{
"path": "pages/oaLogin/oaLogin",
"style": {
"navigationBarTitleText": "登录",
"app-plus": {
"titleNView": false
}
}
{
"path": "pages/oaHome/oaHome",
"style": {
"navigationBarTitleText": "首页",
"enablePullDownRefresh": true,
"app-plus": {
"titleNView": false
}
}
},
{
"path": "pages/oaLogin/oaLogin",
"style": {
"navigationBarTitleText": "登录",
"app-plus": {
"titleNView": false
}
}
},
{
"path": "pages/business/business",
"style": {
"navigationBarTitleText": "商机信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/business/business",
"style": {
"navigationBarTitleText": "商机信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/oaExamine/oaExamine",
"style": {
"navigationBarTitleText": "审批",
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/oaTask/oaTask",
"style": {
"navigationBarTitleText": "今日任务",
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/oaMy/oaMy",
"style": {
"navigationBarTitleText": "我的",
"app-plus": {
"titleNView": false
}
}
}, {
"path": "pages/oaManager/oaManager",
"style": {
"navigationBarTitleText": "片区经理",
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/oaExamine/oaExamine",
"style": {
"navigationBarTitleText": "审批",
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/oaTask/oaTask",
"style": {
"navigationBarTitleText": "今日任务",
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/oaMy/oaMy",
"style": {
"navigationBarTitleText": "我的",
"app-plus": {
"titleNView": false
}
}
}, {
"path": "pages/oaManager/oaManager",
"style": {
"navigationBarTitleText": "片区经理",
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/oaNews/oaNews",
"style": {
"navigationBarTitleText": "公告详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/oaNews/oaNews",
"style": {
"navigationBarTitleText": "公告详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}
],
"subPackages": [{
"root": "pages/views",
"name": "views",
"pages": [{
"path": "application",
"style": {
"navigationBarTitleText": "地图首页",
"enablePullDownRefresh": false
}
},
{
"path": "new_task",
"style": {
"navigationBarTitleText": "新建任务",
"enablePullDownRefresh": false
}
},
{
"path": "com_approve",
"style": {
"navigationBarTitleText": "通用审批",
"enablePullDownRefresh": false
}
}, {
"path": "personal_center",
"style": {
"navigationBarTitleText": "个人中心1",
"enablePullDownRefresh": false
}
}, {
"path": "pages/logistics/index",
"style": {
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "task_details",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/logistics/logisticDetil",
"style": {
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "personal_center_two",
"style": {
"navigationBarTitleText": "个人中心2",
"enablePullDownRefresh": false
}
}, {
"path": "pages/logistics/t",
"style": {
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "public_document",
"style": {
"navigationBarTitleText": "公司公示文档",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/logistics/deliveryDetil",
"style": {
"navigationBarTitleText": "配送信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "leave_request",
"style": {
"navigationBarTitleText": "请假申请",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}
}
]
}, {
"root": "subpkg",
"name": "subpkg",
"pages": [{
"path": "personnel/personnel",
"style": {
"navigationBarTitleText": "人员管理",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
],
"subPackages": [{
"root": "pages/views",
"name": "views",
"pages": [{
"path": "application",
"style": {
"navigationBarTitleText": "地图首页",
"enablePullDownRefresh": false
}
},
{
"path": "new_task",
"style": {
"navigationBarTitleText": "新建任务",
"enablePullDownRefresh": false
}
},
{
"path": "com_approve",
"style": {
"navigationBarTitleText": "通用审批",
"enablePullDownRefresh": false
}
}, {
"path": "personal_center",
"style": {
"navigationBarTitleText": "个人中心1",
"enablePullDownRefresh": false
}
}, {
"path": "finance/finance",
"style": {
"navigationBarTitleText": "财务管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "task_details",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "topUp/topUp",
"style": {
"navigationBarTitleText": "账户充值",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": {
"buttons": [{
"color": "#fff",
"text": "充值记录",
"fontSize": "15",
"width": "90"
}]
}
}
}
}, {
"path": "personal_center_two",
"style": {
"navigationBarTitleText": "个人中心2",
"enablePullDownRefresh": false
}
}, {
"path": "contract/contract",
"style": {
"navigationBarTitleText": "合同管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "public_document",
"style": {
"navigationBarTitleText": "公司公示文档",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "contractDetail/contractDetail",
"style": {
"navigationBarTitleText": "合同详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "leave_request",
"style": {
"navigationBarTitleText": "请假申请",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "pdfView/pdfView",
"style": {
"navigationBarTitleText": "合同内容",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}
]
}, {
"root": "subpkg",
"name": "subpkg",
"pages": [{
"path": "personnel/personnel",
"style": {
"navigationBarTitleText": "人员管理",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyInfo/companyInfo",
"style": {
"navigationBarTitleText": "公司信息",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "finance/finance",
"style": {
"navigationBarTitleText": "财务管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "companySign/companySign",
"style": {
"navigationBarTitleText": "签约公司详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "topUp/topUp",
"style": {
"navigationBarTitleText": "账户充值",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": {
"buttons": [{
"color": "#fff",
"text": "充值记录",
"fontSize": "15",
"width": "90"
}]
}
}
}
}, {
"path": "personnelDetails/personnelDetails",
"style": {
"navigationBarTitleText": "人员详细信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "contract/contract",
"style": {
"navigationBarTitleText": "合同管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "orderDetail/orderDetail",
"style": {
"navigationBarTitleText": "流水详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "contractDetail/contractDetail",
"style": {
"navigationBarTitleText": "合同详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "withdrawDeposit/withdrawDeposit",
"style": {
"navigationBarTitleText": "提现余额",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": {
"buttons": [{
"color": "#fff",
"text": "提现记录",
"fontSize": "15",
"width": "90"
}]
}
}
}
}, {
"path": "withdrawList/withdrawList",
"style": {
"navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "pdfView/pdfView",
"style": {
"navigationBarTitleText": "合同内容",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "noticeList/noticeList",
"style": {
"navigationBarTitleText": "公告列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyInfo/companyInfo",
"style": {
"navigationBarTitleText": "公司信息",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "topUpList/topUpList",
"style": {
"navigationBarTitleText": "充值记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "companySign/companySign",
"style": {
"navigationBarTitleText": "签约公司详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyAdmin/companyAdmin",
"style": {
"navigationBarTitleText": "公司管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "personnelDetails/personnelDetails",
"style": {
"navigationBarTitleText": "人员详细信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "newPersonnel/newPersonnel",
"style": {
"navigationBarTitleText": "新增人员",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "orderDetail/orderDetail",
"style": {
"navigationBarTitleText": "流水详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "archives/archives",
"style": {
"navigationBarTitleText": "档案管理",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "withdrawDeposit/withdrawDeposit",
"style": {
"navigationBarTitleText": "提现余额",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": {
"buttons": [{
"color": "#fff",
"text": "提现记录",
"fontSize": "15",
"width": "90"
}]
}
}
}
}, {
"path": "withdrawList/withdrawList",
"style": {
"navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "newArchives/newArchives",
"style": {
"navigationBarTitleText": "信息登记",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "noticeList/noticeList",
"style": {
"navigationBarTitleText": "公告列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "updateArchives/updateArchives",
"style": {
"navigationBarTitleText": "信息更新",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "topUpList/topUpList",
"style": {
"navigationBarTitleText": "充值记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "fixedAssets/fixedAssets",
"style": {
"navigationBarTitleText": "固定资产",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyAdmin/companyAdmin",
"style": {
"navigationBarTitleText": "公司管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "taskAdmin/taskAdmin",
"style": {
"navigationBarTitleText": "任务管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "newPersonnel/newPersonnel",
"style": {
"navigationBarTitleText": "新增人员",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "archivesDetail/archivesDetail",
"style": {
"navigationBarTitleText": "档案详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "archives/archives",
"style": {
"navigationBarTitleText": "档案管理",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "captain/captain",
"style": {
"navigationBarTitleText": "队长列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "newArchives/newArchives",
"style": {
"navigationBarTitleText": "信息登记",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyFinance/companyFinance",
"style": {
"navigationBarTitleText": "公司财务",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "updateArchives/updateArchives",
"style": {
"navigationBarTitleText": "信息更新",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyUnsign/companyUnsign",
"style": {
"navigationBarTitleText": "未签约公司列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "fixedAssets/fixedAssets",
"style": {
"navigationBarTitleText": "固定资产",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "submit/submit",
"style": {
"navigationBarTitleText": "提交审核",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "taskAdmin/taskAdmin",
"style": {
"navigationBarTitleText": "任务管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "dispatching/dispatching",
"style": {
"navigationBarTitleText": "任务:宣传配送",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "archivesDetail/archivesDetail",
"style": {
"navigationBarTitleText": "档案详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "blockTransaction/blockTransaction",
"style": {
"navigationBarTitleText": "任务:片区交易",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "captain/captain",
"style": {
"navigationBarTitleText": "队长列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "fileTask/fileTask",
"style": {
"navigationBarTitleText": "任务:档案更新",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyFinance/companyFinance",
"style": {
"navigationBarTitleText": "公司财务",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}]
}],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#282828",
"selectedColor": "#3175f9",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/oaHome/oaHome",
"text": "首页",
"iconPath": "/static/tabs-icon/home.png",
"selectedIconPath": "/static/tabs-icon/home-a.png"
},
{
"pagePath": "pages/oaExamine/oaExamine",
"text": "审批",
"iconPath": "/static/tabs-icon/Task.png",
"selectedIconPath": "/static/tabs-icon/Task-a.png"
},
{
"pagePath": "pages/oaTask/oaTask",
"text": "任务",
"iconPath": "/static/tabs-icon/approval.png",
"selectedIconPath": "/static/tabs-icon/approval-a.png"
},
// {
// "pagePath": "pages/oaManager/oaManager",
// "text": "片区经理",
// "iconPath": "/static/tabs-icon/manager.png",
// "selectedIconPath": "/static/tabs-icon/manager-a.png"
// },
{
"pagePath": "pages/business/business",
"text": "商机",
"iconPath": "/static/tabs-icon/manager.png",
"selectedIconPath": "/static/tabs-icon/manager-a.png"
},
{
"pagePath": "pages/oaMy/oaMy",
"text": "我的",
"iconPath": "/static/tabs-icon/my.png",
"selectedIconPath": "/static/tabs-icon/my-a.png"
}
]
},
"uniIdRouter": {}
}, {
"path": "companyUnsign/companyUnsign",
"style": {
"navigationBarTitleText": "未签约公司列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "submit/submit",
"style": {
"navigationBarTitleText": "提交审核",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "dispatching/dispatching",
"style": {
"navigationBarTitleText": "任务:宣传配送",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "blockTransaction/blockTransaction",
"style": {
"navigationBarTitleText": "任务:片区交易",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "fileTask/fileTask",
"style": {
"navigationBarTitleText": "任务:档案更新",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}]
}],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#282828",
"selectedColor": "#3175f9",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/oaHome/oaHome",
"text": "首页",
"iconPath": "/static/tabs-icon/home.png",
"selectedIconPath": "/static/tabs-icon/home-a.png"
},
{
"pagePath": "pages/oaExamine/oaExamine",
"text": "审批",
"iconPath": "/static/tabs-icon/Task.png",
"selectedIconPath": "/static/tabs-icon/Task-a.png"
},
{
"pagePath": "pages/oaTask/oaTask",
"text": "任务",
"iconPath": "/static/tabs-icon/approval.png",
"selectedIconPath": "/static/tabs-icon/approval-a.png"
},
// {
// "pagePath": "pages/oaManager/oaManager",
// "text": "片区经理",
// "iconPath": "/static/tabs-icon/manager.png",
// "selectedIconPath": "/static/tabs-icon/manager-a.png"
// },
{
"pagePath": "pages/business/business",
"text": "商机",
"iconPath": "/static/tabs-icon/manager.png",
"selectedIconPath": "/static/tabs-icon/manager-a.png"
},
{
"pagePath": "pages/oaMy/oaMy",
"text": "我的",
"iconPath": "/static/tabs-icon/my.png",
"selectedIconPath": "/static/tabs-icon/my-a.png"
}
]
},
"uniIdRouter": {}
}

View File

@ -0,0 +1,352 @@
<template>
<view class="content">
<view class="map">
<map id="map" :markers='markers' :scale="scale" :enable-zoom="true" :polyline="polyline"
style="width:100%;height: 100%;" :latitude="latitude" :enable-scroll="false"
:longitude="longitude"></map>
</view>
<view class="order_info">
<u-modal :show="showPop" @confirm="confirm" content="56565撒大苏打撒旦" @close="showPop=false"
:closeOnClickOverlay="true"></u-modal>
<button @click="getDriverLine">线路规划</button>
<p class='tit'>订单号: {{goodsDetil.logistics.order_sn}}</p>
<view class="store_name">
商户名称 {{goodsDetil.logistics.shop_name}}
</view>
<view class="store_time">
{{goodsDetil.logistics.shop_address}}
</view>
<view class="tit_a">
<text>物流信息</text>
</view>
<view class="info" v-for="(item,index) in goodsDetil.record">
<view style="margin: 20rpx 0;">
{{item.content }}
</view>
<view style="margin: 20rpx 0;">
{{item.create_time }}
</view>
</view>
<view class="pro_info">
<view style="color: #999; flex:1">
商品信息
</view>
<view style="flex:4">
<view v-for="(item,index) in goodsDetil.product" class="goods_tit">
<text style="width: 60vw;">{{item.goods_name}}</text>
<text style="float: right;">X{{item.product_num}}{{item.goods_unit}}</text>
</view>
</view>
</view>
<view class="total">
共计{{goodsDetil.product_count}}件商品
</view>
<u-button type="primary" v-if='goodsDetil.logistics.status==0' @click="showPop=true"
class="custom-style">已取货</u-button>
</view>
</view>
</template>
<script>
import {
getDetil
} from "@/api/logistics.js"
import {
takeGoods
} from "@/api/logistics.js"
export default {
data() {
return {
showPop: false,
goodsDetil: undefined,
scale: 17,
latitude: 28.908854,
longitude: 105.43639400000002,
markers: [],
polyline: [],
// https://p4.itc.cn/images03/20200518/90137c12bbac485dbc5bb0fe9d8cf4bd.jpeg
// https://t9.baidu.com/it/u=414099140,1072313909&fm=193
// mark: [{
// id: 0,
// latitude: 28.908854,
// longitude: 105.43639400000002,
// iconPath: 'https://img2.baidu.com/it/u=3116155797,2219949885&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', //
// width: 40, //
// height: 40, //
// title: '', //
// alpha: 0.5, //
// callout: { //
// content: '', //
// color: '#ffffff', //
// fontSize: 14, //
// borderRadius: 15, //
// borderWidth: '10',
// bgColor: '#3274F9', //
// display: 'ALWAYS', //
// },
// },
// {
// id: 2,
// latitude: 28.908447, //
// longitude: 105.439304,
// //
// iconPath: '../../static/img/contract/company.png', //
// rotate: 0, //
// width: 20, //
// height: 30, //
// alpha: 0.5, //
// callout: { //
// content: '', //
// color: 'white', //
// fontSize: 14, //
// borderRadius: 15, //
// borderWidth: '10',
// bgColor: '#3274F9', //
// display: 'ALWAYS', //
// },
// },
// ],
// polyline: [{
// points: [{
// latitude: 28.908854,
// longitude: 105.43639400000002,
// }, {
// latitude: 28.908447, //
// longitude: 105.439304,
// }],
// color: "#0091ff",
// // dottedLine: true,
// // colorList: true,
// // dottedLine: true,
// width: 15,
// // arrowLine: true,
// // colorList: true,
// // colorList: true
// }
// ]
}
},
methods: {
confirm() {
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
takeGoods({
user_id: id,
logistics_id: this.goodsDetil.logistics.id
})
this.showPop = false
uni.navigateBack()
},
/*
地图相关
*/
// 线
getDriverLine() {
const that = this;
const key = "997c9a3d88154fa78f4d28bebc1dd84f";
//
const origin = "28.908854,105.43639400000002,";
//
this.startingPoint()
//
this.endPoint()
//
const destination = "28.908447,105.439304,";
uni.request({
// url: `https://restapi.amap.com/v3/direction/walking?key=${key}&origin=105.43639400000002,28.908854&destination=105.439304,28.908447`,
url: `https:restapi.amap.com/v4/direction/bicycling?key=${key}&origin=105.43639400000002,28.908854&destination=105.439304,28.908447`,
success: (res) => {
const data = res.data.data;
var points = [];
if (data.paths && data.paths[0] && data.paths[0].steps) {
var steps = data.paths[0].steps;
for (var i = 0; i < steps.length; i++) {
//points
var poLen = steps[i].polyline.split(";");
for (var j = 0; j < poLen.length; j++) {
points.push({
longitude: parseFloat(poLen[j].split(",")[0]),
latitude: parseFloat(poLen[j].split(",")[1]),
});
}
}
console.log(data.paths[0].steps[0].instruction)
that.runningRoute = data.paths[0].steps[0].instruction;
console.log('行驶路线-----------', that.runningRoute)
}
that.polyline = [{
points: points,
color: "#0091ff",
dottedLine: true,
width: 15,
arrowLine: true,
colorList: true,
}, ];
},
fail: function(res) {
console.log("获取路线失败", res);
},
});
},
// 线marker
startingPoint() {
let point = [{
id: 1,
width: 40,
height: 40,
latitude: 28.908854,
longitude: 105.43639400000002,
iconPath: "https://p4.itc.cn/images03/20200518/90137c12bbac485dbc5bb0fe9d8cf4bd.jpeg",
anchor: {
x: 0.5,
y: 1,
},
}, ];
this.markers = this.markers.concat(point);
},
// 线marker
endPoint() {
let point = [{
id: 2,
width: 40,
height: 40,
latitude: 28.908447, //
longitude: 105.439304,
//
iconPath: 'https://t9.baidu.com/it/u=414099140,1072313909&fm=193',
anchor: {
x: 0.5,
y: 1,
},
}, ];
this.markers = this.markers.concat(point);
},
//
},
onLoad(options) {
getDetil({
logistics_id: options.id
}).then(res => {
this.goodsDetil = res.data
console.log(this.goodsDetil)
})
},
// onShow() {
// let that = this
// // uni.getLocation({
// // type: 'wgs84',
// // success: function(res) {
// // that.mark[0].latitude = res.latitude
// // that.mark[0].longitude = res.longitude
// // console.log(that.mark[0])
// // console.log(res)
// // }
// // });
// }
}
</script>
<style lang='scss' scoped>
.map {
height: 40vh;
width: 100vw;
}
.custom-style {
width: 100%;
background-color: red;
border: none;
color: white;
height: 90rpx;
line-height: 90rpx;
}
.order_info {
height: auto;
background-color: white;
border-radius: 6vw 6vw 0 0;
transform: translateY(-5vh);
padding: 5vh 3vw;
box-sizing: border-box;
.tit {
font-weight: bold;
font-size: 35rpx
}
.tit_a {
display: flex;
justify-content: space-between;
font-weight: bold;
font-size: 35rpx
}
.total {
text-align: right;
color: #3274F9;
font-weight: bold;
font-size: 32rpx;
margin: 20rpx 0;
}
.store_name {
color: #999999;
margin: 18rpx 0;
}
.store_time {
color: #999999;
padding: 0 0 20rpx 0;
border-bottom: 1px solid #999999;
margin-bottom: 20rpx;
}
.info {
margin: 10rpx 0;
}
.pro_info {
display: flex;
justify-content: space-between;
}
}
.goods_tit {
display: flex;
justify-content: space-between;
}
.icon {
text-align: center;
font-size: 50rpx;
text {
display: block;
transform: rotate(90deg);
}
}
</style>

78
pages/logistics/index.vue Normal file
View File

@ -0,0 +1,78 @@
<template>
<view class="content">
<u-search placeholder="搜索你的订单" @search="getOrderList" :show-action='false' bg-color='white'
v-model="keywords"></u-search>
<view style="margin: 10rpx 0 0 0;">
</view>
<u-sticky bgColor="#F5F5F5">
<u-subsection :list="list" :current="curNow" @change="sectionChange"></u-subsection>
</u-sticky>
<view v-if="!orderlist.length">
<u-empty mode="data" icon="../../static/img/empty/data.png">
</u-empty>
</view>
<view v-else>
<logistiCard v-for='(item,index) in orderlist' @getlist="getOrderList" :goodsInfo="item" :key="index">
</logistiCard>
</view>
</view>
</template>
<script>
import {
getList
} from "@/api/logistics.js"
import {
informationAdd
} from "@/api/logistics.js"
import logistiCard from "@/components/logistiComptent/logistiCard/logistiCard.vue"
export default {
components: {
logistiCard
},
data() {
return {
keywords: "",
list: ['待取货', '已取货', '已送达'],
curNow: 0,
orderlist: []
}
},
methods: {
sectionChange(index) {
this.curNow = index;
this.getOrderList()
// console.log(this.curNow)
},
getOrderList() {
// console.log(9999)
// return
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
getList({
status: this.curNow,
// courier_id: id,
courier_id: id,
keywords: this.keywords
}).then(res => {
this.orderlist = res.data.data
console.log(this.orderlist)
})
}
},
onShow() {
// this.curNow = 1
this.getOrderList()
}
}
</script>
<style lang='scss'>
.content {
background-color: #F5F5F5;
padding: 1vh 2vw;
}
</style>

View File

@ -0,0 +1,299 @@
<template>
<view class="content">
<view v-if='showLoading'>
<u-loading-page :loading="showLoading"></u-loading-page>
</view>
<view v-else>
<view class="order">
<u-loading-page :loading="showLoading"></u-loading-page>
<p>订单号:{{goodsDetil.logistics.order_sn}}</p>
<view class='phone'>收货时间 : &nbsp;{{goodsDetil.record[0].create_time}} </view>
<!-- 已送达 -->
<view class="left" v-if="goodsDetil.logistics.status>=2">
<view class="list">
<text>
收货时间
</text>
<view>
{{goodsDetil.record[0].create_time}}
</view>
</view>
<view class="list">
<text>
收获详情
</text>
<view>
<view>
{{goodsDetil.logistics.user_address}}
</view>
<view>
{{goodsDetil.logistics.user_name||"顾客电话"}}
</view>
<view>
{{goodsDetil.record[0].create_time}}
</view>
</view>
</view>
<view class="list">
<text>
取货详情
</text>
<view>
<view>
{{goodsDetil.logistics.shop_address||"商家地址"}}
</view>
<view>
{{goodsDetil.logistics.shop_phone||"商家电话"}}
</view>
<view>
{{goodsDetil.record[1].create_time}}
</view>
</view>
</view>
<view class="list">
<text>
订单详情
</text>
<view>
<view v-for="(item,index) in goodsDetil.record" :key="item.create_time">
<view>
{{item.content}}
</view>
<view>
{{item.create_time}}
</view>
</view>
</view>
</view>
<view class="pro_list">
<text style="color: #999;width: 15vw;">
商品信息
</text>
<view>
<view class="goods_tit" v-for="(item,index) in goodsDetil.product">
<text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text>
</view>
</view>
</view>
</view>
<!-- 已取货 -->
<view class="left" v-else>
<view class="list">
<text>
用户名称
</text>
<view>
{{goodsDetil.logistics.user_name}}
</view>
</view>
<view class="list" style="margin: 10rpx 0;">
<text style="width: 16vw;">
收货地址
</text>
<view>
<view>
{{goodsDetil.logistics.user_address}}
</view>
</view>
</view>
<view class="list">
<text>
物流信息
</text>
<view>
<view v-for="(item,index) in goodsDetil.record">
{{item.content}}
<view>
{{item.create_time}}
</view>
</view>
</view>
</view>
<view class="pro_list">
<text style="color: #999;width: 15vw;">
商品信息
</text>
<view>
<view class="goods_tit" v-for="(item,index) in goodsDetil.product">
<text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text>
</view>
</view>
</view>
</view>
<view class="total">
<text>共计{{goodsDetil.product_count}}件商品 </text>
</view>
<u-button v-if='goodsDetil.logistics.status==1' @click="showPop=true" type="primary"
style="background-color: #34A853;border: none;">已送达</u-button>
</view>
<view class="cil_left">
</view>
<view class="cil_right">
</view>
<u-modal :show="showPop" @confirm="confirm" content="56565撒大苏打撒旦" @close="showPop=false"
:closeOnClickOverlay="true"></u-modal>
</view>
</view>
</view>
</template>
<script>
import {
doneDelivery
} from "@/api/logistics.js"
import {
getDetil
} from "@/api/logistics.js"
export default {
data() {
return {
showPop: false,
showLoading: true,
goodsDetil: undefined,
flag: 0,
}
},
methods: {
confirm() {
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
doneDelivery({
user_id: id,
// user_id: id,
logistics_id: this.goodsDetil.logistics.id
})
this.showPop = false
uni.navigateBack()
},
},
onLoad(options) {
// console.log(options.id)
getDetil({
logistics_id: options.id
}).then(res => {
this.showLoading = false
this.goodsDetil = res.data
console.log(this.goodsDetil)
})
},
}
</script>
<style lang='scss' scoped>
.content {
background-color: #F5F5F5;
padding: 2vh 2vw;
}
.order {
position: relative;
background-color: white;
margin: 20rpx 0;
border-radius: 15rpx;
height: auto;
padding: 2vh 3vw;
box-sizing: border-box;
p {
font-family: "PingFang SC-Medium";
font-size: 32rpx;
font-weight: bold;
}
.phone {
color: #999999;
padding: 10rpx 0;
border-bottom: 1px dashed blue;
font-size: 20rpx;
}
.left {
.list {
display: flex;
view {
flex: 8;
view {
margin-bottom: 10rpx;
}
}
text {
flex: 2;
}
/* view {
view {
margin-bottom: 10rpx;
}
}
text {
margin-right: 20rpx;
width: 30vw;
color: #999;
} */
}
}
.pro_list {
display: flex;
text {
margin-right: 20rpx;
}
}
.total {
/* font-family: "宋体"; */
margin: 20rpx 0;
color: #3274F9;
font-weight: bold;
font-size: 32rpx;
text-align: right;
}
.cil_left {
width: 30rpx;
height: 30rpx;
background-color: #F5F5F5;
border-radius: 30rpx;
position: absolute;
top: 110rpx;
left: -15rpx;
}
.cil_right {
width: 30rpx;
height: 30rpx;
background-color: #F5F5F5;
border-radius: 30rpx;
position: absolute;
top: 110rpx;
right: -15rpx;
}
.goods_tit {
display: flex;
justify-content: space-between;
}
}
</style>

311
pages/logistics/t.vue Normal file
View File

@ -0,0 +1,311 @@
<template>
<view class="content">
<view class="map">
<map id="map" :markers='markers' :scale="scale" :enable-zoom="true" :polyline="polyline"
style="width:100%;height: 100%;" :latitude="latitude" :enable-scroll="false"
:longitude="longitude"></map>
</view>
<button @click="getDriverLine">叫我按钮</button>
</view>
</template>
<script>
import {
getDetil
} from "@/api/logistics.js"
import {
takeGoods
} from "@/api/logistics.js"
export default {
data() {
return {
showPop: false,
goodsDetil: undefined,
scale: 17,
latitude: 28.908854,
longitude: 105.43639400000002,
markers: [],
polyline: [],
// https://p4.itc.cn/images03/20200518/90137c12bbac485dbc5bb0fe9d8cf4bd.jpeg
// https://t9.baidu.com/it/u=414099140,1072313909&fm=193
// mark: [{
// id: 0,
// latitude: 28.908854,
// longitude: 105.43639400000002,
// iconPath: 'https://img2.baidu.com/it/u=3116155797,2219949885&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', //
// width: 40, //
// height: 40, //
// title: '', //
// alpha: 0.5, //
// callout: { //
// content: '', //
// color: '#ffffff', //
// fontSize: 14, //
// borderRadius: 15, //
// borderWidth: '10',
// bgColor: '#3274F9', //
// display: 'ALWAYS', //
// },
// },
// {
// id: 2,
// latitude: 28.908447, //
// longitude: 105.439304,
// //
// iconPath: '../../static/img/contract/company.png', //
// rotate: 0, //
// width: 20, //
// height: 30, //
// alpha: 0.5, //
// callout: { //
// content: '', //
// color: 'white', //
// fontSize: 14, //
// borderRadius: 15, //
// borderWidth: '10',
// bgColor: '#3274F9', //
// display: 'ALWAYS', //
// },
// },
// ],
// polyline: [{
// points: [{
// latitude: 28.908854,
// longitude: 105.43639400000002,
// }, {
// latitude: 28.908447, //
// longitude: 105.439304,
// }],
// color: "#0091ff",
// // dottedLine: true,
// // colorList: true,
// // dottedLine: true,
// width: 15,
// // arrowLine: true,
// // colorList: true,
// // colorList: true
// }
// ]
}
},
methods: {
confirm() {
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
takeGoods({
user_id: id,
logistics_id: this.goodsDetil.logistics.id
})
this.showPop = false
},
/*
地图相关
*/
// 线
getDriverLine() {
const that = this;
const key = "997c9a3d88154fa78f4d28bebc1dd84f";
//
const origin = "105.43639400000002,28.908854";
//
this.startingPoint()
//
this.endPoint()
//
const destination = "105.439304,28.908447";
uni.request({
// url: `https://restapi.amap.com/v3/direction/walking?key=${key}&origin=105.43639400000002,28.908854&destination=105.439304,28.908447`,
url: `https:restapi.amap.com/v4/direction/bicycling?key=${key}&origin=${origin}&destination=${destination}`,
success: (res) => {
const data = res.data.data;
var points = [];
if (data.paths && data.paths[0] && data.paths[0].steps) {
var steps = data.paths[0].steps;
for (var i = 0; i < steps.length; i++) {
//points
var poLen = steps[i].polyline.split(";");
for (var j = 0; j < poLen.length; j++) {
points.push({
longitude: parseFloat(poLen[j].split(",")[0]),
latitude: parseFloat(poLen[j].split(",")[1]),
});
}
}
console.log(data.paths[0].steps[0].instruction)
that.runningRoute = data.paths[0].steps[0].instruction;
console.log('行驶路线-----------', that.runningRoute)
}
that.polyline = [{
points: points,
color: "#0091ff",
dottedLine: true,
width: 15,
arrowLine: true,
colorList: true,
}, ];
},
fail: function(res) {
console.log("获取路线失败", res);
},
});
},
// 线marker
startingPoint() {
let point = [{
id: 1,
width: 40,
height: 40,
latitude: 28.908854,
longitude: 105.43639400000002,
iconPath: "https://p4.itc.cn/images03/20200518/90137c12bbac485dbc5bb0fe9d8cf4bd.jpeg",
anchor: {
x: 0.5,
y: 1,
},
}, ];
this.markers = this.markers.concat(point);
},
// 线marker
endPoint() {
let point = [{
id: 2,
width: 40,
height: 40,
latitude: 28.908447, //
longitude: 105.439304,
//
iconPath: 'https://t9.baidu.com/it/u=414099140,1072313909&fm=193',
anchor: {
x: 0.5,
y: 1,
},
}, ];
this.markers = this.markers.concat(point);
},
//
},
onLoad(options) {
// getDetil({
// logistics_id: options.id
// }).then(res => {
// this.goodsDetil = res.data
// console.log(this.goodsDetil)
// })
},
// onShow() {
// let that = this
// // uni.getLocation({
// // type: 'wgs84',
// // success: function(res) {
// // that.mark[0].latitude = res.latitude
// // that.mark[0].longitude = res.longitude
// // console.log(that.mark[0])
// // console.log(res)
// // }
// // });
// }
}
</script>
<style lang='scss' scoped>
.map {
height: 40vh;
width: 100vw;
}
.custom-style {
width: 100%;
background-color: red;
border: none;
color: white;
height: 90rpx;
line-height: 90rpx;
}
.order_info {
height: auto;
background-color: white;
border-radius: 6vw 6vw 0 0;
transform: translateY(-5vh);
padding: 5vh 3vw;
box-sizing: border-box;
.tit {
font-weight: bold;
font-size: 35rpx
}
.tit_a {
display: flex;
justify-content: space-between;
font-weight: bold;
font-size: 35rpx
}
.total {
text-align: right;
color: #3274F9;
font-weight: bold;
font-size: 32rpx;
margin: 20rpx 0;
}
.store_name {
color: #999999;
margin: 18rpx 0;
}
.store_time {
color: #999999;
padding: 0 0 20rpx 0;
border-bottom: 1px solid #999999;
margin-bottom: 20rpx;
}
.info {
margin: 10rpx 0;
}
.pro_info {
display: flex;
justify-content: space-between;
}
}
.goods_tit {
display: flex;
justify-content: space-between;
}
.icon {
text-align: center;
font-size: 50rpx;
text {
display: block;
transform: rotate(90deg);
}
}
</style>

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

112
utils/logistics.js Normal file
View File

@ -0,0 +1,112 @@
import {
HTTP_REQUEST_URL_THREE,
HEADER,
TOKENNAME,
} from '@/config/app';
import {
Toast
} from '../libs/uniApi';
// import { checkLogin } from '../libs/login';
import store from '../store';
function toLogin() {
uni.showToast({
title: '请先登录',
icon: 'none',
duration: 1000
});
}
function baseRequestTwo(url, method, data, {
noAuth = false,
noVerify = false
}) {
let Url = "http://logistics.lihaink.cn",
header = HEADER;
if (!noAuth) {
// 已经未登录了,禁止请求
if (!store.state.config.request) return Promise.reject({
msg: '未登录'
});
//登录过期自动登录
if (!store.state.app.token) {
toLogin();
store.commit("SET_REQUEST", false);
return Promise.reject({
msg: '未登录'
});
}
}
// if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
if (store.state.app.token) header[TOKENNAME] = store.state.app.token;
// header[TOKENNAME] = 'Bearer sdjflidshjgfkbdasgjmasbgvhauuiavhkesvndkaesbvkjsdbv';
return new Promise((reslove, reject) => {
// uni.showLoading({
// title: '加载中'
// })
uni.request({
// url: Url + '/api/v1' + url,
url: Url + '/api' + url,
method: method || 'GET',
header: header,
data: method != 'GET' ? data || {} : {},
params: method == 'GET' ? data : {},
success: (res) => {
// uni.hideLoading()
if (noVerify)
// reslove(res.data, res);
reslove(res.data);
else if (res.data.code == -1) {
store.commit("LOGOUT");
store.commit("SET_REQUEST", false);
reject(res.data);
} else if (res.data.code == 0) {
// uni.hideLoading();
uni.showToast({
title: res.data.msg || '请检查网络',
icon: 'none'
})
reject(res.data);
} else if (res.data.code == 1) {
store.commit("SET_REQUEST");
reslove(res.data);
} else if (res.data.code == 200) {
store.commit("SET_REQUEST");
reslove(res.data.data);
} else if ([410000, 410001, 410002, 40000].indexOf(res.data.code) !== -1) {
toLogin();
reject(res.data);
} else if (res.data.code == 501) {
// uni.reLaunch({
// url: '/pages/error/index'
// })
reject(res.data);
} else {
// uni.hideLoading();
uni.showToast({
title: res.data.msg || '请检查网络',
icon: 'none'
})
reject(res.data.msg || '请检查网络');
}
},
fail: (message) => {
// uni.hideLoading()
uni.showToast({
title: '网络错误',
icon: 'none'
})
reject('请求失败');
}
})
});
}
const oahttp = {};
['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => {
oahttp[method] = (api, data, opt) => baseRequestTwo(api, method, data, opt || {})
});
export default oahttp;