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