wangfukang 3 years ago
parent
commit
7568d0f7a5
  1. 411
      pages/other/logistics.vue
  2. 232
      pages/other/logisticsDetail.vue
  3. BIN
      pages/staff/.DS_Store

411
pages/other/logistics.vue

@ -1,156 +1,283 @@
<template> <template>
<view> <view>
<view> <view>
<button size="default" type="default" @tap="goAddPeople" hover-class="is-hover">新增人员</button> <button size="default" type="default" @tap="goAddPeople" hover-class="is-hover">上线</button>
</view> </view>
<uni-section class="mb-10" title="历史订单" type="line"> <!-- <uni-section class="mb-10" title="历史订单" type="line">
<uni-datetime-picker style="margin-bottom:10px;" v-model="range" type="daterange" /> <uni-datetime-picker style="margin-bottom:10px;" v-model="range" type="daterange" />
</uni-section> </uni-section> -->
<view class="item-wrapper"> <view class="contentPadding">
<u-cell-group> <view class="title">
<u-cell @click="onCellClick(item)" :label="item.createTime" v-for="(item,index) in shopList" :key="index"> <i class="iconfont icon-huaban"> 今日订单
<view class="btn" @tap="gotoSearchData">
历史订单 >
</view>
</i>
</view>
</view>
<view class="item-wrapper">
<u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection>
<view class="ulList" v-if="bList.length > 0">
<ul>
<li v-for="(item,index ) in bList" :key="index">
<uni-card :title="'店铺名称:张三的店'" :sub-title="'明珠早市馆15001 (13521420172)'">
<view class="uni-body">
<text class="cardText">德邦物流</text>
(15014256321)
</view>
<view class="uni-body">
<text class="cardText"> 下单时间:</text>
<text class="priceText"> 2023-11-29 12:00:01</text>
</view>
<view class="uni-body">
<text class="cardText"> 订单状态:</text>
待送达
</view>
</uni-card>
</li>
</ul>
</view>
<!-- <u-cell-group>
<u-cell @click="onCellClick(item)" :label="item.createTime">
<view slot="title"> <view slot="title">
<view class="text">下单店铺:{{item.shopName}}</view> <view class="text">下单店铺:张三的店</view>
<view class="text">收货地址:{{item.receiveAddress}}</view> <view class="text">收货地址:北京市朝阳区十里河66号</view>
<view class="text">联系电话:{{item.recPhone}}</view> <view class="text">联系电话:13510521562</view>
<view class="text">物流人员:{{item.customerName}}</view> <view class="text">物流人员:物流李四</view>
</view> </view>
</u-cell> </u-cell>
</u-cell-group> </u-cell-group> -->
</view> </view>
<u-modal :show="modalShow" title="详细地址" :content='content' @confirm="modalShow = false"></u-modal> <u-modal :show="modalShow" title="详细地址" :content='content' @confirm="modalShow = false"></u-modal>
</view> </view>
</template> </template>
<script> <script>
import tui from '../../common/httpRequest.js' import tui from '../../common/httpRequest.js'
export default { export default {
data() { data() {
return { return {
range: '', range: '',
name: '', name: '',
shopList: [], shopList: [],
modalShow: false, list: ['待指派', '待取货','待送达'],
content: '地址地址地址', modalShow: false,
query: { content: '地址地址地址',
saleVO: { query: {
searchDateVo: { saleVO: {
endDate: '', searchDateVo: {
startDate: '' endDate: '',
}, startDate: ''
transCompany:'' },
}, transCompany: ''
} },
} },
}, bList:[]
created() { }
const id = uni.getStorageSync('transCompany') },
const date = this.formatDate(new Date(), 'YYYY-MM-DD') created() {
this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00' const id = uni.getStorageSync('transCompany')
this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59' const date = this.formatDate(new Date(), 'YYYY-MM-DD')
this.query.saleVO.transCompany = id this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00'
this.range = date this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59'
this.getShopList() this.query.saleVO.transCompany = id
}, this.range = date
methods: { this.getShopList()
getShopList() { this.getAllList()
// this.tui.request('/app/sale/listCompany', 'POST', {}, false, true, false).then(res => { },
// if (res.code !== 200) return methods: {
// this.shopList = res.result.map((v) => { sectionChange(index) {
// return { console.log(index)
// text: v.shopName, this.current = index
// value: v.id this.bList = []
// } if (index == 0) {
// }) this.getAllList()
// }) }
const that = this if (index == 1) {
uni.request({ this.getList()
url: tui.interfaceUrl() + '/app/sale/listCompany', }
data: this.query.saleVO, if (index == 2) {
header: { this.getReturnList()
'content-type': 'application/json', }
// 'Authorization': tui.getToken() },
'appWLToken': tui.getToken() getList() {
}, this.tui.request('/app/sale/listAll', 'post', {
method: 'post', //'GET','POST' remarkSR:2,
dataType: 'json', shopId: this.shopId,
success: (res) => { searchDateVo: this.query
that.shopList = res.data.result }, false, false, false).then(res => {
console.log(res) if (res.code !== 200) return
}, this.bList = res.result
fail: (res) => { })
tui.toast("网络不给力,请稍后再试~") },
console.log(res) getAllList() {
} this.tui.request('/app/sale/listAll', 'post', {
}) remarkSR:2,
}, shopId: this.shopId,
onCellClick(item) { searchDateVo: this.query
this.modalShow = true }, false, false, false).then(res => {
this.content = item.receiveAddress if (res.code !== 200) return
console.log('item', item) this.bList = res.result.saleList
}, })
onDatePackerChange(date) { },
console.log(date) getReturnList() {
if (!date) { this.tui.request('/app/sale/listAll', 'post', {
this.query.saleVO.searchDateVo.startDate = '' remarkSR:3,
this.query.saleVO.searchDateVo.endDate = '' shopId: this.shopId,
}else { searchDateVo: this.query
this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00' }, false, false, false).then(res => {
this.query.saleVO.searchDateVo.endDate = date + " 23:59:59" if (res.code !== 200) return
} this.bList = res.result.returnSaleList
this.getShopList() })
}, },
formatDate(date, fmt) { dateChange() {
var o = { console.log(this.range)
'M+': date.getMonth() + 1, //月份 this.query.startDate = this.range[0]
'D+': date.getDate(), //日 this.query.endDate = this.range[1]
'H+': date.getHours(), //小时 this.sectionChange(this.current)
'm+': date.getMinutes(), //分 },
's+': date.getSeconds(), //秒 gotoInfo() {
'q+': Math.floor((date.getMonth() + 3) / 3), //季度 uni.navigateTo({
'S': date.getMilliseconds() //毫秒 url: `/pages/index/shopInfo`
}; })
if (/(Y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)); },
for (var k in o)
if (new RegExp('(' + k + ')').test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length))); gotoSearchData() {
return fmt; uni.navigateTo({
} url: '/pages/other/logisticsDetail'
} })
} },
getShopList() {
// this.tui.request('/app/sale/listCompany', 'POST', {}, false, true, false).then(res => {
// if (res.code !== 200) return
// this.shopList = res.result.map((v) => {
// return {
// text: v.shopName,
// value: v.id
// }
// })
// })
const that = this
uni.request({
url: tui.interfaceUrl() + '/app/sale/listCompany',
data: this.query.saleVO,
header: {
'content-type': 'application/json',
// 'Authorization': tui.getToken()
'appWLToken': tui.getToken()
},
method: 'post', //'GET','POST'
dataType: 'json',
success: (res) => {
that.shopList = res.data.result
console.log(res)
},
fail: (res) => {
tui.toast("网络不给力,请稍后再试~")
console.log(res)
}
})
},
onCellClick(item) {
this.modalShow = true
this.content = item.receiveAddress
console.log('item', item)
},
onDatePackerChange(date) {
console.log(date)
if (!date) {
this.query.saleVO.searchDateVo.startDate = ''
this.query.saleVO.searchDateVo.endDate = ''
} else {
this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00'
this.query.saleVO.searchDateVo.endDate = date + " 23:59:59"
}
this.getShopList()
},
formatDate(date, fmt) {
var o = {
'M+': date.getMonth() + 1, //月份
'D+': date.getDate(), //日
'H+': date.getHours(), //小时
'm+': date.getMinutes(), //分
's+': date.getSeconds(), //秒
'q+': Math.floor((date.getMonth() + 3) / 3), //季度
'S': date.getMilliseconds() //毫秒
};
if (/(Y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp('(' + k + ')').test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k])
.length)));
return fmt;
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
button { button {
color: #ffffff; color: #ffffff;
background: #5fd9ee; background: #5fd9ee;
width: 90%; width: 90%;
margin-top: 20rpx; margin:20rpx auto;
} }
.example-body {
}
.shop-choose { .example-body {}
padding: 25upx 15upx;
display: flex; .shop-choose {
justify-content: space-between; padding: 25upx 15upx;
align-items: center; display: flex;
justify-content: space-between;
align-items: center;
.shop-name {
flex-basis: 150upx;
}
}
.shop-name { .item-wrapper {
flex-basis: 150upx; background-color: #fff;
} overflow: hidden;
} }
.item-wrapper { .text {
margin-top: 24upx; width: 600upx;
background-color: #fff; overflow: hidden;
overflow: hidden; white-space: nowrap;
} text-overflow: ellipsis;
.text { }
width: 600upx; .contentPadding {
overflow: hidden; padding: 0 20upx;
white-space: nowrap; background-color: #fff;
text-overflow: ellipsis; color: #909399;
}
</style> .title {
padding-left: 20rpx;
font-size: 32rpx;
color: #303133;
line-height: 66rpx;
image {
display: inline-block;
width: 40rpx;
vertical-align: middle;
}
.btn {
text-align: right;
width: 24%;
float: right;
font-size: 26rpx;
color: $u-primary;
}
}
.grid-text {
font-size: 28rpx;
margin-bottom: 26rpx;
}
}
</style>

