复制订单详情

version/0412
shuxiaoquan 8 months ago
parent 913d2a5f76
commit 0fb20e1701
  1. 68
      pages/order/detail.vue

@ -143,10 +143,14 @@
<view class="fd">
{{ order.total_num }}件商品实付款<text>{{ order.pay_price?Number(order.pay_price):order.pay_price }}</text>
</view>
<view class="line" v-if="order.pay_status == PayStatusEnum.PENDING.value">
<view class="line"
v-if="order.order_status == OrderStatusEnum.NORMAL.value && order.pay_status == PayStatusEnum.SUCCESS.value && order.delivery_status == DeliveryStatusEnum.NOT_DELIVERED.value"
>
</view>
<view class="cancel" @click="onCancel(order.order_id)"
v-if="order.pay_status == PayStatusEnum.PENDING.value">
<view class="cancel" @click="onCancel(order.order_id)"
v-if="order.order_status == OrderStatusEnum.NORMAL.value && order.pay_status == PayStatusEnum.SUCCESS.value && order.delivery_status == DeliveryStatusEnum.NOT_DELIVERED.value"
>
取消订单
</view>
</view>
@ -316,7 +320,12 @@
v-if="order.order_status == OrderStatusEnum.COMPLETED.value && order.is_comment == 0"
@click="handleTargetComment(order.order_id)">
评价
</view> -->
</view> -->
<view class="buyAgain" @click="onCopyOrderInfo(order)"
style="width: 200rpx;color:#fff;background: linear-gradient( 180deg, #FD5D06 0%, #F3211A 100%);"
>
复制订单详情
</view>
</view>
</view>
@ -431,7 +440,7 @@
onShareAppMessage(res) {
return {
title: this.Store.storeInfo.store_name,
path: "pages/order/detail?orderId="+this.orderId, //
path: "/pages/order/detail?orderId="+this.orderId, //
imageUrl:this.Store.storeInfo.image_url,
success: function(res){
//
@ -449,7 +458,42 @@
}
}
},
methods: {
methods: {
onCopyOrderInfo(obj) {
console.log(obj)
/**
* 1.订单编号:
2.商品型号:
3.商品编码:
4.商品单价:
5.商品数量:
6.商品总价:
7.收件人名字:
8.收件人电话:
9.收件人地址:
*/
let goods_no = "";
if(obj.goods && obj.goods.length > 0){
obj.goods.map(a=>{
goods_no+=`商品型号: ${(a.goods_sku_id !=0?a.goods_sku_id:'无')};商品编码: ${a.goods_no?a.goods_no:'无编码'};商品单价: ¥${a.goods_price}元;商品数量: ${a.total_num};商品总价: ¥${a.total_price}`
})
}
const str =`订单编号:${obj.order_no};${goods_no};收件人名字:${obj.address.name};收件人电话:${obj.address.phone};收件人地址:${obj.address.region.province+obj.address.region.city+obj.address.region.region+obj.address.detail};`
console.log(str)
uni.setClipboardData({
data: str,
success() {
uni.getClipboardData({
success() {
uni.showToast({
icon: "none",
title: "复制成功"
})
}
})
}
})
},
//
callStore(phone) {
uni.makePhoneCall({
@ -512,14 +556,14 @@
//
handleTargetExtract(shopId) {
this.$navTo('pages/shop/detail', {
this.$navTo('/pages/shop/detail', {
shopId
})
},
//
handleTargetExpress() {
this.$navTo('pages/order/express/index', {
this.$navTo('/pages/order/express/index', {
orderId: this.orderId
})
},
@ -527,12 +571,12 @@
//
handleTargetGoods(goodsId) {
uni.redirectTo({
url: 'pages/goods/detail?goodsId=' + goodsId //
url: '/pages/goods/detail?goodsId=' + goodsId //
})
},
//
onAdress(orderId) {
this.$navTo('pages/address/index', {
this.$navTo('/pages/address/index', {
orderId
})
},
@ -628,14 +672,14 @@
},
//
onPay(orderId) {
this.$navTo('pages/checkout/cashier/index', {
this.$navTo('/pages/checkout/cashier/index', {
orderId
})
},
//
handleTargetComment(orderId) {
this.$navTo('pages/order/comment/index', {
this.$navTo('/pages/order/comment/index', {
orderId
})
},

Loading…
Cancel
Save