|
@@ -20,9 +20,9 @@
|
|
|
</view>
|
|
|
<image src="../../../../../static/news.jpg" mode="aspectFill" class="pic"></image>
|
|
|
<view class="con">
|
|
|
- <view class="productName omit">{{item.goodsNames}}</view>
|
|
|
+ <view class="productName omit">{{ item.goodsNames }}</view>
|
|
|
<view class="desc omit">
|
|
|
- <text>{{item.totalWeight}}吨</text>
|
|
|
+ <text>{{ item.totalWeight }}{{ item.goodsUnit }}</text>
|
|
|
<text>{{ item.tradeAreaName }}</text>
|
|
|
</view>
|
|
|
<view class="price">¥ {{ item.totalPrice }}</view>
|
|
@@ -31,44 +31,40 @@
|
|
|
<view class="op">
|
|
|
<view class="date">2022-12-12:12:12</view>
|
|
|
<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 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>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
|
|
|
<u-empty v-if="!loadMore && list.length == 0"></u-empty>
|
|
|
<view>
|
|
|
- <u-popup :show="show" @close="close" @open="open">
|
|
|
+ <u-popup :show="show" @close="close">
|
|
|
<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="con">
|
|
|
<view class="productName omit">{{ item.vehiclePlate }}</view>
|
|
|
<view class="desc omit">{{item.vehicleModel}}</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>
|
|
|
- <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>
|
|
|
</scroll-view>
|
|
|
- <!-- <view><button>确定</button></view> -->
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
</u-popup>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -79,40 +75,23 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
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: [],
|
|
|
loadMore: true,
|
|
|
show: false,
|
|
|
vehiceList: [],
|
|
|
+ vehice: {},
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.getData();
|
|
|
-<<<<<<< HEAD
|
|
|
+ this.getByVehiclePlate()
|
|
|
},
|
|
|
methods: {
|
|
|
getData() {
|
|
@@ -125,49 +104,11 @@
|
|
|
if (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=拒绝]'
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
@@ -175,16 +116,11 @@
|
|
|
success: res => {
|
|
|
if (res.confirm) {
|
|
|
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',
|
|
|
success: resp => {
|
|
|
- uni.showToast({
|
|
|
- title: '操作成功'
|
|
|
- });
|
|
|
+ uni.showToast({ title: '操作成功' });
|
|
|
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() {
|
|
@@ -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.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
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
//下拉刷新
|
|
|
onPullDownRefresh() {
|
|
@@ -244,14 +210,14 @@
|
|
|
page {
|
|
|
background-color: $pg;
|
|
|
}
|
|
|
-
|
|
|
- .pop{
|
|
|
+
|
|
|
+ .pop {
|
|
|
padding: 30px;
|
|
|
height: 300px;
|
|
|
background-color: $pg;
|
|
|
}
|
|
|
-
|
|
|
- .btn{
|
|
|
+
|
|
|
+ .btn {
|
|
|
height: 30px;
|
|
|
margin: 8px 0px;
|
|
|
display: flex;
|