123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386 |
- <template>
- <view class="container">
- <view class="search-user flex-y-center ">
- <view class="search-content flex-y-center">
- <icon type="search" size="18" />
- <input confirm-type="search" v-model="seTval" @confirm="confirm" @input="getSearch" class="flex-grow-1"
- type="text" placeholder-style="font-size:26rpx" placeholder="请输入名称|真实姓名|员工工号" />
- <view class="flex-center" style="margin-left: 10rpx;" @click.stop="onDel" v-if="seTval">
- <icon type="clear" size="18" />
- </view>
- </view>
- <view class="search-btn" @click="search">
- 搜索
- </view>
- </view>
- <view class="box-pack-between headerScreen flex-y-center ">
- <view class="flex-y-center flex-grow-1 ft26 header-text">
- <view style="width: 50%;" class="flex-grow-1 flex-center " data-text="1" :class="act_index==1?'act':''"
- @click="onTopBtnTap(1)">
- <view class="text-1" style="width: auto; max-width: 300rpx;">
- {{level_text}}
- </view>
- <view class="d3"></view>
- </view>
- <view style="width: 50%;" class="flex-grow-1 flex-center text-1" data-text="2"
- :class="act_index==2?'act':''" @click="onTopBtnTap(2)">
- <view class="text-1" style="width: auto; max-width: 300rpx;">
- {{type_text}}
- </view>
- <view class="d3"></view>
- </view>
- </view>
- </view>
-
- <view class="header-hg200"></view>
-
- <uni-popup-top ref="popup" type="top" :top="top" :maskClass="maskClass">
- <view class="showpay">
- <block v-if='act_index==1'>
- <view class="box-li" :class="store_id==0?'active':''" @click="Onlevel(0,'全部')" data-text='全部'>全部
- </view>
- <scroll-view scroll-y="true" style="height: 400rpx;">
- <view class="box-li" v-for="(item,index) of tableTypeList" :key='index'
- :class="item.id==store_id?'active':''" @click="Onlevel(item.id,item.title)">
- {{item.title}}
- </view>
- </scroll-view>
- </block>
- <block v-if='act_index==2'>
- <view class="box-li" :class="status==2?'active':''" @click="onStatus(2,'全部')" data-text='全部'>全部
- </view>
- <view class="box-li" :class="status==1?'active':''" @click="onStatus(1,'已签到')" data-text='已签到'>已签到
- </view>
- <view class="box-li" :class="status==0?'active':''" @click="onStatus(0,'未签到')" data-text='未签到'>未签到
- </view>
- </block>
- </view>
- </uni-popup-top>
-
- <no-none v-if='list.length<=0'></no-none>
- <view class="list" v-else>
- <view class="item" style="border: none;" v-for="(item,index) in list" :key="index">
- <view class="box-pack-between">
- <view class="name box-pack-between flex-grow-1">
- <text>{{item.nickname}}</text>
- <view class="flex-center ft28" style="padding-right: 20rpx;color: #247EFF;">{{item.status}}
- </view>
- </view>
- </view>
- <view class="content">
- <view class="flex flex-y-center">
- <view class="cell flex flex-y-center">
- <view class="title">签到时间:</view>
- <view class="desc">{{item.open_time}}</view>
- </view>
- </view>
- <view class="flex flex-y-center" style="margin-top: 16rpx;">
- <view class="cell flex flex-y-center " style="width:100%">
- <view class="title">签退时间:</view>
- <view class="desc">{{item.end_time}}</view>
- </view>
- </view>
- <view class="flex flex-y-center" style="margin-top: 16rpx;">
- <view class="cell flex flex-y-center " style="width:100%">
- <view class="title">名字:</view>
- <view class="desc">{{item.name}}</view>
- </view>
- </view>
- <view class="flex flex-y-center" style="margin-top: 16rpx;">
- <view class="cell flex flex-y-center " style="width:100%">
- <view class="title">员工号:</view>
- <view class="desc">{{item.number}}</view>
- </view>
- </view>
- <view class="flex flex-y-center" style="margin-top: 16rpx;">
- <view class="cell flex flex-y-center " style="width:100%">
- <view class="title">交班状态:</view>
- <view class="desc">{{item.status}}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import uniPopupTop from '@/components/zx-uni-popup/uni-popup-top.vue'
- export default {
- components: {
- uniPopupTop
- },
- data() {
- return {
- act_index: 1,
- type_text: '签到状态',
- level_text: '门店',
- store_id: "",
- admin_id: '',
- list: [],
- page: 1,
- is_bottom: false,
- keywords: "",
- status: 2,
- type: 2,
- tableTypeList: [],
- top: "200rpx",
- maskClass: {
- 'position': 'fixed',
- 'bottom': 0,
- 'top': "100rpx",
- 'left': 0,
- 'right': 0,
- 'backgroundColor': 'rgba(0, 0, 0, 0.4)'
- },
- }
- },
- onLoad(e) {
- this.type = e.type || 2;
- this.store_id = uni.getStorageSync("store_id");
- this.admin_id = uni.getStorageSync("admin_id");
- this.shop_store_index();
- },
- onShow() {
- this.getData(1)
- },
- onReachBottom() {
- if (!this.is_bottom) {
- this.getData(this.page + 1)
- }
- },
- methods: {
- shop_store_index() {
- let storeinfo = uni.getStorageSync("storeinfo");
- this.request({
- url: 'Smdcshop/shop_store_index',
- data: {
- admin_id: this.admin_id,
- }
- }).then(res => {
- if (res.code == 200) {
- if (res.data.length > 0) {
- this.tableTypeList = res.data;
- } else {
- this.tableTypeList = [{
- title: storeinfo.title,
- id: storeinfo.id,
- }];
- }
- }
- })
- },
- onStatus(e, text) {
- this.status = e;
- this.type_text = text;
- this.list = [];
- this.getData(1);
- this.$refs.popup.close();
- },
- Onlevel(e, text) {
- this.store_id = e;
- this.level_text = text;
- this.list = [];
- this.getData(1);
- this.$refs.popup.close();
- },
- getSearch(e) {
- if (!e.detail.value) {
- this.page = 1;
- this.list = [];
- this.keywords = "";
- this.getData(1);
- }
- this.keywords = e.detail.value;
- },
- onDel() {
- this.seTval = '';
- this.page = 1;
- this.list = [];
- this.keywords = "";
- this.getData(1);
- },
- confirm(e) {
- this.page = 1;
- this.list = [];
- this.keywords = e.detail.value;
- this.getData(1);
- },
- search(e) {
- this.page = 1;
- this.list = [];
- this.getData(1);
- },
- onTopBtnTap(e) {
- this.act_index = e;
- this.$refs.popup.open();
- },
- getData(page) {
- if (page == 1) {
- this.list = []
- this.page = 1
- this.is_bottom = false
- }
- this.request({
- url: 'Smdcshop/handover_index',
- data: {
- page,
- limit: 10,
- status: this.status,
- serch: this.keywords,
- admin_id: this.admin_id,
- store_id: this.store_id,
- }
- }).then(res => {
- if (res.code == 200 && res.data.length) {
- this.list = this.list.concat(res.data)
- this.page = page
- } else {
- this.is_bottom = true
- }
- })
- }
- }
- }
- </script>
- <style>
- @import url("./static/css/common.css");
- page {
- background-color: #F4F5F7;
- }
- .list {
- padding: 30rpx 25rpx;
- }
- .list .item {
- border-radius: 8rpx;
- overflow: hidden;
- padding-left: 30rpx;
- border-left: 8rpx solid #247EFF;
- background-color: #fff;
- margin-bottom: 30rpx;
- }
- .list .item .name {
- height: 80rpx;
- border-bottom: 1rpx solid #f5f5f5;
- font-size: 30rpx;
- line-height: 80rpx;
- font-weight: bold;
- }
- .list .item .content {
- padding: 20rpx 0 24rpx;
- }
- .list .item .content .cell {
- /* flex: none; */
- /* width: 50%; */
- box-sizing: border-box;
- padding-right: 30rpx;
- font-size: 26rpx;
- line-height: 37rpx;
- color: #666;
- }
- .list .item .content .cell .title {
- color: #99A0AD;
- }
- .headerScreen {
- height: 100rpx;
- position: fixed;
- top: 100rpx;
- width: 100%;
- z-index: 999;
- background: #fff;
- border-bottom: 1rpx solid #F1F1F1;
- }
- .header-hg200 {
- height: 210rpx;
- }
- .header-text {
- text-align: center;
- }
- .d3 {
- width: 0;
- height: 0;
- border-width: 12rpx;
- border-style: solid;
- border-color: #000 transparent transparent transparent;
- margin-top: 14rpx;
- margin-left: 6rpx;
- }
- .showpay {
- width: 100%;
- z-index: 10;
- background: #FFFFFF;
- }
- .search-user {
- z-index: 999;
- position: fixed;
- left: 0;
- width: 100%;
- height: 100rpx;
- background: #FFFFFF;
- margin-left: 15rpx;
- }
- .search-user .search-content {
- width: 83%;
- height: 70rpx;
- background: #F1F1F1;
- border-radius: 100rpx;
- padding: 0 20rpx;
- }
- .search-user .search-content icon {
- margin-right: 10rpx;
- }
- .search-user .search-btn {
- margin-left: 20rpx;
- font-size: 28rpx;
- }
- .box-li {
- background-color: #fff;
- text-align: center;
- border-bottom: 1rpx solid #f1f1f1;
- height: 80rpx;
- line-height: 80rpx;
- font-size: 26rpx;
- }
- page .active {
- color: #007AFF;
- }
- </style>
|