Commit 94d9442d authored by tangfh's avatar tangfh

+

parent 3462d4be
...@@ -2,7 +2,10 @@ ...@@ -2,7 +2,10 @@
<view class="content"> <view class="content">
<!-- [uni-nav-bar 自定义导航栏](https://uniapp.dcloud.net.cn/component/uniui/uni-nav-bar.html) --> <!-- [uni-nav-bar 自定义导航栏](https://uniapp.dcloud.net.cn/component/uniui/uni-nav-bar.html) -->
<uni-nav-bar ref="navBar" class="uni-navi-bar" status-bar="true" :border="false" color="#333333" fixed="true" <uni-nav-bar ref="navBar" class="uni-navi-bar" status-bar="true" :border="false" color="#333333" fixed="true"
left-icon="left" left-text="返回" :title="title" @clickLeft="onNavBarLeftClick"> left-icon="left" left-text="返回" :title="title" @clickLeft="onNavBarLeftClick"
:titleRightIcon="tabBars[tabIndex].isNeedFilter ? titleRightIcon : ''"
:titleRightIcon2="titleRightIcon2" @onClickTitleRightIcon="onClickTitleRightIcon"
@onClickTitleRightIcon2="onClickTitleRightIcon2">
</uni-nav-bar> </uni-nav-bar>
<c-tab-bar :tabBars="tabBars" :tabIndex="tabIndex" :tabWidth="tabWidth" :scrollInto="scrollInto" <c-tab-bar :tabBars="tabBars" :tabIndex="tabIndex" :tabWidth="tabWidth" :scrollInto="scrollInto"
:marginL="tabItemMargin" :marginR="tabItemMargin" @onTabItemClick="onTabItemClick"></c-tab-bar> :marginL="tabItemMargin" :marginR="tabItemMargin" @onTabItemClick="onTabItemClick"></c-tab-bar>
...@@ -28,6 +31,10 @@ ...@@ -28,6 +31,10 @@
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
</swiper> </swiper>
<text class="text-bottom-btn center active2" @click="onAddEmployeeBtnClick">添加店员</text>
<c-pop-passcard-filter ref="filter" @onEnsureBtnClick="onFilterEnsureBtnClick"></c-pop-passcard-filter>
</view> </view>
</template> </template>
...@@ -44,11 +51,13 @@ ...@@ -44,11 +51,13 @@
apply: { apply: {
type: 1, type: 1,
name: '店员申请', name: '店员申请',
isNeedFilter: false,
content: JSON.parse(JSON.stringify(constant.LIST_CONTENT)) content: JSON.parse(JSON.stringify(constant.LIST_CONTENT))
}, },
passed: { passed: {
type: 2, type: 2,
name: '我的店员', name: '我的店员',
isNeedFilter: true,
content: JSON.parse(JSON.stringify(constant.LIST_CONTENT)) content: JSON.parse(JSON.stringify(constant.LIST_CONTENT))
} }
}; };
...@@ -76,6 +85,8 @@ ...@@ -76,6 +85,8 @@
seletedItem: { seletedItem: {
range_name: "" range_name: ""
}, },
titleRightIcon: "/static/btn_bar_screen.png",
titleRightIcon2: "/static/btn_problem.png",
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -85,8 +96,8 @@ ...@@ -85,8 +96,8 @@
this.tabWidth = (getApp().globalData.screenWidth - this.tabItemMargin * 2) / this.tabBars.length; this.tabWidth = (getApp().globalData.screenWidth - this.tabItemMargin * 2) / this.tabBars.length;
let contentHeight = systemInfo.screenHeight - (uni.getSystemInfoSync() let contentHeight = systemInfo.screenHeight - (uni.getSystemInfoSync()
.statusBarHeight + this.$refs.navBar.height) - (systemInfo.safeAreaInsets.bottom); .statusBarHeight + this.$refs.navBar.height) - (systemInfo.safeAreaInsets.bottom);
//80 tabBar的高度 //80 tabBar的高度 90 底部按钮高度 单位:rpx,除以 getApp().globalData.pxToRpxScale 转换为 px
this.swiperHeight = contentHeight - 80 / getApp().globalData.pxToRpxScale; this.swiperHeight = contentHeight - (80 + 90) / getApp().globalData.pxToRpxScale;
this.init(option); this.init(option);
}, },
...@@ -109,6 +120,25 @@ ...@@ -109,6 +120,25 @@
onNavBarLeftClick() { onNavBarLeftClick() {
uni.navigateBack(); uni.navigateBack();
}, },
onClickTitleRightIcon() {
},
onClickTitleRightIcon2() {
},
onFilterEnsureBtnClick(items) {
this.$refs.filter.dismiss();
let screen = "";
items.forEach((item, index) => {
if (index != items.length - 1) {
screen += item.status + ","
} else {
screen += item.status
}
})
this.screen = screen;
this.refresh();
},
onStatusClick() { onStatusClick() {
this.refresh(); this.refresh();
}, },
...@@ -140,8 +170,8 @@ ...@@ -140,8 +170,8 @@
var tab = this.tabBars[this.tabIndex]; var tab = this.tabBars[this.tabIndex];
tab.content.refreshFlag = false; tab.content.refreshFlag = false;
let param = { let param = {
status: this.tabBars[index].type, status: tab.type,
screen: this.screen, screen: tab.isNeedFilter ? this.screen : '',
}; };
let option = { let option = {
isNeedShowLoading: false isNeedShowLoading: false
...@@ -162,7 +192,6 @@ ...@@ -162,7 +192,6 @@
tab.content.firstRequest = false; tab.content.firstRequest = false;
let data = res.data.data; let data = res.data.data;
let list = data.list; let list = data.list;
if (tab.content.refreshing || tab.content.list.length == 0) { if (tab.content.refreshing || tab.content.list.length == 0) {
tab.content.total_pages = util.calTotalPage(data.total_list); tab.content.total_pages = util.calTotalPage(data.total_list);
this.clearTabData(this.tabIndex); this.clearTabData(this.tabIndex);
...@@ -230,13 +259,19 @@ ...@@ -230,13 +259,19 @@
this.tabBars[cacheIndex].content.list.length = 0; this.tabBars[cacheIndex].content.list.length = 0;
this.tabBars[cacheIndex].content.loadingText = "加载更多..."; this.tabBars[cacheIndex].content.loadingText = "加载更多...";
}, },
onItemClick(item) { onItemClick(item2, index2) {
uni.navigateTo({ // uni.navigateTo({
url: '/pages/repair-detail/repair-detail' // url: '/pages/repair-detail/repair-detail'
}) // })
}, },
ensure() { ensure() {
uni.navigateBack(); uni.navigateBack();
},
onAuditBtnClick(item2, index2) {
},
onAddEmployeeBtnClick() {
} }
} }
} }
...@@ -296,46 +331,10 @@ ...@@ -296,46 +331,10 @@
background-color: #ffffff; background-color: #ffffff;
} }
.checkbox {} .text-bottom-btn {
.view-repair-item {
height: 80rpx;
padding-left: 32rpx;
padding-right: 32rpx;
justify-content: center;
align-items: center;
}
.text-name {
flex-grow: 1;
font-size: 26rpx;
color: $uni-text-color-grey;
font-size: $uni-font-size-base;
}
.view-bottom {
padding-left: 32rpx;
width: 100%; width: 100%;
height: 90rpx; height: 90rpx;
flex-grow: 1;
align-items: center;
}
.view-bottom-left {
flex-grow: 1;
}
.text-bottom-prefix1 {
font-size: 20rpx;
color: $uni-text-color-grey;
}
.text-ensure-btn {
display: flex;
justify-content: center;
align-items: center;
width: 260rpx;
height: 100%;
background-color: $main-colro1; background-color: $main-colro1;
color: $uni-font-size-lg;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment