From 30cb0df99ada7cffda1bd5b97c52ea3e45c4cda7 Mon Sep 17 00:00:00 2001
From: xuxy <1059738716@qq.com>
Date: 星期一, 12 八月 2024 22:05:41 +0800
Subject: [PATCH] update
---
pages/order/order-sale/order-sale.vue | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 53 insertions(+), 1 deletions(-)
diff --git a/pages/order/order-sale/order-sale.vue b/pages/order/order-sale/order-sale.vue
index 81dc4ff..d388c1c 100644
--- a/pages/order/order-sale/order-sale.vue
+++ b/pages/order/order-sale/order-sale.vue
@@ -51,6 +51,12 @@
<view class="label">理由</view>
<view class="value">{{item.reason}}</view>
</view>
+ <!-- #ifdef PUB_CUSTOMER -->
+ <view class="line-gray" v-if="item.status=='PENDING'"></view>
+ <view class="flex buttons" v-if="item.status=='PENDING'">
+ <view class="button button-1 m-l-15 m-r-0" @click="cancelSale(item)">取消售后</view>
+ </view>
+ <!-- #endif -->
</view>
</view>
</view>
@@ -83,7 +89,6 @@
},
onReachBottom() {
- this.page.current += 1
this.getMore()
},
async onPullDownRefresh() {
@@ -92,6 +97,22 @@
uni.stopPullDownRefresh()
},
methods: {
+ async cancelSale(item) {
+ await this.$message.confirm('是否取消售后')
+ this.$message.showLoading()
+ const {
+ code,
+ data
+ } = await this.$http.request('get', '/api/customer/sales/list/cancel', {
+ params: {
+ id: item.id
+ }
+ })
+ this.$message.hideLoading()
+ if (code === 0) {
+ this.refreshList()
+ }
+ },
changeIndex(index) {
if (this.tabIndex !== index) {
this.tabIndex = index
@@ -165,6 +186,37 @@
max-width: unset;
}
}
+
+ .buttons {
+ display: flex;
+ margin-left: auto;
+ width: fit-content;
+
+ .button {
+ // width: 216rpx;
+ padding: 10rpx 20rpx;
+ line-height: 34rpx;
+ font-size: 24rpx;
+ height: 34rpx;
+ background: #20613D;
+ text-align: center;
+ border-radius: 30rpx;
+
+ }
+
+ .button-1 {
+ background: #fff;
+ color: #333;
+ border: 2rpx solid #333;
+
+ }
+
+ .button-0 {
+ color: #fff;
+ border: 2rpx solid #20613D;
+ }
+ }
+
}
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3