wangfukang 3 years ago
parent
commit
58ba95f510
  1. 79
      pages/index/peopleList.vue
  2. 141
      pages/other/logistics.vue
  3. 1
      pages/other/logisticsAddress.vue

79
pages/index/peopleList.vue

@ -1,5 +1,9 @@
<template> <template>
<view class=""> <view class="">
<view class="title-box">
<uni-search-bar class="uni-mt-10" radius="5" placeholder="请输入运输公司名称查询" cancelButton="none"
@confirm="search" />
</view>
<view class=""> <view class="">
<view class="" v-if="popleType== 'khName' || popleType== 'gysName'" @tap=""> <view class="" v-if="popleType== 'khName' || popleType== 'gysName'" @tap="">
<!-- 供应商、客户走这一套 --> <!-- 供应商、客户走这一套 -->
@ -44,6 +48,10 @@
<text style="line-height: 45rpx;color:red;font-size: 24rpx;" v-if="item.rebateAmount">本单返佣{{item.rebateAmount}}元</text> <text style="line-height: 45rpx;color:red;font-size: 24rpx;" v-if="item.rebateAmount">本单返佣{{item.rebateAmount}}元</text>
</view> </view>
</view> </view>
<view class="no-more">
<view>以上结果根据客户地址自动匹配得出</view>
<view>↓↓下方为区域内所有物流公司↓↓</view>
</view>
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList[1]" :key="item"> <view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList[1]" :key="item">
<view class="name-tel"> <view class="name-tel">
<text style="line-height: 75rpx;">{{item.companyName}}</text> <text style="line-height: 75rpx;">{{item.companyName}}</text>
@ -112,7 +120,8 @@
companyType: '', //运输公司类型 快递公司有值 物流公司直接传空 companyType: '', //运输公司类型 快递公司有值 物流公司直接传空
modelShow:false, modelShow:false,
remark:'', remark:'',
khName:{} khName:{},
searchName:''
} }
}, },
onShow(){ onShow(){
@ -157,7 +166,7 @@
} }
}, },
//物流或者快递列表 //物流或者快递列表
wlOrKdList(e) { wlOrKdList(e,num) {
let url, let url,
data = {}, data = {},
isTrue isTrue
@ -165,12 +174,24 @@
if (e == 'wlName') { if (e == 'wlName') {
url = '/app/operatingArea/getByArea' url = '/app/operatingArea/getByArea'
isTrue = true isTrue = true
data = { if(num == '1'){
province:this.khName.province, data = {
city:this.khName.city, province:"",
area:this.khName.area, city:"",
shippingType:0 area:"",
} shippingType:0,
seachParams:this.searchName
}
}else{
data = {
province:this.khName.province,
city:this.khName.city,
area:this.khName.area,
shippingType:0,
seachParams:this.searchName
}
}
} else if (e == 'kdName') { } else if (e == 'kdName') {
isTrue = false isTrue = false
url = '/app/logitics/getAll' url = '/app/logitics/getAll'
@ -178,13 +199,25 @@
signCompany:1 signCompany:1
} }
} else if (e == 'fcName') { } else if (e == 'fcName') {
isTrue = true isTrue = true
data = { if(num == '1'){
province:this.khName.province, data = {
city:this.khName.city, province:"",
area:this.khName.area, city:"",
shippingType:4 area:"",
} shippingType:4,
seachParams:this.searchName
}
}else{
data = {
province:this.khName.province,
city:this.khName.city,
area:this.khName.area,
shippingType:4,
seachParams:this.searchName
}
}
url = '/app/operatingArea/getByArea' url = '/app/operatingArea/getByArea'
}else if (e == 'dbName') { }else if (e == 'dbName') {
isTrue = true isTrue = true
@ -238,6 +271,11 @@
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: phone phoneNumber: phone
}); });
},
//顶部搜索框
search(res) {
this.searchName = res.value
this.wlOrKdList(this.popleType,'1')
}, },
//查询拉包工和快递人员的列表 //查询拉包工和快递人员的列表
kdyOrlbgList() { kdyOrlbgList() {
@ -320,7 +358,9 @@
height: 700rpx; height: 700rpx;
background-color: #fff; background-color: #fff;
} }
.title-box {
background: #fff;
}
.popup-title { .popup-title {
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
@ -337,5 +377,10 @@
color: #088FEB; color: #088FEB;
font-size: 26rpx; font-size: 26rpx;
padding-left:40rpx; padding-left:40rpx;
}
.no-more{
text-align: center;
color: #BEBEBE;
margin-top:20rpx;
} }
</style> </style>

