|
@@ -20,9 +20,9 @@
|
|
</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>{{item.totalWeight}}吨</text>
|
|
|
|
|
|
+ <text>{{ item.totalWeight }}{{ item.goodsUnit }}</text>
|
|
<text>{{ item.tradeAreaName }}</text>
|
|
<text>{{ item.tradeAreaName }}</text>
|
|
</view>
|
|
</view>
|
|
<view class="price">¥ {{ item.totalPrice }}</view>
|
|
<view class="price">¥ {{ item.totalPrice }}</view>
|
|
@@ -31,44 +31,40 @@
|
|
<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">
|
|
-<<<<<<< HEAD
|
|
|
|
- <view class="an" style="color: #f44336" @click.stop="confirm(item.id, 2, '确认拒绝?')">拒绝订单</view>
|
|
|
|
- <view class="an" style="color: #4581fb" @click.stop="confirm(item.goodsId, 1, '确认接单?')">确认订单
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="an" style="color: #f44336" @click.stop="confirm(item.id, item.goodsId, 2, '确认拒绝?')">拒绝订单</view>
|
|
|
|
+ <view class="an" style="color: #4581fb" @click.stop="confirm(item.id, item.goodsId, 1, '确认接单?')">确认订单</view>
|
|
</template>
|
|
</template>
|
|
<template v-if="item.enterpriseConfirm == 1">
|
|
<template v-if="item.enterpriseConfirm == 1">
|
|
- <view class="an" style="color: #13ce66"
|
|
|
|
- @click.stop="showPop">物流车辆</view>
|
|
|
|
-=======
|
|
|
|
- <view class="an" style="color: #f44336" @click.stop="confirm(item.id, item.goodsId, 2, '确认拒绝?')">取消订单</view>
|
|
|
|
- <view class="an" style="color: #4581fb" @click.stop="confirm(item.id, item.goodsId, 1, '确认接单?')">确认订单</view>
|
|
|
|
->>>>>>> 10869ae7aad892d454d8d29e68f543377fcd7de4
|
|
|
|
|
|
+ <view class="an" style="color: #13ce66" @click.stop="showPop(item)">物流车辆</view>
|
|
</template>
|
|
</template>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
|
|
<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
|
|
<u-empty v-if="!loadMore && list.length == 0"></u-empty>
|
|
<u-empty v-if="!loadMore && list.length == 0"></u-empty>
|
|
<view>
|
|
<view>
|
|
- <u-popup :show="show" @close="close" @open="open">
|
|
|
|
|
|
+ <u-popup :show="show" @close="close">
|
|
<view class="pop">
|
|
<view class="pop">
|
|
- <view class="search">
|
|
|
|
- <u-search placeholder="输入车辆名称" v-model="param.vehiclePlate" bgColor="white" @search="getByVehiclePlate()" :showAction="true" @clear="getByVehiclePlate()"></u-search>
|
|
|
|
- <view class="clear"></view>
|
|
|
|
- </view>
|
|
|
|
- <scroll-view class="goodsList" scroll-y="true" style="height: 450rpx; width: 97%;" :show-scrollbar="true">
|
|
|
|
|
|
+ <view class="search">
|
|
|
|
+ <u-search placeholder="输入车辆名称" v-model="param.vehiclePlate" bgColor="white"
|
|
|
|
+ @search="getByVehiclePlate()" :showAction="true"
|
|
|
|
+ @clear="getByVehiclePlate()"></u-search>
|
|
|
|
+ <view class="clear"></view>
|
|
|
|
+ </view>
|
|
|
|
+ <scroll-view class="goodsList" scroll-y="true" style="height: 450rpx; width: 97%;"
|
|
|
|
+ :show-scrollbar="true">
|
|
<view class="item" v-for="(item, index) in vehiceList" :key="index" style="height: 80rpx;">
|
|
<view class="item" v-for="(item, index) in vehiceList" :key="index" style="height: 80rpx;">
|
|
<view class="con">
|
|
<view class="con">
|
|
<view class="productName omit">{{ item.vehiclePlate }}</view>
|
|
<view class="productName omit">{{ item.vehiclePlate }}</view>
|
|
<view class="desc omit">{{item.vehicleModel}}</view>
|
|
<view class="desc omit">{{item.vehicleModel}}</view>
|
|
</view>
|
|
</view>
|
|
- <view><button class="btn" @click="vehicleClick(item.id)">确认绑定</button> </view>
|
|
|
|
|
|
+ <view><button class="btn" @click="vehicleClick(item)">确认绑定</button> </view>
|
|
<view class="clear"></view>
|
|
<view class="clear"></view>
|
|
</view>
|
|
</view>
|
|
- <view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
|
|
|
|
|
|
+ <view class="loading" v-if="loadMore"><u-loadmore
|
|
|
|
+ :status="loadMore ? 'loading' : 'nomore'" /></view>
|
|
<u-empty v-if="!loadMore && vehiceList.length == 0"></u-empty>
|
|
<u-empty v-if="!loadMore && vehiceList.length == 0"></u-empty>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
- <!-- <view><button>确定</button></view> -->
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
</u-popup>
|
|
</u-popup>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -79,40 +75,23 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- tab: [{
|
|
|
|
- name: '全部',
|
|
|
|
- enterpriseConfirm: '',
|
|
|
|
- isOrders: ''
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '待确认',
|
|
|
|
- enterpriseConfirm: 0,
|
|
|
|
- isOrders: 1
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '已确认',
|
|
|
|
- enterpriseConfirm: 1,
|
|
|
|
- isOrders: 1
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '已拒绝',
|
|
|
|
- enterpriseConfirm: 2,
|
|
|
|
- isOrders: 0
|
|
|
|
- }
|
|
|
|
|
|
+ tab: [
|
|
|
|
+ { name: '全部', enterpriseConfirm: '', isOrders: ''},
|
|
|
|
+ { name: '待确认', enterpriseConfirm: 0, isOrders: 1},
|
|
|
|
+ { name: '已确认', enterpriseConfirm: 1, isOrders: 1},
|
|
|
|
+ { name: '已拒绝', enterpriseConfirm: 2 ,isOrders: 0}
|
|
],
|
|
],
|
|
- param: {
|
|
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 10
|
|
|
|
- },
|
|
|
|
|
|
+ param: { pageNo: 1, pageSize: 10},
|
|
list: [],
|
|
list: [],
|
|
loadMore: true,
|
|
loadMore: true,
|
|
show: false,
|
|
show: false,
|
|
vehiceList: [],
|
|
vehiceList: [],
|
|
|
|
+ vehice: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
this.getData();
|
|
this.getData();
|
|
-<<<<<<< HEAD
|
|
|
|
|
|
+ this.getByVehiclePlate()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
getData() {
|
|
getData() {
|
|
@@ -125,49 +104,11 @@
|
|
if (res.data.data) {
|
|
if (res.data.data) {
|
|
this.list.push(...res.data.data);
|
|
this.list.push(...res.data.data);
|
|
}
|
|
}
|
|
-=======
|
|
|
|
- },
|
|
|
|
- // 商家确认
|
|
|
|
- confirm(id, goodsId, status, content) {
|
|
|
|
- //enterprise_confirm:'商铺确认情况[0=待确认,1=已确认,2=拒绝]'
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: content,
|
|
|
|
- success: res => {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- this.http.request({
|
|
|
|
- url: '/level-one-server/app/TbOrder/updateEnterpriseConfirm',
|
|
|
|
- data: { id: id, goodsId: goodsId, enterpriseConfirm: status },
|
|
|
|
- method: 'POST',
|
|
|
|
- success: resp => {
|
|
|
|
- uni.showToast({ title: '操作成功' });
|
|
|
|
- this.refresh();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
->>>>>>> 10869ae7aad892d454d8d29e68f543377fcd7de4
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- //点击tab切换
|
|
|
|
- click(e) {
|
|
|
|
- this.param.enterpriseConfirm = e.enterpriseConfirm;
|
|
|
|
- this.param.isOrders = e.isOrders;
|
|
|
|
- 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, status, content) {
|
|
|
|
|
|
+ confirm(id, goodsId, status, content) {
|
|
//enterprise_confirm:'商铺确认情况[0=待确认,1=已确认,2=拒绝]'
|
|
//enterprise_confirm:'商铺确认情况[0=待确认,1=已确认,2=拒绝]'
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: '提示',
|
|
title: '提示',
|
|
@@ -175,16 +116,11 @@
|
|
success: res => {
|
|
success: res => {
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
this.http.request({
|
|
this.http.request({
|
|
- url: '/level-one-server/app/TbGoodsTransit/updateEnterpriseConfirm',
|
|
|
|
- data: {
|
|
|
|
- id: id,
|
|
|
|
- enterpriseConfirm: status
|
|
|
|
- },
|
|
|
|
|
|
+ url: '/level-one-server/app/TbOrder/updateEnterpriseConfirm',
|
|
|
|
+ data: { id: id, goodsId: goodsId, enterpriseConfirm: status },
|
|
method: 'POST',
|
|
method: 'POST',
|
|
success: resp => {
|
|
success: resp => {
|
|
- uni.showToast({
|
|
|
|
- title: '操作成功'
|
|
|
|
- });
|
|
|
|
|
|
+ uni.showToast({ title: '操作成功' });
|
|
this.refresh();
|
|
this.refresh();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -192,10 +128,21 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- go(url) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: url
|
|
|
|
- });
|
|
|
|
|
|
+ //点击tab切换
|
|
|
|
+ click(e) {
|
|
|
|
+ this.param.enterpriseConfirm = e.enterpriseConfirm;
|
|
|
|
+ this.param.isOrders = e.isOrders;
|
|
|
|
+ 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();
|
|
},
|
|
},
|
|
// 车牌查询
|
|
// 车牌查询
|
|
getByVehiclePlate() {
|
|
getByVehiclePlate() {
|
|
@@ -213,15 +160,34 @@
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 弹窗显示司机信息
|
|
// 弹窗显示司机信息
|
|
- showPop() {
|
|
|
|
|
|
+ showPop(item) {
|
|
|
|
+ this.vehice.tradeAreaId = item.tradeAreaId
|
|
|
|
+ this.vehice.tradeAreaName = item.tradeAreaName
|
|
|
|
+ this.vehice.enterpriseId = item.enterpriseId
|
|
|
|
+ this.vehice.orderId = item.id
|
|
this.getByVehiclePlate()
|
|
this.getByVehiclePlate()
|
|
- this.show=!this.show
|
|
|
|
|
|
+ this.show = !this.show
|
|
|
|
+ },
|
|
|
|
+ close() {
|
|
|
|
+ this.show = false
|
|
|
|
+ // console.log('close');
|
|
},
|
|
},
|
|
- // 车辆绑定
|
|
|
|
- vehicleClick(id){
|
|
|
|
- uni.showToast({ title: '绑定成功' })
|
|
|
|
|
|
+ // 车辆绑定,通知司机
|
|
|
|
+ vehicleClick(item) {
|
|
|
|
+ this.vehice.driverId = item.driverId
|
|
|
|
+ this.vehice.vehicleId = item.id
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/transport-server/app/TbVehicle/informDriver',
|
|
|
|
+ loading: 'false',
|
|
|
|
+ method: 'POST',
|
|
|
|
+ contentType: 'application/json;charset=UTF-8',
|
|
|
|
+ data: this.vehice,
|
|
|
|
+ success: res => {
|
|
|
|
+ uni.showToast({ title: '稍等片刻,司机马上就来' })
|
|
|
|
+ }
|
|
|
|
+ });
|
|
this.show = false
|
|
this.show = false
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
//下拉刷新
|
|
//下拉刷新
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
@@ -244,14 +210,14 @@
|
|
page {
|
|
page {
|
|
background-color: $pg;
|
|
background-color: $pg;
|
|
}
|
|
}
|
|
-
|
|
|
|
- .pop{
|
|
|
|
|
|
+
|
|
|
|
+ .pop {
|
|
padding: 30px;
|
|
padding: 30px;
|
|
height: 300px;
|
|
height: 300px;
|
|
background-color: $pg;
|
|
background-color: $pg;
|
|
}
|
|
}
|
|
-
|
|
|
|
- .btn{
|
|
|
|
|
|
+
|
|
|
|
+ .btn {
|
|
height: 30px;
|
|
height: 30px;
|
|
margin: 8px 0px;
|
|
margin: 8px 0px;
|
|
display: flex;
|
|
display: flex;
|