oil-station/pos-uni/pagesHome/changeShifts/list.vue

159 lines
3.1 KiB
Vue
Raw Normal View History

2024-05-27 15:15:43 +08:00
<template>
<view class="content">
<view class="container">
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
<view class="time-bs">
<view class="time-box" @click="show = true">开始日期</view>
<view class="">-</view>
<view class="time-box" @click="show = true">结束日期</view>
</view>
2024-05-28 14:17:49 +08:00
<view class="box_" v-for="item,index in listData">
2024-05-27 15:15:43 +08:00
<view class="top-title">
2024-05-28 14:17:49 +08:00
<view class="name_">{{item.staffName}}</view>
2024-05-27 15:15:43 +08:00
<view class="price_">400.00</view>
</view>
<view class="time">2024-05-11 07:10-2024-05-13 16:45</view>
</view>
<u-datetime-picker :show="show" v-model="value1" mode="datetime"></u-datetime-picker>
</view>
</view>
</template>
<script>
2024-05-28 14:17:49 +08:00
import request from "../../utils/request";
2024-05-27 15:15:43 +08:00
import headers from '../../components/header/headers.vue'
export default {
data() {
return {
titles: "交班记录",
show: false,
value1: Number(new Date()),
2024-05-28 14:17:49 +08:00
listData: [],
form: {
page: 1,
pageSize: 10000,
beginTime: '',
endTime: ''
}
2024-05-27 15:15:43 +08:00
}
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore" 底部刷新结束
2024-05-28 14:17:49 +08:00
this.getIndexData()
2024-05-27 15:15:43 +08:00
},
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
},
components: {
headers
},
methods: {
goback() {
uni.navigateBack()
2024-05-28 14:17:49 +08:00
},
// 获取销售数据
getIndexData() {
request({
url: 'business/handoverRecord/queryByPage',
method: 'get',
params: this.form
}).then((res) => {
if (res.code == 200) {
this.listData = res.data.records
} else {
uni.showToast({
title: res.data,
icon: "none"
})
}
})
2024-05-27 15:15:43 +08:00
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f8f8f8;
// background: linear-gradient(180deg, #B2D2FC 0%, #B2D2FC 14%, rgba(255, 255, 255, 0.84) 24%, rgba(255, 255, 255, 0.84) 100%);
height: 100vh;
}
.container {
width: 100%;
background: #f8f8f8;
box-sizing: border-box;
padding-top: 88px;
}
.box_ {
width: 95%;
background: #FFFFFF;
border-radius: 8px;
box-sizing: border-box;
margin: 10px auto;
box-sizing: border-box;
padding: 15px;
}
.top-title {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.name_ {
font-weight: bold;
font-size: 16px;
color: #333333;
}
.price_ {
font-weight: bold;
font-size: 16px;
color: #0864E9;
}
.time {
font-weight: 500;
font-size: 14px;
color: #333333;
margin: 0px auto;
margin-top: 15px;
}
.time-bs {
width: 100%;
box-sizing: border-box;
background: #FFFFFF;
padding: 15px;
display: flex;
align-items: center;
justify-content: space-around;
}
.time-box {
border: 1px solid #0864E9;
box-sizing: border-box;
padding: 5px 15px;
border-radius: 8px;
font-size: 14px;
color: #333;
display: flex;
align-items: center;
justify-content: center;
}
</style>