Commit 07040959 authored by huangyecong's avatar huangyecong

接入预约列表接口

parent a5d0122b
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -12,4 +12,12 @@ api.getCustomerDetail = function (data) { ...@@ -12,4 +12,12 @@ api.getCustomerDetail = function (data) {
api.improveInformation = function (data) { api.improveInformation = function (data) {
return req.post('/api/mn/mobile/improveInformation', data) return req.post('/api/mn/mobile/improveInformation', data)
} }
// 待预约列表
api.getPackageList = function (data) {
return req.post('/api/mn/mobile/getPackageList', data)
}
// 已预约列表
api.getAppointmentList = function (data) {
return req.post('/api/mn/mobile/getAppointmentList', data)
}
export default api export default api
...@@ -157,7 +157,7 @@ export default { ...@@ -157,7 +157,7 @@ export default {
api.improveInformation(query).then((res) => { api.improveInformation(query).then((res) => {
if (res.returnCode == '0000') { if (res.returnCode == '0000') {
// 提交成功之后,提示成功信息,关闭"个人信息填写弹窗",并刷新当前页面 // 提交成功之后,提示成功信息,关闭"个人信息填写弹窗",并刷新当前页面
this.$message.success('个人信息提交成功') this.$message.success('提交信息成功')
setTimeout(() => { setTimeout(() => {
this.$emit('hideModal') this.$emit('hideModal')
// 刷新列表 // 刷新列表
......
<template> <template>
<div class="item"> <div class="item">
<div class="left"> <div class="left">
<div class="title"><span class="point"></span> {{ item.name }}</div> <div class="title">
<span class="point"></span> {{ item.servicepackageName }}
</div>
<div class="detail" @click="$router.push(item.detailUrl)"> <div class="detail" @click="$router.push(item.detailUrl)">
<img :src="eyes" alt="" />点击查看体检套餐详情 <img :src="eyes" alt="" />点击查看体检套餐详情
<!-- {{item.fileList[0].url}} -->
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<a-button <a-button
v-if="item.type == 2" v-if="listType == 2"
style="background: #ffcc00; color: white; border: none; width: 86px" style="background: #ffcc00; color: white; border: none; width: 86px"
>查看</a-button >查看</a-button
> >
<a-button <a-button
v-else v-else
style="background: #3f7ffb; color: white; border: none; width: 86px" style="background: #3f7ffb; color: white; border: none; width: 86px"
@click="handleSubmit"
>立即预约</a-button >立即预约</a-button
> >
<div class="date">有效期至:{{ item.date }}</div> <div class="date">
有效期至:{{ item.validityStart }} ~ {{ item.validityEnd }}
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "item", name: 'item',
components: {}, components: {},
props: { props: {
listType: {
type: String,
default: '',
},
id: {
type: String | Number,
default: '',
},
item: { item: {
type: Object, type: Object,
default: () => {}, default: () => {},
...@@ -34,11 +48,22 @@ export default { ...@@ -34,11 +48,22 @@ export default {
}, },
data() { data() {
return { return {
eyes: require("@/assets/imgs/index/eyes.png"), eyes: require('@/assets/imgs/index/eyes.png'),
}; }
},
methods: {
// 立即预约
handleSubmit() {
console.log('立即预约~')
this.$router.push({
name: 'Flow',
query: {
id: this.id,
},
})
},
}, },
methods: {}, }
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<div class="appointment"> <div class="appointment">
<div class="type"><span class="point"></span> 待预约的服务</div> <div class="type"><span class="point"></span> 待预约的服务</div>
<div class="item-container"> <div class="item-container">
<Item v-for="(item, index) in items" :item="item" :key="index" /> <Item v-for="(item, index) in packageList" :item="item" :key="index" listType='1' :id="id"/>
</div> </div>
</div> </div>
<div class="appointmented"> <div class="appointmented">
<div class="type"><span class="point"></span>已预约的服务</div> <div class="type"><span class="point"></span>已预约的服务</div>
<div class="item-container"> <div class="item-container">
<Item v-for="(item, index) in itemb" :item="item" :key="index" /> <Item v-for="(item, index) in itemb" :item="item" :key="index" listType='2' :id="id"/>
</div> </div>
</div> </div>
<!-- 新卡-初始对话框 --> <!-- 新卡-初始对话框 -->
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
@ok="handleHideModal" @ok="handleHideModal"
:footer="null" :footer="null"
> >
<Form @hideModal="handleHideModal"/> <Form @hideModal="handleHideModal" />
</a-modal> </a-modal>
</div> </div>
</template> </template>
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
components: { Item, Form }, components: { Item, Form },
data() { data() {
return { return {
id:'', id: '',//客户id
visible: false, //是否显示"个人基本信息填写"弹窗 visible: false, //是否显示"个人基本信息填写"弹窗
items: [ items: [
{ {
...@@ -86,12 +86,15 @@ export default { ...@@ -86,12 +86,15 @@ export default {
date: '2021-11-18', date: '2021-11-18',
}, },
], ],
packageList:[]//待预约列表
} }
}, },
created() { created() {
const {id}= this.$route.query const { id } = this.$route.query
this.id = id this.id = id
this.getCustomerDetail() this.getCustomerDetail()
this.getPackageList() //待预约列表
this.getAppointmentList() //已预约列表
}, },
methods: { methods: {
showModal() { showModal() {
...@@ -114,6 +117,23 @@ export default { ...@@ -114,6 +117,23 @@ export default {
} }
}) })
}, },
// 获取待预约列表
getPackageList() {
api.getPackageList({ id: parseInt(this.id) }).then((res) => {
if (res.returnCode == '0000') {
console.log('获取待预约==', res.content)
this.packageList = res.content
} else {
this.$message.error(res.returnMsg)
}
})
},
// 获取已预约列表
getAppointmentList() {
api.getAppointmentList({ id: parseInt(this.id) }).then((res) => {
console.log('获取已预约列表', res)
})
},
}, },
} }
</script> </script>
......
...@@ -133,7 +133,7 @@ export default { ...@@ -133,7 +133,7 @@ export default {
id:res.content.id id:res.content.id
} }
}) })
}, 1500); }, 1000);
}else{ }else{
this.$message.error(res.returnMsg); this.$message.error(res.returnMsg);
} }
......
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