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