|
@@ -31,106 +31,205 @@
|
|
<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" @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, 2, '确认拒绝?')">拒绝订单</view>
|
|
|
|
+ <view class="an" style="color: #4581fb" @click.stop="confirm(item.goodsId, 1, '确认接单?')">确认订单
|
|
|
|
+ </view>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="item.enterpriseConfirm == 1">
|
|
|
|
+ <view class="an" style="color: #13ce66"
|
|
|
|
+ @click.stop="showPop">物流车辆</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>
|
|
|
|
+ <u-popup :show="show" @close="close" @open="open">
|
|
|
|
+ <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="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 class="clear"></view>
|
|
|
|
+ </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>
|
|
|
|
+ </u-popup>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-export default {
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- tab: [
|
|
|
|
- { name: '全部', enterpriseConfirm: '', isOrders: ''},
|
|
|
|
- { name: '待确认', enterpriseConfirm: 0, isOrders: 1},
|
|
|
|
- { name: '已确认', enterpriseConfirm: 1, isOrders: 1},
|
|
|
|
- { name: '已拒绝', enterpriseConfirm: 2 ,isOrders: 0}
|
|
|
|
- ],
|
|
|
|
- param: { pageNo: 1, pageSize: 10},
|
|
|
|
- list: [],
|
|
|
|
- loadMore: true
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- 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);
|
|
|
|
|
|
+ export default {
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ tab: [{
|
|
|
|
+ name: '全部',
|
|
|
|
+ enterpriseConfirm: '',
|
|
|
|
+ isOrders: ''
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '待确认',
|
|
|
|
+ enterpriseConfirm: 0,
|
|
|
|
+ isOrders: 1
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '已确认',
|
|
|
|
+ enterpriseConfirm: 1,
|
|
|
|
+ isOrders: 1
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '已拒绝',
|
|
|
|
+ enterpriseConfirm: 2,
|
|
|
|
+ isOrders: 0
|
|
}
|
|
}
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- //点击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 });
|
|
|
|
|
|
+ ],
|
|
|
|
+ param: {
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 10
|
|
|
|
+ },
|
|
|
|
+ list: [],
|
|
|
|
+ loadMore: true,
|
|
|
|
+ show: false,
|
|
|
|
+ vehiceList: [],
|
|
|
|
+ };
|
|
},
|
|
},
|
|
- //刷新数据
|
|
|
|
- refresh() {
|
|
|
|
- this.loadMore = true;
|
|
|
|
- this.param.pageNo = 1;
|
|
|
|
- this.list = [];
|
|
|
|
|
|
+ onLoad() {
|
|
this.getData();
|
|
this.getData();
|
|
- },
|
|
|
|
- // 商家确认
|
|
|
|
- confirm(id, 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/TbGoodsTransit/updateEnterpriseConfirm',
|
|
|
|
- data: { id: id, enterpriseConfirm: status },
|
|
|
|
- method: 'POST',
|
|
|
|
- success: resp => {
|
|
|
|
- uni.showToast({ title: '操作成功' });
|
|
|
|
- this.refresh();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ },
|
|
|
|
+ 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);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- //下拉刷新
|
|
|
|
- onPullDownRefresh() {
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.refresh();
|
|
|
|
- uni.stopPullDownRefresh();
|
|
|
|
- }, 1000);
|
|
|
|
- },
|
|
|
|
- //上拉加载
|
|
|
|
- onReachBottom() {
|
|
|
|
- if (this.loadMore) {
|
|
|
|
- this.param.pageNo++;
|
|
|
|
- this.getData();
|
|
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //点击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) {
|
|
|
|
+ //enterprise_confirm:'商铺确认情况[0=待确认,1=已确认,2=拒绝]'
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: content,
|
|
|
|
+ success: res => {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/level-one-server/app/TbGoodsTransit/updateEnterpriseConfirm',
|
|
|
|
+ data: {
|
|
|
|
+ id: id,
|
|
|
|
+ enterpriseConfirm: status
|
|
|
|
+ },
|
|
|
|
+ method: 'POST',
|
|
|
|
+ success: resp => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '操作成功'
|
|
|
|
+ });
|
|
|
|
+ this.refresh();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ go(url) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: url
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 车牌查询
|
|
|
|
+ getByVehiclePlate() {
|
|
|
|
+ this.vehiceList = []
|
|
|
|
+ this.param.vehiclePlate = ''
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/transport-server/app/TbVehicle/getByVehiclePlate',
|
|
|
|
+ loading: 'false',
|
|
|
|
+ data: this.param,
|
|
|
|
+ success: res => {
|
|
|
|
+ if (res.data.data) {
|
|
|
|
+ this.vehiceList.push(...res.data.data);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 弹窗显示司机信息
|
|
|
|
+ showPop() {
|
|
|
|
+ this.getByVehiclePlate()
|
|
|
|
+ this.show=!this.show
|
|
|
|
+ },
|
|
|
|
+ // 车辆绑定
|
|
|
|
+ vehicleClick(id){
|
|
|
|
+ uni.showToast({ title: '绑定成功' })
|
|
|
|
+ this.show = false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //下拉刷新
|
|
|
|
+ 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;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .pop{
|
|
|
|
+ padding: 30px;
|
|
|
|
+ height: 300px;
|
|
|
|
+ background-color: $pg;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .btn{
|
|
|
|
+ height: 30px;
|
|
|
|
+ margin: 8px 0px;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ }
|
|
|
|
+</style>
|