Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
ln-medicalAppointment-pc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙海亮
ln-medicalAppointment-pc
Commits
37f61644
Commit
37f61644
authored
Nov 22, 2021
by
huangyecong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加已预约接口
parent
c18c17eb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
159 additions
and
58 deletions
+159
-58
customer.js
src/api/customer.js
+8
-0
combo.vue
src/views/flow/components/combo.vue
+3
-0
selectInstitution.vue
src/views/flow/components/selectInstitution.vue
+107
-32
index.vue
src/views/flow/index.vue
+17
-10
item.vue
src/views/index/components/item.vue
+6
-8
index.vue
src/views/index/index.vue
+18
-8
No files found.
src/api/customer.js
View file @
37f61644
...
@@ -40,4 +40,12 @@ api.getSupplierList = function (data) {
...
@@ -40,4 +40,12 @@ api.getSupplierList = function (data) {
api
.
getShopByDistrictCode
=
function
(
data
)
{
api
.
getShopByDistrictCode
=
function
(
data
)
{
return
req
.
post
(
'
/api/mn/mobile/getShopByDistrictCode
'
,
data
)
return
req
.
post
(
'
/api/mn/mobile/getShopByDistrictCode
'
,
data
)
}
}
// 门店排期
api
.
getScheduleByCode
=
function
(
data
)
{
return
req
.
post
(
'
/api/mn/mobile/getScheduleByCode
'
,
data
)
}
// 预约
api
.
addAppointment
=
function
(
data
)
{
return
req
.
post
(
'
/api/mn/mobile/addAppointment
'
,
data
)
}
export
default
api
export
default
api
src/views/flow/components/combo.vue
View file @
37f61644
...
@@ -99,8 +99,11 @@ export default {
...
@@ -99,8 +99,11 @@ export default {
chooseList
.
push
({
chooseList
.
push
({
id
:
this
.
chooseId
id
:
this
.
chooseId
})
})
// 本地存储数据-选择的体检套餐
window
.
localStorage
.
setItem
(
'
chooseList
'
,
JSON
.
stringify
(
chooseList
))
window
.
localStorage
.
setItem
(
'
chooseList
'
,
JSON
.
stringify
(
chooseList
))
console
.
log
(
"
选择体检套餐chooseId===
"
,
this
.
chooseId
)
console
.
log
(
"
选择体检套餐chooseId===
"
,
this
.
chooseId
)
// 显示"下一步"
this
.
$parent
.
next
=
true
},
},
},
},
};
};
...
...
src/views/flow/components/selectInstitution.vue
View file @
37f61644
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
:key=
"index"
:key=
"index"
:class=
"index === selectIndex ? 'active' : ''"
:class=
"index === selectIndex ? 'active' : ''"
@
click=
"clickTab(index, item.id)"
@
click=
"clickTab(index, item.id)"
>
{{
item
.
supplierName
}}
</span
>
{{
item
.
supplierName
}}
-
{{
item
.
id
}}
</span
>
>
</div>
</div>
</div>
</div>
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
:class=
"item.isDisabled ? 'btn disabled' : 'btn'"
:class=
"item.isDisabled ? 'btn disabled' : 'btn'"
@
click=
"openDatePicker(item)"
@
click=
"openDatePicker(item)"
>
>
选择体检日期
选择体检日期
-
{{
item
.
supplierId
}}
-
{{
item
.
id
}}
</button>
</button>
</li>
</li>
</ul>
</ul>
...
@@ -121,13 +121,17 @@ export default {
...
@@ -121,13 +121,17 @@ export default {
isShowHospitalList
:
true
,
//是否显示体检中心列表
isShowHospitalList
:
true
,
//是否显示体检中心列表
supplierIds
:
''
,
//体检中心ids,默认显示全部
supplierIds
:
''
,
//体检中心ids,默认显示全部
servicepackageId
:
''
,
//产品id
servicepackageId
:
''
,
//产品id
serviceDate
:
''
,
//预约的时间
hospitalId
:
''
,
//医院id
supplierId
:
''
,
//选择体检中id
}
}
},
},
created
()
{
created
()
{
const
{
servicepackageId
}
=
this
.
$route
.
query
const
{
servicepackageId
}
=
this
.
$route
.
query
this
.
servicepackageId
=
servicepackageId
?
servicepackageId
:
''
this
.
servicepackageId
=
servicepackageId
?
servicepackageId
:
''
this
.
getProvinceList
()
//省
this
.
getProvinceList
()
//
获取
省
this
.
getSupplierList
()
//获取体检机构
this
.
getSupplierList
()
//获取体检机构
// 获取门店排期
},
},
methods
:
{
methods
:
{
...
@@ -146,6 +150,7 @@ export default {
...
@@ -146,6 +150,7 @@ export default {
}
}
})
})
},
},
// 获取市
// 获取市
getCityListByProvinceCode
()
{
getCityListByProvinceCode
()
{
const
query
=
{
const
query
=
{
...
@@ -161,6 +166,7 @@ export default {
...
@@ -161,6 +166,7 @@ export default {
}
}
})
})
},
},
// 获取区/城市
// 获取区/城市
getDistrictListByCityCode
()
{
getDistrictListByCityCode
()
{
const
query
=
{
const
query
=
{
...
@@ -200,31 +206,33 @@ export default {
...
@@ -200,31 +206,33 @@ export default {
// 获取体检机构
// 获取体检机构
async
getSupplierList
()
{
async
getSupplierList
()
{
// 测试id1043
// 测试id1043
api
.
getSupplierList
({
servicepackageId
:
this
.
servicepackageId
}).
then
((
res
)
=>
{
api
if
(
res
.
returnCode
==
'
0000
'
)
{
.
getSupplierList
({
servicepackageId
:
this
.
servicepackageId
})
const
data
=
res
.
content
.
then
((
res
)
=>
{
if
(
res
.
returnCode
==
'
0000
'
)
{
// 提取所有的体检机构ids,并用逗号隔开,比如:1004,1007
const
data
=
res
.
content
this
.
supplierIds
=
data
.
map
(
function
(
e
,
i
)
{
// 提取所有的体检机构ids,并用逗号隔开,比如:1004,1007
return
e
.
id
this
.
supplierIds
=
data
})
.
map
(
function
(
e
,
i
)
{
.
join
(
'
,
'
)
return
e
.
id
})
.
join
(
'
,
'
)
this
.
mechanismList
=
[
this
.
mechanismList
=
[
{
{
status
:
'
0
'
,
status
:
'
0
'
,
supplierName
:
'
全部
'
,
supplierName
:
'
全部
'
,
id
:
this
.
supplierIds
id
:
this
.
supplierIds
,
},
},
...
res
.
content
,
...
res
.
content
,
]
]
console
.
log
(
'
this.supplierIds===
'
,
this
.
supplierIds
)
console
.
log
(
'
this.supplierIds===
'
,
this
.
supplierIds
)
this
.
getShopByDistrictCode
()
//根据体检结构-显示可选择的体检中心,默认显示全部
this
.
getShopByDistrictCode
()
//根据体检结构-显示可选择的体检中心,默认显示全部
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
returnMsg
)
this
.
$message
.
error
(
res
.
returnMsg
)
}
}
})
})
},
},
// 选择体检机构
// 选择体检机构
...
@@ -248,34 +256,101 @@ export default {
...
@@ -248,34 +256,101 @@ export default {
areaCode
:
''
,
//区号
areaCode
:
''
,
//区号
supplierIds
:
this
.
supplierIds
,
//体检机构d
supplierIds
:
this
.
supplierIds
,
//体检机构d
location
:
'
,
'
,
//经纬度
location
:
'
,
'
,
//经纬度
servicepackageId
:
this
.
servicepackageId
,
//
客户
id
servicepackageId
:
this
.
servicepackageId
,
//
产品
id
}
}
api
.
getShopByDistrictCode
(
params
).
then
((
res
)
=>
{
api
.
getShopByDistrictCode
(
params
).
then
((
res
)
=>
{
if
(
res
.
returnCode
===
'
0000
'
)
{
if
(
res
.
returnCode
===
'
0000
'
)
{
this
.
isShowHospitalList
=
true
this
.
isShowHospitalList
=
true
this
.
hospitalList
=
res
.
content
this
.
hospitalList
=
res
.
content
console
.
log
(
'
根据体检机构-获取体检中心列表=
'
,
this
.
hospitalList
)
console
.
log
(
'
根据体检机构-获取体检中心列表=
'
,
this
.
hospitalList
)
}
else
{
}
else
{
this
.
isShowHospitalList
=
false
this
.
isShowHospitalList
=
false
// this.$message.error(res.returnMsg)
// this.$message.error(res.returnMsg)
}
}
})
})
},
},
// 获取门店排期
getScheduleByCode
()
{
const
query
=
{
code
:
''
,
//门店编码
beginDate
:
''
,
//开始时间
endDate
:
''
,
//结束时间
supplierId
:
''
,
//机构id
}
api
.
getScheduleByCode
(
query
).
then
((
res
)
=>
{
console
.
log
(
res
)
})
},
// 打开日期弹框
// 打开日期弹框
openDatePicker
(
item
)
{
openDatePicker
(
item
)
{
if
(
item
.
isDisabled
)
{
if
(
item
.
isDisabled
)
{
return
return
}
}
this
.
supplierId
=
item
.
supplierId
this
.
hospitalId
=
item
.
id
this
.
datePickShow
=
true
this
.
datePickShow
=
true
},
},
// 确认选择-"立即预约"
getConfirm
(
val
)
{
getConfirm
(
val
)
{
this
.
datePickShow
=
false
this
.
datePickShow
=
false
console
.
log
(
'
确认选择
'
,
val
,
this
.
serviceDate
)
const
_this
=
this
const
query
=
{
dataSource
:
'
M
'
,
//数据来源P电脑PC ,M 手机
customerId
:
this
.
id
,
//客户id
servicepackageId
:
this
.
servicepackageId
,
//套餐id
checkUnitCode
:
JSON
.
stringify
(
this
.
hospitalId
),
//预约门店code
serviceDate
:
this
.
serviceDate
,
//预约使用服务时间
chooseList
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'
chooseList
'
)),
//选择服务列表
payList
:
[],
supplierId
:
this
.
supplierId
,
//供应商id
hospitalId
:
this
.
hospitalId
,
//医院id
// checkUnitCode: '2152',
// chooseList: [{ id: 1069 }],
// customerId: 56418,
// dataSource: 'M',
// hospitalId: 2152,
// payList: [],
// serviceDate: '20211127',
// servicepackageId: 1043,
// supplierId: 1007,
}
console
.
log
(
'
立即预约=
'
,
query
)
// 弹窗-"你预约的日期为:xxxxxx"
this
.
$confirm
({
title
:
'
预约时间确认
'
,
content
:
`你预约的日期为:
${
this
.
serviceDate
}
`
,
onOk
()
{
// return new Promise((resolve, reject) => {
// setTimeout(Math.random() > 0.5 ? resolve : reject, 1000)
// }).catch(() => console.log('Oops errors!'))
api
.
addAppointment
(
query
).
then
((
res
)
=>
{
if
(
res
.
returnCode
===
'
0000
'
)
{
console
.
log
(
'
立即预约=
'
,
res
)
_this
.
$message
.
error
(
'
预约成功
'
)
// 提示预约成功,之后跳转到预约详情页面
}
else
{
_this
.
$message
.
error
(
res
.
returnMsg
)
}
})
},
onCancel
()
{},
})
},
},
getCancle
(
val
)
{
getCancle
(
val
)
{
this
.
datePickShow
=
false
this
.
datePickShow
=
false
},
},
dateChange
(
date
,
type
)
{
dateChange
(
date
,
type
)
{
console
.
log
(
date
)
console
.
log
(
date
)
if
(
date
.
length
!=
0
)
{
this
.
serviceDate
=
date
[
0
].
date
}
},
},
},
},
}
}
...
@@ -377,7 +452,7 @@ export default {
...
@@ -377,7 +452,7 @@ export default {
}
}
}
}
}
}
.hospital_none{
.hospital_none
{
text-align: center;
text-align: center;
padding: 20px;
padding: 20px;
}
}
...
...
src/views/flow/index.vue
View file @
37f61644
...
@@ -6,12 +6,12 @@
...
@@ -6,12 +6,12 @@
<div
class=
"info"
>
<div
class=
"info"
>
<div
class=
"item"
>
<div
class=
"item"
>
<span
class=
"label"
>
姓名:
</span>
<span
class=
"label"
>
姓名:
</span>
<a-input
:
default-
value=
"customerInfo.name"
disabled
></a-input>
<a-input
:value=
"customerInfo.name"
disabled
></a-input>
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
<span
class=
"label"
>
性别:
</span>
<span
class=
"label"
>
性别:
</span>
<a-input
<a-input
:
default-
value=
"customerInfo.sex == 'M' ? '女' : '男'"
:value=
"customerInfo.sex == 'M' ? '女' : '男'"
disabled
disabled
/>
/>
</div>
</div>
...
@@ -24,15 +24,15 @@
...
@@ -24,15 +24,15 @@
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
<span
class=
"label"
>
身份证:
</span>
<span
class=
"label"
>
身份证:
</span>
<a-input
:
default-
value=
"customerInfo.idNo"
disabled
/>
<a-input
:value=
"customerInfo.idNo"
disabled
/>
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
<span
class=
"label"
>
手机号码:
</span>
<span
class=
"label"
>
手机号码:
</span>
<a-input
:
default-
value=
"customerInfo.phone"
/>
<a-input
:value=
"customerInfo.phone"
/>
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
<span
class=
"label"
>
出生日期:
</span>
<span
class=
"label"
>
出生日期:
</span>
<a-input
:
default-
value=
"customerInfo.birthDate"
disabled
/>
<a-input
:value=
"customerInfo.birthDate"
disabled
/>
</div>
</div>
</div>
</div>
<div
class=
"reset"
>
<div
class=
"reset"
>
...
@@ -41,13 +41,13 @@
...
@@ -41,13 +41,13 @@
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
<!--
<Combos
:id=
"id"
/>
--
>
<!--
<Combos
:id=
"id"
v-if=
"step1"
/
>
<SelectInstitution
:id=
"id"
/
>
<SelectInstitution
:id=
"id"
v-if=
"step2"
/>
--
>
<
!--
<Detail
/>
--
>
<
Detail
/
>
</div>
</div>
</div>
</div>
<div
class=
"btn"
>
<div
class=
"btn"
>
<a-button
type=
"primary"
@
click=
"nextStep"
v-if=
"
!
next"
>
下一步
</a-button>
<a-button
type=
"primary"
@
click=
"nextStep"
v-if=
"next"
>
下一步
</a-button>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -67,7 +67,7 @@ export default {
...
@@ -67,7 +67,7 @@ export default {
props
:
{},
props
:
{},
data
()
{
data
()
{
return
{
return
{
next
:
tru
e
,
next
:
fals
e
,
id
:
''
,
//客户id
id
:
''
,
//客户id
customerInfo
:
{
customerInfo
:
{
name
:
''
,
name
:
''
,
...
@@ -77,6 +77,9 @@ export default {
...
@@ -77,6 +77,9 @@ export default {
birthDate
:
''
,
birthDate
:
''
,
maritalStatus
:
''
maritalStatus
:
''
},
//客户信息
},
//客户信息
step1
:
true
,
step2
:
false
,
step3
:
false
}
}
},
},
created
()
{
created
()
{
...
@@ -87,6 +90,10 @@ export default {
...
@@ -87,6 +90,10 @@ export default {
methods
:
{
methods
:
{
nextStep
()
{
nextStep
()
{
this
.
next
=
true
this
.
next
=
true
if
(
this
.
next
){
this
.
step1
=
false
this
.
step2
=
true
}
},
},
// 获取客户信息
// 获取客户信息
...
...
src/views/index/components/item.vue
View file @
37f61644
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"item"
>
<div
class=
"item"
>
<div
class=
"left"
>
<div
class=
"left"
>
<div
class=
"title"
>
<div
class=
"title"
>
<span
class=
"point"
></span>
{{
item
.
servicepackageName
}}
-
{{
item
.
id
}}
<span
class=
"point"
></span>
{{
item
.
servicepackageName
}}
-
{{
item
.
id
}}
</div>
</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=
""
/>
点击查看体检套餐详情
...
@@ -21,9 +21,7 @@
...
@@ -21,9 +21,7 @@
@
click=
"handleSubmit"
@
click=
"handleSubmit"
>
立即预约
</a-button
>
立即预约
</a-button
>
>
<div
class=
"date"
>
<div
class=
"date"
>
有效期至:
{{
item
.
validityEnd
}}
</div>
有效期至:
{{
item
.
validityEnd
}}
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -54,15 +52,15 @@ export default {
...
@@ -54,15 +52,15 @@ export default {
methods
:
{
methods
:
{
// 立即预约
// 立即预约
handleSubmit
()
{
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
({
this
.
$router
.
push
({
name
:
'
Flow
'
,
name
:
'
Flow
'
,
query
:
{
query
:
{
id
:
this
.
id
,
//客户id
id
:
this
.
id
,
//客户id
servicepackageId
:
this
.
item
.
id
//产品id
servicepackageId
:
this
.
item
.
id
,
//产品id
},
},
})
})
},
},
...
...
src/views/index/index.vue
View file @
37f61644
...
@@ -2,15 +2,18 @@
...
@@ -2,15 +2,18 @@
<div
class=
"index"
>
<div
class=
"index"
>
<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
v-if=
"packageList.length == 0"
>
暂无可预约体检
</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>
</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
v-if=
"appointmentList.length == 0"
>
暂无已预约体检
</div>
<Item
v-for=
"(item, index) in itemb"
:item=
"item"
:key=
"index"
listType=
'2'
:id=
"id"
/>
<div
class=
"item-container"
v-else
>
<Item
v-for=
"(item, index) in appointmentList"
:item=
"item"
:key=
"index"
listType=
'2'
:id=
"id"
/>
</div>
</div>
</div>
</div>
<!-- 新卡-初始对话框 -->
<!-- 新卡-初始对话框 -->
<a-modal
<a-modal
...
@@ -86,7 +89,8 @@ export default {
...
@@ -86,7 +89,8 @@ export default {
date
:
'
2021-11-18
'
,
date
:
'
2021-11-18
'
,
},
},
],
],
packageList
:[]
//待预约列表
packageList
:[],
//待预约列表
appointmentList
:[]
//已预约列表
}
}
},
},
created
()
{
created
()
{
...
@@ -123,15 +127,21 @@ export default {
...
@@ -123,15 +127,21 @@ export default {
if
(
res
.
returnCode
==
'
0000
'
)
{
if
(
res
.
returnCode
==
'
0000
'
)
{
console
.
log
(
'
获取待预约==
'
,
res
.
content
)
console
.
log
(
'
获取待预约==
'
,
res
.
content
)
this
.
packageList
=
res
.
content
this
.
packageList
=
res
.
content
}
else
{
}
this
.
$message
.
error
(
res
.
returnMsg
)
// else {
}
// this.$message.error(res.returnMsg)
// }
})
})
},
},
// 获取已预约列表
// 获取已预约列表
getAppointmentList
()
{
getAppointmentList
()
{
api
.
getAppointmentList
({
id
:
parseInt
(
this
.
id
)
}).
then
((
res
)
=>
{
api
.
getAppointmentList
({
id
:
parseInt
(
this
.
id
)
}).
then
((
res
)
=>
{
console
.
log
(
'
获取已预约列表
'
,
res
)
if
(
res
.
returnCode
==
'
0000
'
)
{
console
.
log
(
'
获取已预约列表==
'
,
res
.
content
)
this
.
appointmentList
=
res
.
content
}
else
{
this
.
$message
.
error
(
res
.
returnMsg
)
}
})
})
},
},
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment