diff --git a/package-lock.json b/package-lock.json index eb835cc..d78ed18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10060,6 +10060,12 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, + "numeral": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", + "integrity": "sha1-StCAk21EPCVhrtnyGX7//iX05QY=", + "dev": true + }, "nwsapi": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", diff --git a/package.json b/package.json index 056f716..0304dd9 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "mini-types": "*", "miniprogram-api-typings": "*", "node-sass": "^4.14.1", + "numeral": "^2.0.6", "postcss-comment": "^2.0.0", "sass-loader": "^10.0.2", "vue-template-compiler": "^2.6.11", diff --git a/src/components/integral_order/integral_order.vue b/src/components/integral_order/integral_order.vue index a49dd96..54755d9 100644 --- a/src/components/integral_order/integral_order.vue +++ b/src/components/integral_order/integral_order.vue @@ -1,48 +1,74 @@ @@ -59,13 +85,13 @@ export default { line-height: 96upx; border-bottom: 2upx solid #D8D8D8; @include centerFlex(space-between); - >view{ + .ih-view{ flex-grow: 1; font-size: 28upx; color: #1a1a1a; @include textHide(1); } - >text{ + .ih-text{ margin-left: 20upx; flex-shrink: 0; font-size: 28upx; @@ -79,18 +105,18 @@ export default { padding: 0 20upx 20upx; .is-line{ display: flex; - view{ + .il-view,.iv-view{ line-height: 40upx; font-size: 24upx; color: #9c9c9f; } - >view{ + .il-view{ &:first-child{ flex-shrink: 0; } - &+view{ + &+.il-view{ flex-grow: 1; - >view{ + .iv-view{ @include textHide(1); } } @@ -102,13 +128,13 @@ export default { padding: 20upx; border-top: 2upx solid #D8D8D8; @include centerFlex(space-between); - >view{ + .ib-view{ line-height: 40upx; font-size: 24upx; color: #9c9c9f; min-width: 50%; @include textHide(1); - &+view{ + &+.ib-view{ text-align: right; } } @@ -117,7 +143,7 @@ export default { padding-bottom: 20upx; padding-right: 36upx; @include centerFlex(flex-end); - >view{ + .ib-view{ width: 176upx; height: 72upx; line-height: 68upx; diff --git a/src/components/membership_order/membership_order.vue b/src/components/membership_order/membership_order.vue index 7b44149..b19a624 100644 --- a/src/components/membership_order/membership_order.vue +++ b/src/components/membership_order/membership_order.vue @@ -1,63 +1,86 @@ @@ -73,35 +96,38 @@ export default { line-height: 96upx; border-bottom: 2upx solid #D8D8D8; @include centerFlex(space-between); - >view{ + .mh-view{ font-size: 28upx; font-weight: 500; color: #1a1a1a; @include textHide(1); } - >text{ + .mh-text{ flex-shrink: 0; font-size: 28upx; - color: $themeColor; + color: #9C9C9F; + &.active{ + color: $themeColor; + } } } .mo-section{ padding-bottom: 30upx; .ms-line{ display: flex; - view{ + .ml-view,.mv-view{ line-height: 40upx; font-size: 24upx; color: #9c9c9f; } - >view{ + .ml-view{ &:first-child{ flex-shrink: 0; } - &+view{ + &+.ml-view{ flex-grow: 1; - >view{ - >text{ + .mv-view{ + .mv-text{ color: #1A1A1A; } @include textHide(1); @@ -114,7 +140,7 @@ export default { height: 90upx; border-top: 2upx solid #D8D8D8; @include centerFlex(space-between); - >view{ + .mb-view{ line-height: 40upx; font-size: 24upx; color: #9c9c9f; diff --git a/src/components/reservation_order/reservation_order.vue b/src/components/reservation_order/reservation_order.vue index 3a87678..7f2b095 100644 --- a/src/components/reservation_order/reservation_order.vue +++ b/src/components/reservation_order/reservation_order.vue @@ -1,59 +1,102 @@ diff --git a/src/js/api.js b/src/js/api.js index ec96a06..4c6616b 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -19,7 +19,9 @@ export const API = { reservationOrder:`${ORIGIN}/admin/stadium/order/list`, // 预约订单 membershipOrder:`${ORIGIN}/admin/member_card/order/list`, // 会员卡订单 + integralOrder:`${ORIGIN}/admin/shop/order/list`, // 积分商城订单 + integralOrderSend:`${ORIGIN}/admin/shop/order/ship`, // 积分商城订单-发货 diff --git a/src/pages/collection/detail/detail.vue b/src/pages/collection/detail/detail.vue index e21bec1..956bb9b 100644 --- a/src/pages/collection/detail/detail.vue +++ b/src/pages/collection/detail/detail.vue @@ -15,11 +15,11 @@ - 全部 - 退款 + 全部 + 退款 - + {{e.desc || '-'}} @@ -27,8 +27,8 @@ {{e.pay_time || '-'}} - {{e.amount || '-'}} - 退款成功 + {{e.amount || '-'}} + {{e.refund_desc || ''}} @@ -46,6 +46,7 @@ export default { detail: {}, // 收入概况 receiveList: [], timerArr: [], // 时间选择数据 + curType: 0, curSelectedDate: { year: '', month: '', @@ -58,21 +59,49 @@ export default { this.storeInfo = _query.store; this.detail = _query.detail; this.timerArr = this.getTimerArr(_query.detail.date); - this.getDetail({}); - console.log('_query.detail',_query.detail) + + this.getDetail({ + date: _query.detail.date, + type: this.curType, + stadium_id: _query.store.id, + }); }, methods: { + tabChangeBtn(type){ + if(this.curType == type)return; + let { curSelectedDate, storeInfo } = this; + this.curType = type; + this.getDetail({ + date: `${curSelectedDate.year}-${curSelectedDate.month}-${curSelectedDate.date}`, + type: type, + stadium_id: storeInfo.id, + }) + }, dateChange(e){ let { value } = e.detail; - let { detail } = this; - + let { timerArr, curType, storeInfo } = this; + let _curTime = util.jsonPar(util.jsonStr(this.curSelectedDate)); + + let _obj = { + year: _curTime.year, + month: timerArr[0][value[0]], + date: timerArr[1][value[1]], + } + + this.curSelectedDate = _obj; + + this.getDetail({ + date: `${_obj.year}-${_obj.month}-${_obj.date}`, + type: curType, + stadium_id: storeInfo.id, + }) }, getTimerArr(curDate){ let _dateObj = new Date(curDate); let _year = _dateObj.getFullYear(); - let _month = util.formatNumber(_dateObj.getMonth()); + let _month = util.formatNumber(_dateObj.getMonth()+1); let _date = util.formatNumber(_dateObj.getDate()); - let _dateAmount = new Date(_year, _month, 0).getDate(); + let _dateAmount = new Date(_year, _month, 0).getDate(); // 当月总天数 this.setCurDate(_year, _month, _date); return [ new Array(12).fill(1).map((e,i)=>util.formatNumber(i+1)), @@ -80,20 +109,6 @@ export default { ] }, - getDateObj(curDate){ - let _dateObj = new Date(curDate); - let _year = _dateObj.getFullYear(); - let _month = util.formatNumber(_dateObj.getMonth()); - let _date = util.formatNumber(_dateObj.getDate()); - let _dateAmount = new Date(_year, _month, 0).getDate(); - - return { - year: _year, - month: _month, - date: _date, - dateAmount: _dateAmount, - } - }, setCurDate(y,m,d){ this.curSelectedDate = { year: y, @@ -102,10 +117,11 @@ export default { } }, getDetail({ - date='2020-09-20', + date='2020-08-10', type=0, stadium_id='', }){ + util.showLoad(); servers.get({ url: API.collectionDetails, data: { @@ -116,9 +132,10 @@ export default { failMsg: '加载失败!' }) .then(e=>{ - console.log('明细',e); + util.hideLoad(); this.receiveList = e.list || []; }) + .catch(util.hideLoad) } } diff --git a/src/pages/order_list/order_list.vue b/src/pages/order_list/order_list.vue index e10db9c..453f1a1 100644 --- a/src/pages/order_list/order_list.vue +++ b/src/pages/order_list/order_list.vue @@ -1,11 +1,11 @@