物流页面更新
This commit is contained in:
parent
a9f905f609
commit
4d299879b2
@ -1,12 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="card" @click="goDetil(goodsInfo.id)">
|
<view class="card" @click="goDetil(goodsInfo.id)">
|
||||||
|
|
||||||
<u-button type="primary" class="custom-style" style="background-color: #34A853;"
|
<u-button type="primary" class="custom-style" style="background-color: #34A853;"
|
||||||
v-if='goodsInfo.status==0'>待取货</u-button>
|
v-if='goodsInfo.status==0'>待取货</u-button>
|
||||||
<u-button type="primary" class="custom-style" v-if='goodsInfo.status==1'>待送货</u-button>
|
<u-button type="primary" class="custom-style" v-if='goodsInfo.status==1'>待送货</u-button>
|
||||||
|
<view v-if="goodsInfo.status==0">
|
||||||
<p>{{goodsInfo.shop_name}}</p>
|
<p>{{goodsInfo.shop_name}}</p>
|
||||||
<view class="address">地址: {{goodsInfo.shop_address}}</view>
|
<view class="address">地址: {{goodsInfo.shop_address}}</view>
|
||||||
<view class="date">日期: {{goodsInfo.create_time}}</view>
|
<view class="date">日期: {{goodsInfo.create_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="goodsInfo.status==1">
|
||||||
|
<p>{{goodsInfo.user_name}}</p>
|
||||||
|
<view class="address">地址: {{goodsInfo.user_address}}</view>
|
||||||
|
<!-- <view class="date">日期: {{goodsInfo.create_time}}</view> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
@ -20,13 +29,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.goodsInfo)
|
// console.log(this.goodsInfo)
|
||||||
|
// console.log(6666)
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
goDetil(id) {
|
goDetil(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/logistics/deliveryDetil?id=${id}`,
|
// url: `/pages/logistics/deliveryDetil?id=${id}`,
|
||||||
|
// deliveryDetil
|
||||||
|
url: `/pages/logistics/${this.goodsInfo.status==1?"logisticDetil":"deliveryDetil"}?id=${id}`,
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<view class="order">
|
<view class="order">
|
||||||
|
|
||||||
<!-- <u-notify message="成功" duration="2000" show="true"></u-notify> -->
|
<!-- <u-notify message="成功" duration="2000" show="true"></u-notify> -->
|
||||||
<view v-if='goodsInfo.status !==2'>
|
<view v-if='goodsInfo.status !==2'>
|
||||||
<view class="" @click="goDetil">
|
<view class="" @click="goDetil">
|
||||||
<p>{{goodsInfo.shop_name}}</p>
|
<p v-if="goodsInfo.status==0">{{goodsInfo.shop_name}}</p>
|
||||||
<view class='phone'>联系方式 :{{goodsInfo.shop_phone}} </view>
|
<p v-else>{{goodsInfo.user_name}}</p>
|
||||||
|
<view class='phone' v-if="goodsInfo.status==0">联系方式 :{{goodsInfo.shop_phone}} </view>
|
||||||
|
<view class='phone' v-else>联系方式 :{{goodsInfo.user_phone}} </view>
|
||||||
<view class="content_box">
|
<view class="content_box">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="">
|
<view v-if="goodsInfo.status==0">
|
||||||
商家地址
|
商家地址
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="goodsInfo.status==1">
|
||||||
|
用户地址
|
||||||
|
</view>
|
||||||
<view style="margin: 20rpx 0;">
|
<view style="margin: 20rpx 0;">
|
||||||
订单编号
|
订单编号
|
||||||
</view>
|
</view>
|
||||||
@ -19,23 +25,26 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="goods_tit">
|
<view class="goods_tit" v-if="goodsInfo.status==0">
|
||||||
{{goodsInfo.shop_address}}
|
{{goodsInfo.shop_address}}
|
||||||
</view>
|
</view>
|
||||||
|
<view class="goods_tit" v-else>
|
||||||
|
{{goodsInfo.user_address}}
|
||||||
|
</view>
|
||||||
<view style="margin: 20rpx 0;">
|
<view style="margin: 20rpx 0;">
|
||||||
{{goodsInfo.order_sn}}
|
{{goodsInfo.order_sn}}
|
||||||
</view>
|
</view>
|
||||||
<view class='product' v-for="(item,index) in list" :key="index">
|
<view class='product' v-for="(item,index) in goodsInfo.products" :key="index">
|
||||||
<text class="goods_tit">{{item.goods_name}}</text>
|
<text class="goods_tit">{{item.goods_name}}</text>
|
||||||
<text>X{{item.product_num}}{{item.goods_unit}}</text>
|
<text>X{{item.product_num}}{{item.goods_unit}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="icon" @click='getMore' v-if="flag">
|
<!-- <view class="icon" @click='getMore' v-if="flag">
|
||||||
<image style="width: 70rpx;height: 70rpx;text-align: center;" src="@/static/img/logistics/more.png"
|
<image style="width: 70rpx;height: 70rpx;text-align: center;" src="@/static/img/logistics/more.png"
|
||||||
alt="">
|
alt="">
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else class='finishOrder' @click="goDetil">
|
<view v-else class='finishOrder' @click="goDetil">
|
||||||
@ -46,13 +55,13 @@
|
|||||||
<text style="color:#999">联系方式</text> {{goodsInfo.user_phone}}
|
<text style="color:#999">联系方式</text> {{goodsInfo.user_phone}}
|
||||||
</view>
|
</view>
|
||||||
<view style="margin: 20rpx 0;">
|
<view style="margin: 20rpx 0;">
|
||||||
<text style="color:#999">收货时间</text> {{goodsInfo.xd_time||"无"}}
|
<text style="color:#999">收货时间</text> {{goodsInfo.xd_time||"暂未收货"}}
|
||||||
</view>
|
</view>
|
||||||
<view style="margin: 20rpx 0;">
|
<view style="margin: 20rpx 0;">
|
||||||
<text style="color:#999">送达时间</text> {{goodsInfo.pc_time||"无"}}
|
<text style="color:#999">送达时间</text> {{goodsInfo.pc_time||"暂未送达"}}
|
||||||
</view>
|
</view>
|
||||||
<view style="margin: 20rpx 0;">
|
<view style="margin: 20rpx 0;">
|
||||||
<text style="color:#999">取货时间</text> {{goodsInfo.qh_time||"无"}}
|
<text style="color:#999">取货时间</text> {{goodsInfo.qh_time||"暂未取货"}}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -84,7 +93,7 @@
|
|||||||
props: ['goodsInfo'],
|
props: ['goodsInfo'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tost: 0,
|
|
||||||
list: [],
|
list: [],
|
||||||
flag: undefined,
|
flag: undefined,
|
||||||
showPop: false,
|
showPop: false,
|
||||||
@ -98,20 +107,28 @@
|
|||||||
url: `/pages/logistics/${status==0?"deliveryDetil":"logisticDetil"}?id=${this.goodsInfo.id}`
|
url: `/pages/logistics/${status==0?"deliveryDetil":"logisticDetil"}?id=${this.goodsInfo.id}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 取货
|
|
||||||
|
test() {
|
||||||
|
this.showMore()
|
||||||
|
this.getMore()
|
||||||
|
},
|
||||||
|
// 取货{}
|
||||||
takeGood() {
|
takeGood() {
|
||||||
|
|
||||||
takeGoods({
|
takeGoods({
|
||||||
user_id: this.goodsInfo.courier_id,
|
user_id: this.goodsInfo.courier_id,
|
||||||
logistics_id: this.goodsInfo.id
|
logistics_id: this.goodsInfo.id
|
||||||
|
}).then(res => {
|
||||||
|
this.$emit('showTost')
|
||||||
|
this.$emit('getlist')
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
async confirm() {
|
async confirm() {
|
||||||
await this.goodsInfo.status == 0 ? this.takeGood() : this.doneGood()
|
await this.goodsInfo.status == 0 ? this.takeGood() : this.doneGood()
|
||||||
this.showPop = false
|
this.showPop = false
|
||||||
this.tost = true
|
this.showMore()
|
||||||
this.$emit('getlist')
|
|
||||||
},
|
},
|
||||||
// 送达
|
// 送达
|
||||||
doneGood() {
|
doneGood() {
|
||||||
@ -119,6 +136,9 @@
|
|||||||
user_id: this.goodsInfo.courier_id,
|
user_id: this.goodsInfo.courier_id,
|
||||||
// user_id: 167,
|
// user_id: 167,
|
||||||
logistics_id: this.goodsInfo.id
|
logistics_id: this.goodsInfo.id
|
||||||
|
}).then(res => {
|
||||||
|
this.$emit('showTost')
|
||||||
|
this.$emit('getlist')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showMore() {
|
showMore() {
|
||||||
@ -142,7 +162,10 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.showMore()
|
// this.showMore()
|
||||||
|
console.log(this.goodsInfo)
|
||||||
|
// console.log(this.goodsInfo)
|
||||||
|
// conso
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -170,7 +193,7 @@
|
|||||||
|
|
||||||
.goods_tit {
|
.goods_tit {
|
||||||
width: 60vw;
|
width: 60vw;
|
||||||
color: red;
|
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
|
<u-toast ref="uToast"></u-toast>
|
||||||
<view class="map">
|
<view class="map">
|
||||||
<map id="map" :markers='markers' :scale="scale" :enable-zoom="true" :polyline="polyline"
|
<map id="map" :markers='markers' :scale="scale" :enable-zoom="true" :polyline="polyline"
|
||||||
style="width:100%;height: 100%;" :latitude="latitude" :enable-scroll="false" :longitude="longitude">
|
style="width:100%;height: 100%;" :latitude="latitude" :enable-scroll="false" :longitude="longitude">
|
||||||
@ -44,7 +45,7 @@
|
|||||||
<view class="total">
|
<view class="total">
|
||||||
共计{{goodsDetil.product_count}}件商品
|
共计{{goodsDetil.product_count}}件商品
|
||||||
</view>
|
</view>
|
||||||
<u-button type="primary" v-if='goodsDetil.logistics.status==0' @click="showPop=true"
|
<u-button type="primary" v-if='goodsDetil.logistics.status==0' @click="confirm"
|
||||||
class="custom-style">已取货</u-button>
|
class="custom-style">已取货</u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -145,9 +146,22 @@
|
|||||||
takeGoods({
|
takeGoods({
|
||||||
user_id: id,
|
user_id: id,
|
||||||
logistics_id: this.goodsDetil.logistics.id
|
logistics_id: this.goodsDetil.logistics.id
|
||||||
|
}).then(res => {
|
||||||
|
this.showToast()
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 2000)
|
||||||
})
|
})
|
||||||
this.showPop = false
|
this.showPop = false
|
||||||
uni.navigateBack()
|
|
||||||
|
},
|
||||||
|
showToast() {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
type: 'success',
|
||||||
|
title: '成功主题(带图标)',
|
||||||
|
message: "操作成功",
|
||||||
|
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
地图相关
|
地图相关
|
||||||
@ -273,7 +287,7 @@
|
|||||||
|
|
||||||
.custom-style {
|
.custom-style {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: red;
|
background-color: #3C9CFF;
|
||||||
border: none;
|
border: none;
|
||||||
color: white;
|
color: white;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
|
@ -12,9 +12,11 @@
|
|||||||
</u-empty>
|
</u-empty>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<logistiCard v-for='(item,index) in orderlist' @getlist="getOrderList" :goodsInfo="item" :key="index">
|
<logistiCard :ref="'logistiCard'+index" v-for='(item,index) in orderlist' @getlist="getOrderList"
|
||||||
|
@showTost='showToast' :goodsInfo="item" :key="index">
|
||||||
</logistiCard>
|
</logistiCard>
|
||||||
</view>
|
</view>
|
||||||
|
<u-toast ref="uToast"></u-toast>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -42,27 +44,37 @@
|
|||||||
sectionChange(index) {
|
sectionChange(index) {
|
||||||
this.curNow = index;
|
this.curNow = index;
|
||||||
this.getOrderList()
|
this.getOrderList()
|
||||||
// console.log(this.curNow)
|
|
||||||
},
|
},
|
||||||
|
showToast() {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
type: 'success',
|
||||||
|
title: '成功主题(带图标)',
|
||||||
|
message: "操作成功",
|
||||||
|
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
|
||||||
|
})
|
||||||
|
},
|
||||||
getOrderList() {
|
getOrderList() {
|
||||||
// console.log(9999)
|
console.log("列表更新")
|
||||||
// return
|
|
||||||
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
|
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
|
||||||
getList({
|
getList({
|
||||||
status: this.curNow,
|
status: this.curNow,
|
||||||
// courier_id: id,
|
// courier_id: 167,
|
||||||
courier_id: id,
|
courier_id: id,
|
||||||
keywords: this.keywords
|
keywords: this.keywords
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
this.orderlist = []
|
||||||
this.orderlist = res.data.data
|
this.orderlist = res.data.data
|
||||||
console.log(this.orderlist)
|
for (let i = 0; i < this.orderlist.length; i++) {
|
||||||
|
// this.logistiCard
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// this.curNow = 1
|
|
||||||
this.getOrderList()
|
this.getOrderList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -138,8 +138,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="cil_right">
|
<view class="cil_right">
|
||||||
</view>
|
</view>
|
||||||
<u-modal :show="showPop" @confirm="confirm" content="56565撒大苏打撒旦" @close="showPop=false"
|
<u-modal :show="showPop" @confirm="confirm" content="请确认货物已送达" @close="showPop=false"
|
||||||
:closeOnClickOverlay="true"></u-modal>
|
:closeOnClickOverlay="true"></u-modal>
|
||||||
|
<u-toast ref="uToast"></u-toast>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -172,9 +173,22 @@
|
|||||||
user_id: id,
|
user_id: id,
|
||||||
// user_id: id,
|
// user_id: id,
|
||||||
logistics_id: this.goodsDetil.logistics.id
|
logistics_id: this.goodsDetil.logistics.id
|
||||||
|
}).then(res => {
|
||||||
|
this.showToast()
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 2000)
|
||||||
})
|
})
|
||||||
this.showPop = false
|
this.showPop = false
|
||||||
uni.navigateBack()
|
|
||||||
|
},
|
||||||
|
showToast() {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
type: 'success',
|
||||||
|
title: '成功主题(带图标)',
|
||||||
|
message: "操作成功",
|
||||||
|
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
@ -137,6 +137,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import logistiBriefCard from "@/components/logistiComptent/logistiCard/logistiBriefCard.vue"
|
||||||
import {
|
import {
|
||||||
getList
|
getList
|
||||||
} from "@/api/logistics.js"
|
} from "@/api/logistics.js"
|
||||||
@ -160,6 +161,7 @@
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
// tabbar
|
// tabbar
|
||||||
|
logistiBriefCard
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -213,6 +215,7 @@
|
|||||||
this.initUserInfo()
|
this.initUserInfo()
|
||||||
this.showToask()
|
this.showToask()
|
||||||
this.initOaHomeDada()
|
this.initOaHomeDada()
|
||||||
|
this.getOrderList()
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
@ -230,7 +233,6 @@
|
|||||||
// },
|
// },
|
||||||
async getOrderList() {
|
async getOrderList() {
|
||||||
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
|
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
|
||||||
console.log(id)
|
|
||||||
let res = await getList({
|
let res = await getList({
|
||||||
courier_id: id
|
courier_id: id
|
||||||
// courier_id: 167
|
// courier_id: 167
|
||||||
|
@ -13,13 +13,12 @@
|
|||||||
itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;font-size: 32rpx;"></u-tabs>
|
itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;font-size: 32rpx;"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
<input v-if="current==0" class="mobile item" v-model="formData.account" placeholder="输入账号" />
|
<input v-if="current==0" class="mobile item" v-model="formData.account" placeholder="输入账号" />
|
||||||
<input v-if="current==0" class="mobile item" v-model="formData.password" maxlength="26" placeholder="输入密码" password
|
<input v-if="current==0" class="mobile item" v-model="formData.password" maxlength="26"
|
||||||
type="safe-password" />
|
placeholder="输入密码" password type="safe-password" />
|
||||||
<input v-if="current==1" class="mobile item" v-model="formData.account" placeholder="输入手机号" />
|
<input v-if="current==1" class="mobile item" v-model="formData.account" placeholder="输入手机号" />
|
||||||
<view v-if="current==1" class="code item">
|
<view v-if="current==1" class="code item">
|
||||||
<input placeholder="输入验证码" v-model="formData.code" maxlength="6" />
|
<input placeholder="输入验证码" v-model="formData.code" maxlength="6" />
|
||||||
<u-code :seconds="seconds" @end="end" @start="start" ref="uCode"
|
<u-code :seconds="seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-code>
|
||||||
@change="codeChange"></u-code>
|
|
||||||
<view class="get-code" @click="getCode">{{tips}}</view>
|
<view class="get-code" @click="getCode">{{tips}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
@ -34,13 +33,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { loginAccount, userInfo, test } from "@/api/oaUser.js"
|
import {
|
||||||
import { Toast } from "../../libs/uniApi";
|
loginAccount,
|
||||||
|
userInfo,
|
||||||
|
test
|
||||||
|
} from "@/api/oaUser.js"
|
||||||
|
import {
|
||||||
|
Toast
|
||||||
|
} from "../../libs/uniApi";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabList: [
|
tabList: [{
|
||||||
{name:'账号登录'},
|
name: '账号登录'
|
||||||
|
},
|
||||||
// {name:'手机登录'},
|
// {name:'手机登录'},
|
||||||
],
|
],
|
||||||
current: 0,
|
current: 0,
|
||||||
@ -76,7 +82,9 @@ import { Toast } from "../../libs/uniApi";
|
|||||||
user: data,
|
user: data,
|
||||||
token: res.data.token
|
token: res.data.token
|
||||||
})
|
})
|
||||||
let { data } = await userInfo();
|
let {
|
||||||
|
data
|
||||||
|
} = await userInfo();
|
||||||
this.$store.commit('setUserInfo', data);
|
this.$store.commit('setUserInfo', data);
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user