232
pages/other/logisticsDetail.vue

@ -0,0 +1,232 @@
<template>
<view>
<uni-datetime-picker style="margin-bottom:10px;" v-model="range" type="daterange" />
<view class="item-wrapper">
<view class="ulList" v-if="bList.length > 0">
<ul>
<li v-for="(item,index ) in bList" :key="index">
<uni-card :title="'店铺名称:张三的店'" :sub-title="'明珠早市馆15001 (13521420172)'">
<view class="uni-body" @tap="goPhone">
<text class="cardText">德邦物流:</text>
<text style="color: blue;text-decoration-line: underline;">15014256321</text>
</view>
<view class="uni-body">
<text class="cardText"> 下单时间:</text>
<text class="priceText"> 2023-11-29 12:00:01</text>
</view>
<view class="uni-body">
<text class="cardText"> 订单状态:</text>
待送达
</view>
</uni-card>
</li>
</ul>
</view>
</view>
<u-modal :show="modalShow" title="详细地址" :content='content' @confirm="modalShow = false"></u-modal>
</view>
</template>
<script>
import tui from '../../common/httpRequest.js'
export default {
data() {
return {
range: '',
name: '',
shopList: [],
modalShow: false,
content: '地址地址地址',
query: {
saleVO: {
searchDateVo: {
endDate: '',
startDate: ''
},
transCompany: ''
},
},
bList:[]
}
},
created() {
const id = uni.getStorageSync('transCompany')
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
this.range = date
this.getShopList()
this.getAllList()
},
methods: {
sectionChange(index) {
console.log(index)
this.current = index
this.bList = []
if (index == 0) {
this.getAllList()
}
if (index == 1) {
this.getList()
}
if (index == 2) {
this.getReturnList()
}
},
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
})
},
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
})
},
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
})
},
dateChange() {
console.log(this.range)
this.query.startDate = this.range[0]
this.query.endDate = this.range[1]
this.sectionChange(this.current)
},
gotoInfo() {
uni.navigateTo({
url: `/pages/index/shopInfo`
})
},
gotoSearchData() {
uni.navigateTo({
url: '/pages/other/logisticsDetail'
})
},
getShopList() {
// this.tui.request('/app/sale/listCompany', 'POST', {}, false, true, false).then(res => {
// if (res.code !== 200) return
// this.shopList = res.result.map((v) => {
// return {
// text: v.shopName,
// value: v.id
// }
// })
// })
const that = this
uni.request({
url: tui.interfaceUrl() + '/app/sale/listCompany',
data: this.query.saleVO,
header: {
'content-type': 'application/json',
// 'Authorization': tui.getToken()
'appWLToken': tui.getToken()
},
method: 'post', //'GET','POST'
dataType: 'json',
success: (res) => {
that.shopList = res.data.result
console.log(res)
},
fail: (res) => {
tui.toast("网络不给力,请稍后再试~")
console.log(res)
}
})
},
onCellClick(item) {
this.modalShow = true
this.content = item.receiveAddress
console.log('item', item)
},
onDatePackerChange(date) {
console.log(date)
if (!date) {
this.query.saleVO.searchDateVo.startDate = ''
this.query.saleVO.searchDateVo.endDate = ''
} else {
this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00'
this.query.saleVO.searchDateVo.endDate = date + " 23:59:59"
}
this.getShopList()
},
formatDate(date, fmt) {
var o = {
'M+': date.getMonth() + 1, //月份
'D+': date.getDate(), //日
'H+': date.getHours(), //小时
'm+': date.getMinutes(), //分
's+': date.getSeconds(), //秒
'q+': Math.floor((date.getMonth() + 3) / 3), //季度
'S': date.getMilliseconds() //毫秒
};
if (/(Y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp('(' + k + ')').test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k])
.length)));
return fmt;
},
goPhone(){
uni.makePhoneCall({
phoneNumber: '13521030702'
});
}
}
}
</script>
<style lang="scss" scoped>
button {
color: #ffffff;
background: #5fd9ee;
width: 90%;
margin:20rpx auto;
}
.example-body {}
.shop-choose {
padding: 25upx 15upx;
display: flex;
justify-content: space-between;
align-items: center;
.shop-name {
flex-basis: 150upx;
}
}
.item-wrapper {
background-color: #fff;
overflow: hidden;
}
.text {
width: 600upx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>

BIN
pages/staff/.DS_Store

Binary file not shown.
Loading…
Cancel
Save