wangfukang 3 years ago
parent
commit
1bec67842f
  1. 198
      pages/other/logistics.vue
  2. 243
      pages/other/logisticsDetail.vue
  3. 8
      pages/rebate/detail.vue
  4. 45
      pages/rebate/rebate.vue

198
pages/other/logistics.vue

@ -17,24 +17,20 @@
<view class="ulList" v-if="bList.length > 0"> <view class="ulList" v-if="bList.length > 0">
<ul> <ul>
<li v-for="(item,index ) in bList" :key="index"> <li v-for="(item,index ) in bList" :key="index">
<uni-card :title="'店铺名称:张三的店'" :sub-title="'明珠早市馆15001 (13521420172)'"> <uni-card :title="'店铺名称:'+item.shopName" :sub-title="item.getOrderAddress+'('+item.mobile+')'">
<view class="uni-body"> <view class="uni-body">
<text class="cardText">德邦物流</text> <text class="cardText">{{item.orderAddress}}</text>
(15014256321)
</view> </view>
<view class="uni-body"> <view class="uni-body">
<text class="cardText"> 下单时间:</text> <text class="cardText"> 下单时间:</text>
<text class="priceText"> 2023-11-29 12:00:01</text> <text class="priceText"> {{item.createTime}}</text>
</view>
<view class="uni-body">
<text class="cardText"> 订单状态:</text>
待送达
</view> </view>
</uni-card> </uni-card>
</li> </li>
</ul> </ul>
</view> </view>
</view> </view>
<u-loadmore :status="status" />
<u-modal :show="modalShow" title="详细地址" :content='content' @confirm="modalShow = false"></u-modal> <u-modal :show="modalShow" title="详细地址" :content='content' @confirm="modalShow = false"></u-modal>
<uni-fab ref="fab" :content="content" :horizontal="horizontal" <uni-fab ref="fab" :content="content" :horizontal="horizontal"
@trigger="trigger" /> @trigger="trigger" />
@ -47,20 +43,16 @@
export default { export default {
data() { data() {
return { return {
range: '', list: ['待接单', '待取货', '待送达'],
shopList: [],
list: ['待指派', '待取货', '待送达'],
modalShow: false, modalShow: false,
content:'地址', content:'地址',
query: { orderStatus:0,
saleVO: { status: 'loadmore',
searchDateVo: { endDate: '',
endDate: '', startDate: '',
startDate: '' transCompany: '',
}, totalPages:0,
transCompany: '' pages:1,
},
},
bList: [], bList: [],
horizontal: 'right', horizontal: 'right',
content: [{ content: [{
@ -69,6 +61,11 @@
text: '线路配置', text: '线路配置',
active: false active: false
},{ },{
iconPath: '/static/images/tabbar/home.png',
selectedIconPath: '/static/images/tabbar/home-sel.png',
text: '扣减记录',
active: false
},{
iconPath: '/static/images/tabbar/home.png', iconPath: '/static/images/tabbar/home.png',
selectedIconPath: '/static/images/tabbar/home-sel.png', selectedIconPath: '/static/images/tabbar/home-sel.png',
text: '退出登录', text: '退出登录',
@ -76,28 +73,32 @@
}], }],
id:'', id:'',
type:'', type:'',
companyName:'' companyName:'',
current:0
} }
}, },
created() { created() {
uni.hideHomeButton() //左上角HOME按钮 uni.hideHomeButton() //左上角HOME按钮
}, },
onReachBottom() {
if (this.pages >= this.totalPages) return;
this.status = 'loading';
this.pages = ++this.pages;
this.getList();
},
onShow(){ onShow(){
this.id = uni.getStorageSync('transCompany') this.id = uni.getStorageSync('transCompany')
this.companyName = uni.getStorageSync('companyName') this.companyName = uni.getStorageSync('companyName')
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.startDate = date
this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59' this.endDate = date
this.query.saleVO.transCompany = this.id this.transCompany = this.id
// this.range = date this.getList()
this.getShopList()
this.getAllList()
}, },
methods: { methods: {
upOrDown(){ upOrDown(){
var url var url
if(this.type == 1){ //上线状态 if(this.type == 1){ //上线状态
url = '/app/logitics/offLine' url = '/app/logitics/offLine'
@ -136,18 +137,16 @@
} }
}) })
}, },
sectionChange(index) { sectionChange(index) {
this.current = index this.current = index
this.bList = [] if(index == 2){
if (index == 0) { this.orderStatus = 3
this.getAllList() }else{
} this.orderStatus = index
if (index == 1) {
this.getList()
}
if (index == 2) {
this.getReturnList()
} }
this.bList = []
this.getList()
}, },
trigger(e) { trigger(e) {
let that = this; let that = this;
@ -156,6 +155,10 @@
// url: `/pages/other/logisticsAddress` // url: `/pages/other/logisticsAddress`
// }) // })
that.tui.toast("线路配置暂不可用") that.tui.toast("线路配置暂不可用")
}else if(e.index == 1){
uni.navigateTo({
url: `/pages/other/companyLog`
})
}else{ }else{
uni.showModal({ uni.showModal({
title: "提示", title: "提示",
@ -184,70 +187,33 @@
}, },
getList() { getList() {
this.status = 'loading';
uni.request({ uni.request({
url: this.tui.interfaceUrl() + '/app/sale/listAll', url: this.tui.interfaceUrl() + '/order/getByCondition',
data: { data: {
remarkSR: 2, orderStatus:this.orderStatus,
shopId: this.shopId, endDate: this.endDate,
searchDateVo: this.query startDate: this.startDate,
transCompany: this.transCompany,
pageNumber:this.pages,
pageSize:10
}, },
header: { header: {
'content-type': 'application/json', 'content-type': 'application/x-www-form-urlencoded',
'appWLToken': this.tui.getToken() 'appWLToken': this.tui.getToken()
}, },
method: 'POST', //'GET','POST' method: 'GET', //'GET','POST'
dataType: 'json', dataType: 'json',
success: (res) => { success: (res) => {
this.status = 'nomore';
if (res.data.code == 200){ if (res.data.code == 200){
this.bList = res.result this.bList = res.data.result.content
} if (this.pages == 1) {
}, this.bList = res.data.result.content
fail: (res) => { } else {
this.tui.toast("网络不给力,请稍后再试~") this.bList = [...this.bList, ...res.data.result.content]
} }
}) this.totalPages = res.data.result.totalPages
},
getAllList() {
uni.request({
url: this.tui.interfaceUrl() + '/app/sale/listAll',
data: {
remarkSR: 2,
shopId: this.shopId,
searchDateVo: this.query
},
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() {
uni.request({
url: this.tui.interfaceUrl() + '/app/sale/listAll',
data: {
remarkSR: 3,
shopId: this.shopId,
searchDateVo: this.query
},
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) => { fail: (res) => {
@ -255,56 +221,16 @@
} }
}) })
}, },
dateChange() {
this.query.startDate = this.range[0]
this.query.endDate = this.range[1]
this.sectionChange(this.current)
},
gotoInfo() { gotoInfo() {
uni.navigateTo({ uni.navigateTo({
url: `/pages/index/shopInfo` url: `/pages/index/shopInfo`
}) })
}, },
gotoSearchData() { gotoSearchData() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/other/logisticsDetail' url: '/pages/other/logisticsDetail'
}) })
}, },
getShopList() {
const that = this
uni.request({
url: tui.interfaceUrl() + '/app/sale/listCompany',
data: this.query.saleVO,
header: {
'content-type': 'application/json',
'appWLToken': tui.getToken()
},
method: 'post',
dataType: 'json',
success: (res) => {
that.shopList = res.data.result
},
fail: (res) => {
tui.toast("网络不给力,请稍后再试~")
}
})
},
onCellClick(item) {
this.modalShow = true
this.content = item.receiveAddress
},
onDatePackerChange(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) { formatDate(date, fmt) {
var o = { var o = {
'M+': date.getMonth() + 1, //月份 'M+': date.getMonth() + 1, //月份

243
pages/other/logisticsDetail.vue

@ -2,28 +2,24 @@
<view> <view>
<uni-datetime-picker style="margin-bottom:10px;" v-model="range" type="daterange" /> <uni-datetime-picker style="margin-bottom:10px;" v-model="range" type="daterange" />
<view class="item-wrapper"> <view class="item-wrapper">
<view class="ulList" v-if="bList.length > 0"> <view class="ulList" v-if="bList.length > 0">
<ul> <ul>
<li v-for="(item,index ) in bList" :key="index"> <li v-for="(item,index ) in bList" :key="index">
<uni-card :title="'店铺名称:张三的店'" :sub-title="'明珠早市馆15001 (13521420172)'"> <uni-card :title="'店铺名称:'+item.shopName" :sub-title="item.getOrderAddress+'('+item.mobile+')'">
<view class="uni-body" @tap="goPhone"> <view class="uni-body">
<text class="cardText">德邦物流:</text> <text class="cardText">{{item.orderAddress}}</text>
<text style="color: blue;text-decoration-line: underline;">15014256321</text> </view>
</view> <view class="uni-body">
<view class="uni-body"> <text class="cardText"> 下单时间:</text>
<text class="cardText"> 下单时间:</text> <text class="priceText"> {{item.createTime}}</text>
<text class="priceText"> 2023-11-29 12:00:01</text> </view>
</view> </uni-card>
<view class="uni-body"> </li>
<text class="cardText"> 订单状态:</text> </ul>
待送达 </view>
</view> </view>
</uni-card> <u-loadmore :status="status" />
</li>
</ul>
</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>
@ -33,149 +29,92 @@
export default { export default {
data() { data() {
return { return {
range: '', range:[],
name: '',
shopList: [],
modalShow: false, modalShow: false,
content: '地址地址地址', content: '地址地址地址',
query: { orderStatus:0,
saleVO: { status: 'loadmore',
searchDateVo: { endDate: '',
endDate: '', startDate: '',
startDate: '' transCompany: '',
}, totalPages:0,
transCompany: '' pages:1,
}, bList:[],
}, id:'',
bList:[] type:'',
companyName:'',
} }
},
onReachBottom() {
if (this.pages >= this.totalPages) return;
this.status = 'loading';
this.pages = ++this.pages;
this.getList();
}, },
created() { onShow() {
const id = uni.getStorageSync('transCompany') this.getMonth();
const date = this.formatDate(new Date(), 'YYYY-MM-DD') this.id = uni.getStorageSync('transCompany')
this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00' this.companyName = uni.getStorageSync('companyName')
this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59' this.type = uni.getStorageSync('isOnLine')
this.query.saleVO.transCompany = id this.transCompany = this.id
this.range = date this.getList()
this.getShopList()
this.getAllList()
}, },
methods: { methods: {
sectionChange(index) {
this.current = index
this.bList = []
if (index == 0) {
this.getAllList()
}
if (index == 1) {
this.getList()
}
if (index == 2) {
this.getReturnList()
}
},
getList() { getList() {
this.tui.request('/app/sale/listAll', 'post', { this.status = 'loading';
remarkSR:2, uni.request({
shopId: this.shopId, url: this.tui.interfaceUrl() + '/order/getByCondition',
searchDateVo: this.query data: {
}, false, false, false).then(res => { orderStatus:4,
if (res.code !== 200) return endDate: this.range[1],
this.bList = res.result startDate: this.range[0],
}) transCompany: this.transCompany,
}, pageNumber:this.pages,
getAllList() { pageSize:10
this.tui.request('/app/sale/listAll', 'post', { },
remarkSR:2, header: {
shopId: this.shopId, 'content-type': 'application/x-www-form-urlencoded',
searchDateVo: this.query 'appWLToken': this.tui.getToken()
}, false, false, false).then(res => { },
if (res.code !== 200) return method: 'GET', //'GET','POST'
this.bList = res.result.saleList dataType: 'json',
success: (res) => {
this.status = 'nomore';
if (res.data.code == 200){
this.bList = res.data.result.content
if (this.pages == 1) {
this.bList = res.data.result.content
} else {
this.bList = [...this.bList, ...res.data.result.content]
}
this.totalPages = res.data.result.totalPages
}
},
fail: (res) => {
this.tui.toast("网络不给力,请稍后再试~")
}
}) })
}, },
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() {
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() {
const that = this
uni.request({
url: tui.interfaceUrl() + '/app/sale/listCompany',
data: this.query.saleVO,
header: {
'content-type': 'application/json',
'appWLToken': tui.getToken()
},
method: 'post',
dataType: 'json',
success: (res) => {
that.shopList = res.data.result
},
fail: (res) => {
tui.toast("网络不给力,请稍后再试~")
}
})
},
onCellClick(item) {
this.modalShow = true
this.content = item.receiveAddress
},
onDatePackerChange(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(){ goPhone(){
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: '13521030702' phoneNumber: '13521030702'
}); });
},
//获取当月1日到当前时间
getMonth() {
//获取新的时间
let date = new Date()
//获取当前时间的年份转为字符串
let year = date.getFullYear().toString() //'年'
//获取月份,由于月份从0开始,此处要加1,判断是否小于10,如果是在字符串前面拼接'0'
let month = date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1).toString():(date.getMonth()+1).toString() //'月'
//获取天,判断是否小于10,如果是在字符串前面拼接'0'
let da = date.getDate() < 10 ? '0'+date.getDate().toString():date.getDate().toString() //'日'
//字符串拼接,开始时间,结束时间
let end = year + '-' + month + '-' + da //当天
let beg = year + '-' + month + '-01' //当月第一天
this.range = [beg,end]
} }
} }
} }

8
pages/rebate/detail.vue

@ -3,9 +3,9 @@
<uni-card title="提现记录"> <uni-card title="提现记录">
<ul class="inventoryList"> <ul class="inventoryList">
<li v-for="(item ,index) in commissionList" :key="index" style="margin-bottom:20rpx;"> <li v-for="(item ,index) in commissionList" :key="index" style="margin-bottom:20rpx;">
<uni-card :title="'提现人:张三'" :sub-title="'2023-10-15'"> <uni-card :title="'提现人:'+ item.aliName" :sub-title="item.createTime">
<view class="uni-body">提现金额:50元</view> <view class="uni-body">提现金额:{{item.commission}}元</view>
<view class="uni-body">余 额:200元</view> <view class="uni-body">余 额:{{item.shopAfterRebateAmount}}元</view>
</uni-card> </uni-card>
</li> </li>
</ul> </ul>
@ -25,7 +25,7 @@
}, },
methods: { methods: {
getList() { getList() {
this.tui.request('/app/returnCommission/listWithReturned', 'get', {}, false, false, true).then((res) => { this.tui.request('/app/returnCommission/listWithReturned', 'post', {}, false, false, true).then((res) => {
if (res.code == 200){ if (res.code == 200){
this.commissionList = res.result this.commissionList = res.result
} }

45
pages/rebate/rebate.vue

@ -28,7 +28,6 @@
<uni-card title="返佣记录" v-show="current === 0"> <uni-card title="返佣记录" v-show="current === 0">
<ul class="inventoryList"> <ul class="inventoryList">
<li v-for="(item ,index) in commissionList" :key="index" style="margin-bottom:20rpx;"> <li v-for="(item ,index) in commissionList" :key="index" style="margin-bottom:20rpx;">
<!-- <li> -->
<uni-card :title="'返佣日期:'+ item.createTime" :sub-title="'返佣后账户余额:'+ item.shopAfterDepoBal" @tap=""> <uni-card :title="'返佣日期:'+ item.createTime" :sub-title="'返佣后账户余额:'+ item.shopAfterDepoBal" @tap="">
<view class="uni-body" style="margin-bottom: 5px;padding-bottom: 10rpx;border-bottom:1px solid #eee;"> <view class="uni-body" style="margin-bottom: 5px;padding-bottom: 10rpx;border-bottom:1px solid #eee;">
<view class="cardText">物流返佣:{{item.companyName}}</view> <view class="cardText">物流返佣:{{item.companyName}}</view>
@ -38,21 +37,21 @@
<view class="cardText">拉包返佣:{{item.workerName}}</view> <view class="cardText">拉包返佣:{{item.workerName}}</view>
<view class="cardText">返佣金额:{{item.workerRebateAmount}}元</view> <view class="cardText">返佣金额:{{item.workerRebateAmount}}元</view>
</view> </view>
<!-- <view class="uni-body">返佣后余额:200元</view> -->
</uni-card> </uni-card>
</li> </li>
</ul> </ul>
</uni-card> </uni-card>
<uni-card title="返佣记录" v-show="current === 1"> <uni-card title="返佣记录" v-show="current === 1">
<ul class="inventoryList"> <ul class="inventoryList">
<!-- <li v-for="(item ,index) in commissionList" :key="index" style="margin-bottom:20rpx;"> --> <li v-for="(item ,index) in commissionList" :key="index" style="margin-bottom:20rpx;">
<li> <uni-card :title="'返佣日期:'+ item.registerShopTime" :sub-title="'返佣后账户余额:'+ item.shopAfterRebateAmount" @tap="">
<uni-card :title="'返佣类型:邀请返佣'" :sub-title="'返佣日期:2023-10-15'" :extra="'返佣金额:50'" @tap=""> <view class="uni-body" style="margin-bottom: 5px;padding-bottom: 10rpx;border-bottom:1px solid #eee;">
<view class="uni-body">返佣主体:平台</view> <view class="cardText">返佣状态:{{item.isOpen == 1?'已返佣':'未返佣'}}</view>
<view class="uni-body"> <view class="cardText">返佣金额:{{item.shopRebateAmount}}元</view>
<text class="cardText">对应订单:4165481316546</text> </view>
</view> <view class="uni-body">
<view class="uni-body">返佣后余额:200元</view> <view class="cardText">邀请店铺名:{{item.registerShopName}}</view>
</view>
</uni-card> </uni-card>
</li> </li>
</ul> </ul>
@ -109,18 +108,28 @@
}) })
}, },
getList() { getList() {
var url,data
this.commissionList = []
if(this.current == 0){ if(this.current == 0){
this.tui.request('/app/deductlog/getShopLogById', 'post', { url = '/app/deductlog/getShopLogById'
data = {
shopId: this.shopId, shopId: this.shopId,
pageNum: this.pageNum, pageNum: this.pageNum,
pageSize: 10 pageSize: 10
}, false, false, true).then((res) => { }
this.status = 'nomore'; }else{
if (res.code == 200) { url = '/app/inviteLog/getInviteLogListByShop'
this.commissionList = res.result.records data = {
} pageNumber: this.pageNum,
}) pageSize: 10
} }
}
this.tui.request(url, 'post', data, false, false, true).then((res) => {
this.status = 'nomore';
if (res.code == 200) {
this.commissionList = res.result.records
}
})
}, },
goToDetail() { goToDetail() {
uni.navigateTo({ uni.navigateTo({

Loading…
Cancel
Save