|
@@ -5,19 +5,21 @@
|
|
</view>
|
|
</view>
|
|
<view class="goodsList">
|
|
<view class="goodsList">
|
|
<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
|
|
<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
|
|
- <view class="title">{{ item.enterpriseName }}</view>
|
|
|
|
- <view class="state" v-if="item.enterpriseConfirm == 0">
|
|
|
|
- <text class="icon"></text>
|
|
|
|
- <text>商家未确认</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="state" v-if="item.enterpriseConfirm == 1">
|
|
|
|
- <text class="icon" style="color: #13ce66"></text>
|
|
|
|
- <text>已确认</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="state" v-if="item.enterpriseConfirm == 2">
|
|
|
|
- <text class="icon" style="color: #f44336"></text>
|
|
|
|
- <text>已取消</text>
|
|
|
|
|
|
+ <view class="title">{{ item.enterpriseName }}
|
|
|
|
+ <view class="state" v-if="item.enterpriseConfirm == 0">
|
|
|
|
+ <text class="icon"></text>
|
|
|
|
+ <text>商家未确认</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="state" v-if="item.enterpriseConfirm == 1">
|
|
|
|
+ <text class="icon" style="color: #13ce66"></text>
|
|
|
|
+ <text>已确认</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="state" v-if="item.enterpriseConfirm == 2">
|
|
|
|
+ <text class="icon" style="color: #f44336"></text>
|
|
|
|
+ <text>已取消</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
<image src="../../../../static/news.jpg" mode="aspectFill" class="pic"></image>
|
|
<image src="../../../../static/news.jpg" mode="aspectFill" class="pic"></image>
|
|
<view class="con">
|
|
<view class="con">
|
|
<view class="productName omit">{{ item.goodsNames }}</view>
|
|
<view class="productName omit">{{ item.goodsNames }}</view>
|
|
@@ -30,8 +32,8 @@
|
|
<view class="clear"></view>
|
|
<view class="clear"></view>
|
|
<view class="op">
|
|
<view class="op">
|
|
<view class="date">2022-12-12:12:12</view>
|
|
<view class="date">2022-12-12:12:12</view>
|
|
- <template v-if="item.enterpriseConfirm == 0">
|
|
|
|
- <view class="an" style="color: #f44336" v-if="user.userType == 1" @click.stop="confirm(item.id)">边民确认</view>
|
|
|
|
|
|
+ <template v-if="item.enterpriseConfirm == 1">
|
|
|
|
+ <view class="an" style="color: #f44336" v-if="user.userType == 1" @click.stop="confirmOrder(item.id)">边民确认</view>
|
|
</template>
|
|
</template>
|
|
<template v-if="item.enterpriseConfirm == 0">
|
|
<template v-if="item.enterpriseConfirm == 0">
|
|
<view class="an" style="color: #f44336" v-if="user.userType == 2" @click.stop="confirm(item.id)">取消订单</view>
|
|
<view class="an" style="color: #f44336" v-if="user.userType == 2" @click.stop="confirm(item.id)">取消订单</view>
|
|
@@ -110,7 +112,7 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- //点击tab切换
|
|
|
|
|
|
+ // 点击tab切换
|
|
click(e) {
|
|
click(e) {
|
|
console.log(e);
|
|
console.log(e);
|
|
this.param.orderStatus = e.enterpriseConfirm;
|
|
this.param.orderStatus = e.enterpriseConfirm;
|
|
@@ -120,14 +122,25 @@ export default {
|
|
detail(item) {
|
|
detail(item) {
|
|
uni.navigateTo({url: '/pages/market/one/leader/detail?id=' + item.id});
|
|
uni.navigateTo({url: '/pages/market/one/leader/detail?id=' + item.id});
|
|
},
|
|
},
|
|
- //刷新数据
|
|
|
|
|
|
+ // 刷新数据
|
|
refresh() {
|
|
refresh() {
|
|
this.loadMore = true;
|
|
this.loadMore = true;
|
|
this.param.pageNo = 1;
|
|
this.param.pageNo = 1;
|
|
this.list = [];
|
|
this.list = [];
|
|
this.getData();
|
|
this.getData();
|
|
},
|
|
},
|
|
- //通知商家
|
|
|
|
|
|
+ //边民确认订单
|
|
|
|
+ confirmOrder(id) {
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/level-one-server/app/TbPeople/confirmOrder',
|
|
|
|
+ data: { orderId: id },
|
|
|
|
+ success: resp => {
|
|
|
|
+ uni.showToast({ title: '操作成功' });
|
|
|
|
+ this.refresh();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 取消订单
|
|
confirm(id) {
|
|
confirm(id) {
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: '提示',
|
|
title: '提示',
|
|
@@ -187,4 +200,7 @@ export default {
|
|
page {
|
|
page {
|
|
background-color: $pg;
|
|
background-color: $pg;
|
|
}
|
|
}
|
|
|
|
+.state{
|
|
|
|
+ margin-right: -70px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|