mym vor 1 Jahr
Ursprung
Commit
f3e6efe950
1 geänderte Dateien mit 22 neuen und 0 gelöschten Zeilen
  1. 22 0
      pages/market/one/leader/order.vue

+ 22 - 0
pages/market/one/leader/order.vue

@@ -33,6 +33,9 @@
 					<template v-if="item.enterpriseConfirm == 0">
 						<view class="an" style="color: #f44336" v-if="user.userType == 2" @click.stop="confirm(item.id)">取消订单</view>
 					</template>
+					<template v-if="item.enterpriseConfirm == 3">
+						<view class="an" style="color: #f44336" v-if="user.userType == 2" @click.stop="del(item.id)">删除订单</view>
+					</template>
 				</view>
 			</view>
 			<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
@@ -138,6 +141,25 @@ export default {
 					}
 				}
 			});
+		},
+		// 删除订单
+		del(id) {
+			uni.showModal({
+				title: '提示',
+				content: '确认删除该订单?',
+				success: res => {
+					if (res.confirm) {
+						this.http.request({
+							url: '/level-one-server/app/TbOrder/delete',
+							data: { id: id },
+							success: resp => {
+								uni.showToast({ title: '操作成功' });
+								this.refresh();
+							}
+						});
+					}
+				}
+			});
 		}
 	},
 	//下拉刷新