master
chc 2022-11-22 17:19:09 +08:00
parent 7f71614781
commit df3ce9eda7
6 changed files with 413 additions and 232 deletions

View File

@ -55,5 +55,17 @@ export function getStoreList(params) {
} }
/**
* 获取自提点信息
* @param id
*/
export function getStoreAddress(storeId,params) {
return http.request({
url: `/store/address/page/${storeId}`,
method: Method.GET,
params
});
}

View File

@ -155,6 +155,18 @@ export function setAddressId(addressId,way) {
}); });
} }
/**
* 设置收货地址ID
* @param addressId
*/
export function setStoreAddressId(storeAddressId,way) {
return http.request({
url: `/trade/carts/storeAddress?storeAddressId=${storeAddressId}&way=${way}`,
method: Method.GET,
needToken: true,
});
}
/** /**
@ -281,3 +293,29 @@ export function reBuy(sn) {
needToken: true, needToken: true,
}); });
} }
/**
* 获取全部配送方式
*/
export function shippingMethodList(params) {
return http.request({
url: `/buyer/trade/carts/shippingMethodList`,
method: Method.GET,
needToken: true,
params: params,
});
}
/**
* 提交配送方式
* @param params
*/
export function setShipMethod(params) {
return http.request({
url: "/buyer/trade/carts/shippingMethod",
method: Method.PUT,
needToken: true,
params,
});
}

View File

