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>
<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="" 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>
</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="name-tel">
<text style="line-height: 75rpx;">{{item.companyName}}</text>
@ -112,7 +120,8 @@
companyType: '', //运输公司类型 快递公司有值 物流公司直接传空
modelShow:false,
remark:'',
khName:{}
khName:{},
searchName:''
}
},
onShow(){
@ -157,7 +166,7 @@
}
},
//物流或者快递列表
wlOrKdList(e) {
wlOrKdList(e,num) {
let url,
data = {},
isTrue
@ -165,12 +174,24 @@
if (e == 'wlName') {
url = '/app/operatingArea/getByArea'
isTrue = true
data = {
province:this.khName.province,
city:this.khName.city,
area:this.khName.area,
shippingType:0
}
if(num == '1'){
data = {
province:"",
city:"",
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') {
isTrue = false
url = '/app/logitics/getAll'
@ -178,13 +199,25 @@
signCompany:1
}
} else if (e == 'fcName') {
isTrue = true
data = {
province:this.khName.province,
city:this.khName.city,
area:this.khName.area,
shippingType:4
}
isTrue = true
if(num == '1'){
data = {
province:"",
city:"",
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'
}else if (e == 'dbName') {
isTrue = true
@ -238,6 +271,11 @@
uni.makePhoneCall({
phoneNumber: phone
});
},
//顶部搜索框
search(res) {
this.searchName = res.value
this.wlOrKdList(this.popleType,'1')
},
//查询拉包工和快递人员的列表
kdyOrlbgList() {
@ -320,7 +358,9 @@
height: 700rpx;
background-color: #fff;
}
.title-box {
background: #fff;
}
.popup-title {
font-size: 36rpx;
font-weight: bold;
@ -337,5 +377,10 @@
color: #088FEB;
font-size: 26rpx;
padding-left:40rpx;
}
.no-more{
text-align: center;
color: #BEBEBE;
margin-top:20rpx;
}
</style>

141
pages/other/logistics.vue

@ -81,13 +81,13 @@
onShow(){
this.id = uni.getStorageSync('transCompany')
this.type = uni.getStorageSync('isOnLine')
// const date = this.formatDate(new Date(), 'YYYY-MM-DD')
// this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00'
// this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59'
// this.query.saleVO.transCompany = id
const date = this.formatDate(new Date(), 'YYYY-MM-DD')
this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00'
this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59'
this.query.saleVO.transCompany = this.id
// this.range = date
// this.getShopList()
// this.getAllList()
this.getShopList()
this.getAllList()
},
methods: {
upOrDown(){
@ -98,18 +98,35 @@
}else{ //离线状态
url = '/app/logitics/onLine'
}
this.tui.request(url, 'post', {
id:this.id
}, false, false, false).then(res => {
if (res.code == 200){
if(this.type == 1){
tui.toast("下线成功")
uni.setStorageSync('isOnLine', 0)
}else{
tui.toast("上线成功")
uni.setStorageSync('isOnLine', 1)
uni.request({
url: this.tui.interfaceUrl() + url,
data: {
id:this.id
},
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
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`
})
},
getList() {
this.tui.request('/app/sale/listAll', 'post', {
remarkSR: 2,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
if (res.code !== 200) return
this.bList = res.result
getList() {
uni.request({
url: this.tui.interfaceUrl() + '/app/sale/listAll',
data: {
remarkSR: 2,
shopId: this.shopId,
searchDateVo: this.query
},
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() {
this.tui.request('/app/sale/listAll', 'post', {
remarkSR: 2,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
if (res.code !== 200) return
this.bList = res.result.saleList
getAllList() {
uni.request({
url: this.tui.interfaceUrl() + '/app/sale/listAll',
data: {
remarkSR: 2,
shopId: this.shopId,
searchDateVo: this.query
},
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() {
this.tui.request('/app/sale/listAll', 'post', {
remarkSR: 3,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
if (res.code !== 200) return
this.bList = res.result.returnSaleList
getReturnList() {
uni.request({
url: this.tui.interfaceUrl() + '/app/sale/listAll',
data: {
remarkSR: 3,
shopId: this.shopId,
searchDateVo: this.query
},
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() {

1
pages/other/logisticsAddress.vue

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

Loading…
Cancel
Save