diff --git a/src/subpackage/income/js/api.js b/src/subpackage/income/js/api.js
index 6a2e5d5..af17381 100644
--- a/src/subpackage/income/js/api.js
+++ b/src/subpackage/income/js/api.js
@@ -3,6 +3,7 @@ import { ORIGIN } from '../../../js/api';
export const INCOME_API = {
consumeCountDetailList:`${ORIGIN}/admin/stadium/consumeCountDetail/list`, // 收款明细列表
consumeRecordSceneLs:`${ORIGIN}/consumeRecordScene/list`, // 收款明细列表
+ stadiumList: `${ORIGIN}/admin/stadium/list`, // 店铺列表
}
export default { ORIGIN, INCOME_API };
\ No newline at end of file
diff --git a/src/subpackage/income/pages/details_record/details_record.vue b/src/subpackage/income/pages/details_record/details_record.vue
index 2ced899..db3a864 100644
--- a/src/subpackage/income/pages/details_record/details_record.vue
+++ b/src/subpackage/income/pages/details_record/details_record.vue
@@ -14,7 +14,7 @@
- 筛选
+ 筛选
@@ -39,7 +39,7 @@
-
+
筛选
门店
-
+
-
+
@@ -70,13 +70,18 @@
- {{ e.name || '-' }}
+ {{ e.name || '-' }}
- 重置
- 确定
+ 重置
+ 确定
@@ -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);
+ }
}
}
}
diff --git a/src/subpackage/income/pages/search/search.vue b/src/subpackage/income/pages/search/search.vue
index 5bc197d..5bc82cd 100644
--- a/src/subpackage/income/pages/search/search.vue
+++ b/src/subpackage/income/pages/search/search.vue
@@ -2,28 +2,81 @@
-
-
-
+
+
+
-
-
-
-
+
+
+
+
+
+
@@ -50,7 +103,6 @@ export default {
flex-shrink: 0;
width: 30upx;
height: 30upx;
- background-color: skyblue;
}
.if-search-icon{
margin-right: 24upx;
@@ -69,7 +121,6 @@ export default {
display: block;
width: 370upx;
height: 370upx;
- background-color: skyblue;
}
}
diff --git a/src/subpackage/income/static/images/account_null.png b/src/subpackage/income/static/images/account_null.png
new file mode 100644
index 0000000..34aad1f
Binary files /dev/null and b/src/subpackage/income/static/images/account_null.png differ