141
pages/other/logistics.vue

@ -81,13 +81,13 @@
onShow(){ onShow(){
this.id = uni.getStorageSync('transCompany') this.id = uni.getStorageSync('transCompany')
this.type = uni.getStorageSync('isOnLine') this.type = uni.getStorageSync('isOnLine')
// const date = this.formatDate(new Date(), 'YYYY-MM-DD') const date = this.formatDate(new Date(), 'YYYY-MM-DD')
// this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00' this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00'
// this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59' this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59'
// this.query.saleVO.transCompany = id this.query.saleVO.transCompany = this.id
// this.range = date // this.range = date
// this.getShopList() this.getShopList()
// this.getAllList() this.getAllList()
}, },
methods: { methods: {
upOrDown(){ upOrDown(){
@ -98,18 +98,35 @@
}else{ //离线状态 }else{ //离线状态
url = '/app/logitics/onLine' url = '/app/logitics/onLine'
} }
this.tui.request(url, 'post', { uni.request({
id:this.id url: this.tui.interfaceUrl() + url,
}, false, false, false).then(res => { data: {
if (res.code == 200){ id:this.id
if(this.type == 1){ },
tui.toast("下线成功") header: {
uni.setStorageSync('isOnLine', 0) 'content-type': 'application/json',
}else{ 'appWLToken': this.tui.getToken()
tui.toast("上线成功") },
uni.setStorageSync('isOnLine', 1) method: 'POST', //'GET','POST'
dataType: 'json',
success: (res) => {
if (res.data.code == 200){
if(this.type == 1){
tui.toast("下线成功")
uni.setStorageSync('isOnLine', 0)
this.type = 0
}else{
tui.toast("上线成功")
uni.setStorageSync('isOnLine', 1)
this.type = 1
}
uni.reLaunch({
url: '/pages/other/logistics'
});
} }
},
fail: (res) => {
this.tui.toast("网络不给力,请稍后再试~")
} }
}) })
}, },
@ -134,34 +151,76 @@
url: `/pages/other/logisticsAddress` url: `/pages/other/logisticsAddress`
}) })
}, },
getList() { getList() {
this.tui.request('/app/sale/listAll', 'post', { uni.request({
remarkSR: 2, url: this.tui.interfaceUrl() + '/app/sale/listAll',
shopId: this.shopId, data: {
searchDateVo: this.query remarkSR: 2,
}, false, false, false).then(res => { shopId: this.shopId,
if (res.code !== 200) return searchDateVo: this.query
this.bList = res.result },
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST', //'GET','POST'
dataType: 'json',
success: (res) => {
if (res.data.code == 200){
this.bList = res.result
}
},
fail: (res) => {
this.tui.toast("网络不给力,请稍后再试~")
}
}) })
}, },
getAllList() { getAllList() {
this.tui.request('/app/sale/listAll', 'post', { uni.request({
remarkSR: 2, url: this.tui.interfaceUrl() + '/app/sale/listAll',
shopId: this.shopId, data: {
searchDateVo: this.query remarkSR: 2,
}, false, false, false).then(res => { shopId: this.shopId,
if (res.code !== 200) return searchDateVo: this.query
this.bList = res.result.saleList },
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST', //'GET','POST'
dataType: 'json',
success: (res) => {
if (res.data.code == 200){
this.bList = res.result.saleList
}
},
fail: (res) => {
this.tui.toast("网络不给力,请稍后再试~")
}
}) })
}, },
getReturnList() { getReturnList() {
this.tui.request('/app/sale/listAll', 'post', { uni.request({
remarkSR: 3, url: this.tui.interfaceUrl() + '/app/sale/listAll',
shopId: this.shopId, data: {
searchDateVo: this.query remarkSR: 3,
}, false, false, false).then(res => { shopId: this.shopId,
if (res.code !== 200) return searchDateVo: this.query
this.bList = res.result.returnSaleList },
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST', //'GET','POST'
dataType: 'json',
success: (res) => {
if (res.data.code == 200){
this.bList = res.result.returnSaleList
}
},
fail: (res) => {
this.tui.toast("网络不给力,请稍后再试~")
}
}) })
}, },
dateChange() { dateChange() {

1
pages/other/logisticsAddress.vue

@ -164,7 +164,6 @@
data: item, data: item,
header: { header: {
'content-type': 'application/json', 'content-type': 'application/json',
// 'Authorization': tui.getToken()
'appWLToken': this.tui.getToken() 'appWLToken': this.tui.getToken()
}, },
method: 'POST', //'GET','POST' method: 'POST', //'GET','POST'

Loading…
Cancel
Save