From c212c9ab501e1aff9e2dd90e8e87871c0bc7f1bc Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期二, 30 七月 2024 14:03:29 +0800 Subject: [PATCH] fix bug --- pages/order/order-sale/order-sale.vue | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 53 insertions(+), 0 deletions(-) diff --git a/pages/order/order-sale/order-sale.vue b/pages/order/order-sale/order-sale.vue index 81dc4ff..e35e0bf 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> @@ -92,6 +98,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 +187,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