Commit 9dcfb796 authored by huangyecong's avatar huangyecong

添加选择体检套餐接口

parent d903206d
...@@ -11,7 +11,7 @@ const routes = [ ...@@ -11,7 +11,7 @@ const routes = [
children: [ children: [
{ {
path: "/", path: "/",
redirect: "/index", // 页面重定向 redirect: "/login", // 页面重定向
}, },
{ {
// 主页 // 主页
......
<template> <template>
<div class="combo"> <div class="combo">
<div class="title"><span class="point"></span>请选择套餐</div> <div class="title"><span class="point"></span>请选择套餐</div>
<!-- v-if="combos.type === '1'" -->
<a-radio-group <a-radio-group
class="items-radios" class="items-radios"
v-if="combos.type === '1'" v-model="chooseId"
v-model="value"
@change="onChange" @change="onChange"
> >
<ul class="items"> <ul class="items">
<li class="item" v-for="(item, index) in combos.items" :key="index"> <li class="item" v-for="item in reservedInfo.chooseList" :key="item.id">
<a-radio :style="radioStyle" :value="item.id"> <a-radio :value="item.id">
{{ item.title }} {{ item.servicecententName }}
</a-radio> </a-radio>
</li> </li>
</ul> </ul>
</a-radio-group> </a-radio-group>
<ul class="items"> <!-- <ul class="items">
<li> <li>
<a-checkbox-group <a-checkbox-group
:options="combos2.items" :options="combos2.items"
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
> >
</a-checkbox-group> </a-checkbox-group>
</li> </li>
</ul> </ul> -->
</div> </div>
</template> </template>
...@@ -33,59 +33,70 @@ ...@@ -33,59 +33,70 @@
export default { export default {
name: "componentName", name: "componentName",
components: {}, components: {},
props: {}, props: {
id:{
type:String | Number,
default:''
}
},
data() { data() {
return { return {
value: 1, chooseId: '',
chkvalue: [], // chkvalue: [],
combos: { // combos: {
type: "2", // type: "2",
items: [ // items: [
{ // {
id: 0, // id: 0,
title: "21招商信诺-银保客户-豪华套餐女未婚", // title: "21招商信诺-银保客户-豪华套餐女未婚",
}, // },
{ // {
id: 1, // id: 1,
title: "22招商信诺-银保客户-豪华套餐女未婚", // title: "22招商信诺-银保客户-豪华套餐女未婚",
}, // },
{ // {
id: 2, // id: 2,
title: "23招商信诺-银保客户-豪华套餐女未婚", // title: "23招商信诺-银保客户-豪华套餐女未婚",
}, // },
{ // {
id: 3, // id: 3,
title: "24招商信诺-银保客户-豪华套餐女未婚", // title: "24招商信诺-银保客户-豪华套餐女未婚",
}, // },
], // ],
}, // },
combos2: { // combos2: {
type: "1", // type: "1",
items: [ // items: [
{ // {
value: 0, // value: 0,
label: "21招商信诺-银保客户-豪华套餐女未婚", // label: "21招商信诺-银保客户-豪华套餐女未婚",
}, // },
{ // {
value: 1, // value: 1,
label: "22招商信诺-银保客户-豪华套餐女未婚", // label: "22招商信诺-银保客户-豪华套餐女未婚",
}, // },
{ // {
value: 2, // value: 2,
label: "23招商信诺-银保客户-豪华套餐女未婚", // label: "23招商信诺-银保客户-豪华套餐女未婚",
}, // },
{ // {
value: 3, // value: 3,
label: "24招商信诺-银保客户-豪华套餐女未婚", // label: "24招商信诺-银保客户-豪华套餐女未婚",
}, // },
], // ],
}, // },
reservedInfo:[]//可选择的体检套餐
}; };
}, },
created(){
//获取产品信息-可选体检套餐
this.reservedInfo = JSON.parse(window.localStorage.getItem('reservedInfo'))
this.chooseId = JSON.parse(window.localStorage.getItem('chooseId'))
},
methods: { methods: {
onChange(checkedValues) { onChange(checkedValues) {
console.log("checked = ", checkedValues); window.localStorage.setItem('chooseId',JSON.stringify(this.chooseId))
console.log("value = ", this.chkvalue); console.log("选择体检套餐chooseId===",this.chooseId)
}, },
}, },
}; };
......
<template> <template>
<div class="flow"> <div class="flow">
<div class="content"> <div class="content">
<div class="left"> <div class="left" v-if="customerInfo !== ''">
<div class="title"><span class="point"></span>客户信息</div> <div class="title"><span class="point"></span>客户信息</div>
<div class="info"> <div class="info">
<div class="item"> <div class="item">
<span class="label">姓名:</span> <span class="label">姓名:</span>
<a-input default-value="11111" disabled></a-input> <a-input :default-value="customerInfo.name" disabled></a-input>
</div> </div>
<div class="item"> <div class="item">
<span class="label">性别:</span> <span class="label">性别:</span>
<a-input :default-value="customerInfo.sex" disabled /> <a-input
:default-value="customerInfo.sex == 'M' ? '女' : '男'"
disabled
/>
</div> </div>
<div class="item"> <div class="item">
<span class="label">婚姻状况</span> <span class="label">婚姻状况</span>
<a-input :default-value="customerInfo.maritalStatus" /> <a-radio-group v-model="customerInfo.maritalStatus">
<a-radio value="01">未婚 </a-radio>
<a-radio value="02">已婚</a-radio>
</a-radio-group>
</div> </div>
<div class="item"> <div class="item">
<span class="label">身份证:</span> <span class="label">身份证:</span>
...@@ -30,18 +36,20 @@ ...@@ -30,18 +36,20 @@
</div> </div>
</div> </div>
<div class="reset"> <div class="reset">
<a-button type="primary">点击修改</a-button> <a-button type="primary" @click="onSubmit">点击修改</a-button>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<Combos v-if="false" /> <!-- v-if="false" -->
<Detail v-if="!next" /> <Combos :id="id" />
<SelectInstitution :id="id" /> <!-- <Detail v-if="!next" /> -->
<!-- <SelectInstitution :id="id" /> -->
</div> </div>
</div> </div>
<div class="btn"> <div class="btn">
<a-button type="primary" @click="nextStep" v-if="!next">下一步</a-button> <!-- v-if="!next" -->
<a-button type="primary" @click="nextStep">下一步</a-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -51,6 +59,7 @@ import SelectInstitution from './components/selectInstitution.vue' ...@@ -51,6 +59,7 @@ import SelectInstitution from './components/selectInstitution.vue'
import Combos from './components/combo.vue' import Combos from './components/combo.vue'
import Detail from './components/detail.vue' import Detail from './components/detail.vue'
import api from '@/api/customer' import api from '@/api/customer'
import { log } from 'util'
export default { export default {
name: 'componentName', name: 'componentName',
components: { components: {
...@@ -64,11 +73,12 @@ export default { ...@@ -64,11 +73,12 @@ export default {
next: true, next: true,
id: '', //客户id id: '', //客户id
customerInfo: { customerInfo: {
// name: '', name: '',
// sex: '', sex: '',
// idNo: '', idNo: '',
// phone: '', phone: '',
// birthDate: '', birthDate: '',
maritalStatus:''
}, //客户信息 }, //客户信息
} }
}, },
...@@ -84,7 +94,27 @@ export default { ...@@ -84,7 +94,27 @@ export default {
getCustomerDetail() { getCustomerDetail() {
api.getCustomerDetail({ id: parseInt(this.id) }).then((res) => { api.getCustomerDetail({ id: parseInt(this.id) }).then((res) => {
if (res.returnCode == '0000') { if (res.returnCode == '0000') {
this.customerInfo = res.content const {name,sex,idNo,phone,birthDate,maritalStatus} = res.content
this.customerInfo={name,sex,idNo,phone,birthDate,maritalStatus}
console.log('customerInfo=', this.customerInfo)
} else {
this.$message.error(res.returnMsg)
}
})
},
// "立即修改"
onSubmit() {
const query = {
// ...this.form,
}
api.improveInformation(query).then((res) => {
if (res.returnCode == '0000') {
// 提交成功之后,提示成功信息,关闭"个人信息填写弹窗",并刷新当前页面
this.$message.success('修改信息成功')
// setTimeout(() => {
// this.$emit('hideModal')
// // 刷新列表
// }, 1500)
} else { } else {
this.$message.error(res.returnMsg) this.$message.error(res.returnMsg)
} }
...@@ -119,7 +149,7 @@ export default { ...@@ -119,7 +149,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
.left { .left {
max-height: 430px; max-height: 480px;
.reset { .reset {
text-align: center; text-align: center;
margin-top: 25px; margin-top: 25px;
......
...@@ -54,7 +54,10 @@ export default { ...@@ -54,7 +54,10 @@ export default {
methods: { methods: {
// 立即预约 // 立即预约
handleSubmit() { handleSubmit() {
console.log('立即预约~') console.log('立即预约~',this.item.chooseList)
// 本地存储数据-该产品下可选择的体检套餐
window.localStorage.setItem('reservedInfo',JSON.stringify(this.item))
this.$router.push({ this.$router.push({
name: 'Flow', name: 'Flow',
query: { query: {
......
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