Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
work-order-system
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
xueyuanyuan
work-order-system
Commits
065b58b1
Commit
065b58b1
authored
Jul 26, 2018
by
Jie Feng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logic change
parent
e481d8f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
29 deletions
+106
-29
index.html
index.html
+19
-14
index.js
js/index.js
+87
-15
No files found.
index.html
View file @
065b58b1
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
<a href="#"><i class="fa fa-upload" aria-hidden="true"></i>备用上传</a>
<a href="#"><i class="fa fa-upload" aria-hidden="true"></i>备用上传</a>
<a href="#"><i class="fa fa-upload" aria-hidden="true"></i>海外收款</a>-->
<a href="#"><i class="fa fa-upload" aria-hidden="true"></i>海外收款</a>-->
<a
href=
"#"
class=
"user-img"
><img
src=
"./images/avatar.jpg"
alt=
""
>
admin
</a>
<a
href=
"#"
class=
"user-img"
><img
src=
"./images/avatar.jpg"
alt=
""
>
admin
</a>
<a
href=
"#"
><i
class=
"fa fa-upload"
aria-hidden=
"true"
></i>
退出
</a>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -136,11 +137,11 @@
...
@@ -136,11 +137,11 @@
</div>
</div>
</div>
</div>
<div
class=
"panel panel-default"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
role=
"tab"
id=
"headingFive"
>
<div
class=
"panel-heading"
role=
"tab"
data-toggle=
"collapse"
id=
"headingFive"
>
<h4
class=
"panel-title"
>
<h4
class=
"panel-title"
>
<a
class=
"collapsed"
role=
"button"
data-toggle=
"collapse"
data-parent=
"#accordion"
<a
class=
"collapsed"
role=
"button"
data-toggle=
"collapse"
data-parent=
"#accordion"
href=
"#collapseFive"
aria-expanded=
"
fals
e"
aria-controls=
"collapseFive"
>
href=
"#collapseFive"
aria-expanded=
"
tru
e"
aria-controls=
"collapseFive"
>
<i
class=
"fa fa-bookmark"
aria-hidden=
"
tru
e"
></i>
工单管理
<i
<i
class=
"fa fa-bookmark"
aria-hidden=
"
fals
e"
></i>
工单管理
<i
class=
"fa fa-angle-left right"
aria-hidden=
"true"
></i>
class=
"fa fa-angle-left right"
aria-hidden=
"true"
></i>
</a>
</a>
</h4>
</h4>
...
@@ -164,15 +165,19 @@
...
@@ -164,15 +165,19 @@
<button
type=
"button"
class=
"btn btn-default"
>
回访
</button>
<button
type=
"button"
class=
"btn btn-default"
>
回访
</button>
<!--<button type="button" class="btn btn-default else">其他</button>-->
<!--<button type="button" class="btn btn-default else">其他</button>-->
</div>
</div>
<div
class=
"status"
id=
"workStatus"
>
<div
class=
"status"
id=
"workStatus"
>
工作状态:
<select
name=
"status"
id=
""
>
工作状态:
<option
value=
""
>
空闲中
</option>
<select
@
change=
"updateWOStatus"
>
<option
value=
""
>
下班
</option>
<option
v-for=
"(item,index) in woStates"
:value=
'index'
>
{{item.text}}
<option
value=
""
>
挂起
</option>
</option>
<option
value=
""
>
接待中
</option>
</select>
<option
value=
""
>
会议中
</option>
<!--
<option
value=
""
>
午饭中
</option>
<option value=''>空闲中</option>
</select>
<option value='' >下班</option>
<option value='' >挂起</option>
<option value='' >接待中</option>
<option value='' >会议中</option>
<option value='' >午饭中</option>-->
</div>
</div>
<ul
id=
"statusTab"
class=
"nav nav-tabs"
role=
"tablist"
>
<ul
id=
"statusTab"
class=
"nav nav-tabs"
role=
"tablist"
>
<li
role=
"presentation"
class=
"active"
><a
href=
"#home"
id=
"home-tab"
role=
"tab"
data-toggle=
"tab"
<li
role=
"presentation"
class=
"active"
><a
href=
"#home"
id=
"home-tab"
role=
"tab"
data-toggle=
"tab"
...
@@ -186,7 +191,7 @@
...
@@ -186,7 +191,7 @@
aria-controls=
"myTabDrop1-contents"
aria-expanded=
"false"
v-on:click=
"processed()"
>
已完结
</a>
aria-controls=
"myTabDrop1-contents"
aria-expanded=
"false"
v-on:click=
"processed()"
>
已完结
</a>
</li>
</li>
</ul>
</ul>
<div
class=
"detail"
id=
"numCount"
>
第1-
2
0条,共{{message}}条数据
</div>
<div
class=
"detail"
id=
"numCount"
>
第1-
1
0条,共{{message}}条数据
</div>
<!-- 表格 -->
<!-- 表格 -->
<table
class=
"table"
id=
"order-list"
>
<table
class=
"table"
id=
"order-list"
>
...
@@ -222,7 +227,7 @@
...
@@ -222,7 +227,7 @@
<nav
aria-label=
"..."
id=
"pager"
>
<nav
aria-label=
"..."
id=
"pager"
>
<ul
class=
"pager"
>
<ul
class=
"pager"
>
<li><a
href=
"#"
v-on:click=
"prePage()"
>
上一页
</a></li>
<li><a
href=
"#"
v-on:click=
"prePage()"
>
上一页
</a></li>
<li><span>
{{curPage}}
</span>
/
<span>
20
</span></li>
<li><span>
{{curPage}}
</span>
/
<span>
{{totalPage}}
</span></li>
<li><a
href=
"#"
v-on:click=
"nextPage()"
>
下一页
</a></li>
<li><a
href=
"#"
v-on:click=
"nextPage()"
>
下一页
</a></li>
</ul>
</ul>
</nav>
</nav>
...
...
js/index.js
View file @
065b58b1
jQuery
(
document
).
ready
(
function
(
$
)
{
jQuery
(
document
).
ready
(
function
(
$
)
{
// 工单列表逻辑
// 工单列表逻辑
var
orderList
=
new
Vue
({
var
orderList
=
new
Vue
({
...
@@ -15,7 +15,7 @@ jQuery(document).ready(function($) {
...
@@ -15,7 +15,7 @@ jQuery(document).ready(function($) {
"id"
:
wo
.
id
,
"id"
:
wo
.
id
,
"woStatus"
:
wo
.
woStatus
,
"woStatus"
:
wo
.
woStatus
,
"woType"
:
wo
.
woType
,
"woType"
:
wo
.
woType
,
"woProcessUid"
:
''
"woProcessUid"
:
''
}
}
);
);
$
.
ajax
({
$
.
ajax
({
...
@@ -27,6 +27,14 @@ jQuery(document).ready(function($) {
...
@@ -27,6 +27,14 @@ jQuery(document).ready(function($) {
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
res
);
console
.
log
(
res
);
orderList
.
workOrders
=
res
.
data
.
list
;
orderList
.
workOrders
=
res
.
data
.
list
;
// 计算页数
if
(
Math
.
round
(
res
.
data
.
total
%
res
.
data
.
size
)
==
0
)
{
pager
.
totalPage
=
Math
.
round
(
res
.
data
.
total
/
res
.
data
.
size
);
}
else
{
console
.
log
(
res
.
data
.
total
/
res
.
data
.
size
);
pager
.
totalPage
=
Math
.
round
(
res
.
data
.
total
/
res
.
data
.
size
)
+
1
;
}
},
},
fail
:
function
(
msg
)
{
fail
:
function
(
msg
)
{
console
.
log
(
msg
);
console
.
log
(
msg
);
...
@@ -39,12 +47,12 @@ jQuery(document).ready(function($) {
...
@@ -39,12 +47,12 @@ jQuery(document).ready(function($) {
})
})
function
initLoadWO
()
{
function
initLoadWO
()
{
var
url
=
"/work/wo/list?page=1&limit=
2
0"
;
var
url
=
"/work/wo/list?page=1&limit=
1
0"
;
var
data
=
JSON
.
stringify
({
var
data
=
JSON
.
stringify
({
"reqDto"
:
{
"reqDto"
:
{
"woStatus"
:
0
,
"woStatus"
:
0
,
"woType"
:
"revisit"
,
"woType"
:
"revisit"
,
"woProcessUid"
:
''
"woProcessUid"
:
''
}
}
});
});
$
.
ajax
({
$
.
ajax
({
...
@@ -57,6 +65,14 @@ jQuery(document).ready(function($) {
...
@@ -57,6 +65,14 @@ jQuery(document).ready(function($) {
console
.
log
(
res
);
console
.
log
(
res
);
orderList
.
workOrders
=
res
.
data
.
list
;
orderList
.
workOrders
=
res
.
data
.
list
;
numCount
.
message
=
res
.
data
.
total
;
numCount
.
message
=
res
.
data
.
total
;
// 计算页数
if
(
Math
.
round
(
res
.
data
.
total
%
res
.
data
.
size
)
==
0
)
{
pager
.
totalPage
=
Math
.
round
(
res
.
data
.
total
/
res
.
data
.
size
);
}
else
{
console
.
log
(
res
.
data
.
total
/
res
.
data
.
size
);
pager
.
totalPage
=
Math
.
round
(
res
.
data
.
total
/
res
.
data
.
size
)
+
1
;
}
}
}
});
});
}
}
...
@@ -69,36 +85,77 @@ jQuery(document).ready(function($) {
...
@@ -69,36 +85,77 @@ jQuery(document).ready(function($) {
// 员工工作状态逻辑
// 员工工作状态逻辑
var
workStatus
=
new
Vue
({
var
workStatus
=
new
Vue
({
el
:
'#workStatus'
,
el
:
'#workStatus'
,
selected
:
{},
methods
:
{
updateWOStatus
:
function
(
val
)
{
console
.
log
(
'updateWOStatus:'
+
val
.
target
.
value
);
var
url
=
"/work/ws/update"
;
var
data
=
JSON
.
stringify
({
"woStatus"
:
val
.
target
.
value
,
"statusDisplay"
:
""
,
"userId"
:
'1'
});
$
.
ajax
({
url
:
url
,
dataType
:
"json"
,
data
:
data
,
type
:
'post'
,
contentType
:
"application/json; charset=utf-8"
,
success
:
function
(
res
)
{
console
.
log
(
res
);
console
.
log
(
"用户状态修改成功!"
);
}
});
}
},
data
:
{
data
:
{
curStatus
:
'下班'
woStates
:
[
{
value
:
0
,
text
:
'空闲中'
},
{
value
:
1
,
text
:
'下班'
},
{
value
:
2
,
text
:
'挂起'
},
{
value
:
3
,
text
:
'接待中'
},
{
value
:
4
,
text
:
'会议中'
},
{
value
:
5
,
text
:
'午饭中'
}
]
}
}
})
})
// 数据提示条
// 数据提示条
var
numCount
=
new
Vue
({
var
numCount
=
new
Vue
({
el
:
'#numCount'
,
el
:
'#numCount'
,
data
:
{
data
:
{
message
:
"100"
message
:
"100"
}
}
})
})
// 页面分页按钮逻辑
// 页面分页按钮逻辑
var
pager
=
new
Vue
({
var
pager
=
new
Vue
({
el
:
'#pager'
,
el
:
'#pager'
,
data
:
{
data
:
{
curPage
:
1
curPage
:
1
,
totalPage
:
1
},
},
methods
:
{
methods
:
{
prePage
:
function
()
{
prePage
:
function
()
{
this
.
curPage
=
this
.
curPage
-
1
;
if
(
this
.
curPage
-
1
<
1
)
{
return
;
}
else
{
this
.
curPage
=
this
.
curPage
-
1
;
}
},
},
nextPage
:
function
()
{
nextPage
:
function
()
{
this
.
curPage
=
this
.
curPage
+
1
;
if
(
this
.
curPage
+
1
>
this
.
totalPage
)
{
return
;
}
else
{
this
.
curPage
=
this
.
curPage
+
1
;
}
}
}
}
}
})
})
// 工单状态选择Tab逻辑
// 工单状态选择Tab逻辑
var
url
=
"/work/wo/list?page=1&limit=
2
0"
;
var
url
=
"/work/wo/list?page=1&limit=
1
0"
;
var
statusTab
=
new
Vue
({
var
statusTab
=
new
Vue
({
el
:
'#statusTab'
,
el
:
'#statusTab'
,
methods
:
{
methods
:
{
...
@@ -107,7 +164,7 @@ jQuery(document).ready(function($) {
...
@@ -107,7 +164,7 @@ jQuery(document).ready(function($) {
{
{
"woStatus"
:
0
,
"woStatus"
:
0
,
"woType"
:
"revisit"
,
"woType"
:
"revisit"
,
"woProcessUid"
:
''
"woProcessUid"
:
''
}
}
);
);
$
.
ajax
({
$
.
ajax
({
...
@@ -117,7 +174,15 @@ jQuery(document).ready(function($) {
...
@@ -117,7 +174,15 @@ jQuery(document).ready(function($) {
type
:
'post'
,
type
:
'post'
,
contentType
:
"application/json; charset=utf-8"
,
contentType
:
"application/json; charset=utf-8"
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
res
);
orderList
.
workOrders
=
res
.
data
.
list
;
orderList
.
workOrders
=
res
.
data
.
list
;
// 计算页数
if
(
res
.
data
.
total
%
res
.
data
.
size
==
0
)
{
pager
.
totalPage
=
Math
.
round
(
res
.
data
.
total
/
res
.
data
.
size
);
}
else
{
console
.
log
(
res
.
data
.
total
/
res
.
data
.
size
);
pager
.
totalPage
=
Math
.
round
(
res
.
data
.
total
/
res
.
data
.
size
)
+
1
;
}
},
},
fail
:
function
(
msg
)
{
fail
:
function
(
msg
)
{
console
.
log
(
"Error happened, Please contact Administrator. "
+
msg
);
console
.
log
(
"Error happened, Please contact Administrator. "
+
msg
);
...
@@ -127,10 +192,10 @@ jQuery(document).ready(function($) {
...
@@ -127,10 +192,10 @@ jQuery(document).ready(function($) {
},
},
processed
:
function
()
{
processed
:
function
()
{
var
data
=
JSON
.
stringify
(
var
data
=
JSON
.
stringify
(
{
{
"woStatus"
:
1
,
"woStatus"
:
1
,
"woType"
:
"revisit"
,
"woType"
:
"revisit"
,
"woProcessUid"
:
''
"woProcessUid"
:
''
}
}
);
);
$
.
ajax
({
$
.
ajax
({
...
@@ -142,6 +207,13 @@ jQuery(document).ready(function($) {
...
@@ -142,6 +207,13 @@ jQuery(document).ready(function($) {
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
res
);
console
.
log
(
res
);
orderList
.
workOrders
=
res
.
data
.
list
;
orderList
.
workOrders
=
res
.
data
.
list
;
// 计算页数
if
(
Math
.
round
(
res
.
data
.
total
%
res
.
data
.
size
)
==
0
)
{
pager
.
totalPage
=
Math
.
round
(
res
.
data
.
total
/
res
.
data
.
size
);
}
else
{
console
.
log
(
res
.
data
.
total
/
res
.
data
.
size
);
pager
.
totalPage
=
Math
.
round
(
res
.
data
.
total
/
res
.
data
.
size
)
+
1
;
}
},
},
fail
:
function
(
msg
)
{
fail
:
function
(
msg
)
{
console
.
log
(
msg
);
console
.
log
(
msg
);
...
...
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