|
|
@ -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() { |
|
|
|