Browse Source

add income api

tags/v1.1.30
刘嘉炜 3 years ago
parent
commit
60d68de140
  1. 31
      src/pages/turnover/turnover.vue
  2. BIN
      src/static/images/icon/toggle.png
  3. 29
      src/subpackage/income/pages/details_record/details_record.vue

31
src/pages/turnover/turnover.vue

@ -12,13 +12,15 @@
</view>
<!-- 仅有一家店铺情况下没有品牌查看权限 -->
<view class="tts-address" v-else-if="tabID == 3&&storeList.length ==1">
<image class="ta-logo" :src="totalData.logo" mode="aspectFit"></image>
<view>{{curSelectStore.name || '-'}}</view>
<!-- <image mode="aspectFit" src="/static/images/icon/arrow_b2.png"></image> -->
</view>
<picker v-else-if="tabID == 3" :range="storeList" range-key="name" @change="storeChange">
<view class="tts-address">
<image class="ta-logo" :src="totalData.logo" mode="aspectFit"></image>
<view>{{curSelectStore.name || '-'}}</view>
<image mode="aspectFit" src="/static/images/icon/arrow_b2.png"></image>
<image mode="aspectFit" src="/static/images/icon/toggle.png"></image>
</view>
</picker>
@ -34,21 +36,21 @@
<view class="tpl-item">
<view class="ti-name">
<text>线上</text>
<image mode="aspectFit" src="/static/images/icon/question_mark.png"></image>
<image mode="aspectFit" @click="incomeQusModal(totalData.online_tips)" src="/static/images/icon/question_mark.png"></image>
</view>
<view class="ti-price">¥{{totalData.online_actual_income_amount || '0'}}</view>
</view>
<view class="tpl-item">
<view class="ti-name">
<text>线下</text>
<image mode="aspectFit" src="/static/images/icon/question_mark.png"></image>
<image mode="aspectFit" @click="incomeQusModal(totalData.offline_tips)" src="/static/images/icon/question_mark.png"></image>
</view>
<view class="ti-price">¥{{totalData.offline_actual_income_amount || '0'}}</view>
</view>
<view class="tpl-item">
<view class="ti-name">
<text>联营</text>
<image mode="aspectFit" src="/static/images/icon/question_mark.png"></image>
<image mode="aspectFit" @click="incomeQusModal(totalData.joint_tips)" src="/static/images/icon/question_mark.png"></image>
</view>
<view class="ti-price">¥{{totalData.joint_actual_income_amount || '0'}}</view>
</view>
@ -77,7 +79,7 @@
<view class="td-tip">总收入</view>
<view class="td-price"><text>¥</text>{{botData.count_type_actual_income_amount || 0}}</view>
<view class="td-check-btn">
<text>查看收款明细</text>
<text @click="toDetailsRecord">查看收款明细</text>
<image mode="aspectFit" src="/static/images/icon/triangle_c33.png"></image>
</view>
<view class="td-income-info">
@ -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 => {

BIN
src/static/images/icon/toggle.png

After

Width: 56  |  Height: 56  |  Size: 393 B

29
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 || '',

Loading…
Cancel
Save