Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
Project
Project
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
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
365439ea
Commit
365439ea
authored
Mar 07, 2019
by
liboyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成任务单
parent
79923c56
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
255 additions
and
49 deletions
+255
-49
policeList.html
src/main/resources/static/dialogs/policeList.html
+31
-0
app.js
src/main/resources/static/js/app.js
+27
-2
service.js
src/main/resources/static/js/service.js
+28
-0
createTaskList.html
...resources/static/views/createTaskList/createTaskList.html
+71
-44
createTaskList.js
...n/resources/static/views/createTaskList/createTaskList.js
+98
-3
No files found.
src/main/resources/static/dialogs/policeList.html
View file @
365439ea
<style>
.table
th
,
.table
td
{
text-align
:
center
;
vertical-align
:
middle
!important
;
}
.ul
li
{
cursor
:
pointer
;
}
.page-list
.pagination
{
float
:
left
;}
.page-list
.pagination
span
{
cursor
:
pointer
;}
.page-list
.pagination
.separate
span
{
cursor
:
default
;
border-top
:
none
;
border-bottom
:
none
;}
.page-list
.pagination
.separate
span
:hover
{
background
:
none
;}
.page-list
.page-total
{
float
:
left
;
margin
:
25px
20px
;}
.page-list
.page-total
input
,
.page-list
.page-total
select
{
height
:
26px
;
border
:
1px
solid
#ddd
;}
.page-list
.page-total
input
{
width
:
40px
;
padding-left
:
3px
;}
.page-list
.page-total
select
{
width
:
50px
;}
.page-list
:after
{
display
:
block
;
clear
:
both
;
content
:
""
}
.page-list
{
zoom
:
1
}
</style>
<div
class=
"ui-dialog-title"
>
组号详情
</div>
...
...
@@ -6,6 +31,7 @@
<table
class=
"table"
style=
"border-color: black;"
>
<thead>
<tr>
<th><input
type=
"checkbox"
></th>
<th>
组号
</th>
<th>
合格数量
</th>
<th>
不合格数量
</th>
...
...
@@ -17,6 +43,7 @@
</thead>
<tbody>
<tr
ng-repeat=
"groups in policeList"
>
<td><input
type=
"checkbox"
></td>
<td>
{{groups.GROUP_NO}}
</td>
<td>
{{groups.VALID_COUNT}}
</td>
<td>
{{groups.INVALID_COUNT}}
</td>
...
...
@@ -30,4 +57,7 @@
</tr>
</tbody>
</table>
<div
style=
"padding-left: 27%;"
>
<tm-pagination
conf=
"paginationConf"
class=
"ul"
></tm-pagination>
</div>
</div>
\ No newline at end of file
src/main/resources/static/js/app.js
View file @
365439ea
...
...
@@ -219,6 +219,31 @@ angular.module('AvatarCheck', [
return
permanentPositionDate
;
}
}
})
;
}).
filter
(
'myDate2StringFilter'
,
function
()
{
//可以注入依赖
return
function
Format
(
datetime
,
fmt
)
{
if
(
parseInt
(
datetime
)
==
datetime
)
{
if
(
datetime
.
length
==
10
)
{
datetime
=
parseInt
(
datetime
)
*
1000
;
}
else
if
(
datetime
.
length
==
13
)
{
datetime
=
parseInt
(
datetime
);
}
}
datetime
=
new
Date
(
datetime
);
var
o
=
{
"M+"
:
datetime
.
getMonth
()
+
1
,
//月份
"d+"
:
datetime
.
getDate
(),
//日
"h+"
:
datetime
.
getHours
(),
//小时
"m+"
:
datetime
.
getMinutes
(),
//分
"s+"
:
datetime
.
getSeconds
(),
//秒
"q+"
:
Math
.
floor
((
datetime
.
getMonth
()
+
3
)
/
3
),
//季度
"S"
:
datetime
.
getMilliseconds
()
//毫秒
};
if
(
/
(
y+
)
/
.
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
datetime
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
for
(
var
k
in
o
)
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
RegExp
.
$1
.
length
==
1
)
?
(
o
[
k
])
:
((
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
)));
return
fmt
;
}
});
src/main/resources/static/js/service.js
View file @
365439ea
...
...
@@ -404,6 +404,33 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
console
.
log
(
response
.
data
)
success
(
response
.
data
)
})
},
getGroupListData
:
function
(
saveDate
,
countyCode
,
typeCode
,
currPage
,
pageSize
,
success
){
$http
({
method
:
'GET'
,
url
:
"../TaskList/queryByGroupNoAtACCU"
+
urlTimeStamp
(),
params
:{
date
:
saveDate
,
typeCode
:
typeCode
,
countyCode
:
countyCode
,
currPage
:
currPage
,
pageSize
:
pageSize
}
}).
then
(
function
successCallback
(
response
)
{
console
.
log
(
response
.
data
)
success
(
response
.
data
)
})
},
createTask
:
function
(
data
,
success
){
var
body
=
JSON
.
stringify
(
data
);
$http
({
method
:
'POST'
,
url
:
"../TaskList/createTask"
,
data
:
body
,
headers
:
{
'Content-Type'
:
'application/json'
}
}).
then
(
function
successCallback
(
response
)
{
success
(
response
.
data
)
})
}
}
});
\ No newline at end of file
src/main/resources/static/views/createTaskList/createTaskList.html
View file @
365439ea
<style>
.table
th
,
.table
td
{
text-align
:
center
;
vertical-align
:
middle
!important
;
}
.ul
li
{
cursor
:
pointer
;
}
.page-list
.pagination
{
float
:
left
;}
.page-list
.pagination
span
{
cursor
:
pointer
;}
.page-list
.pagination
.separate
span
{
cursor
:
default
;
border-top
:
none
;
border-bottom
:
none
;}
.page-list
.pagination
.separate
span
:hover
{
background
:
none
;}
.page-list
.page-total
{
float
:
left
;
margin
:
25px
20px
;}
.page-list
.page-total
input
,
.page-list
.page-total
select
{
height
:
26px
;
border
:
1px
solid
#ddd
;}
.page-list
.page-total
input
{
width
:
40px
;
padding-left
:
3px
;}
.page-list
.page-total
select
{
width
:
50px
;}
.page-list
:after
{
display
:
block
;
clear
:
both
;
content
:
""
}
.page-list
{
zoom
:
1
}
</style>
<div
class=
"content row"
>
<div
class=
"col-md-12"
style=
"margin-top:20px;"
>
<div
class=
"row"
>
...
...
@@ -17,48 +43,52 @@
<div
class=
"box-body"
>
<div
ng-if=
"cycleSheetData.length>0"
>
<div
class=
"nav-tabs-custom clearfix"
style=
"margin-bottom: 0;"
>
<ul
class=
"nav nav-tabs"
>
<li
ng-class=
"{true: 'active', false: 'inactive'}[tab.isActive]"
ng-repeat=
"tab in cycleSheetData track by $index"
>
<a
ng-click=
"func($index,tab.typeCode)"
>
<ul
style=
"margin: 0;padding: 0;"
>
<li
style=
"font-size: 16px;"
>
{{tab.typeName}}
</li>
<li
style=
"text-align: center;"
>
{{tab.typeSum}}
</li>
</ul>
</a>
</li>
</ul>
</div>
<ul
class=
"nav nav-tabs"
>
<li
ng-class=
"{true: 'active', false: 'inactive'}[tab.isActive]"
ng-repeat=
"tab in cycleSheetData track by $index"
>
<a
ng-click=
"func($index,tab.typeCode)"
>
<ul
style=
"margin: 0;padding: 0;"
>
<li
style=
"font-size: 16px;"
>
{{tab.typeName}}
</li>
<li
style=
"text-align: center;"
>
{{tab.typeSum}}
</li>
</ul>
</a>
</li>
</ul>
</div>
<div
ng-repeat=
"type in cycleSheetData track by $index"
class=
"table-responsive mailbox-messages"
ng-show=
"currentTab==$index"
>
<table
class=
"table table-hover table-striped"
>
<thead>
<tr>
<th><input
type=
"checkbox"
></th>
<th>
保存日期
</th>
<th>
地区
</th>
<th>
组数
</th>
<th>
受理组号
</th>
<th>
合格数量
</th>
<th>
不合格数量
</th>
<th></th>
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"task in type.countyList"
>
<td><input
type=
"checkbox"
class=
"icheckbox_flat-blue"
></td>
<td
class=
"mailbox-star"
><b>
{{task.saveDate | date:'yyyy-MM-dd'}}
</b></td>
<td
class=
"mailbox-name"
><a>
{{task.countyName}}
</a></td>
<td
class=
"mailbox-subject"
>
{{task.groupCount}}
</td>
<td
class=
"mailbox-subject"
>
{{task.groupNum}}
</td>
<td
class=
"mailbox-attachment"
>
{{task.countyValidCount}}
</td>
<td
class=
"mailbox-date"
>
{{task.countyInvalidCount}}
</td>
<td
class=
"mailbox-date"
><a
ng-click=
"getPoliceList(task.groupList)"
>
组号列表
</a></td>
</tr>
<table
class=
"table table-hover"
>
<thead>
<tr>
<th><input
type=
"checkbox"
ng-click=
"selectAll(type.countyList,$event)"
ng-checked=
"isSelectedAll($index)"
></th>
<th>
保存日期
</th>
<th>
地区
</th>
<th>
组数
</th>
<th>
受理组号
</th>
<th>
合格数量
</th>
<th>
不合格数量
</th>
<th></th>
</tr>
</thead>
<tbody
ng-repeat=
"task in type.countyList"
>
<tr>
<td><input
type=
"checkbox"
class=
"checkOneBox"
ng-checked=
"isSelected(task)"
value=
"{{task.valid}}"
ng-click=
"updateSelection($event,task)"
></td>
<td
class=
"mailbox-star"
><b>
{{task.saveDate | date:'yyyy-MM-dd'}}
</b></td>
<td
class=
"mailbox-name"
><a>
{{task.countyName}}
</a></td>
<td
class=
"mailbox-subject"
>
{{task.groupCount}}
</td>
<td
class=
"mailbox-subject"
>
{{task.groupNum}}
</td>
<td
class=
"mailbox-attachment"
>
{{task.countyValidCount}}
</td>
<td
class=
"mailbox-date"
>
{{task.countyInvalidCount}}
</td>
<td
class=
"mailbox-date"
><a
ng-click=
"getPoliceList(task.countyCode,type.typeCode)"
>
组号列表
</a></td>
</tr>
</tbody>
</table>
<!-- /.table -->
<div
class=
"box-footer"
style=
"text-align: right;"
>
<button
class=
"btn btn-primary"
ng-click=
"createTaskList(type.typeCode)"
>
创建任务单
</button>
<button
class=
"btn btn-primary"
>
下发任务单
</button>
</div>
</div>
</tbody>
</table>
<!-- /.table -->
</div>
</div>
<div
ng-if=
"cycleSheetData.length==0"
>
<h4>
暂无数据
</h4>
...
...
@@ -66,10 +96,7 @@
<!-- /.mail-box-messages -->
</div>
<!-- /.box-body -->
<div
class=
"box-footer"
style=
"text-align: right;"
ng-if=
"cycleSheetData.length>0"
>
<button
class=
"btn btn-primary"
>
创建任务单
</button>
<button
class=
"btn btn-primary"
>
下发任务单
</button>
</div>
</div>
<!-- /. box -->
</div>
...
...
src/main/resources/static/views/createTaskList/createTaskList.js
View file @
365439ea
...
...
@@ -20,6 +20,8 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
autoclose
:
1
});
$scope
.
choseDate
=
$filter
(
"date"
)(
new
Date
(),
"yyyy-MM-dd"
);
...
...
@@ -52,17 +54,110 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
$scope
.
currentTab
=
index
;
}
$scope
.
getPoliceList
=
function
(
groupList
){
$scope
.
getPoliceList
=
function
(
countyCode
,
typeCode
){
ngDialog
.
open
({
template
:
'dialogs/policeList.html'
+
urlTimeStamp
(),
width
:
800
,
cache
:
false
,
closeByDocument
:
false
,
controller
:
[
'$scope'
,
function
(
$scope
)
{
$scope
.
policeList
=
groupList
;
controller
:
[
'$scope'
,
'HttpService'
,
function
(
$scope
,
HttpService
)
{
console
.
log
(
$
(
'#datepicker'
).
val
(),
countyCode
,
typeCode
);
$scope
.
paginationConf
=
{
currentPage
:
1
,
itemsPerPage
:
10
,
perPageOptions
:
[
10
,
20
,
30
,
40
,
50
]
};
var
getGroupInfoList
=
function
()
{
HttpService
.
getGroupListData
(
$
(
'#datepicker'
).
val
(),
countyCode
,
typeCode
,
$scope
.
paginationConf
.
currentPage
,
$scope
.
paginationConf
.
itemsPerPage
,
function
(
data
){
$scope
.
paginationConf
.
totalItems
=
data
.
count
;
$scope
.
policeList
=
data
.
groupList
;
})
}
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope
.
$watch
(
'paginationConf.currentPage +paginationConf.itemsPerPage'
,
getGroupInfoList
);
}]
});
}
//创建变量用来保存选中结果
$scope
.
selected
=
[];
var
updateSelected
=
function
(
action
,
task
)
{
if
(
action
===
'add'
&&
$scope
.
selected
.
indexOf
(
task
)
===
-
1
)
{
$scope
.
selected
.
push
(
task
);
}
if
(
action
===
'remove'
&&
$scope
.
selected
.
indexOf
(
task
)
!==
-
1
)
$scope
.
selected
.
splice
(
$scope
.
selected
.
indexOf
(
task
),
1
);
};
//更新某一列数据的选择
var
temp
=
0
;
$rootScope
.
cardsTotal
=
0
;
$scope
.
updateSelection
=
function
(
$event
,
task
)
{
var
checkbox
=
$event
.
target
;
var
action
=
(
checkbox
.
checked
?
'add'
:
'remove'
);
updateSelected
(
action
,
task
);
var
sum
=
0
;
var
checks
=
document
.
getElementsByClassName
(
"checkOneBox"
);
for
(
var
i
=
0
;
i
<
checks
.
length
;
i
++
){
if
(
checks
[
i
].
checked
)
{
sum
+=
parseInt
(
checks
[
i
].
value
);
}
}
$rootScope
.
cardsTotal
=
$rootScope
.
cardsTotal
+
sum
-
temp
;
temp
=
sum
;
};
//全选操作
$scope
.
selectAll
=
function
(
task
,
$event
)
{
var
checkbox
=
$event
.
target
;
var
action
=
(
checkbox
.
checked
?
'add'
:
'remove'
);
for
(
var
i
=
0
;
i
<
task
.
length
;
i
++
)
{
var
contact
=
task
[
i
];
updateSelected
(
action
,
contact
);
}
if
(
checkbox
.
checked
){
var
sum
=
0
;
var
checks
=
document
.
getElementsByClassName
(
"checkOneBox"
);
for
(
var
i
=
0
;
i
<
checks
.
length
;
i
++
)
{
sum
+=
parseInt
(
checks
[
i
].
value
);
}
$rootScope
.
cardsTotal
=
$rootScope
.
cardsTotal
+
sum
-
temp
;
temp
=
sum
;
}
else
{
$rootScope
.
cardsTotal
=
0
;
temp
=
0
;
}
};
$scope
.
isSelected
=
function
(
task
)
{
return
$scope
.
selected
.
indexOf
(
task
)
>=
0
;
};
$scope
.
isSelectedAll
=
function
(
index
)
{
return
$scope
.
selected
.
length
===
$scope
.
cycleSheetData
[
index
].
countyList
.
length
>
0
;
};
$scope
.
createTaskList
=
function
(
typeCode
){
var
arr
=
[];
for
(
var
i
=
0
;
i
<
$scope
.
selected
.
length
;
i
++
){
var
json
=
{
countyCode
:
$scope
.
selected
[
i
].
countyCode
,
typeCode
:
typeCode
}
arr
.
push
(
json
);
}
var
groupList
=
[];
var
map
=
{
date
:
$
(
'#datepicker'
).
val
(),
name
:
$rootScope
.
loginData
.
name
,
countyList
:
arr
,
groupList
:
groupList
}
HttpService
.
createTask
(
map
,
function
(
data
){
console
.
log
(
data
);
})
}
});
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