xinelu-applet-ui/pagesC/ServiceAppointment/ServiceAppointment.vue

95 lines
1.9 KiB
Vue
Raw Normal View History

2023-09-27 16:26:09 +08:00
<template>
<view class="app">
<u-navbar :is-back="false" :background="background" class="u-navbar">
2023-12-11 16:16:39 +08:00
<image src="@/static/fanhui.png" mode="" @tap="goprevious"></image>
2023-09-27 16:26:09 +08:00
<view class="title" @tap="goprevious">
2023-10-16 14:19:19 +08:00
服务预约
2023-09-27 16:26:09 +08:00
</view>
<view class="inputs">
<i class="icon"></i>
2023-10-11 17:38:22 +08:00
<input v-model="projectName" type="text" name="" id="" class="input" placeholder="搜索服务"
2023-09-27 16:26:09 +08:00
placeholder-class="placeholder">
</view>
</u-navbar>
2023-10-11 17:38:22 +08:00
<view class="content" v-for="(item ,index) in listinfo" :key="index">
<view class="big">{{item.projectName}}
2023-11-08 09:54:26 +08:00
<span v-if="item.sourceType ==1">{{item.performanceCount}}/{{item.serviceFreq}}</span>
2023-09-27 16:26:09 +08:00
</view>
<view class="servename">
2023-10-11 17:38:22 +08:00
{{item.packageName}}
2023-09-27 16:26:09 +08:00
</view>
2023-10-11 17:38:22 +08:00
<view class="appoint" @tap="goapponint(item)">
2023-09-27 16:26:09 +08:00
预约
</view>
</view>
2023-10-31 10:40:00 +08:00
<u-toast ref="uToast" />
2023-09-27 16:26:09 +08:00
</view>
</template>
<script>
2023-10-11 17:38:22 +08:00
import {
getForm,
} from '@/api/pagesC/ServiceAppointment/ServiceAppointment.js'
2023-09-27 16:26:09 +08:00
export default {
data() {
return {
background: {
backgroundColor: '#26A888',
},
2023-10-11 17:38:22 +08:00
projectName: '',
2023-10-12 10:29:09 +08:00
identity: '',
2023-10-11 17:38:22 +08:00
listinfo: [],
2023-10-12 10:14:51 +08:00
appointlist: [],
packageNo: '',
formName: '',
formNo: '',
2023-10-11 17:38:22 +08:00
2023-09-27 16:26:09 +08:00
};
},
2023-10-11 17:38:22 +08:00
onShow() {
this.getlist()
},
watch: { //监听
projectName(e) {
this.getlist()
},
},
2023-09-27 16:26:09 +08:00
methods: {
2023-10-11 17:38:22 +08:00
getlist() {
this.userinfo = uni.getStorageSync('userinfo');
2023-10-16 11:28:16 +08:00
this.identity = this.userinfo.cardNo
getForm(this.identity, this.projectName).then(res => {
2023-11-08 09:54:26 +08:00
if (res.code == 500) {
2023-10-31 10:40:00 +08:00
this.$refs.uToast.show({
title: res.msg,
type: 'error',
duration: '1000',
})
2023-11-08 09:54:26 +08:00
} else {
2023-10-31 10:40:00 +08:00
this.listinfo = res.data
}
2023-10-11 17:38:22 +08:00
})
},
2023-09-27 16:26:09 +08:00
goprevious() {
uni.navigateBack({
delta: 1
})
},
2023-10-11 17:38:22 +08:00
goapponint(item) {
2023-10-12 10:14:51 +08:00
uni.navigateTo({
url: `/pagesC/appointmenttime/appointmenttime?item=${JSON.stringify(item)}`
})
2023-10-11 17:38:22 +08:00
2023-09-27 16:26:09 +08:00
}
},
}
</script>
<style lang="scss">
2023-10-07 11:08:50 +08:00
@import './ServiceAppointment.scss'
2023-11-08 09:54:26 +08:00
</style>