From 60d68de140cfd5b19ad2e488cf27cae81907e83d Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Thu, 1 Sep 2022 13:33:59 +0800 Subject: [PATCH] add income api --- src/pages/turnover/turnover.vue | 31 +++++++++++++++------ src/static/images/icon/toggle.png | Bin 0 -> 393 bytes .../income/pages/details_record/details_record.vue | 29 +++++++++++++------ 3 files changed, 43 insertions(+), 17 deletions(-) create mode 100644 src/static/images/icon/toggle.png diff --git a/src/pages/turnover/turnover.vue b/src/pages/turnover/turnover.vue index b09eb70..1cf2f12 100644 --- a/src/pages/turnover/turnover.vue +++ b/src/pages/turnover/turnover.vue @@ -12,13 +12,15 @@ + {{curSelectStore.name || '-'}} + {{curSelectStore.name || '-'}} - + @@ -34,21 +36,21 @@ 线上 - + ¥{{totalData.online_actual_income_amount || '0'}} 线下 - + ¥{{totalData.offline_actual_income_amount || '0'}} 联营 - + ¥{{totalData.joint_actual_income_amount || '0'}} @@ -77,7 +79,7 @@ 总收入 ¥{{botData.count_type_actual_income_amount || 0}} - 查看收款明细 + 查看收款明细 @@ -131,7 +133,7 @@ export default { }, data(){ return { - tabID: 4, + tabID: 4, // 4 品牌, 3 门店 timeTabIdx: 0, totalData: {}, @@ -170,6 +172,14 @@ export default { }, methods: { + toDetailsRecord(){ + let { curSelectStore, brandInfo, tabID } = this; + util.$_emit('turnoverToDetailsRecord', { + stadiumInfo: (tabID == 3&&curSelectStore&&curSelectStore.id) ? curSelectStore : null, + brandInfo: brandInfo&&brandInfo.brand ? brandInfo.brand : null, + }); + util.routeTo(`/subpackage/income/pages/details_record/details_record`, 'nT'); + }, /* count_type @@ -184,7 +194,6 @@ export default { 7 统计品牌的某一年 */ getCountType({ tab_id = -1, time_tab_idx = -1 }){ - console.warn(tab_id, time_tab_idx, getType(time_tab_idx) + 5); if(time_tab_idx == -1)return tab_id; let _type = getType(time_tab_idx) @@ -208,11 +217,17 @@ export default { } } }, + incomeQusModal(data){ + util.showModal({ + title: '提示', + content: data || '-', + }) + }, showQuestionModal(){ let { totalData } = this util.showModal({ title: totalData.income_record_name|| '提示', - content: totalData.income_record_tips || '总收入为:线上(微信支付)+ 线下的总收入(退款已删除)', + content: totalData.income_record_tips || '-', showCancel: true, success: mRes => { diff --git a/src/static/images/icon/toggle.png b/src/static/images/icon/toggle.png new file mode 100644 index 0000000000000000000000000000000000000000..45567fcd17e7deebdcc6306001a9f162a4b27fdc GIT binary patch literal 393 zcmeAS@N?(olHy`uVBq!ia0vp^79h;R3?!pgsObVJg8-ipS0KG<)27XvHv>rs*s^5{ zkP8Gr#@4M{fr3C1!Uc+$|2L=y>Jcaj@(X78_ikCF*tUjgURoCv4rf}p-?aS(l>6c7 z;uvCaI$1*Gfwi6I@*tZ@eXrO*cyMifG*Lvvy1{*Uf}PylrX=AHFGTJ%xi4REA=qY8 z(<}A@X>FA&tw8<_CLsU2;~RnGkc2`(CC#@CQ`U$b;ZnF4=proKWGv$_sVjp)hgBq$ z-$A0AQ|BSyA(q^^Jcl`SDjzj**Cc#6D(f_p=TE1F>Q+gKFb<}}aU2~jQvwYf27hSslLco?v2vYjeVZnH&?3@P$1v zoYuIUqu;Nsz}03FPyYwcA}ysiM_7tCzHX^x?^ii&R5QtD+7F>KL2V0p85X|xe!SD5 S_!Te=7(8A5T-G@yGywq0DxT8- literal 0 HcmV?d00001 diff --git a/src/subpackage/income/pages/details_record/details_record.vue b/src/subpackage/income/pages/details_record/details_record.vue index dd7c473..4b2d684 100644 --- a/src/subpackage/income/pages/details_record/details_record.vue +++ b/src/subpackage/income/pages/details_record/details_record.vue @@ -121,6 +121,7 @@ }, data(){ return { + brandInfo: {}, modalScrollViewHeight: '', incomeTime: '', @@ -145,11 +146,17 @@ let _timeStr = util.formatDate({}); this.incomeTime = _timeStr; this.incomeTypeInfo = incomeTypeLs[0]; - this.refreshPage(); + util.$_once('turnoverToDetailsRecord', data=>{ + let { brandInfo, stadiumInfo } = data; + this.confirmSelectStore = stadiumInfo || null; + this.brandInfo = brandInfo || {}; + this.refreshPage(); + }) }, onReachBottom(){ - let { incomeTime, type, incomeTypeInfo, confirmSelectStore, confirmSelectScene, page } = this; + let { brandInfo, incomeTime, type, incomeTypeInfo, confirmSelectStore, confirmSelectScene, page } = this; this.getRecordLs({ + brand_id: brandInfo.id || '', type: type || '', time_str: incomeTime || '', income_type: incomeTypeInfo.eng || '', @@ -162,12 +169,13 @@ // 弹窗重置按钮 modalResetBtn(){ - let { incomeTypeInfo } = this; + let { brandInfo, incomeTypeInfo } = this; this.modalSelectScene = null; this.modalSelectStore = null; // 不同店铺场景值不一样 this.sceneLs = []; this.getSceneLs({ + brand_id: brandInfo.id || '', income_type: incomeTypeInfo.eng || '', }); }, @@ -184,7 +192,7 @@ this.modalSelectScene = e || null; }, stadiumChange(e){ - let { incomeTypeInfo, storeList, modalSelectStore } = this; + let { brandInfo, incomeTypeInfo, storeList, modalSelectStore } = this; let _idx = e.detail.value; let _stadium = storeList[_idx] || {}; if(modalSelectStore&&(modalSelectStore.id == _stadium.id))return; @@ -193,6 +201,7 @@ // 不同店铺场景值不一样 this.sceneLs = []; this.getSceneLs({ + brand_id: brandInfo.id || '', income_type: incomeTypeInfo.eng || '', stadium_id: _stadium.id }); @@ -200,7 +209,7 @@ }, // 弹窗筛选显示 filterShow(){ - let { incomeTypeInfo, confirmSelectStore, confirmSelectScene } = this; + let { brandInfo, incomeTypeInfo, confirmSelectStore, confirmSelectScene } = this; this.modalSelectScene = confirmSelectScene || null; this.modalSelectStore = confirmSelectStore || null; @@ -208,12 +217,13 @@ this.$nextTick(async _=>{ this.initFilterScrollView(); if(true)try{ - await this.getStoreList(); + await this.getStoreList(brandInfo.id || '',); }catch(err){ console.warn('getStore err ->', err) }; this.getSceneLs({ + brand_id: brandInfo.id || '', income_type: incomeTypeInfo.eng || '', stadium_id: (confirmSelectStore&&confirmSelectStore.id) || '' }); @@ -221,11 +231,11 @@ }, // 获取弹窗品牌店铺列表 - getStoreList(){ + getStoreList(brand_id){ util.showLoad(); return server.get({ url: INCOME_API.stadiumList, - data: {}, + data: { brand_id }, failMsg: '加载店铺列表失败!', }) .then(res=>{ @@ -274,11 +284,12 @@ refreshPage(){ this.$nextTick(_=>{ - let { incomeTime, type, incomeTypeInfo, confirmSelectStore, confirmSelectScene } = this; + let { brandInfo, incomeTime, type, incomeTypeInfo, confirmSelectStore, confirmSelectScene } = this; this.page = 1; this.incomeLs = []; this.incomeMes = {}; this.getRecordLs({ + brand_id: brandInfo.id || '', type: type || '', time_str: incomeTime || '', income_type: incomeTypeInfo.eng || '',