Commit b49988fb by 前端

UI

1 parent 0ad36539
...@@ -19,6 +19,14 @@ ...@@ -19,6 +19,14 @@
size="20" size="20"
></uni-icons ></uni-icons
></view> ></view>
<uni-icons
v-if="isSearch"
type="closeempty"
class="close"
color="#999"
@click="handleClear"
size="20"
></uni-icons>
</view> </view>
<scroll-view class="record-box" scroll-y> <scroll-view class="record-box" scroll-y>
...@@ -105,6 +113,14 @@ export default { ...@@ -105,6 +113,14 @@ export default {
this.isSearch = true this.isSearch = true
}, },
init() {
this.name = '';
this.isSearch = false
this.list = this.views
},
handleClear() {
this.init()
},
input(e) { input(e) {
this.name = e.detail.value this.name = e.detail.value
if(this.name == '') if(this.name == '')
...@@ -164,17 +180,26 @@ export default { ...@@ -164,17 +180,26 @@ export default {
margin-left: 12rpx; margin-left: 12rpx;
} }
} }
.close {
position: absolute;
right: 0;
top: 0;
width: 120rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
}
} }
.record-box { .record-box {
height: calc(100vh - 300rpx); height: calc(100vh - 300rpx);
padding-top: 48rpx; padding-top: 48rpx;
} }
.list { .list {
display: flex; display: grid;
flex-wrap: wrap; grid-template-columns: repeat(5, 1fr);
gap: 48rpx 50rpx; gap: 48rpx 50rpx;
.item { .item {
width: 404rpx;
height: 544rpx; height: 544rpx;
background: #ffffff; background: #ffffff;
border-radius: 48rpx; border-radius: 48rpx;
......
...@@ -117,17 +117,20 @@ export default { ...@@ -117,17 +117,20 @@ export default {
watch:{ watch:{
watchStatus:{ watchStatus:{
handler() { handler() {
this.customerNameOrPhone = ''; this.init()
this.isSearch = false
this.pageNum = 1
this.flag = false
this.getRecordList()
}, },
immediate:true immediate:true
} }
}, },
methods: { methods: {
init() {
this.customerNameOrPhone = '';
this.isSearch = false
this.pageNum = 1
this.flag = false
this.getRecordList()
},
//已预约的并且预约时间小于当前时间的,显示超时未到店,否则显示已预约 //已预约的并且预约时间小于当前时间的,显示超时未到店,否则显示已预约
formatInvite(val) { formatInvite(val) {
if(val.inviteStatus == 2 && new Date().getTime() > new Date(val.inviteDate).getTime()) { if(val.inviteStatus == 2 && new Date().getTime() > new Date(val.inviteDate).getTime()) {
...@@ -160,13 +163,9 @@ export default { ...@@ -160,13 +163,9 @@ export default {
}, },
focus () { focus () {
this.isSearch = true this.isSearch = true
}, },
handleClear() { handleClear() {
this.isSearch = false this.init()
this.customerNameOrPhone = ''
this.pageNum = 1
this.getRecordList()
}, },
getRecordList () { getRecordList () {
const { pageNum, pageSize, customerNameOrPhone } = this, const { pageNum, pageSize, customerNameOrPhone } = this,
...@@ -301,8 +300,7 @@ export default { ...@@ -301,8 +300,7 @@ export default {
position: absolute; position: absolute;
top: 24rpx; top: 24rpx;
right: 32rpx; right: 32rpx;
width: 152rpx; padding: 4rpx 16rpx;
height: 44rpx;
border-radius: 4rpx; border-radius: 4rpx;
font-weight: 500; font-weight: 500;
font-size: 24rpx; font-size: 24rpx;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!