From 1bec67842fe0ad2b63ec189531076a8b36f93eea Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Wed, 28 Feb 2024 18:52:54 +0800
Subject: [PATCH] 111
---
pages/other/logistics.vue | 198 ++++++++------------------
pages/other/logisticsDetail.vue | 243 ++++++++++++--------------------
pages/rebate/detail.vue | 8 +-
pages/rebate/rebate.vue | 45 +++---
4 files changed, 184 insertions(+), 310 deletions(-)
diff --git a/pages/other/logistics.vue b/pages/other/logistics.vue
index e36d420..e0c00ab 100644
--- a/pages/other/logistics.vue
+++ b/pages/other/logistics.vue
@@ -17,24 +17,20 @@
-
-
+
- 德邦物流
- (15014256321)
+ {{item.orderAddress}}
下单时间:
- 2023-11-29 12:00:01
-
-
- 订单状态:
- 待送达
+ {{item.createTime}}
-
+
+
@@ -47,20 +43,16 @@
export default {
data() {
return {
- range: '',
- shopList: [],
- list: ['待指派', '待取货', '待送达'],
+ list: ['待接单', '待取货', '待送达'],
modalShow: false,
- content:'地址',
- query: {
- saleVO: {
- searchDateVo: {
- endDate: '',
- startDate: ''
- },
- transCompany: ''
- },
- },
+ content:'地址',
+ orderStatus:0,
+ status: 'loadmore',
+ endDate: '',
+ startDate: '',
+ transCompany: '',
+ totalPages:0,
+ pages:1,
bList: [],
horizontal: 'right',
content: [{
@@ -69,6 +61,11 @@
text: '线路配置',
active: false
},{
+ iconPath: '/static/images/tabbar/home.png',
+ selectedIconPath: '/static/images/tabbar/home-sel.png',
+ text: '扣减记录',
+ active: false
+ },{
iconPath: '/static/images/tabbar/home.png',
selectedIconPath: '/static/images/tabbar/home-sel.png',
text: '退出登录',
@@ -76,28 +73,32 @@
}],
id:'',
type:'',
- companyName:''
+ companyName:'',
+ current:0
}
},
created() {
uni.hideHomeButton() //左上角HOME按钮
},
+ onReachBottom() {
+ if (this.pages >= this.totalPages) return;
+ this.status = 'loading';
+ this.pages = ++this.pages;
+ this.getList();
+ },
onShow(){
this.id = uni.getStorageSync('transCompany')
this.companyName = uni.getStorageSync('companyName')
this.type = uni.getStorageSync('isOnLine')
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 = this.id
- // this.range = date
- this.getShopList()
- this.getAllList()
+ this.startDate = date
+ this.endDate = date
+ this.transCompany = this.id
+ this.getList()
},
methods: {
upOrDown(){
-
var url
if(this.type == 1){ //上线状态
url = '/app/logitics/offLine'
@@ -136,18 +137,16 @@
}
})
},
- sectionChange(index) {
- this.current = index
- this.bList = []
- if (index == 0) {
- this.getAllList()
- }
- if (index == 1) {
- this.getList()
- }
- if (index == 2) {
- this.getReturnList()
+ sectionChange(index) {
+ this.current = index
+ if(index == 2){
+ this.orderStatus = 3
+ }else{
+ this.orderStatus = index
}
+
+ this.bList = []
+ this.getList()
},
trigger(e) {
let that = this;
@@ -156,6 +155,10 @@
// url: `/pages/other/logisticsAddress`
// })
that.tui.toast("线路配置暂不可用")
+ }else if(e.index == 1){
+ uni.navigateTo({
+ url: `/pages/other/companyLog`
+ })
}else{
uni.showModal({
title: "提示",
@@ -184,70 +187,33 @@
},
getList() {
+ this.status = 'loading';
uni.request({
- url: this.tui.interfaceUrl() + '/app/sale/listAll',
+ url: this.tui.interfaceUrl() + '/order/getByCondition',
data: {
- remarkSR: 2,
- shopId: this.shopId,
- searchDateVo: this.query
+ orderStatus:this.orderStatus,
+ endDate: this.endDate,
+ startDate: this.startDate,
+ transCompany: this.transCompany,
+ pageNumber:this.pages,
+ pageSize:10
},
header: {
- 'content-type': 'application/json',
+ 'content-type': 'application/x-www-form-urlencoded',
'appWLToken': this.tui.getToken()
},
- method: 'POST', //'GET','POST'
+ method: 'GET', //'GET','POST'
dataType: 'json',
success: (res) => {
+ this.status = 'nomore';
if (res.data.code == 200){
- this.bList = res.result
- }
- },
- fail: (res) => {
- this.tui.toast("网络不给力,请稍后再试~")
- }
- })
- },
- 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
+ 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) => {
@@ -255,56 +221,16 @@
}
})
},
- 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, //月份
diff --git a/pages/other/logisticsDetail.vue b/pages/other/logisticsDetail.vue
index ae580af..b289639 100644
--- a/pages/other/logisticsDetail.vue
+++ b/pages/other/logisticsDetail.vue
@@ -2,28 +2,24 @@
-
-
-
- -
-
-
- 德邦物流:
- 15014256321
-
-
- 下单时间:
- 2023-11-29 12:00:01
-
-
- 订单状态:
- 待送达
-
-
-
-
-
-
+
+
+
+ -
+
+
+ {{item.orderAddress}}
+
+
+ 下单时间:
+ {{item.createTime}}
+
+
+
+
+
+
+
@@ -33,149 +29,92 @@
export default {
data() {
- return {
- range: '',
- name: '',
- shopList: [],
+ return {
+ range:[],
modalShow: false,
content: '地址地址地址',
- query: {
- saleVO: {
- searchDateVo: {
- endDate: '',
- startDate: ''
- },
- transCompany: ''
- },
- },
- bList:[]
+ orderStatus:0,
+ status: 'loadmore',
+ endDate: '',
+ startDate: '',
+ transCompany: '',
+ totalPages:0,
+ pages:1,
+ bList:[],
+ id:'',
+ type:'',
+ companyName:'',
}
+ },
+ onReachBottom() {
+ if (this.pages >= this.totalPages) return;
+ this.status = 'loading';
+ this.pages = ++this.pages;
+ this.getList();
},
- 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()
+ onShow() {
+ this.getMonth();
+ this.id = uni.getStorageSync('transCompany')
+ this.companyName = uni.getStorageSync('companyName')
+ this.type = uni.getStorageSync('isOnLine')
+ this.transCompany = this.id
+ this.getList()
},
methods: {
- sectionChange(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
+ this.status = 'loading';
+ uni.request({
+ url: this.tui.interfaceUrl() + '/order/getByCondition',
+ data: {
+ orderStatus:4,
+ endDate: this.range[1],
+ startDate: this.range[0],
+ transCompany: this.transCompany,
+ pageNumber:this.pages,
+ pageSize:10
+ },
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded',
+ 'appWLToken': this.tui.getToken()
+ },
+ method: 'GET', //'GET','POST'
+ 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(){
uni.makePhoneCall({
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]
}
}
}
diff --git a/pages/rebate/detail.vue b/pages/rebate/detail.vue
index 98b2ddb..bfe843a 100644
--- a/pages/rebate/detail.vue
+++ b/pages/rebate/detail.vue
@@ -3,9 +3,9 @@
-
-
- 提现金额:50元
- 余 额:200元
+
+ 提现金额:{{item.commission}}元
+ 余 额:{{item.shopAfterRebateAmount}}元
@@ -25,7 +25,7 @@
},
methods: {
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){
this.commissionList = res.result
}
diff --git a/pages/rebate/rebate.vue b/pages/rebate/rebate.vue
index 151c2fa..5579b08 100644
--- a/pages/rebate/rebate.vue
+++ b/pages/rebate/rebate.vue
@@ -28,7 +28,6 @@
-
-
物流返佣:{{item.companyName}}
@@ -38,21 +37,21 @@
拉包返佣:{{item.workerName}}
返佣金额:{{item.workerRebateAmount}}元
-
-
- -
-
- 返佣主体:平台
-
- 对应订单:4165481316546
-
- 返佣后余额:200元
+
-
+
+
+ 返佣状态:{{item.isOpen == 1?'已返佣':'未返佣'}}
+ 返佣金额:{{item.shopRebateAmount}}元
+
+
+ 邀请店铺名:{{item.registerShopName}}
+
@@ -109,18 +108,28 @@
})
},
getList() {
+ var url,data
+ this.commissionList = []
if(this.current == 0){
- this.tui.request('/app/deductlog/getShopLogById', 'post', {
+ url = '/app/deductlog/getShopLogById'
+ data = {
shopId: this.shopId,
pageNum: this.pageNum,
pageSize: 10
- }, false, false, true).then((res) => {
- this.status = 'nomore';
- if (res.code == 200) {
- this.commissionList = res.result.records
- }
- })
- }
+ }
+ }else{
+ url = '/app/inviteLog/getInviteLogListByShop'
+ 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() {
uni.navigateTo({