Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.portalStaticPage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f68cd453
authored
2020-12-21 10:10:20 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:预约列表
1 parent
aadb19d6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
21 deletions
staticCss/wdyy.css
staticJs/businessGuideDeatil.js
staticJs/wdyy.js
staticCss/wdyy.css
View file @
f68cd45
...
...
@@ -175,6 +175,7 @@
line-height
:
40px
;
text-align
:
center
;
margin
:
0
auto
;
cursor
:
pointer
;
}
#page
{
text-align
:
center
;
...
...
staticJs/businessGuideDeatil.js
View file @
f68cd45
$
(
function
()
{
_initData
()
if
(
GetQueryString
(
'id'
))
{
_initData
();
}
else
{
_getBsznDetailByYwid
();
}
})
layui
.
use
(
'element'
,
function
()
{
...
...
@@ -26,6 +30,29 @@ function _initData() {
}
});
}
// 通过业务ID获取对应的办事指南明细
function
_getBsznDetailByYwid
()
{
var
newsDetail
=
$
(
"#newsDetail"
);
newsDetail
.
empty
();
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/portal/MhGuide/getBsznDetailByYwid"
,
//路径
data
:
{
"ywid"
:
GetQueryString
(
'ywid'
),
},
dataType
:
"json"
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
&&
result
.
data
!=
null
)
{
$
(
'.newsTitle'
).
html
(
result
.
data
.
headline
)
$
(
'.releaseTime'
).
html
(
result
.
data
.
publishTime
)
newsDetail
.
append
(
result
.
data
.
content
)
}
}
});
}
function
GetQueryString
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
...
...
staticJs/wdyy.js
View file @
f68cd45
layui
.
use
(
'element'
,
function
()
{
let
element
=
layui
.
element
;
//导航的hover效果、二级菜单等功能,需要依赖element模块
//监听导航点击
element
.
on
(
'nav(demo)'
,
function
(
elem
)
{
//console.log(elem)
layer
.
msg
(
elem
.
text
());
});
});
$
(
function
()
{
_initData
();
...
...
@@ -12,11 +7,11 @@ $(function () {
$
(
'#username'
).
text
(
getCookie
().
username
);
$
(
document
).
on
(
"click"
,
".business"
,
function
(
e
)
{
window
.
open
(
"./businessGuideDeatil.html?
id="
+
$
(
this
).
attr
(
'ywid'
)
+
""
)
window
.
open
(
"./businessGuideDeatil.html?yw
id="
+
$
(
this
).
attr
(
'ywid'
)
+
""
)
})
})
// 获取列表信息
function
_initData
(
currentPage
=
1
)
{
function
_initData
(
currentPage
=
1
)
{
var
appointment_list
=
$
(
".appointment_list"
);
appointment_list
.
empty
();
var
li
;
...
...
@@ -41,28 +36,28 @@ function _initData(currentPage=1) {
li
+=
'<h3>预约成功</h3>'
li
+=
'<a href="./yyjg.html">查看<i class="layui-icon layui-icon-right"></i></a>'
li
+=
'</div>'
}
else
if
(
records
[
i
].
state
==
'1'
)
{
}
else
if
(
records
[
i
].
state
==
'1'
)
{
li
+=
'<div class="item_title success">'
li
+=
'<h3>已赴约</h3>'
li
+=
'</div>'
}
else
if
(
records
[
i
].
state
==
'2'
)
{
}
else
if
(
records
[
i
].
state
==
'2'
)
{
li
+=
'<div class="item_title overdue">'
li
+=
'<h3>已逾期</h3>'
li
+=
'</div>'
}
else
if
(
records
[
i
].
state
==
'3'
||
records
[
i
].
state
==
'4'
)
{
}
else
if
(
records
[
i
].
state
==
'3'
||
records
[
i
].
state
==
'4'
)
{
li
+=
'<div class="item_title cancel">'
li
+=
'<h3>已取消预约</h3>'
li
+=
'</div>'
}
li
+=
'<ul class="item_info">'
li
+=
'<li><span>预约人:</span><p>'
+
records
[
i
].
name
+
'</p></li>'
li
+=
'<li><span>办事大厅:</span><p>'
+
records
[
i
].
organizationName
+
'</p></li>'
li
+=
'<li><span>办理业务类型:</span><p>'
+
records
[
i
].
businessName
+
'</p><a class="business" ywid="'
+
records
[
i
].
ywid
+
'">办事指南</a></li>'
li
+=
'<li><span>预约日期:</span><p>'
+
records
[
i
].
reserveTime
+
'</p></li>'
li
+=
'<li><span>预约流水号:</span><p>'
+
records
[
i
].
reservationNumber
+
'</p></li>'
li
+=
'<li><span>预约人:</span><p>'
+
records
[
i
].
name
+
'</p></li>'
li
+=
'<li><span>办事大厅:</span><p>'
+
records
[
i
].
organizationName
+
'</p></li>'
li
+=
'<li><span>办理业务类型:</span><p>'
+
records
[
i
].
businessName
+
'</p><a class="business" ywid="'
+
records
[
i
].
ywid
+
'">办事指南</a></li>'
li
+=
'<li><span>预约日期:</span><p>'
+
records
[
i
].
reserveTime
+
'</p></li>'
li
+=
'<li><span>预约流水号:</span><p>'
+
records
[
i
].
reservationNumber
+
'</p></li>'
li
+=
'</ul>'
if
(
records
[
i
].
state
==
'
1
'
)
{
li
+=
'<a class="cancel_reservation">取消预约</a>'
if
(
records
[
i
].
state
==
'
0
'
)
{
li
+=
'<a
periodRulesId="'
+
records
[
i
].
periodRulesId
+
'" jgid="'
+
records
[
i
].
jgid
+
'" appointmentId="'
+
records
[
i
].
appointmentId
+
'"
class="cancel_reservation">取消预约</a>'
}
li
+=
'</div>'
li
+=
'</li>'
...
...
@@ -75,6 +70,34 @@ function _initData(currentPage=1) {
});
}
// 用户取消预约
$
(
document
).
on
(
"click"
,
".cancel_reservation"
,
function
(
e
)
{
_cancleAppointment
(
$
(
this
).
attr
(
'appointmentId'
),
$
(
this
).
attr
(
'jgid'
),
$
(
this
).
attr
(
'periodRulesId'
),
getCookie
(
'myCookie'
).
userid
)
})
function
_cancleAppointment
(
appointmentId
,
jgid
,
periodRulesId
,
userid
)
{
$
.
ajax
({
type
:
"post"
,
//提交方式
url
:
portal
.
api_url
+
"/portal/appointmentmh/cancleAppointment"
,
//路径
dataType
:
"json"
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
,
},
data
:
JSON
.
stringify
({
'appointmentId'
:
appointmentId
,
'jgid'
:
jgid
,
'periodRulesId'
:
periodRulesId
,
'userid'
:
userid
}),
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
)
{
layer
.
msg
(
'取消预约成功'
);
_initData
();
}
}
});
}
// 分页
function
paged
(
pageCount
,
curr
)
{
...
...
@@ -90,7 +113,6 @@ function paged(pageCount, curr) {
,
theme
:
'#0091FF'
,
jump
:
function
(
obj
,
first
)
{
if
(
!
first
)
{
console
.
log
(
obj
.
curr
)
_initData
(
obj
.
curr
);
}
}
...
...
@@ -98,6 +120,6 @@ function paged(pageCount, curr) {
})
}
var
dataList
=
{
"userid"
:
getCookie
().
userid
var
dataList
=
{
"userid"
:
getCookie
().
userid
};
\ No newline at end of file
...
...
Please
register
or
sign in
to post a comment