Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_REFACTORING
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_REFACTORING
Commits
dcde98cb
Commit
dcde98cb
authored
Dec 27, 2018
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加添加废证页面
parent
f53684f7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
312 additions
and
9 deletions
+312
-9
config.router.js
src/main/resources/static/js/config.router.js
+12
-0
service.js
src/main/resources/static/js/services/service.js
+65
-7
addFailedCard.html
...ources/static/tpl/layout/addFailedCard/addFailedCard.html
+98
-0
addFailedCard.js
...esources/static/tpl/layout/addFailedCard/addFailedCard.js
+134
-0
cycleSheet.js
...main/resources/static/tpl/layout/cycleSheet/cycleSheet.js
+0
-2
receipt.js
src/main/resources/static/tpl/layout/receipt/receipt.js
+3
-0
No files found.
src/main/resources/static/js/config.router.js
View file @
dcde98cb
...
...
@@ -142,6 +142,18 @@ angular.module('app')
}]
}
})
.
state
(
'layout.addFailedCard'
,
{
url
:
'/addFailedCard'
,
templateUrl
:
'tpl/layout/addFailedCard/addFailedCard.html'
,
cache
:
false
,
controller
:
'addFailedCardCtrl'
,
resolve
:
{
deps
:
[
'uiLoad'
,
function
(
uiLoad
){
return
uiLoad
.
load
(
[
'tpl/layout/addFailedCard/addFailedCard.js'
]
);
}]
}
})
}
]
...
...
src/main/resources/static/js/services/service.js
View file @
dcde98cb
...
...
@@ -485,22 +485,79 @@ app.service('MessageService', function (ngDialog) {
MessageService
.
httpRequestFailed
(
JSON
.
stringify
(
errA
))
})
},
get
printReceipt
:
function
(
startTime
,
endTime
,
success
){
get
FailedType
:
function
(
success
){
$http
({
method
:
'GET'
,
url
:
"../user/printReceiptList"
+
urlTimeStamp
(),
params
:{
startDate
:
startTime
,
endDate
:
endTime
}
url
:
"../user/getFailedType"
+
urlTimeStamp
(),
}).
then
(
function
successCallback
(
response
)
{
console
.
log
(
response
.
data
,
"-------------response.data------"
)
success
(
response
.
data
)
},
function
(
err
){
var
errA
=
{
Error
:
true
,
ReturnCode
:
err
.
status
,
ReturnMsg
:
"API访问返回错误"
}
MessageService
.
httpRequestFailed
(
JSON
.
stringify
(
errA
))
})
}
},
saveFailedCardsID
:
function
(
success
){
$http
({
method
:
'GET'
,
url
:
"../yingxin/addInValidCardInfo"
+
urlTimeStamp
(),
}).
then
(
function
successCallback
(
response
)
{
console
.
log
(
response
.
data
,
"-------------response.data------"
)
success
(
response
.
data
)
},
function
(
err
){
var
errA
=
{
Error
:
true
,
ReturnCode
:
err
.
status
,
ReturnMsg
:
"API访问返回错误"
}
MessageService
.
httpRequestFailed
(
JSON
.
stringify
(
errA
))
})
},
getprintReceipt
:
function
(
startDate
,
endDate
,
success
)
{
$http
({
method
:
'GET'
,
url
:
"../user/printReceiptList"
+
urlTimeStamp
(),
params
:
{
startDate
:
startDate
,
endDate
:
endDate
},
headers
:
{
'Content-Type'
:
'application/json'
},
transformRequest
:
angular
.
identity
,
responseType
:
'arraybuffer'
,
}).
then
(
function
successCallback
(
response
)
{
if
(
response
.
data
.
Error
==
true
){
MessageService
.
httpRequestFailed
(
JSON
.
stringify
(
response
.
data
))
}
else
{
success
(
response
.
data
)
}
},
function
(
err
){
DebugService
.
debug
(
"$http error:"
,
err
)
DebugService
.
debug
(
"----------------------------------------------"
)
var
errA
=
{
Error
:
true
,
ReturnCode
:
err
.
status
,
ReturnMsg
:
"API访问返回错误"
}
MessageService
.
httpRequestFailed
(
JSON
.
stringify
(
errA
))
})
},
getPrintOfficialReceipt
:
function
(
startDate
,
endDate
,
success
)
{
$http
({
method
:
'GET'
,
url
:
"../user/printOfficialReceipt"
+
urlTimeStamp
(),
params
:
{
startDate
:
startDate
,
endDate
:
endDate
},
headers
:
{
'Content-Type'
:
'application/json'
},
transformRequest
:
angular
.
identity
,
responseType
:
'arraybuffer'
,
}).
then
(
function
successCallback
(
response
)
{
if
(
response
.
data
.
Error
==
true
){
MessageService
.
httpRequestFailed
(
JSON
.
stringify
(
response
.
data
))
}
else
{
success
(
response
.
data
)
}
},
function
(
err
){
DebugService
.
debug
(
"$http error:"
,
err
)
DebugService
.
debug
(
"----------------------------------------------"
)
var
errA
=
{
Error
:
true
,
ReturnCode
:
err
.
status
,
ReturnMsg
:
"API访问返回错误"
}
MessageService
.
httpRequestFailed
(
JSON
.
stringify
(
errA
))
})
},
}
}])
\ No newline at end of file
src/main/resources/static/tpl/layout/addFailedCard/addFailedCard.html
0 → 100644
View file @
dcde98cb
<!--<div class="row" style="font-size: 1.3em;border-bottom:1px solid #CCCCCC;margin-bottom:10px;padding-top:10px;">-->
<!---->
<!--</div>-->
<!--<div style="padding: 10px;background-color: #fff;border: 1px solid #CCC;border-radius: 10px;">-->
<!---->
<!--</div>-->
<div
class=
"col-md-12"
>
<p>
废证补制
</p>
</div>
<div
id=
"cardsDiv"
>
<form
ng-submit=
"createInputs()"
>
<span
style=
"font-size:20px;"
>
填写废证数:
</span>
<input
style=
"margin-top:20px;height: 30px;"
type=
"text"
class=
"failedcount"
>
<input
type=
"submit"
class=
"btn btn-primary"
value=
"确定"
>
<span
style=
"font-size:14px;color: red;"
ng-if=
"errMsglb"
>
{{errMsglb}}
</span>
</form>
<form
ng-show=
"showH5==1"
ng-submit=
"saveFailedCards()"
>
<div
style=
"padding-top:10px;padding-bottom:10px;"
>
请填写废证受理号:
</div>
<ul
id=
"cardsUl"
style=
"padding: 0;margin-bottom:10px;"
>
<li
id=
"0"
>
身份证号:
<input
style=
"height: 30px;"
type=
"text"
placeholder=
"受理号/身份证号"
/>
废证类型:
<select
style=
"height: 30px;border-radius: 4px;"
>
<option
value=
"{{type.failed_Card_Reason_Id}}"
ng-repeat=
"type in failedTypeList"
>
{{type.failed_Card_Reason}}
</option>
</select>
</li>
<li
id=
"1"
>
身份证号:
<input
style=
"height: 30px;"
type=
"text"
placeholder=
"受理号/身份证号"
/>
废证类型:
<select
style=
"height: 30px;border-radius: 4px;"
>
<option
value=
"{{type.failed_Card_Reason_Id}}"
ng-repeat=
"type in failedTypeList"
>
{{type.failed_Card_Reason}}
</option>
</select>
</li>
<li
id=
"2"
>
身份证号:
<input
style=
"height: 30px;"
type=
"text"
placeholder=
"受理号/身份证号"
/>
废证类型:
<select
style=
"height: 30px;border-radius: 4px;"
>
<option
value=
"{{type.failed_Card_Reason_Id}}"
ng-repeat=
"type in failedTypeList"
>
{{type.failed_Card_Reason}}
</option>
</select>
</li>
<li
id=
"3"
>
身份证号:
<input
style=
"height: 30px;"
type=
"text"
placeholder=
"受理号/身份证号"
/>
废证类型:
<select
style=
"height: 30px;border-radius: 4px;"
>
<option
value=
"{{type.failed_Card_Reason_Id}}"
ng-repeat=
"type in failedTypeList"
>
{{type.failed_Card_Reason}}
</option>
</select>
</li>
<li
id=
"4"
>
身份证号:
<input
style=
"height: 30px;"
type=
"text"
placeholder=
"受理号/身份证号"
/>
废证类型:
<select
style=
"height: 30px;border-radius: 4px;"
>
<option
value=
"{{type.failed_Card_Reason_Id}}"
ng-repeat=
"type in failedTypeList"
>
{{type.failed_Card_Reason}}
</option>
</select>
</li>
<li
id=
"5"
>
身份证号:
<input
style=
"height: 30px;"
type=
"text"
placeholder=
"受理号/身份证号"
/>
废证类型:
<select
style=
"height: 30px;border-radius: 4px;"
>
<option
value=
"{{type.failed_Card_Reason_Id}}"
ng-repeat=
"type in failedTypeList"
>
{{type.failed_Card_Reason}}
</option>
</select>
</li>
<li
id=
"6"
>
身份证号:
<input
style=
"height: 30px;"
type=
"text"
placeholder=
"受理号/身份证号"
/>
废证类型:
<select
style=
"height: 30px;border-radius: 4px;"
>
<option
value=
"{{type.failed_Card_Reason_Id}}"
ng-repeat=
"type in failedTypeList"
>
{{type.failed_Card_Reason}}
</option>
</select>
</li>
<li
id=
"7"
>
身份证号:
<input
style=
"height: 30px;"
type=
"text"
placeholder=
"受理号/身份证号"
/>
废证类型:
<select
style=
"height: 30px;border-radius: 4px;"
>
<option
value=
"{{type.failed_Card_Reason_Id}}"
ng-repeat=
"type in failedTypeList"
>
{{type.failed_Card_Reason}}
</option>
</select>
</li>
<li
id=
"8"
>
身份证号:
<input
style=
"height: 30px;"
type=
"text"
placeholder=
"受理号/身份证号"
/>
废证类型:
<select
style=
"height: 30px;border-radius: 4px;"
>
<option
value=
"{{type.failed_Card_Reason_Id}}"
ng-repeat=
"type in failedTypeList"
>
{{type.failed_Card_Reason}}
</option>
</select>
</li>
<li
id=
"9"
>
身份证号:
<input
style=
"height: 30px;"
type=
"text"
placeholder=
"受理号/身份证号"
/>
废证类型:
<select
style=
"height: 30px;border-radius: 4px;"
>
<option
value=
"{{type.failed_Card_Reason_Id}}"
ng-repeat=
"type in failedTypeList"
>
{{type.failed_Card_Reason}}
</option>
</select>
</li>
</ul>
<p
style=
"font-size:14px;color: red;text-align: left;"
ng-if=
"alertLb"
>
{{alertLb}}
</p>
<div
style=
"text-align: right;"
>
<input
type=
"submit"
class=
"btn btn-primary"
value=
"保存"
>
<input
type=
"button"
class=
"btn btn-danger"
ng-click=
"cancelAddFailed()"
value=
"取消"
>
</div>
</form>
</div>
src/main/resources/static/tpl/layout/addFailedCard/addFailedCard.js
0 → 100644
View file @
dcde98cb
app
.
controller
(
'addFailedCardCtrl'
,
[
'$scope'
,
'$rootScope'
,
'$http'
,
'$state'
,
'$filter'
,
'$localStorage'
,
'HttpService'
,
'ngDialog'
,
function
(
$scope
,
$rootScope
,
$http
,
$state
,
$filter
,
$localStorage
,
HttpService
,
$ngDialog
)
{
if
(
$rootScope
.
loginData
.
login
===
false
)
{
$state
.
go
(
"signin"
)
}
else
{
$state
.
go
(
"layout.addFailedCard"
)
}
$scope
.
failedTypeList
=
[{
failed_Card_Reason_Id
:
2
,
failed_Card_Reason
:
'切废1'
},{
failed_Card_Reason_Id
:
1
,
failed_Card_Reason
:
"切废"
}];
$rootScope
.
showH5
=
0
;
$scope
.
createInputs
=
function
()
{
console
.
log
(
"---查询废证制证类型---"
)
// HttpService.getFailedType(function(data) {
// $scope.failedTypeList = data.respData;
// console.log($scope.failedTypeList)
// })
for
(
var
i
=
0
;
i
<
10
;
i
++
){
document
.
getElementById
(
i
).
style
.
display
=
'none'
;
document
.
getElementById
(
i
).
style
.
marginBottom
=
'10px'
;
}
$scope
.
failedCount
=
$
(
".failedcount"
).
val
();
console
.
log
(
$scope
.
failedCount
)
if
(
$scope
.
failedCount
==
''
||
parseInt
(
$scope
.
failedCount
)
<=
0
||
parseInt
(
$scope
.
failedCount
)
>
10
)
{
$scope
.
errMsglb
=
"数量应在0和10之间且不能为空!"
;
}
else
{
$scope
.
errMsglb
=
""
;
$rootScope
.
showH5
=
1
;
for
(
var
i
=
0
;
i
<
$scope
.
failedCount
;
i
++
)
{
document
.
getElementById
(
i
).
style
.
display
=
'block'
;
}
}
}
$rootScope
.
emptyForm
=
function
(){
for
(
var
i
=
0
;
i
<
$scope
.
failedCount
;
i
++
)
{
document
.
getElementById
(
i
).
getElementsByTagName
(
"input"
)[
0
].
value
=
""
;
document
.
getElementById
(
i
).
getElementsByTagName
(
"input"
)[
1
].
value
=
""
;
}
}
$scope
.
saveFailedCards
=
function
()
{
$rootScope
.
arr
=
[];
var
checkArr
=
[];
var
jsonStr
=
{};
var
valueArr
=
[];
var
checkValueArr
=
[];
for
(
var
i
=
0
;
i
<
$scope
.
failedCount
;
i
++
)
{
var
json
=
{};
var
checkJson
=
{};
json
.
acceptNo
=
$
(
'#'
+
i
+
' input:eq(0)'
).
val
();
json
.
reson
=
$
(
'#'
+
i
+
' select'
).
val
();
valueArr
.
push
(
json
);
if
(
checkValueArr
.
indexOf
(
$
(
'#'
+
i
+
' input:eq(0)'
).
val
())
==-
1
){
checkValueArr
.
push
(
$
(
'#'
+
i
+
' input:eq(0)'
).
val
());
}
}
if
(
checkValueArr
.
length
==
$scope
.
failedCount
){
checkJson
.
list
=
checkValueArr
;
jsonStr
.
list
=
valueArr
;
jsonStr
.
workshop
=
$rootScope
.
loginData
.
workshop
;
$rootScope
.
arr
.
push
(
jsonStr
);
checkArr
.
push
(
checkJson
);
console
.
log
(
$rootScope
.
arr
)
var
myFailedcount
=
0
;
for
(
var
i
=
0
;
i
<
$rootScope
.
arr
.
length
;
i
++
)
{
for
(
var
j
=
0
;
j
<
$rootScope
.
arr
[
i
].
list
.
length
;
j
++
)
{
if
(
$rootScope
.
arr
[
i
].
list
[
j
].
acceptNo
.
length
==
18
||
$rootScope
.
arr
[
i
].
list
[
j
].
acceptNo
.
length
==
10
)
{
myFailedcount
++
;
}
else
{
continue
;
}
}
}
var
str
=
""
;
if
(
myFailedcount
==
(
checkArr
.
length
*
valueArr
.
length
))
{
HttpService
.
remainderCyclesheetInfo
(
checkArr
,
function
(
data
)
{
console
.
log
(
">>>>>>>>>"
)
console
.
log
(
checkArr
)
ngDialog
.
open
({
template
:
'dialogs/confirmFailedCardsInfo.html'
+
urlTimeStamp
(),
width
:
'40%'
,
cache
:
false
,
controller
:
[
'$scope'
,
'$rootScope'
,
'HttpService'
,
function
(
$scope
,
$rootScope
,
HttpService
,
MessageService
)
{
$scope
.
dataInfo
=
data
.
respData
;
console
.
log
(
$scope
.
dataInfo
)
var
count
=
0
;
for
(
var
i
=
0
;
i
<
$scope
.
dataInfo
.
length
;
i
++
){
if
(
$scope
.
dataInfo
[
i
][
0
]
!=
0
){
count
+=
1
;
}
else
{
continue
;
}
}
$scope
.
isShowSuccess
=
0
;
$scope
.
confirmFailedInfo
=
function
()
{
console
.
log
(
$rootScope
.
arr
)
$
(
".confirmBtn"
).
attr
(
"disabled"
,
true
);
if
(
count
==
$scope
.
dataInfo
.
length
){
HttpService
.
saveFailedCardsID
(
$rootScope
.
arr
,
function
(
data
){
$scope
.
isShowSuccess
=
1
;
$scope
.
AddSuccess
=
data
.
respData
.
string
;
$rootScope
.
emptyForm
();
})
}
else
{
$scope
.
alertError
=
"请将您输入有误的受理号修改后再添加!"
;
}
}
$scope
.
cancelThisDialog
=
function
(){
$rootScope
.
showH5
=
0
;
$scope
.
closeThisDialog
();
}
}]
})
})
}
else
{
$scope
.
alertLb
=
"请检查您输入的废证受理号和身份证号是否全部正确!"
;
}
}
else
{
MessageService
.
showAlert
(
"废证受理号或身份证号存在空值或重复,请检查后再提交。"
)
}
}
$scope
.
cancelAddFailed
=
function
()
{
$rootScope
.
showH5
=
0
;
$scope
.
alertLb
=
""
;
$rootScope
.
emptyForm
();
}
}]);
\ No newline at end of file
src/main/resources/static/tpl/layout/cycleSheet/cycleSheet.js
View file @
dcde98cb
...
...
@@ -335,8 +335,6 @@ app.controller('cycleSheetCtrl', ['$scope', '$rootScope', '$http', '$state', '$f
// }
// ]
// $scope.receiptList = [[358, 0, 0, 0, 82, 0, 0, 1, 0, 205, 646, 3, "郑州 辖区", "410101"], [721, 0, 0, 0, 20, 0, 0, 7, 1, 91, 840, 4, "郑州 中原", "410102"],]
$scope
.
showtable
=
-
1
;
$scope
.
showTable
=
function
(
taskID
)
{
console
.
log
(
"$scope.-------$scope.showtable----"
,
taskID
);
...
...
src/main/resources/static/tpl/layout/receipt/receipt.js
View file @
dcde98cb
...
...
@@ -66,8 +66,10 @@ app.controller('receiptCtrl', ['$scope', '$rootScope', '$http', '$state', '$filt
var
date2
=
$
(
"#wdate2"
).
val
();
HttpService
.
getprintReceipt
(
changeDataFormat
(
date1
),
changeDataFormat
(
date2
),
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
var
fileName
=
$filter
(
'date'
)(
date
,
"yyyy年MM月dd日交接单"
)
+
".xls"
;
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
download
=
fileName
;
a
.
href
=
URL
.
createObjectURL
(
blob
);
a
.
click
();
})
...
...
@@ -78,6 +80,7 @@ app.controller('receiptCtrl', ['$scope', '$rootScope', '$http', '$state', '$filt
var
date2
=
$
(
"#wdate2"
).
val
();
HttpService
.
getPrintOfficialReceipt
(
changeDataFormat
(
date1
),
changeDataFormat
(
date2
),
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
var
fileName
=
$filter
(
'date'
)(
date
,
"yyyy年MM月dd日回执单"
)
+
".xls"
;
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
href
=
URL
.
createObjectURL
(
blob
);
...
...
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