Commit b8cd1f7b authored by hailiang.sun's avatar hailiang.sun

bug修复

parent 95c2e5fb
This diff is collapsed.
......@@ -31,9 +31,9 @@
<span class="label">出生日期:</span>
<a-input :value="customerInfo.birthDate" disabled />
</div>
<div class="item tip">
【温馨提醒:女士请注意婚姻状况的选择,未婚代表不做妇科项目,需要做妇科项目检测请选择已婚,谢谢理解!】
</div>
<div class="item tip">
【温馨提醒:女士请注意婚姻状况的选择,未婚代表不做妇科项目,需要做妇科项目检测请选择已婚,谢谢理解!】
</div>
</div>
</div>
......@@ -41,24 +41,24 @@
<!-- 预约详情 -->
<div class="detail">
<div class="title"><span class="point"></span>预约详情</div>
<ul class="items" v-for="item in appointmentList" :key="item.id">
<ul class="items">
<li>
<div class="label">已选服务:</div>
<div class="detail_content">
{{item.servicepackageName}}
{{ item.servicepackageName }}
</div>
</li>
<li>
<div class="label">已选服务门店:</div>
<div class="detail_content">{{item.checkUnitName}}</div>
<div class="detail_content">{{ item.checkUnitName }}</div>
</li>
<li>
<div class="label">已选服务门店地址:</div>
<div class="detail_content">{{item.shopAddress}}</div>
<div class="detail_content">{{ item.shopAddress }}</div>
</li>
<li>
<div class="label">预约日期:</div>
<div class="detail_content">{{item.serviceAppDate}}</div>
<div class="detail_content">{{ item.serviceAppDate }}</div>
</li>
</ul>
<div class="tips">
......@@ -68,7 +68,17 @@
>
</div>
<div class="btns">
<a-button type="primary">预约中...</a-button>
<a-button type="primary" disabled>{{
item.status === "88" ||
item.status === "99" ||
item.status === "1"
? "预约中..."
: item.status === "3"
? "取消中..."
: item.status === "7"
? "改约中..."
: "状态异常"
}}</a-button>
<a-button type="primary" @click="goIndexPage"> 回首页 </a-button>
</div>
</div>
......@@ -78,66 +88,69 @@
</template>
<script>
// import AppointmentDetail from './components/appointmentDetail'
import api from '@/api/customer'
import { log } from 'util'
import api from "@/api/customer";
import { log } from "util";
export default {
name: 'Detail',
name: "Detail",
components: {
// AppointmentDetail,
},
data() {
return {
id: '', //客户id
id: "", //客户id
customerInfo: {
name: '',
sex: '',
idNo: '',
phone: '',
birthDate: '',
maritalStatus: '',
name: "",
sex: "",
idNo: "",
phone: "",
birthDate: "",
maritalStatus: "",
}, //客户信息
tips: require('../../assets/imgs/detail/tips.png'),
tips: require("../../assets/imgs/detail/tips.png"),
appointmentList: [], //已预约列表
}
item: {}, // 详情对象,通过路由带过来
};
},
created() {
const { id } = this.$route.query
this.id = id
this.getCustomerDetail()//获取客户信息
this.getAppointmentList()//获取客户的预约详情
const { id } = this.$route.query;
console.log("对象带过来没?", this.$route);
this.item = this.$route.params;
this.id = id;
this.getCustomerDetail(); //获取客户信息
this.getAppointmentList(); //获取客户的预约详情
},
methods: {
// 获取客户信息
getCustomerDetail() {
api.getCustomerDetail({ id: parseInt(this.id) }).then((res) => {
if (res.returnCode == '0000') {
this.customerInfo = res.content
console.table('客户信息customerInfo=', this.customerInfo)
if (res.returnCode == "0000") {
this.customerInfo = res.content;
console.table("客户信息customerInfo=", this.customerInfo);
} else {
this.$message.error(res.returnMsg)
this.$message.error(res.returnMsg);
}
})
});
},
// 回首页
goIndexPage() {
this.$router.push({
name: 'Index',
name: "Index",
query: {
id: this.id, //客户id
},
})
});
},
// 获取预约详情
getAppointmentList() {
api.getAppointmentList({ id: parseInt(this.id) }).then((res) => {
if (res.returnCode == '0000') {
console.log('111111111111获取已预约列表==', res.content)
this.appointmentList = res.content
if (res.returnCode == "0000") {
console.log("111111111111获取已预约列表==", res.content);
this.appointmentList = res.content;
}
})
});
},
},
}
};
</script>
<style lang="less" scoped>
......@@ -180,10 +193,10 @@ export default {
.item {
display: flex;
margin-top: 14px;
&.tip{
font-size: 12px;
color: #999;
}
&.tip {
font-size: 12px;
color: #999;
}
.label {
display: inline-block;
width: 120px;
......
......@@ -106,9 +106,7 @@ export default {
// 获取客户信息
getCustomerDetail() {
console.log("ssss");
api.getCustomerDetail({ id: parseInt(this.id) }).then((res) => {
console.log("sdadad", res.content);
if (res.returnCode == "0000") {
this.customerInfo = res.content;
console.table("客户信息customerInfo=", this.customerInfo);
......
......@@ -23,7 +23,11 @@
>立即预约</a-button
>
<div class="date">
{{ listType == 1 ? (' 有效期至:'+item.validityEnd ): ('预约体检日期:'+item.customerAppDate) }}
{{
listType == 1
? " 有效期至:" + item.validityEnd
: "预约体检日期:" + item.customerAppDate
}}
</div>
</div>
</div>
......@@ -31,16 +35,16 @@
<script>
export default {
name: 'item',
name: "item",
components: {},
props: {
listType: {
type: String,
default: '',
default: "",
},
id: {
type: String | Number,
default: '',
default: "",
},
item: {
type: Object,
......@@ -49,35 +53,36 @@ export default {
},
data() {
return {
eyes: require('@/assets/imgs/index/eyes.png'),
}
eyes: require("@/assets/imgs/index/eyes.png"),
};
},
methods: {
// 立即预约
handleSubmit() {
console.log('立即预约~', this.item.chooseList)
console.log("立即预约~", this.item.chooseList);
// 本地存储数据-该产品下可选择的体检套餐
window.localStorage.setItem('reservedInfo', JSON.stringify(this.item))
window.localStorage.setItem("reservedInfo", JSON.stringify(this.item));
this.$router.push({
name: 'Flow',
name: "Flow",
query: {
id: this.id, //客户id
servicepackageId: this.item.id, //产品id
},
})
});
},
// 查看-预约详情
handleReadDetail() {
this.$router.push({
name: 'Detail',
name: "Detail",
query: {
id: this.id,
},
})
params: this.item,
});
},
},
}
};
</script>
<style lang="less" scoped>
......
......@@ -2,18 +2,33 @@
<div class="index">
<div class="appointment">
<div class="type"><span class="point"></span> 待预约的服务</div>
<div v-if="packageList.length == 0" class="point_none">暂无可预约体检</div>
<div v-if="packageList.length == 0" class="point_none">
暂无可预约体检
</div>
<div class="item-container" v-else>
<Item v-for="(item, index) in packageList" :item="item" :key="index" listType='1' :id="id"/>
<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 v-if="appointmentList.length == 0" class="point_none">暂无已预约体检</div>
<div v-if="appointmentList.length == 0" class="point_none">
暂无已预约体检
</div>
<div class="item-container" v-else>
<Item v-for="(item, index) in appointmentList" :item="item" :key="index" listType='2' :id="id"/>
<Item
v-for="(item, index) in appointmentList"
:item="item"
:key="index"
listType="2"
:id="id"
/>
</div>
</div>
<!-- 新卡-初始对话框 -->
<a-modal
......@@ -28,125 +43,125 @@
</template>
<script>
import Item from './components/item.vue'
import Form from './components/form.vue'
import api from '@/api/customer'
import Item from "./components/item.vue";
import Form from "./components/form.vue";
import api from "@/api/customer";
export default {
components: { Item, Form },
data() {
return {
id: '',//客户id
id: "", //客户id
visible: false, //是否显示"个人基本信息填写"弹窗
items: [
{
name: '体检套餐名称-某某单位-某某套餐',
detailUrl: 'http://baidu.com',
name: "体检套餐名称-某某单位-某某套餐",
detailUrl: "http://baidu.com",
type: 1,
date: '2021-11-18',
date: "2021-11-18",
},
{
name: '体检套餐名称-某某单位-某某套餐',
detailUrl: 'http://baidu.com',
name: "体检套餐名称-某某单位-某某套餐",
detailUrl: "http://baidu.com",
type: 1,
date: '2021-11-18',
date: "2021-11-18",
},
{
name: '体检套餐名称-某某单位-某某套餐',
detailUrl: 'http://baidu.com',
name: "体检套餐名称-某某单位-某某套餐",
detailUrl: "http://baidu.com",
type: 1,
date: '2021-11-18',
date: "2021-11-18",
},
{
name: '体检套餐名称-某某单位-某某套餐',
detailUrl: 'http://baidu.com',
name: "体检套餐名称-某某单位-某某套餐",
detailUrl: "http://baidu.com",
type: 1,
date: '2021-11-18',
date: "2021-11-18",
},
],
itemb: [
{
name: '体检套餐名称-某某单位-某某套餐',
detailUrl: 'http://baidu.com',
name: "体检套餐名称-某某单位-某某套餐",
detailUrl: "http://baidu.com",
type: 2,
date: '2021-11-18',
date: "2021-11-18",
},
{
name: '体检套餐名称-某某单位-某某套餐',
detailUrl: 'http://baidu.com',
name: "体检套餐名称-某某单位-某某套餐",
detailUrl: "http://baidu.com",
type: 2,
date: '2021-11-18',
date: "2021-11-18",
},
{
name: '体检套餐名称-某某单位-某某套餐',
detailUrl: 'http://baidu.com',
name: "体检套餐名称-某某单位-某某套餐",
detailUrl: "http://baidu.com",
type: 2,
date: '2021-11-18',
date: "2021-11-18",
},
{
name: '体检套餐名称-某某单位-某某套餐',
detailUrl: 'http://baidu.com',
name: "体检套餐名称-某某单位-某某套餐",
detailUrl: "http://baidu.com",
type: 2,
date: '2021-11-18',
date: "2021-11-18",
},
],
packageList:[],//待预约列表
appointmentList:[]//已预约列表
}
packageList: [], //待预约列表
appointmentList: [], //已预约列表
};
},
created() {
const { id } = this.$route.query
this.id = id
this.getCustomerDetail()//客户信息
this.getPackageList() //待预约列表
this.getAppointmentList() //已预约列表
const { id } = this.$route.query;
this.id = id;
this.getCustomerDetail(); //客户信息
this.getPackageList(); //待预约列表
this.getAppointmentList(); //已预约列表
},
methods: {
showModal() {
this.visible = true
this.visible = true;
},
handleHideModal(e) {
console.log(e)
this.visible = false
console.log(e);
this.visible = false;
},
// 获取客户详情
getCustomerDetail() {
api.getCustomerDetail({ id: parseInt(this.id) }).then((res) => {
if (res.returnCode == '0000') {
if (res.returnCode == "0000") {
// 根据information是否显示'个人基本信息填写'弹窗(01:完善 02:不完善)
res.content.information == '02'
res.content.information == "02"
? (this.visible = true)
: (this.visible = false)
: (this.visible = false);
} else {
this.$message.error(res.returnMsg)
this.$message.error(res.returnMsg);
}
})
});
},
// 获取待预约列表
getPackageList() {
api.getPackageList({ id: parseInt(this.id) }).then((res) => {
if (res.returnCode == '0000') {
console.log('获取待预约==', res.content)
this.packageList = res.content
}
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) => {
if (res.returnCode == '0000') {
console.log('获取已预约列表==', res.content)
this.appointmentList = res.content
}
if (res.returnCode == "0000") {
console.log("获取已预约列表==", res.content);
this.appointmentList = res.content;
}
// else {
// this.$message.error(res.returnMsg)
// }
})
});
},
},
}
};
</script>
<style lang="less" scoped>
......@@ -192,7 +207,7 @@ export default {
}
}
}
.point_none{
.point_none {
padding: 26px;
}
</style>
......@@ -92,11 +92,9 @@
background: #2c2c31;
background-size: 100% 100%;
padding: 58px 0 0 0;
position: absolute;
width: 100%;
height: 180px;
bottom: 0px;
box-sizing:border-box;
box-sizing: border-box;
.con_ {
display: flex;
justify-content: space-between;
......
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