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

Loading…
Cancel
Save