|
@@ -8,7 +8,7 @@
|
|
<view class="title">广西京东自营店南宁分店</view>
|
|
<view class="title">广西京东自营店南宁分店</view>
|
|
<view class="state" v-if="item.enterpriseConfirm == 0">
|
|
<view class="state" v-if="item.enterpriseConfirm == 0">
|
|
<text class="icon"></text>
|
|
<text class="icon"></text>
|
|
- <text>待确认</text>
|
|
|
|
|
|
+ <text>商家未确认</text>
|
|
</view>
|
|
</view>
|
|
<view class="state" v-if="item.enterpriseConfirm == 1">
|
|
<view class="state" v-if="item.enterpriseConfirm == 1">
|
|
<text class="icon" style="color: #13ce66"></text>
|
|
<text class="icon" style="color: #13ce66"></text>
|
|
@@ -20,7 +20,7 @@
|
|
</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>
|
|
<view class="desc omit">
|
|
<view class="desc omit">
|
|
<text>50吨</text>
|
|
<text>50吨</text>
|
|
<text>{{ item.tradeAreaName }}</text>
|
|
<text>{{ item.tradeAreaName }}</text>
|
|
@@ -31,12 +31,8 @@
|
|
<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">
|
|
<template v-if="item.enterpriseConfirm == 0">
|
|
- <view class="an" style="color: #f44336" v-if="user.userType == 2"
|
|
|
|
- @click.stop="confirm(item.id, 2,item.enterpriseConfirm)">取消订单</view>
|
|
|
|
- <view class="an" style="color: #4581fb" v-if="user.userType == 3"
|
|
|
|
- @click.stop="confirm(item.id, 1)">确认订单</view>
|
|
|
|
- <!-- <view class="an" style="color: #f44336" @click.stop="confirm(item.id, 2, '确认拒绝?')">取消订单</view>
|
|
|
|
- <view class="an" style="color: #4581fb" @click.stop="confirm(item.id, 1, '确认接单?')">确认订单</view> -->
|
|
|
|
|
|
+ <view class="an" style="color: #f44336" v-if="user.userType == 2" @click.stop="confirm(item.id, 2, item.enterpriseConfirm)">取消订单</view>
|
|
|
|
+ <view class="an" style="color: #4581fb" v-if="user.userType == 3" @click.stop="confirm(item.id, 1)">确认订单</view>
|
|
</template>
|
|
</template>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -47,153 +43,143 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- export default {
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- tab: [{
|
|
|
|
- name: '全部',
|
|
|
|
- enterpriseConfirm: '',
|
|
|
|
- apply: ''
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '待确认',
|
|
|
|
- enterpriseConfirm: 0,
|
|
|
|
- apply: 0
|
|
|
|
- }, //enterpriseConfirm:商户确认(0=待确认,1=是,2=否)
|
|
|
|
- {
|
|
|
|
- name: '申报中',
|
|
|
|
- enterpriseConfirm: 1,
|
|
|
|
- apply: 0
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '已完成',
|
|
|
|
- enterpriseConfirm: 2,
|
|
|
|
- apply: 1
|
|
|
|
- }, //apply:申报[0=待申报,1=申报通过,2=申报不通过]
|
|
|
|
- {
|
|
|
|
- name: '已取消',
|
|
|
|
- enterpriseConfirm: 3,
|
|
|
|
- apply: ''
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- param: {
|
|
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 10
|
|
|
|
|
|
+export default {
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ tab: [
|
|
|
|
+ {
|
|
|
|
+ name: '全部',
|
|
|
|
+ enterpriseConfirm: '',
|
|
|
|
+ apply: ''
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '待确认',
|
|
|
|
+ enterpriseConfirm: 0,
|
|
|
|
+ apply: 0
|
|
|
|
+ }, //enterpriseConfirm:商户确认(0=待确认,1=是,2=否)
|
|
|
|
+ {
|
|
|
|
+ name: '申报中',
|
|
|
|
+ enterpriseConfirm: 1,
|
|
|
|
+ apply: 0
|
|
},
|
|
},
|
|
- list: [],
|
|
|
|
- loadMore: true,
|
|
|
|
- user: this.getUser()
|
|
|
|
- };
|
|
|
|
|
|
+ {
|
|
|
|
+ name: '已完成',
|
|
|
|
+ enterpriseConfirm: 2,
|
|
|
|
+ apply: 1
|
|
|
|
+ }, //apply:申报[0=待申报,1=申报通过,2=申报不通过]
|
|
|
|
+ {
|
|
|
|
+ name: '已取消',
|
|
|
|
+ enterpriseConfirm: 3,
|
|
|
|
+ apply: ''
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ param: {
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 10
|
|
|
|
+ },
|
|
|
|
+ list: [],
|
|
|
|
+ loadMore: true,
|
|
|
|
+ user: this.getUser()
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ onLoad() {
|
|
|
|
+ this.getData();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ getData() {
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/level-one-server/app/TbOrder/getList',
|
|
|
|
+ loading: 'false',
|
|
|
|
+ data: this.param,
|
|
|
|
+ success: res => {
|
|
|
|
+ this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
|
|
|
|
+ if (res.data.data) {
|
|
|
|
+ this.list.push(...res.data.data);
|
|
|
|
+ }
|
|
|
|
+ this.list.map(item => {
|
|
|
|
+ if (item.cancelPeople == 1) {
|
|
|
|
+ item.enterpriseConfirm = 3;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- onLoad() {
|
|
|
|
|
|
+ //点击tab切换
|
|
|
|
+ click(e) {
|
|
|
|
+ console.log(e);
|
|
|
|
+ this.param.orderStatus = e.enterpriseConfirm;
|
|
|
|
+ this.param.apply = e.apply;
|
|
|
|
+ this.refresh();
|
|
|
|
+ },
|
|
|
|
+ detail(item) {
|
|
|
|
+ uni.navigateTo({url: '/pages/market/one/leader/detail?id=' + item.id});
|
|
|
|
+ },
|
|
|
|
+ //刷新数据
|
|
|
|
+ refresh() {
|
|
|
|
+ this.loadMore = true;
|
|
|
|
+ this.param.pageNo = 1;
|
|
|
|
+ this.list = [];
|
|
this.getData();
|
|
this.getData();
|
|
},
|
|
},
|
|
- methods: {
|
|
|
|
- getData() {
|
|
|
|
- this.http.request({
|
|
|
|
- url: '/level-one-server/app/TbOrder/getList',
|
|
|
|
- loading: 'false',
|
|
|
|
- data: this.param,
|
|
|
|
|
|
+ //通知商家
|
|
|
|
+ confirm(id, type, enterpriseConfirm) {
|
|
|
|
+ if (type == 1) {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '是否确认接单?',
|
|
success: res => {
|
|
success: res => {
|
|
- this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
|
|
|
|
- if (res.data.data) {
|
|
|
|
- this.list.push(...res.data.data);
|
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/level-one-server/app/TbGoodsTransit/updateEnterpriseConfirm',
|
|
|
|
+ data: { id: id, enterpriseConfirm: 1 },
|
|
|
|
+ method: 'POST',
|
|
|
|
+ success: resp => {
|
|
|
|
+ uni.showToast({ title: '操作成功' });
|
|
|
|
+ this.refresh();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- this.list.map(item => {
|
|
|
|
- if(item.cancelPeople==1){
|
|
|
|
- item.enterpriseConfirm = 3
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- },
|
|
|
|
- //点击tab切换
|
|
|
|
- click(e) {
|
|
|
|
- console.log(e)
|
|
|
|
- this.param.orderStatus = e.enterpriseConfirm;
|
|
|
|
- this.param.apply = e.apply
|
|
|
|
- this.refresh();
|
|
|
|
- },
|
|
|
|
- detail(item) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/market/one/merchant/order/detail?id=' + item.id
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- //刷新数据
|
|
|
|
- refresh() {
|
|
|
|
- this.loadMore = true;
|
|
|
|
- this.param.pageNo = 1;
|
|
|
|
- this.list = [];
|
|
|
|
- this.getData();
|
|
|
|
- },
|
|
|
|
- //通知商家
|
|
|
|
- confirm(id, type, enterpriseConfirm) {
|
|
|
|
- if (type == 1) {
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '是否确认接单?',
|
|
|
|
- success: res => {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- this.http.request({
|
|
|
|
- // url: '/level-one-server/app/TbGoodsTransit/update',
|
|
|
|
- url: '/level-one-server/app/TbGoodsTransit/updateEnterpriseConfirm',
|
|
|
|
- data: {
|
|
|
|
- id: id,
|
|
|
|
- enterpriseConfirm: 1
|
|
|
|
- },
|
|
|
|
- method: 'POST',
|
|
|
|
- success: resp => {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: '操作成功'
|
|
|
|
- });
|
|
|
|
- this.refresh();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '是否确认取消订单?',
|
|
|
|
- success: res => {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- this.http.request({
|
|
|
|
- url: '/level-one-server/app/TbOrder/cancelOrder',
|
|
|
|
- data: { orderId: id,orderStatus: enterpriseConfirm },
|
|
|
|
- success: resp => {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: '操作成功'
|
|
|
|
- });
|
|
|
|
- this.refresh();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ } else {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '是否确认取消订单?',
|
|
|
|
+ success: res => {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/level-one-server/app/TbOrder/cancelOrder',
|
|
|
|
+ data: { orderId: id, orderStatus: enterpriseConfirm },
|
|
|
|
+ success: resp => {
|
|
|
|
+ uni.showToast({ title: '操作成功' });
|
|
|
|
+ this.refresh();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- //下拉刷新
|
|
|
|
- onPullDownRefresh() {
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.refresh();
|
|
|
|
- uni.stopPullDownRefresh();
|
|
|
|
- }, 1000);
|
|
|
|
- },
|
|
|
|
- //上拉加载
|
|
|
|
- onReachBottom() {
|
|
|
|
- if (this.loadMore) {
|
|
|
|
- this.param.pageNo++;
|
|
|
|
- this.getData();
|
|
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- };
|
|
|
|
|
|
+ },
|
|
|
|
+ //下拉刷新
|
|
|
|
+ onPullDownRefresh() {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.refresh();
|
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
|
+ }, 1000);
|
|
|
|
+ },
|
|
|
|
+ //上拉加载
|
|
|
|
+ onReachBottom() {
|
|
|
|
+ if (this.loadMore) {
|
|
|
|
+ this.param.pageNo++;
|
|
|
|
+ this.getData();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
- page {
|
|
|
|
- background-color: $pg;
|
|
|
|
- }
|
|
|
|
-</style>
|
|
|
|
|
|
+page {
|
|
|
|
+ background-color: $pg;
|
|
|
|
+}
|
|
|
|
+</style>
|