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

View File

@ -12,25 +12,25 @@
<view class="info-view logi-view">
<view class="logi-List" v-if="logiList && logiList.traces.length != 0">
<view class="logi-List-title">
{{logiList.traces[logiList.traces.length-1].AcceptStation}}
{{ logiList.traces[logiList.traces.length - 1].AcceptStation }}
</view>
<view class="logi-List-time">
{{logiList.traces[logiList.traces.length-1].AcceptTime}}
{{ logiList.traces[logiList.traces.length - 1].AcceptTime }}
</view>
</view>
<view class="logi-List" v-else>
<view class="verificationCode" v-if="order.verificationCode ">
券码 {{order.verificationCode}}
<view class="verificationCode" v-if="order.verificationCode">
券码 {{ order.verificationCode }}
</view>
<view v-else class="logi-List-title">
{{'暂无物流信息'}}
{{ '暂无物流信息' }}
</view>
</view>
</view>
<!-- 地址 -->
<view class="info-view">
<view class="info-view" v-if="order.deliveryMethod == 'LOGISTICS'">
<view class="address-view">
<view>
<view class="address-title">
@ -42,6 +42,21 @@
</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 class="seller-view">
@ -49,7 +64,8 @@
<view class="seller-info u-flex u-row-between">
<view class="seller-name" @click="tostore(order)">
<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 class="order-sn"></view>
</view>
@ -70,7 +86,8 @@
<view>x{{ sku.num }}</view>
<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>
@ -105,15 +122,18 @@
</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 class="order-info-view">
<view class="title">服务</view>
</view>
<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 != '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>
@ -129,18 +149,18 @@
<view class="order-info-view">
<view class="title">下单时间</view>
<view class="value">{{
order.createTime
order.createTime
}}</view>
</view>
<view class="order-info-view">
<view class="title">支付状态</view>
<view class="value">
{{
order.payStatus == "UNPAID"
? "未付款"
: order.payStatus == "PAID"
? "已付款"
: ""
order.payStatus == "UNPAID"
? "未付款"
: order.payStatus == "PAID"
? "已付款"
: ""
}}</view>
</view>
<view class="order-info-view">
@ -175,13 +195,16 @@
<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> -->
<!-- <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>
@ -193,7 +216,8 @@
<u-radio-group v-model="reason">
<view class="value">
<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>
</u-radio-group>
@ -204,10 +228,12 @@
</view>
</u-popup>
<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>
</template>
@ -255,6 +281,10 @@ export default {
title: "已完成",
value: "订单已完成,祝您生活愉快",
},
STAY_PICKED_UP: {
title: "待自提",
value: "商品正在等待提取",
},
TAKE: {
title: "待核验",
},
@ -272,7 +302,6 @@ export default {
},
onLoad(options) {
this.loadData(options.sn);
this.loadLogistics(options.sn);
this.sn = options.sn;
},
methods: {
@ -304,7 +333,7 @@ export default {
this.orderGoodsList[0].goodsId,
});
},
loadData(sn) {
async loadData(sn) {
uni.showLoading({
title: "加载中",
});
@ -313,9 +342,12 @@ export default {
this.order = order.order;
this.orderGoodsList = order.orderItems;
this.orderDetail = res.data.result;
if (this.order.deliveryMethod === 'LOGISTICS') {
this.loadLogistics()
}
uni.hideLoading();
});
},
onReceipt(val) {
uni.navigateTo({
@ -383,8 +415,8 @@ export default {
toPay(val) {
val.sn
? uni.navigateTo({
url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
})
url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
})
: false;
}, //
deleteOrder(index) {
@ -491,9 +523,11 @@ export default {
<style lang="scss">
@import "./goods.scss";
.empty {
width: 100%;
}
.customer-service {
background: #ededed;
// padding: 12rpx 40rpx;
@ -506,51 +540,58 @@ export default {
font-size: 24rpx;
border-radius: 10rpx;
}
.customer-list {
display: flex;
flex-wrap: wrap;
}
.logi-view {
justify-content: space-between;
padding: 30rpx !important;
margin: 0 !important;
transform: translateY(-10px);
}
.order-status {
color: #fff;
width: 100%;
text-align: center;
font-size: 36rpx;
margin-top: 40rpx;
> div {
>div {
font-size: 24rpx;
margin-top: 10rpx;
}
}
.logi-List-title {
margin-bottom: 10rpx;
font-size: 26rpx;
}
.logi-List-time {
font-size: 24rpx;
color: #999;
}
.info-detail {
margin-right: 30rpx;
color: #333;
}
.order-view {
margin: 0 !important;
border-radius: 0 !important;
width: 100%;
height: 200rpx;
padding: 0 !important;
background-image: linear-gradient(
to right,
$light-color 0%,
$aider-light-color 100%
) !important;
background-image: linear-gradient(to right,
$light-color 0%,
$aider-light-color 100%) !important;
}
page,
.content {
background: #f1f1f1;
@ -575,18 +616,22 @@ page,
padding: 16rpx 0rpx;
}
}
.seller-view {
margin: 20rpx 0;
padding: 15rpx 0;
border-radius: 30rpx;
}
.address-title {
font-size: 26rpx;
font-weight: bold;
> span {
>span {
margin-right: 20rpx;
}
}
.info-view {
display: flex;
margin: 0 0 20rpx 0;
@ -654,10 +699,12 @@ page,
}
}
}
.verificationCode {
font-weight: bold;
letter-spacing: 2rpx;
}
.bottom_view {
width: 100%;
height: 100rpx;