@ -225,6 +225,13 @@
"navigationBarTitleText": "地址管理" "navigationBarTitleText": "地址管理"
} }
}, },
{
"path": "address/storeAddress",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "自提点"
}
},
{ {
"path": "address/add", "path": "address/add",
"style": { "style": {

View File

@ -0,0 +1,88 @@
<template>
<view class="address">
<u-empty class="empty" v-if="storeAddressList.length == 0" text="暂无自提地址" mode="address"></u-empty>
<view class="list" v-else>
<view class="item c-content" v-for="(item, index) in storeAddressList" :key="index">
<view class="basic" @click="selectAddressData(item)">
<text>{{ item.addressName }}</text>
<text>{{ item.mobile }}</text>
<view>
<div class="region">
<span>{{ item.address }}</span>
</div>
</view>
</view>
</view>
<view style="height: 100px"></view>
</view>
<u-action-sheet :list="removeList" :tips="tips" v-model="showAction" @click="deleteAddressMessage"></u-action-sheet>
</view>
</template>
<script>
import * as API_Trade from "@/api/trade";
import * as API_Store from "@/api/store.js";
export default {
data() {
return {
storeAddressList: [], //
showAction: false, //
removeList: [
{
text: "确定",
},
],
tips: {
text: "确定要删除该收货人信息吗?",
},
removeId: "", //id
routerVal: "",
params: {
pageNumber: 1,
pageSize: 1000,
},
};
},
onPullDownRefresh() {
//
this.storeAddressList = [];
this.getAddressList();
},
onLoad: function (val) {
this.routerVal = val;
},
onShow() {
this.storeAddressList = [];
this.getAddressList();
},
onHide() {},
methods: {
async selectAddressData(val) {
await API_Trade.setStoreAddressId(val.id, this.routerVal.way);
uni.navigateBack({
delta: 1,
});
},
//
getAddressList() {
uni.showLoading();
API_Store.getStoreAddress(
this.routerVal.storeId,
this.params
).then((res) => {
this.storeAddressList = res.data.result.records;
console.log(this.storeAddressList);
uni.hideLoading();
});
},
},
};
</script>
<style lang="scss" scoped>
@import "./address.scss";
</style>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<!-- 选择地址 --> <!-- 选择地址 -->
<div class="address-box" @click="clickToAddress()"> <div class="address-box" @click="clickToAddress()" v-if="shippingText == 'LOGISTICS'">
<div class="user-box flex"> <div class="user-box flex">
<div class="flex-8"> <div class="flex-8">
<div v-if="!address.id"></div> <div v-if="!address.id"></div>
@ -10,15 +10,8 @@
<!-- 省市区 --> <!-- 省市区 -->
<div class="flex flex-a-c"> <div class="flex flex-a-c">
<span class="default" v-if="address.isDefault"></span> <span class="default" v-if="address.isDefault"></span>
<div <div class="address-list" v-if="address.consigneeAddressPath.length != 0">
class="address-list" <span class="address-item" v-for="(item, index) in address.consigneeAddressPath" :key="index">
v-if="address.consigneeAddressPath.length != 0"
>
<span
class="address-item"
v-for="(item, index) in address.consigneeAddressPath"
:key="index"
>
{{ item }} {{ item }}
</span> </span>
</div> </div>
@ -41,50 +34,53 @@
<div class="bar"></div> <div class="bar"></div>
</div> </div>
<!-- 选择自提点 -->
<div class="address-box" v-if="shippingText == 'SELF_PICK_UP'">
<div @click="clickToStoreAddress()">
<div class="user-box flex">
<div class="flex-8">
<div v-if="!storeAddress"></div>
<div v-else>
<div class="user-address">
<!-- 自提点地址 -->
<div class="user-address-detail wes-2">
{{ storeAddress.address }}
</div>
<!-- 联系手机号 -->
<div>
</div>
</div>
</div>
</div>
<u-icon name="arrow-right" style="color: #bababa"></u-icon>
</div>
<!-- 背景 -->
<div class="bar"></div>
</div>
</div>
<!-- 开团信息 --> <!-- 开团信息 -->
<view class="group-box" v-if="isAssemble"> <view class="group-box" v-if="isAssemble">
<view class="group-title"> <view class="group-title">
<span v-if="pintuanFlage"></span> <span v-if="pintuanFlage"></span>
<span v-else <span v-else><span>{{ routerVal.parentOrder.toBeGroupedNum }}</span>人的团购买</span>
>为你加入仅差<span>{{ routerVal.parentOrder.toBeGroupedNum }}</span
>人的团购买</span
>
</view> </view>
<view class="group"> <view class="group">
<view> <view>
<u-image <u-image borderRadius="50%" shape="square" class="head-img" width="81rpx" height="81rpx"
borderRadius="50%" :src="masterWay.face || '/static/missing-face.png'"></u-image>
shape="square"
class="head-img"
width="81rpx"
height="81rpx"
:src="masterWay.face || '/static/missing-face.png'"
></u-image>
<view class="btn-one">团长</view> <view class="btn-one">团长</view>
</view> </view>
<view class="line"> </view> <view class="line"> </view>
<view> <view>
<!-- 如果有最后一名显示最后一名没有最后一名显示等待参团 --> <!-- 如果有最后一名显示最后一名没有最后一名显示等待参团 -->
<u-image <u-image class="head-img" v-if="endWay.face" :src="endWay.face" borderRadius="50%" shape="square"
class="head-img" width="81rpx" height="81rpx">
v-if="endWay.face"
:src="endWay.face"
borderRadius="50%"
shape="square"
width="81rpx"
height="81rpx"
>
<view slot="loading"></view> <view slot="loading"></view>
</u-image> </u-image>
<u-image <u-image class="head-img" borderRadius="50%" shape="square" v-else width="81rpx" height="81rpx"
class="head-img" :src="endWay.face || '/static/missing-face.png'"></u-image>
borderRadius="50%"
shape="square"
v-else
width="81rpx"
height="81rpx"
:src="endWay.face || '/static/missing-face.png'"
></u-image>
<view class="wait">{{ endWay.nickname || "等待参团" }}</view> <view class="wait">{{ endWay.nickname || "等待参团" }}</view>
</view> </view>
@ -92,11 +88,7 @@
</view> </view>
<!-- 店铺商品信息 --> <!-- 店铺商品信息 -->
<div <div class="box box2" v-for="(item, index) in orderMessage.cartList" :key="index">
class="box box2"
v-for="(item, index) in orderMessage.cartList"
:key="index"
>
<div v-if="item.checked"> <div v-if="item.checked">
<div @click="navigateToStore(item)"> <div @click="navigateToStore(item)">
<div class="store-name"> <div class="store-name">
@ -104,42 +96,25 @@
</div> </div>
</div> </div>
<div class="promotionNotice">{{ item.promotionNotice || "" }}</div> <div class="promotionNotice">{{ item.promotionNotice || "" }}</div>
<div <div class="flex goods-item" v-for="(val, i) in item.checkedSkuList" :key="i">
class="flex goods-item" <div class="goods-image" @click="
v-for="(val, i) in item.checkedSkuList"
:key="i"
>
<div
class="goods-image"
@click="
navigateTo( navigateTo(
'/pages/product/goods?id=' + '/pages/product/goods?id=' +
val.goodsSku.id + val.goodsSku.id +
'&goodsId=' + '&goodsId=' +
val.goodsSku.goodsId val.goodsSku.goodsId
) )
" " :span="3">
:span="3" <u-image borderRadius="10rpx" width="200rpx" height="200rpx" :src="val.goodsSku.thumbnail" alt />
>
<u-image
borderRadius="10rpx"
width="200rpx"
height="200rpx"
:src="val.goodsSku.thumbnail"
alt
/>
</div> </div>
<div <div @click="
@click="
navigateTo( navigateTo(
'/pages/product/goods?id=' + '/pages/product/goods?id=' +
val.goodsSku.id + val.goodsSku.id +
'&goodsId=' + '&goodsId=' +
val.goodsSku.goodsId val.goodsSku.goodsId
) )
" " class="goods-detail">
class="goods-detail"
>
<div class="flex"> <div class="flex">
<p class="goods-name">{{ val.goodsSku.goodsName }}</p> <p class="goods-name">{{ val.goodsSku.goodsName }}</p>
<span class="nums">x{{ val.num }}</span> <span class="nums">x{{ val.num }}</span>
@ -155,33 +130,16 @@
</div> </div>
<u-row> <u-row>
<u-col :offset="0" :span="4">发票信息</u-col> <u-col :offset="0" :span="4">发票信息</u-col>
<u-col <u-col :span="8" class="tipsColor" textAlign="right" @click.native="invoice()">
:span="8" <span v-if="receiptList">{{ receiptList.receiptTitle }} -
class="tipsColor" {{ receiptList.receiptContent }}</span>
textAlign="right"
@click.native="invoice()"
>
<span v-if="receiptList"
>{{ receiptList.receiptTitle }} -
{{ receiptList.receiptContent }}</span
>
<span v-else></span> <span v-else></span>
</u-col> </u-col>
</u-row> </u-row>
<u-row> <u-row>
<u-col <u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :offset="0" :span="9" @click="shippingFlag = true">
v-if="orderMessage.cartTypeEnum != 'VIRTUAL'"
:offset="0"
:span="9"
@click="shippingFlag = true"
>配送
</u-col> </u-col>
<u-col <u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="3" textAlign="right" @click="shippingFlag = true">
v-if="orderMessage.cartTypeEnum != 'VIRTUAL'"
:span="3"
textAlign="right"
@click="shippingFlag = true"
>
{{ {{
shippingMethod.find((e) => { shippingMethod.find((e) => {
return e.value == shippingText; return e.value == shippingText;
@ -190,76 +148,47 @@
</u-col> </u-col>
</u-row> </u-row>
<u-row> <u-row>
<u-col :offset="0" :span="4" class="tl" style="text-align: left" <u-col :offset="0" :span="4" class="tl" style="text-align: left">备注信息</u-col>
>备注信息</u-col
>
<u-col :span="8" textAlign="right"> <u-col :span="8" textAlign="right">
<u-input <u-input style="text-align: right" class="uinput" v-model="remarkVal[index].remark" />
style="text-align: right"
class="uinput"
v-model="remarkVal[index].remark"
/>
</u-col> </u-col>
</u-row> </u-row>
</div> </div>
</div> </div>
<!-- 发票信息 --> <!-- 发票信息 -->
<invoices <invoices :res="receiptList" @callbackInvoice="callbackInvoice" v-if="invoiceFlag" />
:res="receiptList" <u-select @confirm="confirmDistribution" v-model="shippingFlag" v-if="shippingMethod.length != 0"
@callbackInvoice="callbackInvoice" :list="shippingMethod"></u-select>
v-if="invoiceFlag"
/>
<u-select v-model="shippingFlag" :list="shippingMethod"></u-select>
<div class="box box5" v-if="orderMessage.priceDetailDTO"> <div class="box box5" v-if="orderMessage.priceDetailDTO">
<div> <div>
<u-row> <u-row>
<u-col :span="9">商品合计</u-col> <u-col :span="9">商品合计</u-col>
<u-col :span="3" textAlign="right"> <u-col :span="3" textAlign="right">
<span <span>{{ orderMessage.priceDetailDTO.goodsPrice | unitPrice }}</span>
>{{ orderMessage.priceDetailDTO.goodsPrice | unitPrice }}</span
>
</u-col> </u-col>
</u-row> </u-row>
</div> </div>
<div> <div>
<u-row> <u-row v-if="shippingText == 'LOGISTICS'">
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="7" <u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="7"></u-col>
>运费</u-col <u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="5" class="tr tipsColor" textAlign="right">
> <span v-if="orderMessage.priceDetailDTO.freightPrice == 0"></span>
<u-col <span v-else>{{
v-if="orderMessage.cartTypeEnum != 'VIRTUAL'"
:span="5"
class="tr tipsColor"
textAlign="right"
>
<span v-if="orderMessage.priceDetailDTO.freightPrice == 0"
>包邮</span
>
<span v-else
>{{
orderMessage.priceDetailDTO.freightPrice | unitPrice orderMessage.priceDetailDTO.freightPrice | unitPrice
}}</span }}</span>
>
</u-col> </u-col>
</u-row> </u-row>
</div> </div>
<u-row> <u-row>
<u-col :offset="0" :span="9" @click="GET_Discount()"></u-col> <u-col :offset="0" :span="9" @click="GET_Discount()"></u-col>
<u-col <u-col :span="3" v-if="
:span="3"
v-if="
orderMessage.priceDetailDTO && orderMessage.priceDetailDTO &&
orderMessage.priceDetailDTO.couponPrice orderMessage.priceDetailDTO.couponPrice
" " textAlign="right" @click="GET_Discount()">
textAlign="right" <span class="main-color">-{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}</span>
@click="GET_Discount()"
>
<span class="main-color"
>-{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}</span
>
</u-col> </u-col>
<!-- orderMessage.priceDetailDTO.couponPrice | unitPrice --> <!-- orderMessage.priceDetailDTO.couponPrice | unitPrice -->
<u-col :span="3" v-else textAlign="right" @click="GET_Discount()"> <u-col :span="3" v-else textAlign="right" @click="GET_Discount()">
@ -270,15 +199,10 @@
<div> <div>
<u-row> <u-row>
<u-col :span="9">优惠金额</u-col> <u-col :span="9">优惠金额</u-col>
<u-col <u-col :span="3" textAlign="right" v-if="orderMessage.priceDetailDTO.couponPrice">
:span="3"
textAlign="right"
v-if="orderMessage.priceDetailDTO.couponPrice"
>
<span class="main-color"> <span class="main-color">
-{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}</span -{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}</span>
></u-col </u-col>
>
<u-col :span="3" textAlign="right" v-else>0.00</u-col> <u-col :span="3" textAlign="right" v-else>0.00</u-col>
</u-row> </u-row>
</div> </div>
@ -286,11 +210,9 @@
<u-row> <u-row>
<u-col :span="6">活动优惠</u-col> <u-col :span="6">活动优惠</u-col>
<u-col :span="6" class="tr tipsColor" textAlign="right"> <u-col :span="6" class="tr tipsColor" textAlign="right">
<span v-if="orderMessage.priceDetailDTO.discountPrice" <span v-if="orderMessage.priceDetailDTO.discountPrice">-{{
>-{{
orderMessage.priceDetailDTO.discountPrice | unitPrice orderMessage.priceDetailDTO.discountPrice | unitPrice
}}</span }}</span>
>
<span v-else>0.00</span> <span v-else>0.00</span>
</u-col> </u-col>
</u-row> </u-row>
@ -299,12 +221,7 @@
<!-- 配送地区没有提示 --> <!-- 配送地区没有提示 -->
<div class="notSupportFreight" v-if="notSupportFreight.length != 0"> <div class="notSupportFreight" v-if="notSupportFreight.length != 0">
<u-notice-bar <u-notice-bar style="width: 100%" :volume-icon="false" mode="horizontal" :list="notSupportFreightGoodsList">
style="width: 100%"
:volume-icon="false"
mode="horizontal"
:list="notSupportFreightGoodsList"
>
</u-notice-bar> </u-notice-bar>
</div> </div>
@ -317,16 +234,12 @@
<span class="price">{{ <span class="price">{{
$options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[0] $options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[0]
}}</span> }}</span>
<span <span>.{{ $options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[1] }}
>.{{ $options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[1] }}
</span> </span>
</div> </div>
<span v-else class="number" <span v-else class="number"><span style="margin-right: 10rpx">{{
><span style="margin-right: 10rpx">{{
orderMessage.priceDetailDTO.payPoint | unitPrice orderMessage.priceDetailDTO.payPoint | unitPrice
}}</span }}</span>积分</span>
>积分</span
>
</div> </div>
<div class="navRiv" @click="createTradeFun()"> <div class="navRiv" @click="createTradeFun()">
<!-- #ifndef MP-WEIXIN --> <!-- #ifndef MP-WEIXIN -->
@ -361,11 +274,16 @@ export default {
invoiceFlag: false, // invoiceFlag: false, //
shippingText: "LOGISTICS", shippingText: "LOGISTICS",
shippingFlag: false, shippingFlag: false,
shippingMethod: [ shippingMethod: [],
shippingWay: [
{ {
value: "LOGISTICS", value: "LOGISTICS",
label: "物流", label: "物流",
}, },
{
value: "SELF_PICK_UP",
label: "自提",
},
], ],
isAssemble: false, // isAssemble: false, //
couponNums: "", // couponNums: "", //
@ -376,6 +294,7 @@ export default {
couponList: "", couponList: "",
// //
address: "", address: "",
shopAddress: "",
// //
receiptList: "", receiptList: "",
// //
@ -438,11 +357,12 @@ export default {
} }
}, },
onShow() { async onShow() {
uni.showLoading({ uni.showLoading({
mask: true, mask: true,
}); });
this.getOrderList(); await this.getOrderList();
await this.getDistribution();
uni.hideLoading(); uni.hideLoading();
if (this.routerVal.way == "PINTUAN") { if (this.routerVal.way == "PINTUAN") {
this.isAssemble = true; this.isAssemble = true;
@ -452,7 +372,7 @@ export default {
this.pintuanWay(); this.pintuanWay();
} }
}, },
mounted() {}, mounted() { },
methods: { methods: {
// //
@ -481,13 +401,18 @@ export default {
// //
clickToAddress() { clickToAddress() {
this.navigateTo( this.navigateTo(
`/pages/mine/address/address?from=cart&way=${ `/pages/mine/address/address?from=cart&way=${this.routerVal.way
this.routerVal.way
}&parentOrder=${encodeURIComponent( }&parentOrder=${encodeURIComponent(
JSON.stringify(this.routerVal.parentOrder) JSON.stringify(this.routerVal.parentOrder)
)}` )}`
); );
}, },
clickToStoreAddress() {
this.navigateTo(
`/pages/mine/address/storeAddress?from=cart&way=${this.routerVal.way
}&storeId=${this.remarkVal[0].storeId}`
);
},
// //
pintuanWay() { pintuanWay() {
@ -561,6 +486,16 @@ export default {
createTradeFun() { createTradeFun() {
// //
this.$u.throttle(() => { this.$u.throttle(() => {
if (this.shippingText === 'SELF_PICK_UP') {
if (!this.storeAddress.id) {
uni.showToast({
title: "请选择提货点",
duration: 2000,
icon: "none",
});
return false;
}
} else if (this.shippingText === 'LOGISTICS') {
if (!this.address.id) { if (!this.address.id) {
uni.showToast({ uni.showToast({
title: "请选择地址", title: "请选择地址",
@ -569,6 +504,8 @@ export default {
}); });
return false; return false;
} }
}
// //
let client; let client;
// #ifdef H5 // #ifdef H5
@ -653,9 +590,40 @@ export default {
} }
}); });
}, },
//
async getDistribution() {
let shopRes = await API_Trade.shippingMethodList({ way: this.routerVal.way });
let shopList;
if (shopRes.data.success) {
shopList = shopRes.data.result;
let way = [];
console.log(shopList)
this.shippingWay.forEach((item) => {
shopList.forEach((child) => {
if (item.value == child) {
way.push(item);
}
});
});
this.shippingMethod = way;
}
},
//
async confirmDistribution(val) {
let res = await API_Trade.setShipMethod({
shippingMethod: val[0].value,
way: this.routerVal.way,
});
this.shippingText = val[0].value;
if (res.data.success) {
this.getOrderList();
}
},
// //
getOrderList() { async getOrderList() {
this.notSupportFreight = []; this.notSupportFreight = [];
// //
API_Trade.getCheckoutParams(this.routerVal.way).then((res) => { API_Trade.getCheckoutParams(this.routerVal.way).then((res) => {
@ -694,7 +662,9 @@ export default {
res.data.result.memberAddress.consigneeAddressPath = res.data.result.memberAddress.consigneeAddressPath =
res.data.result.memberAddress.consigneeAddressPath.split(","); res.data.result.memberAddress.consigneeAddressPath.split(",");
} }
if (res.data.result.storeAddress) {
this.storeAddress = res.data.result.storeAddress
}
if ( if (
res.data.result.notSupportFreight && res.data.result.notSupportFreight &&
res.data.result.notSupportFreight.length != 0 res.data.result.notSupportFreight.length != 0
@ -725,22 +695,26 @@ page {
.main-color { .main-color {
font-weight: bold; font-weight: bold;
} }
.uinput { .uinput {
/deep/ input { /deep/ input {
text-align: right; text-align: right;
} }
} }
.promotionNotice { .promotionNotice {
font-size: 24rpx; font-size: 24rpx;
margin: 20rpx 0; margin: 20rpx 0;
color: $aider-light-color; color: $aider-light-color;
} }
.nums { .nums {
flex: 2; flex: 2;
color: $light-color; color: $light-color;
text-align: center; text-align: center;
} }
.wait { .wait {
font-size: 22rpx; font-size: 22rpx;
font-family: PingFang SC, PingFang SC-Regular; font-family: PingFang SC, PingFang SC-Regular;
@ -756,6 +730,7 @@ page {
width: 143rpx; width: 143rpx;
border-bottom: 2px dotted #999; border-bottom: 2px dotted #999;
} }
.tabbar-left { .tabbar-left {
margin-left: 32rpx; margin-left: 32rpx;
} }
@ -808,6 +783,7 @@ page {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.tr { .tr {
text-align: right; text-align: right;
} }
@ -830,6 +806,7 @@ page {
.box2 { .box2 {
margin-top: 20rpx; margin-top: 20rpx;
} }
.notSupportFreight { .notSupportFreight {
position: fixed; position: fixed;
@ -845,10 +822,11 @@ page {
width: 100%; width: 100%;
transition: 0.35s; transition: 0.35s;
> .tips { >.tips {
margin: 0 32rpx; margin: 0 32rpx;
} }
} }
/deep/ .u-notice-bar-wrap { /deep/ .u-notice-bar-wrap {
width: 100% !important; width: 100% !important;
} }
@ -926,7 +904,8 @@ page {
color: $main-color; color: $main-color;
font-size: 26rpx; font-size: 26rpx;
font-weight: bold; font-weight: bold;
> span {
>span {
font-size: 36rpx; font-size: 36rpx;
} }
} }
@ -936,7 +915,8 @@ page {
color: $main-color; color: $main-color;
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
> .goods-price {
>.goods-price {
font-size: 38rpx; font-size: 38rpx;
padding: 0 2rpx; padding: 0 2rpx;
} }
@ -977,6 +957,7 @@ page {
text-align: left; text-align: left;
overflow: hidden; overflow: hidden;
} }
.default { .default {
background: $main-color; background: $main-color;
font-size: 24rpx; font-size: 24rpx;
@ -985,6 +966,7 @@ page {
color: #fff; color: #fff;
margin-right: 20rpx; margin-right: 20rpx;
} }
.address-box { .address-box {
border-radius: 40rpx; border-radius: 40rpx;
border-top-left-radius: 0 !important; border-top-left-radius: 0 !important;
@ -999,9 +981,11 @@ page {
font-weight: normal; font-weight: normal;
letter-spacing: 1rpx; letter-spacing: 1rpx;
} }
.user-box { .user-box {
padding: 32rpx; padding: 32rpx;
} }
.user-address-detail { .user-address-detail {
color: #333; color: #333;
font-size: 38rpx; font-size: 38rpx;
@ -1009,13 +993,16 @@ page {
margin: 20rpx 0; margin: 20rpx 0;
letter-spacing: 1rpx; letter-spacing: 1rpx;
} }
.mobile { .mobile {
margin-left: 20rpx; margin-left: 20rpx;
} }
.price { .price {
font-size: 50rpx !important; font-size: 50rpx !important;
margin: 0 2rpx; margin: 0 2rpx;
} }
.goods-detail { .goods-detail {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -1023,12 +1010,14 @@ page {
justify-content: center; justify-content: center;
flex: 8; flex: 8;
margin-left: 20rpx !important; margin-left: 20rpx !important;
> p {
>p {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
} }
.goods-item { .goods-item {
margin: 20rpx 0; margin: 20rpx 0;
} }

View File

@ -12,25 +12,25 @@
<view class="info-view logi-view"> <view class="info-view logi-view">
<view class="logi-List" v-if="logiList && logiList.traces.length != 0"> <view class="logi-List" v-if="logiList && logiList.traces.length != 0">
<view class="logi-List-title"> <view class="logi-List-title">
{{logiList.traces[logiList.traces.length-1].AcceptStation}} {{ logiList.traces[logiList.traces.length - 1].AcceptStation }}
</view> </view>
<view class="logi-List-time"> <view class="logi-List-time">
{{logiList.traces[logiList.traces.length-1].AcceptTime}} {{ logiList.traces[logiList.traces.length - 1].AcceptTime }}
</view> </view>
</view> </view>
<view class="logi-List" v-else> <view class="logi-List" v-else>
<view class="verificationCode" v-if="order.verificationCode "> <view class="verificationCode" v-if="order.verificationCode">
券码 {{order.verificationCode}} 券码 {{ order.verificationCode }}
</view> </view>
<view v-else class="logi-List-title"> <view v-else class="logi-List-title">
{{'暂无物流信息'}} {{ '暂无物流信息' }}
</view> </view>
</view> </view>
</view> </view>
<!-- 地址 --> <!-- 地址 -->
<view class="info-view"> <view class="info-view" v-if="order.deliveryMethod == 'LOGISTICS'">
<view class="address-view"> <view class="address-view">
<view> <view>
<view class="address-title"> <view class="address-title">
@ -42,6 +42,21 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 提货地址 -->
<view class="info-view" v-if="order.deliveryMethod == 'SELF_PICK_UP'">
<view class="address-view">
<view>
<view class="address-title">
自提点地址:<span>{{ order.storeAddressPath }}</span>
</view>
<view class="address-title">
联系方式:<span>{{ order.storeAddressMobile }}</span>
</view>
</view>
</view>
</view>
<!-- 商品信息 --> <!-- 商品信息 -->
<view> <view>
<view class="seller-view"> <view class="seller-view">
@ -49,7 +64,8 @@
<view class="seller-info u-flex u-row-between"> <view class="seller-info u-flex u-row-between">
<view class="seller-name" @click="tostore(order)"> <view class="seller-name" @click="tostore(order)">
<view class="name">{{ order.storeName }}</view> <view class="name">{{ order.storeName }}</view>
<view class="status" v-if="orderStatusList[order.orderStatus]"> {{ orderStatusList[order.orderStatus].title }}</view> <view class="status" v-if="orderStatusList[order.orderStatus]"> {{ orderStatusList[order.orderStatus].title
}}</view>
</view> </view>
<view class="order-sn"></view> <view class="order-sn"></view>
</view> </view>
@ -70,7 +86,8 @@
<view>x{{ sku.num }}</view> <view>x{{ sku.num }}</view>
<view class="good-complaint"> <view class="good-complaint">
<u-tag size="mini" mode="plain" @click="complaint(sku)" v-if="sku.complainStatus == 'NO_APPLY'" text="投诉" type="info" /> <u-tag size="mini" mode="plain" @click="complaint(sku)" v-if="sku.complainStatus == 'NO_APPLY'"
text="投诉" type="info" />
</view> </view>
</view> </view>
</view> </view>
@ -105,15 +122,18 @@
</view> </view>
<!-- 客户服务 售后取消订单查看物流投诉等 --> <!-- 客户服务 售后取消订单查看物流投诉等 -->
<view class="info-view" <view class="info-view"
v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true || order.orderStatus == 'DELIVERED' || order.orderStatus != 'UNPAID' && order.orderPromotionType =='PINTUAN'"> v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true || order.orderStatus == 'DELIVERED' || order.orderStatus != 'UNPAID' && order.orderPromotionType == 'PINTUAN'">
<view style="width: 100%"> <view style="width: 100%">
<view class="order-info-view"> <view class="order-info-view">
<view class="title">服务</view> <view class="title">服务</view>
</view> </view>
<view class="customer-list"> <view class="customer-list">
<view class="customer-service" v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true" @click="onCancel(order.sn)"></view> <view class="customer-service"
v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true"
@click="onCancel(order.sn)">取消订单</view>
<view class="customer-service" v-if="order.orderStatus == 'DELIVERED'" @click="onLogistics(order)"></view> <view class="customer-service" v-if="order.orderStatus == 'DELIVERED'" @click="onLogistics(order)"></view>
<view class="customer-service" v-if="order.orderStatus != 'UNPAID' && order.orderPromotionType =='PINTUAN' " @click="ByUserMessage(order)"></view> <view class="customer-service" v-if="order.orderStatus != 'UNPAID' && order.orderPromotionType == 'PINTUAN'"
@click="ByUserMessage(order)">查看拼团信息</view>
</view> </view>
</view> </view>
</view> </view>
@ -175,13 +195,16 @@
<view> <view>
<!-- 全部 --> <!-- 全部 -->
<!-- 等待付款 --> <!-- 等待付款 -->
<u-button type="error" ripple size="mini" v-if=" order.allowOperationVO && order.allowOperationVO.pay" @click="toPay(order)"></u-button> <u-button type="error" ripple size="mini" v-if="order.allowOperationVO && order.allowOperationVO.pay"
@click="toPay(order)">立即付款</u-button>
<!-- <u-button class="rebuy-btn" size="mini" v-if="order.order_operate_allowable_vo.allow_service_cancel"> </u-button> --> <!-- <u-button class="rebuy-btn" size="mini" v-if="order.order_operate_allowable_vo.allow_service_cancel"> </u-button> -->
<!-- <div class="pay-btn">确认收货</div> --> <!-- <div class="pay-btn">确认收货</div> -->
<u-button shape="circle" ripple type="warning" size="mini" v-if="order.orderStatus == 'DELIVERED'" @click="onRog(order.sn)"></u-button> <u-button shape="circle" ripple type="warning" size="mini" v-if="order.orderStatus == 'DELIVERED'"
@click="onRog(order.sn)">确认收货</u-button>
<!-- 交易完成 未评价 --> <!-- 交易完成 未评价 -->
<u-button shape="circle" ripple size="mini" v-if="order.orderStatus == 'COMPLETE'" @click="onComment(order.sn)"></u-button> <u-button shape="circle" ripple size="mini" v-if="order.orderStatus == 'COMPLETE'"
@click="onComment(order.sn)">评价商品</u-button>
</view> </view>
</view> </view>
</view> </view>
@ -193,7 +216,8 @@
<u-radio-group v-model="reason"> <u-radio-group v-model="reason">
<view class="value"> <view class="value">
<view class="radio-view" v-for="(item, index) in cancelList" :key="index"> <view class="radio-view" v-for="(item, index) in cancelList" :key="index">
<u-radio :active-color="lightColor" label-size="25" shape="circle" :name="item.reason" @change="reasonChange">{{ item.reason }}</u-radio> <u-radio :active-color="lightColor" label-size="25" shape="circle" :name="item.reason"
@change="reasonChange">{{ item.reason }}</u-radio>
</view> </view>
</view> </view>
</u-radio-group> </u-radio-group>
@ -204,10 +228,12 @@
</view> </view>
</u-popup> </u-popup>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<u-modal v-model="rogShow" :show-cancel-button="true" :content="'是否确认收货?'" :confirm-color="lightColor" @confirm="confirmRog"></u-modal> <u-modal v-model="rogShow" :show-cancel-button="true" :content="'是否确认收货?'" :confirm-color="lightColor"
@confirm="confirmRog"></u-modal>
<!-- 分享 --> <!-- 分享 -->
<shares v-if="shareFlage " :thumbnail="orderDetail.orderItems[0].image" :goodsName="orderDetail.orderItems[0].goodsName" @close="shareFlage = false" /> <shares v-if="shareFlage" :thumbnail="orderDetail.orderItems[0].image"
:goodsName="orderDetail.orderItems[0].goodsName" @close="shareFlage = false" />
</view> </view>
</template> </template>
@ -255,6 +281,10 @@ export default {
title: "已完成", title: "已完成",
value: "订单已完成,祝您生活愉快", value: "订单已完成,祝您生活愉快",
}, },
STAY_PICKED_UP: {
title: "待自提",
value: "商品正在等待提取",
},
TAKE: { TAKE: {
title: "待核验", title: "待核验",
}, },
@ -272,7 +302,6 @@ export default {
}, },
onLoad(options) { onLoad(options) {
this.loadData(options.sn); this.loadData(options.sn);
this.loadLogistics(options.sn);
this.sn = options.sn; this.sn = options.sn;
}, },
methods: { methods: {
@ -304,7 +333,7 @@ export default {
this.orderGoodsList[0].goodsId, this.orderGoodsList[0].goodsId,
}); });
}, },
loadData(sn) { async loadData(sn) {
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
}); });
@ -313,9 +342,12 @@ export default {
this.order = order.order; this.order = order.order;
this.orderGoodsList = order.orderItems; this.orderGoodsList = order.orderItems;
this.orderDetail = res.data.result; this.orderDetail = res.data.result;
if (this.order.deliveryMethod === 'LOGISTICS') {
this.loadLogistics()
}
uni.hideLoading(); uni.hideLoading();
}); });
}, },
onReceipt(val) { onReceipt(val) {
uni.navigateTo({ uni.navigateTo({
@ -491,9 +523,11 @@ export default {
<style lang="scss"> <style lang="scss">
@import "./goods.scss"; @import "./goods.scss";
.empty { .empty {
width: 100%; width: 100%;
} }
.customer-service { .customer-service {
background: #ededed; background: #ededed;
// padding: 12rpx 40rpx; // padding: 12rpx 40rpx;
@ -506,51 +540,58 @@ export default {
font-size: 24rpx; font-size: 24rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
.customer-list { .customer-list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.logi-view { .logi-view {
justify-content: space-between; justify-content: space-between;
padding: 30rpx !important; padding: 30rpx !important;
margin: 0 !important; margin: 0 !important;
transform: translateY(-10px); transform: translateY(-10px);
} }
.order-status { .order-status {
color: #fff; color: #fff;
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 36rpx; font-size: 36rpx;
margin-top: 40rpx; margin-top: 40rpx;
> div {
>div {
font-size: 24rpx; font-size: 24rpx;
margin-top: 10rpx; margin-top: 10rpx;
} }
} }
.logi-List-title { .logi-List-title {
margin-bottom: 10rpx; margin-bottom: 10rpx;
font-size: 26rpx; font-size: 26rpx;
} }
.logi-List-time { .logi-List-time {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
} }
.info-detail { .info-detail {
margin-right: 30rpx; margin-right: 30rpx;
color: #333; color: #333;
} }
.order-view { .order-view {
margin: 0 !important; margin: 0 !important;
border-radius: 0 !important; border-radius: 0 !important;
width: 100%; width: 100%;
height: 200rpx; height: 200rpx;
padding: 0 !important; padding: 0 !important;
background-image: linear-gradient( background-image: linear-gradient(to right,
to right,
$light-color 0%, $light-color 0%,
$aider-light-color 100% $aider-light-color 100%) !important;
) !important;
} }
page, page,
.content { .content {
background: #f1f1f1; background: #f1f1f1;
@ -575,18 +616,22 @@ page,
padding: 16rpx 0rpx; padding: 16rpx 0rpx;
} }
} }
.seller-view { .seller-view {
margin: 20rpx 0; margin: 20rpx 0;
padding: 15rpx 0; padding: 15rpx 0;
border-radius: 30rpx; border-radius: 30rpx;
} }
.address-title { .address-title {
font-size: 26rpx; font-size: 26rpx;
font-weight: bold; font-weight: bold;
> span {
>span {
margin-right: 20rpx; margin-right: 20rpx;
} }
} }
.info-view { .info-view {
display: flex; display: flex;
margin: 0 0 20rpx 0; margin: 0 0 20rpx 0;
@ -654,10 +699,12 @@ page,
} }
} }
} }
.verificationCode { .verificationCode {
font-weight: bold; font-weight: bold;
letter-spacing: 2rpx; letter-spacing: 2rpx;
} }
.bottom_view { .bottom_view {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;