|
@@ -38,16 +38,22 @@
|
|
|
</view>
|
|
|
<view class="Wrap-Btn">
|
|
|
<!-- 沟通按钮 -->
|
|
|
- <up-button type="primary" text="沟通" shape="circle" :customStyle="wrapqx">
|
|
|
+ <up-button type="primary" text="沟通" shape="circle" :customStyle="wrapqx">
|
|
|
</up-button>
|
|
|
|
|
|
<!-- 当 orderStatus 为 3 显示退款按钮 -->
|
|
|
<up-button v-if="item.orderStatus === '3'" type="error" text="退款"
|
|
|
- shape="circle":customStyle="wrapqx" @click="handleRefund(item)" >
|
|
|
+ shape="circle" :customStyle="wrapqx" @click="handleRefund(item)">
|
|
|
</up-button>
|
|
|
|
|
|
- <!-- 否则显示查看按钮 -->
|
|
|
- <up-button v-else type="error" text="查看" shape="circle" :customStyle="wrapqx"
|
|
|
+ <!-- 当 orderStatus 为 1 显示取消订单按钮 -->
|
|
|
+ <up-button v-if="item.orderStatus === '1'" type="warning" text="取消"
|
|
|
+ shape="circle" :customStyle="wrapqx" @click="handleCancel(item)">
|
|
|
+ </up-button>
|
|
|
+
|
|
|
+ <!-- 其他状态显示查看按钮 -->
|
|
|
+ <up-button v-if="item.orderStatus !== '1' && item.orderStatus !== '3'"
|
|
|
+ type="info" text="查看" shape="circle" :customStyle="wrapqx"
|
|
|
@click="handlClick(item)">
|
|
|
</up-button>
|
|
|
</view>
|
|
@@ -93,7 +99,7 @@
|
|
|
value: "4",
|
|
|
},
|
|
|
{
|
|
|
- name: "已取消",
|
|
|
+ name: "售后",
|
|
|
value: "2",
|
|
|
}
|
|
|
]
|
|
@@ -130,13 +136,6 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- // 评论
|
|
|
- const handleComment = () => {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages_classify/pages/orderItem/userComment`
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
function onChange(tabItem) {
|
|
|
emits('fetchData', tabItem.value)
|
|
|
}
|
|
@@ -152,7 +151,26 @@
|
|
|
const wrapqx = {
|
|
|
height: '50rpx',
|
|
|
width: '100rpx',
|
|
|
+ marginLeft: '8rpx'
|
|
|
}
|
|
|
+
|
|
|
+ // 取消订单
|
|
|
+ const handleCancel = (item) => {
|
|
|
+ const mainOrderId = item.mainOrderId;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定要取消该订单吗?',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ // TODO: 调用取消订单接口
|
|
|
+ uni.showToast({
|
|
|
+ title: '订单已取消',
|
|
|
+ icon: 'success'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
@@ -212,8 +230,9 @@
|
|
|
|
|
|
.Wrap-Btn {
|
|
|
display: flex;
|
|
|
- gap: 6px;
|
|
|
- /* 按钮间距 */
|
|
|
+ gap: 8px;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: flex-end;
|
|
|
}
|
|
|
|
|
|
</style>
|