Commit 94d9442d authored by tangfh's avatar tangfh

+

parent 3462d4be
......@@ -2,7 +2,10 @@
<view class="content">
<!-- [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"
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>
<c-tab-bar :tabBars="tabBars" :tabIndex="tabIndex" :tabWidth="tabWidth" :scrollInto="scrollInto"
:marginL="tabItemMargin" :marginR="tabItemMargin" @onTabItemClick="onTabItemClick"></c-tab-bar>
......@@ -28,6 +31,10 @@
</scroll-view>
</swiper-item>
</swiper>
<text class="text-bottom-btn center active2" @click="onAddEmployeeBtnClick">添加店员</text>
<c-pop-passcard-filter ref="filter" @onEnsureBtnClick="onFilterEnsureBtnClick"></c-pop-passcard-filter>
</view>
</template>
......@@ -44,11 +51,13 @@
apply: {
type: 1,
name: '店员申请',
isNeedFilter: false,
content: JSON.parse(JSON.stringify(constant.LIST_CONTENT))
},
passed: {
type: 2,
name: '我的店员',
isNeedFilter: true,
content: JSON.parse(JSON.stringify(constant.LIST_CONTENT))
}
};
......@@ -76,6 +85,8 @@
seletedItem: {
range_name: ""
},
titleRightIcon: "/static/btn_bar_screen.png",
titleRightIcon2: "/static/btn_problem.png",
}
},
onLoad(option) {
......@@ -85,8 +96,8 @@
this.tabWidth = (getApp().globalData.screenWidth - this.tabItemMargin * 2) / this.tabBars.length;
let contentHeight = systemInfo.screenHeight - (uni.getSystemInfoSync()
.statusBarHeight + this.$refs.navBar.height) - (systemInfo.safeAreaInsets.bottom);
//80 tabBar的高度
this.swiperHeight = contentHeight - 80 / getApp().globalData.pxToRpxScale;
//80 tabBar的高度 90 底部按钮高度 单位:rpx,除以 getApp().globalData.pxToRpxScale 转换为 px
this.swiperHeight = contentHeight - (80 + 90) / getApp().globalData.pxToRpxScale;
this.init(option);
},
......@@ -109,6 +120,25 @@
onNavBarLeftClick() {
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() {
this.refresh();
},
......@@ -140,8 +170,8 @@
var tab = this.tabBars[this.tabIndex];
tab.content.refreshFlag = false;
let param = {
status: this.tabBars[index].type,
screen: this.screen,
status: tab.type,
screen: tab.isNeedFilter ? this.screen : '',
};
let option = {
isNeedShowLoading: false
......@@ -162,7 +192,6 @@
tab.content.firstRequest = false;
let data = res.data.data;
let list = data.list;
if (tab.content.refreshing || tab.content.list.length == 0) {
tab.content.total_pages = util.calTotalPage(data.total_list);
this.clearTabData(this.tabIndex);
......@@ -230,13 +259,19 @@
this.tabBars[cacheIndex].content.list.length = 0;
this.tabBars[cacheIndex].content.loadingText = "加载更多...";
},
onItemClick(item) {
uni.navigateTo({
url: '/pages/repair-detail/repair-detail'
})
onItemClick(item2, index2) {
// uni.navigateTo({
// url: '/pages/repair-detail/repair-detail'
// })
},
ensure() {
uni.navigateBack();
},
onAuditBtnClick(item2, index2) {
},
onAddEmployeeBtnClick() {
}
}
}
......@@ -296,46 +331,10 @@
background-color: #ffffff;
}
.checkbox {}
.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;
.text-bottom-btn {
width: 100%;
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;
color: $uni-font-size-lg;
}
</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