|
|
@ -14,7 +14,7 @@ |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="df-right"> |
|
|
|
<view class="df-name" @click="filterShow">筛选</view> |
|
|
|
<view :class="[ 'df-name', isFilter? 'df-active' : '' ]" @click="filterShow">筛选</view> |
|
|
|
<view class="dr-icons"> |
|
|
|
<image @click="filterShow" mode="aspectFit" src="/subpackage/income/static/images/filter.png"></image> |
|
|
|
<view></view> |
|
|
@ -39,7 +39,7 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="dr-ls"> |
|
|
|
<view class="dr-ls" v-if="incomeLs&&incomeLs.length"> |
|
|
|
<details-item |
|
|
|
v-for="(e, i) in incomeLs" |
|
|
|
:key="i" |
|
|
@ -59,9 +59,9 @@ |
|
|
|
<view class="dc-tit">筛选</view> |
|
|
|
<view class="dc-stadium"> |
|
|
|
<view class="ds-name">门店</view> |
|
|
|
<picker> |
|
|
|
<picker :range="storeList" range-key="name" @change="stadiumChange"> |
|
|
|
<view class="ds-frame"> |
|
|
|
<input /> |
|
|
|
<input :value="modalSelectStore.name || ''" placeholder="全部" disabled /> |
|
|
|
<image mode="aspectFit" src="/subpackage/income/static/images/bot_arrow.png"></image> |
|
|
|
</view> |
|
|
|
</picker> |
|
|
@ -70,13 +70,18 @@ |
|
|
|
</view> |
|
|
|
<scroll-view class="dc-scroll" scroll-y :style="modalScrollViewHeight?('height:'+ modalScrollViewHeight + 'px;'): ''"> |
|
|
|
<view class="dc-scene-ls"> |
|
|
|
<view class="dsl-item" v-for="(e, i) in sceneLs" :key="i">{{ e.name || '-' }}</view> |
|
|
|
<view |
|
|
|
v-for="(e, i) in sceneLs" |
|
|
|
:key="i" |
|
|
|
:class="['dsl-item', (modalSelectScene.scene === e.scene || (modalSelectScene == null&&e.scene==-1))?'dsl-active': '' ]" |
|
|
|
@click="sceneSelect(e)" |
|
|
|
>{{ e.name || '-' }}</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
<view class="dc-btn-bar" id="dcbotbar"> |
|
|
|
<view class="dbb-btns"> |
|
|
|
<view>重置</view> |
|
|
|
<view>确定</view> |
|
|
|
<view @click="modalResetBtn">重置</view> |
|
|
|
<view @click="modalConfirm">确定</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -100,17 +105,23 @@ |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '联营收款', |
|
|
|
eng: ' joint' |
|
|
|
eng: 'joint' |
|
|
|
}, |
|
|
|
]; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
'details-item': details_item |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
isFilter(){ |
|
|
|
let { confirmSelectStore, confirmSelectScene } = this |
|
|
|
if(confirmSelectStore || confirmSelectScene)return true; |
|
|
|
return false |
|
|
|
} |
|
|
|
}, |
|
|
|
data(){ |
|
|
|
return { |
|
|
|
modalScrollViewHeight: '', |
|
|
|
isFilterModal: false, |
|
|
|
incomeTime: '', |
|
|
|
|
|
|
|
incomeLs: [], |
|
|
@ -121,7 +132,13 @@ |
|
|
|
incomeTypeLs, |
|
|
|
incomeTypeInfo: {}, // online 线上收款 offline 线下收款 joint 联营 |
|
|
|
|
|
|
|
sceneLs: [], |
|
|
|
isFilterModal: false, |
|
|
|
sceneLs: [], // 弹窗场景列表 |
|
|
|
storeList: [], // 弹窗店铺列表 |
|
|
|
confirmSelectScene: null, // 弹窗选中&确认场景 |
|
|
|
confirmSelectStore: null, // 弹窗选中&确认店铺 |
|
|
|
modalSelectScene: null, // 弹窗临时选中场景 |
|
|
|
modalSelectStore: null, // 弹窗临时选中店铺 |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(){ |
|
|
@ -130,36 +147,117 @@ |
|
|
|
this.incomeTypeInfo = incomeTypeLs[0]; |
|
|
|
this.refreshPage(); |
|
|
|
}, |
|
|
|
onReachBottom(){ |
|
|
|
let { incomeTime, type, incomeTypeInfo, confirmSelectStore, confirmSelectScene, page } = this; |
|
|
|
this.getRecordLs({ |
|
|
|
type: type || '', |
|
|
|
time_str: incomeTime || '', |
|
|
|
income_type: incomeTypeInfo.eng || '', |
|
|
|
stadium_id: (confirmSelectStore&&confirmSelectStore.id) || '', |
|
|
|
scene: (confirmSelectScene&&confirmSelectScene.scene + '') || '', |
|
|
|
page: ++page, |
|
|
|
}); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
filterShow(){ |
|
|
|
|
|
|
|
// 弹窗重置按钮 |
|
|
|
modalResetBtn(){ |
|
|
|
let { incomeTypeInfo } = this; |
|
|
|
this.modalSelectScene = null; |
|
|
|
this.modalSelectStore = null; |
|
|
|
// 不同店铺场景值不一样 |
|
|
|
this.sceneLs = []; |
|
|
|
this.getSceneLs({ |
|
|
|
income_type: incomeTypeInfo.eng || '', |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 弹窗确认按钮 |
|
|
|
modalConfirm(){ |
|
|
|
let { modalSelectScene, modalSelectStore } = this; |
|
|
|
this.confirmSelectScene = modalSelectScene; |
|
|
|
this.confirmSelectStore = modalSelectStore; |
|
|
|
this.isFilterModal = false; |
|
|
|
this.refreshPage(); |
|
|
|
|
|
|
|
}, |
|
|
|
sceneSelect(e){ |
|
|
|
this.modalSelectScene = e || null; |
|
|
|
}, |
|
|
|
stadiumChange(e){ |
|
|
|
let { incomeTypeInfo, storeList, modalSelectStore } = this; |
|
|
|
let _idx = e.detail.value; |
|
|
|
let _stadium = storeList[_idx] || {}; |
|
|
|
if(modalSelectStore&&(modalSelectStore.id == _stadium.id))return; |
|
|
|
this.modalSelectStore = _stadium || null; |
|
|
|
this.modalSelectScene = null; |
|
|
|
// 不同店铺场景值不一样 |
|
|
|
this.sceneLs = []; |
|
|
|
this.getSceneLs({ |
|
|
|
income_type: incomeTypeInfo.eng || '', |
|
|
|
stadium_id: _stadium.id |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
// 弹窗筛选显示 |
|
|
|
filterShow(){ |
|
|
|
let { incomeTypeInfo, confirmSelectStore, confirmSelectScene } = this; |
|
|
|
this.modalSelectScene = confirmSelectScene || null; |
|
|
|
this.modalSelectStore = confirmSelectStore || null; |
|
|
|
|
|
|
|
this.isFilterModal = true; |
|
|
|
this.$nextTick(_=>{ |
|
|
|
this.$nextTick(async _=>{ |
|
|
|
this.initFilterScrollView(); |
|
|
|
if(true)try{ |
|
|
|
await this.getStoreList(); |
|
|
|
}catch(err){ |
|
|
|
console.warn('getStore err ->', err) |
|
|
|
}; |
|
|
|
|
|
|
|
this.getSceneLs({ |
|
|
|
income_type: incomeTypeInfo.eng || '' |
|
|
|
}) |
|
|
|
income_type: incomeTypeInfo.eng || '', |
|
|
|
stadium_id: (confirmSelectStore&&confirmSelectStore.id) || '' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
// 获取弹窗品牌店铺列表 |
|
|
|
getStoreList(){ |
|
|
|
util.showLoad(); |
|
|
|
return server.get({ |
|
|
|
url: INCOME_API.stadiumList, |
|
|
|
data: {}, |
|
|
|
failMsg: '加载店铺列表失败!', |
|
|
|
}) |
|
|
|
.then(res=>{ |
|
|
|
util.hideLoad(); |
|
|
|
// let _list = [res.list[0]] || []; |
|
|
|
let _list = res.list || []; |
|
|
|
this.storeList = _list; |
|
|
|
return _list || []; |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 弹窗场景列表请求 |
|
|
|
getSceneLs({ |
|
|
|
brand_id = '', |
|
|
|
stadium_id = '', |
|
|
|
income_type = '', |
|
|
|
}){ |
|
|
|
}){ |
|
|
|
util.showLoad(); |
|
|
|
server.get({ |
|
|
|
url: INCOME_API.consumeRecordSceneLs, |
|
|
|
data: { |
|
|
|
brand_id, |
|
|
|
stadium_id, |
|
|
|
income_type, |
|
|
|
stadium_id, // 空字符全部 -1品牌收款 正常的门店id |
|
|
|
income_type, // online线上 offline线下 joint联营 |
|
|
|
}, |
|
|
|
failMsg: '加载场景列表失败!' |
|
|
|
}) |
|
|
|
.then(res=>{ |
|
|
|
util.hideLoad(); |
|
|
|
this.sceneLs = res || []; |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
incomeTypeChange(incomeTypeInfo){ |
|
|
|
this.incomeTypeInfo = incomeTypeInfo || {}; |
|
|
|
this.refreshPage(); |
|
|
@ -173,9 +271,10 @@ |
|
|
|
this.incomeTime = _time; |
|
|
|
this.refreshPage(); |
|
|
|
}, |
|
|
|
|
|
|
|
refreshPage(){ |
|
|
|
this.$nextTick(_=>{ |
|
|
|
let { incomeTime, type, incomeTypeInfo } = this; |
|
|
|
let { incomeTime, type, incomeTypeInfo, confirmSelectStore, confirmSelectScene } = this; |
|
|
|
this.page = 1; |
|
|
|
this.incomeLs = []; |
|
|
|
this.incomeMes = {}; |
|
|
@ -183,9 +282,12 @@ |
|
|
|
type: type || '', |
|
|
|
time_str: incomeTime || '', |
|
|
|
income_type: incomeTypeInfo.eng || '', |
|
|
|
stadium_id: (confirmSelectStore&&confirmSelectStore.id) || '', |
|
|
|
scene: (confirmSelectScene&&confirmSelectScene.scene + '') || '', |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
getRecordLs({ |
|
|
|
brand_id = '', |
|
|
|
stadium_id = '', // 空字符全部 -1品牌收款 其他门店id |
|
|
@ -256,6 +358,9 @@ |
|
|
|
font-size: 28upx; |
|
|
|
line-height: 40upx; |
|
|
|
color: #9C9C9F; |
|
|
|
&.df-active{ |
|
|
|
color: $themeColor |
|
|
|
} |
|
|
|
} |
|
|
|
.df-date{ |
|
|
|
@include centerFlex(flex-start); |
|
|
@ -516,13 +621,19 @@ |
|
|
|
margin: 14upx 10upx; |
|
|
|
width: 164upx; |
|
|
|
height: 64upx; |
|
|
|
line-height: 64upx; |
|
|
|
line-height: 60upx; |
|
|
|
text-align: center; |
|
|
|
background-color: #F2F2F7; |
|
|
|
border-radius: 10upx; |
|
|
|
border: 2upx solid #F2F2F7; |
|
|
|
font-size: 24upx; |
|
|
|
color: #1A1A1A; |
|
|
|
background-color: #F2F2F7; |
|
|
|
@include textHide(1); |
|
|
|
&.dsl-active{ |
|
|
|
color: $themeColor; |
|
|
|
border-color: $themeColor; |
|
|
|
background-color: rgba($color: $themeColor, $alpha: .16); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|