wangfukang 3 years ago
parent
commit
ff22e520ce
  1. 36
      package1/other/logistics.vue
  2. 70
      package1/other/logisticsAddress.vue

36
package1/other/logistics.vue

@ -165,20 +165,30 @@
content: "确定退出登录吗?",
success: function(res) {
if (res.confirm) {
that.tui.request("/auth/loginOutOfCompany", "POST", {
companyId:this.id,
companyName:this.companyName
}, false, false).then((res) => {
if (res.code == 200) {
that.tui.toast("退出登录成功")
uni.clearStorage();
uni.navigateTo({
url: '/pages/login/login'
})
} else {
that.tui.toast(res.message)
uni.request({
url: that.tui.interfaceUrl() + '/auth/loginOutOfCompany',
data: {
companyId:that.id,
companyName:that.companyName
},
header: {
'content-type': 'application/x-www-form-urlencoded',
'appWLToken': that.tui.getToken()
},
method: 'POST', //'GET','POST'
dataType: 'json',
success: (res) => {
if (res.data.code == 401){
that.tui.toast("退出登录成功")
uni.clearStorage();
uni.navigateTo({
url: '/pages/login/login'
})
}
},
fail: (res) => {
that.tui.toast("网络不给力,请稍后再试~")
}
})
}
}

70
package1/other/logisticsAddress.vue

@ -1,7 +1,7 @@
<template>
<view class="">
<view>
<button size="default" type="default" @tap="addAddress" hover-class="is-hover">新增线路</button>
<button size="default" v-if="type!='kaidan'" type="default" @tap="addAddress" hover-class="is-hover">新增线路</button>
</view>
<view class="list-1" style="display: flex;flex-direction: column;height: 150rpx;" v-for="(item, index) in standardList" :key="index">
<view class="name-tel" style="width: 75%;overflow: hidden;">
@ -11,8 +11,8 @@
<text style="line-height: 75rpx;">{{item.chargingStandard}}</text>
</view>
<view class="name-edit">
<text @tap.stop="addAddress(item)" style='line-height: 75rpx;color: #088FEB;'>编辑</text>
<text @tap.stop="delAddress(item)" style='color:red;line-height: 75rpx;'>删除</text>
<text @tap.stop="addAddress(item)" v-if="type!='kaidan'" style='line-height: 75rpx;color: #088FEB;'>编辑</text>
<text @tap.stop="delAddress(item)" v-if="type!='kaidan'" style='color:red;line-height: 75rpx;'>删除</text>
</view>
</view>
<u-loadmore :status="status" />
@ -69,7 +69,8 @@
errorMessage: '请输入费用说明',
}]
},
},
},
type:''
}
},
onShow() {
@ -78,7 +79,8 @@
created() {
uni.hideHomeButton() //左上角HOME按钮
},
onLoad(options) {
onLoad(options) {
this.type = options.type
this.getList()
},
onReachBottom() {
@ -91,34 +93,52 @@
//获取列表
getList(){
let that = this;
uni.request({
url: this.tui.interfaceUrl() + '/app/operatingArea/getOperatingAreaList',
data: {
if(this.type == 'kaidan'){ //客户跳过来的
this.tui.request("/app/operatingArea/getOperatingAreaList", "post", {
pageNum:this.total,
pageSize:10,
shippingMethodId:uni.getStorageSync("transCompany")
},
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST', //'GET','POST'
dataType: 'json',
success: (res) => {
}, false, false).then((res) => {
this.status = 'nomore';
if (res.data.code == 200){
this.pages = res.data.result.pages
if (res.code == 200){
this.pages = res.result.pages
if (this.pages == 1) {
this.standardList = res.data.result.records
this.standardList = res.result.records
} else {
this.standardList = [...this.standardList, ...res.data.result.records]
this.standardList = [...this.standardList, ...res.result.records]
}
}
},
fail: (res) => {
this.tui.toast("网络不给力,请稍后再试~")
}
})
})
}else{ //物流公司登录的
uni.request({
url: this.tui.interfaceUrl() + '/app/operatingArea/getOperatingAreaList',
data: {
pageNum:this.total,
pageSize:10,
shippingMethodId:uni.getStorageSync("transCompany")
},
header: {
'content-type': 'application/json',
'appWLToken': this.tui.getToken()
},
method: 'POST', //'GET','POST'
dataType: 'json',
success: (res) => {
this.status = 'nomore';
if (res.data.code == 200){
this.pages = res.data.result.pages
if (this.pages == 1) {
this.standardList = res.data.result.records
} else {
this.standardList = [...this.standardList, ...res.data.result.records]
}
}
},
fail: (res) => {
this.tui.toast("网络不给力,请稍后再试~")
}
})
}
},
//弹出弹窗
addAddress(data) {

Loading…
Cancel
Save