wangfukang 3 years ago
parent
commit
c73cb08de6
  1. 89
      package1/other/logistics.vue

89
package1/other/logistics.vue

@ -24,7 +24,11 @@
<view class="uni-body">
<text class="cardText"> 下单时间:</text>
<text class="priceText"> {{item.createTime}}</text>
</view>
</view>
<view style="display: flex;height: 80rpx;line-height: 80rpx;">
<view class="copy-text" @tap="copyAddress(item,'fa')">复制发货人地址</view>
<view class="copy-text" @tap="copyAddress(item,'shou')">复制收货人地址</view>
</view>
</uni-card>
</li>
</ul>
@ -43,7 +47,7 @@
export default {
data() {
return {
list: ['待接单', '待取货', '待送达'],
list: ['待接单', '待取货', '待送达','店铺自送'],
modalShow: false,
content:'地址',
orderStatus:0,
@ -90,7 +94,11 @@
if (this.pages >= this.totalPages) return;
this.status = 'loading';
this.pages = ++this.pages;
this.getList();
if(this.current == 3){
this.getZTList();
}else{
this.getList();
}
},
onShow(){
this.id = uni.getStorageSync('transCompany')
@ -141,17 +149,41 @@
this.tui.toast("网络不给力,请稍后再试~")
}
})
},
//复制地址
copyAddress(item,type){
console.log(item);
if(type=='fa'){
var data = item.shopName + item.createBy+'河北省沧州市运河区明珠商贸城' + item.getOrderAddress
uni.setClipboardData({
data: data,
success: function () {
console.log('复制成功');
}
});
}else{
var aaa = item.orderAddress.substr(item.orderAddress.indexOf('-'))
var data = item.userName +item.userMobile + aaa
uni.setClipboardData({
data: data,
success: function () {
console.log('复制成功');
}
});
}
},
sectionChange(index) {
this.current = index
this.bList = []
if(index == 2){
this.orderStatus = 3
this.getList()
}else if(index == 3){
this.getZTList()
}else{
this.orderStatus = index
}
this.bList = []
this.getList()
this.getList()
}
},
trigger(e) {
let that = this;
@ -204,6 +236,42 @@
})
}
},
getZTList() {
this.status = 'loading';
uni.request({
url: this.tui.interfaceUrl() + '/app/sale/getSaleByCompanyId',
data: {
companyId:this.transCompany,
pageNum:this.pages,
pageSize:10
},
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){
for(var i=0;i<res.data.result.records.length;i++){
res.data.result.records[i].getOrderAddress = res.data.result.records[i].shopAddress
res.data.result.records[i].mobile = res.data.result.records[i].createByPhone
res.data.result.records[i].orderAddress = res.data.result.records[i].province + res.data.result.records[i].city + res.data.result.records[i].area + res.data.result.records[i].receiveAddress
}
if (this.pages == 1) {
this.bList = res.data.result.records
} else {
this.bList = [...this.bList, ...res.data.result.records]
}
this.totalPages = res.data.result.totalPages
}
},
fail: (res) => {
this.tui.toast("网络不给力,请稍后再试~")
}
})
},
getList() {
this.status = 'loading';
@ -303,7 +371,12 @@
white-space: nowrap;
text-overflow: ellipsis;
}
.copy-text{
text-align:center;
flex:1;
color: blue;
text-decoration-line: underline;
}
.contentPadding {
padding: 0 20upx;
background-color: #fff;

Loading…
Cancel
Save