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
5c165924
Commit
5c165924
authored
Dec 13, 2018
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加更新出库页面
添加更新入库页面 添加交接单页面 修改查询生产统计报表页面
parent
f73676d5
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
954 additions
and
19 deletions
+954
-19
addInStorage.html
src/main/resources/static/dialogs/addInStorage.html
+43
-0
addOutStorage.html
src/main/resources/static/dialogs/addOutStorage.html
+45
-0
config.router.js
src/main/resources/static/js/config.router.js
+36
-0
service.js
src/main/resources/static/js/services/service.js
+30
-0
receipt.html
src/main/resources/static/tpl/layout/receipt/receipt.html
+63
-0
receipt.js
src/main/resources/static/tpl/layout/receipt/receipt.js
+89
-0
searchSpecialCard.js
.../static/tpl/layout/searchSpecialCard/searchSpecialCard.js
+1
-1
yieldReport.html
.../resources/static/tpl/layout/yieldReport/yieldReport.html
+329
-13
yieldReport.js
...in/resources/static/tpl/layout/yieldReport/yieldReport.js
+318
-5
No files found.
src/main/resources/static/dialogs/addInStorage.html
0 → 100644
View file @
5c165924
<div>
<table
class=
"table table-hover table-responsive"
id=
"enterStoreTr"
>
<thead>
<th><input
id=
"checkCkAllCountyBox"
value=
"0"
style=
"zoom:180%;vertical-align: bottom;"
type=
"checkbox"
ng-click=
"getAllCkCountyBox()"
/>
全选
</th>
<th>
循环单编号
</th>
<th>
区县
</th>
<th>
证件数量
</th>
<th>
已入库数量
</th>
<th>
入库数量
</th>
<th></th>
</thead>
<tbody>
<tr
ng-repeat=
"county in countyList | orderBy:countyCode"
>
<td><input
type=
"checkbox"
class=
"checkCkCountyBox"
value=
"{{county.cycleSheetId}}_{{county.countyCode}}_0_{{county.electricSum- county.numberOfPutInStorage}}_0_0"
style=
"zoom:180%;"
/></td>
<td>
{{county.cycleSheetId}}
</td>
<td>
{{county.countyName}}
</td>
<td
>
{{county.electricSum}}
</td>
<!--<td ng-if="county.numberOfPutInStorage==0">-->
<!--{{county.electricSum}}<i style="padding-left:15px;cursor: pointer;" class="glyphicon glyphicon-pencil" ng-click="updateEnterSum(county.countyCode)"></i>-->
<!--</td> -->
<!--<td ng-if="county.numberOfPutInStorage!=0">-->
<!--{{county.numberOfPutInStorage}}<i style="padding-left:15px;cursor: pointer;" class="glyphicon glyphicon-pencil" ng-click="updateEnterSum(county.countyCode)"></i>-->
<!--</td>-->
<td>
{{county.numberOfPutInStorage}}
</td>
<td
>
{{county.electricSum - county.numberOfPutInStorage}}
<i
style=
"padding-left:15px;cursor: pointer;"
class=
"glyphicon glyphicon-pencil"
ng-click=
"updateEnterSum(county.countyCode)"
></i></td>
<td
ng-show=
"showSum == county.countyCode"
>
<input
type=
"text"
ng-model=
"enterStoreSum"
>
<i
style=
"cursor: pointer;"
class=
"glyphicon glyphicon-ok"
ng-click=
"saveEnterStoreSum(enterStoreSum,0,county.cycleSheetId,county.countyCode)"
>
修改
</i>
<i
style=
"cursor: pointer;"
class=
"glyphicon glyphicon-remove"
ng-click=
"cancelEnterStoreSum()"
>
取消
</i>
</td>
</tr>
</tbody>
</table>
<div
style=
"text-align: right;"
>
<div
style=
"color: red;padding: 5px;"
ng-if=
"showAlertCk"
>
{{alertCk}}
</div>
<div
style=
"color: red;padding: 5px;"
ng-if=
"showUpdateSuccessMsg"
>
{{updateSuccessMsg}}
</div>
<button
class=
"btn btn-info"
ng-click=
"saveTheseCountySum()"
>
更新
</button>
<button
class=
"btn btn-info"
ng-click=
"closeThisDialog()"
>
关闭
</button>
</div>
</div>
\ No newline at end of file
src/main/resources/static/dialogs/addOutStorage.html
0 → 100644
View file @
5c165924
<div>
<table
class=
"table table-hover table-responsive"
id=
"enterStoreTr"
>
<thead>
<th><input
id=
"checkCkAllCountyBox"
value=
"0"
style=
"zoom:180%;vertical-align: bottom;"
type=
"checkbox"
ng-click=
"getAllCkCountyBox()"
/>
全选
</th>
<th>
循环单编号
</th>
<th>
区县
</th>
<th>
证件数量
</th>
<th>
已出库数量
</th>
<th>
出库数量
</th>
<th></th>
</thead>
<tbody>
<tr
ng-repeat=
"county in countyList | orderBy:countyCode"
>
<td><input
type=
"checkbox"
class=
"checkCkCountyBox"
value=
"{{county.cycleSheetId}}_{{county.countyCode}}_0_0_{{county.electricSum - county.numberOfOutbound}}_0"
style=
"zoom:180%;"
/></td>
<td>
{{county.cycleSheetId}}
</td>
<td>
{{county.countyName}}
</td>
<td>
{{county.electricSum}}
</td>
<td>
{{county.numberOfOutbound}}
</td>
<td>
{{county.electricSum - county.numberOfOutbound}}
<i
style=
"padding-left:15px;cursor: pointer;"
class=
"glyphicon glyphicon-pencil"
ng-click=
"updateLeaveSum(county.countyCode)"
></i>
</td>
<td
ng-show=
"showSum == county.countyCode"
>
<input
type=
"text"
ng-model=
"leaveStoreSum"
>
<i
style=
"cursor: pointer;"
class=
"glyphicon glyphicon-ok"
ng-click=
"saveLeaveStoreSum(leaveStoreSum,0,county.cycleSheetId,county.countyCode)"
>
修改
</i>
<i
style=
"cursor: pointer;"
class=
"glyphicon glyphicon-remove"
ng-click=
"cancelLeaveStoreSum()"
>
取消
</i>
</td>
</tr>
</tbody>
</table>
<div
style=
"text-align: right;"
>
<div
style=
"color: red;padding: 5px;"
ng-if=
"showAlertCk"
>
{{alertCk}}
</div>
<div
style=
"color: red;padding: 5px;"
ng-if=
"showUpdateSuccessMsg"
>
{{updateSuccessMsg}}
</div>
<button
class=
"btn btn-info"
ng-click=
"saveTheseCountySum()"
>
更新
</button>
<button
class=
"btn btn-info"
ng-click=
"closeThisDialog()"
>
关闭
</button>
</div>
</div>
\ No newline at end of file
src/main/resources/static/js/config.router.js
View file @
5c165924
...
...
@@ -106,6 +106,42 @@ angular.module('app')
}]
}
})
.
state
(
'layout.searchSpecialCard'
,
{
url
:
'/searchSpecialCard'
,
templateUrl
:
'tpl/layout/searchSpecialCard/searchSpecialCard.html'
,
cache
:
false
,
controller
:
'searchSpecialCardCtrl'
,
resolve
:
{
deps
:
[
'uiLoad'
,
function
(
uiLoad
){
return
uiLoad
.
load
(
[
'tpl/layout/searchSpecialCard/searchSpecialCard.js'
]
);
}]
}
})
.
state
(
'layout.failedCard'
,
{
url
:
'/failedCard'
,
templateUrl
:
'tpl/layout/failedCard/failedCard.html'
,
cache
:
false
,
controller
:
'failedCardCtrl'
,
resolve
:
{
deps
:
[
'uiLoad'
,
function
(
uiLoad
){
return
uiLoad
.
load
(
[
'tpl/layout/failedCard/failedCard.js'
]
);
}]
}
})
.
state
(
'layout.receipt'
,
{
url
:
'/receipt'
,
templateUrl
:
'tpl/layout/receipt/receipt.html'
,
cache
:
false
,
controller
:
'receiptCtrl'
,
resolve
:
{
deps
:
[
'uiLoad'
,
function
(
uiLoad
){
return
uiLoad
.
load
(
[
'tpl/layout/receipt/receipt.js'
]
);
}]
}
})
}
]
...
...
src/main/resources/static/js/services/service.js
View file @
5c165924
...
...
@@ -467,6 +467,36 @@ app.service('MessageService', function (ngDialog) {
var
errA
=
{
Error
:
true
,
ReturnCode
:
err
.
status
,
ReturnMsg
:
"API访问返回错误"
}
MessageService
.
httpRequestFailed
(
JSON
.
stringify
(
errA
))
})
},
getReceiptData
:
function
(
startTime
,
endTime
,
success
){
$http
({
method
:
'GET'
,
url
:
"../user/getConnectList"
+
urlTimeStamp
(),
params
:{
startTime
:
startTime
,
endTime
:
endTime
}
}).
then
(
function
successCallback
(
response
)
{
success
(
response
.
data
)
},
function
(
err
){
var
errA
=
{
Error
:
true
,
ReturnCode
:
err
.
status
,
ReturnMsg
:
"API访问返回错误"
}
MessageService
.
httpRequestFailed
(
JSON
.
stringify
(
errA
))
})
},
getprintReceipt
:
function
(
startTime
,
endTime
,
success
){
$http
({
method
:
'GET'
,
url
:
"../user/getConnectList"
+
urlTimeStamp
(),
params
:{
startTime
:
startTime
,
endTime
:
endTime
}
}).
then
(
function
successCallback
(
response
)
{
success
(
response
.
data
)
},
function
(
err
){
var
errA
=
{
Error
:
true
,
ReturnCode
:
err
.
status
,
ReturnMsg
:
"API访问返回错误"
}
MessageService
.
httpRequestFailed
(
JSON
.
stringify
(
errA
))
})
}
...
...
src/main/resources/static/tpl/layout/receipt/receipt.html
0 → 100644
View file @
5c165924
<div
class=
"row"
style=
"font-size: 1.3em;border-bottom:1px solid #CCCCCC;margin-bottom:10px;padding-top:10px;"
>
<div
class=
"col-md-1"
>
<div>
交接单
</div>
</div>
<div
class=
"col-md-11"
style=
"text-align: right;"
>
<div
style=
"width: auto"
>
<span>
起始时间:
</span>
<input
type=
"text"
ng-model=
"nowDataEight"
value=
"currentDetailDate"
id=
"wdate1"
class=
"Wdate"
onClick=
"WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm',autoPickDate:'true'})"
>
<span>
结束时间:
</span>
<input
type=
"text"
ng-model=
"nowDate"
value=
"currentDetailDate"
id=
"wdate2"
class=
"Wdate"
onClick=
"WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm',autoPickDate:'true'})"
>
<input
type=
"submit"
class=
"btn btn-primary"
value=
"查询"
ng-click=
"myClick()"
>
</div>
</div>
</div>
<div
class=
"loading"
>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
<div
style=
"padding: 10px;background-color: #fff;border: 1px solid #CCC;border-radius: 10px;"
>
<div>
<div
ng-if=
"receiptData.length>0"
>
<table
class=
"table table-hover"
style=
"margin-top:10px;"
>
<thead>
<th></th>
<th>
普通证
</th>
<!--<th><a ng-click="showSpecialCardInfo()">快证</a></th>-->
<th>
快证
</th>
<th>
异地KS邮
</th>
<th>
异地KS普
</th>
<th>
异地邮
</th>
<th>
异地普
</th>
<th>
军人证
</th>
<th>
KS普
</th>
<th>
KS邮
</th>
<th>
邮寄证
</th>
<th>
小计
</th>
<th>
盒数
</th>
</thead>
<tbody>
<tr
ng-repeat=
"county in receiptData"
>
<td
width=
"100px"
>
{{county[12]}}
</td>
<td
width=
"100px"
ng-repeat=
"item in county track by $index"
ng-if=
"$index!=12 && $index!=13"
>
<span
ng-if=
"item!=0"
>
{{item}}
</span>
<span
ng-if=
"item==0"
></span>
</td>
</tr>
</tbody>
</table>
</div>
<div
ng-if=
"receiptData.length==0"
style=
"font-size:1.5em;"
>
当天暂无报表数据。
</div>
<div
ng-if=
"receiptData.length!=0 && receiptData[0][11] != 0"
style=
"font-size:1.5em;"
>
<input
type=
"button"
class=
"btn btn-primary"
value=
"下载交接单"
ng-click=
"printReceipt()"
>
<input
type=
"button"
class=
"btn btn-primary"
value=
"下载回执单"
ng-click=
"printOfficialReceipt()"
>
</div>
</div>
</div>
\ No newline at end of file
src/main/resources/static/tpl/layout/receipt/receipt.js
0 → 100644
View file @
5c165924
app
.
controller
(
'receiptCtrl'
,
[
'$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.receipt"
)
}
$scope
.
date
=
"date"
;
//获得当前年月日
var
getNowFormatDetailDate
=
function
()
{
var
date
=
new
Date
();
var
month
=
date
.
getMonth
()
+
1
;
var
strDate
=
date
.
getDate
();
var
strHours
=
date
.
getHours
();
var
strMin
=
date
.
getMinutes
();
if
(
month
>=
1
&&
month
<=
9
)
{
month
=
"0"
+
month
;
}
if
(
strDate
>=
0
&&
strDate
<=
9
)
{
strDate
=
"0"
+
strDate
;
}
if
(
strHours
>=
0
&&
strHours
<=
9
)
{
strHours
=
"0"
+
strHours
;
}
if
(
strMin
>=
0
&&
strMin
<=
9
)
{
strMin
=
"0"
+
strMin
;
}
var
currentdate
=
date
.
getFullYear
()
+
""
+
month
+
strDate
+
strHours
+
strMin
;
return
currentdate
;
}
$scope
.
currentDetailDate
=
getNowFormatDetailDate
();
$scope
.
nowDataEight
=
new
Date
().
format
(
"yyyy-MM-dd 08:00"
)
$scope
.
nowDate
=
new
Date
().
format
(
"yyyy-MM-dd hh:mm"
);
var
changeDataFormat
=
function
(
date
)
{
var
yyyyMMdd
=
date
.
split
(
" "
)[
0
];
var
hhmm
=
date
.
split
(
" "
)[
1
];
var
yyyy
=
yyyyMMdd
.
split
(
"-"
)[
0
];
var
MM
=
yyyyMMdd
.
split
(
"-"
)[
1
];
var
dd
=
yyyyMMdd
.
split
(
"-"
)[
2
];
var
hh
=
hhmm
.
split
(
":"
)[
0
];
var
mm
=
hhmm
.
split
(
":"
)[
1
];
return
yyyy
+
MM
+
dd
+
hh
+
mm
;
}
var
getReceiptData
=
function
(
startTime
,
endTime
)
{
HttpService
.
getReceiptData
(
startTime
,
endTime
,
function
(
data
)
{
$scope
.
receiptData
=
data
.
respData
;
console
.
log
(
$scope
.
receiptData
)
})
}
getReceiptData
(
changeDataFormat
(
$scope
.
nowDataEight
),
changeDataFormat
(
$scope
.
nowDate
))
$scope
.
myClick
=
function
()
{
var
date1
=
$
(
"#wdate1"
).
val
();
var
date2
=
$
(
"#wdate2"
).
val
();
console
.
log
(
changeDataFormat
(
date1
))
console
.
log
(
changeDataFormat
(
date2
))
getReceiptData
(
changeDataFormat
(
date1
),
changeDataFormat
(
date2
))
}
$scope
.
printReceipt
=
function
()
{
var
date1
=
$
(
"#wdate1"
).
val
();
var
date2
=
$
(
"#wdate2"
).
val
();
HttpService
.
getprintReceipt
(
changeDataFormat
(
date1
),
changeDataFormat
(
date2
),
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
href
=
URL
.
createObjectURL
(
blob
);
a
.
click
();
})
}
//下载回执单
$scope
.
printOfficialReceipt
=
function
()
{
var
date1
=
$
(
"#wdate1"
).
val
();
var
date2
=
$
(
"#wdate2"
).
val
();
HttpService
.
getPrintOfficialReceipt
(
changeDataFormat
(
date1
),
changeDataFormat
(
date2
),
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
href
=
URL
.
createObjectURL
(
blob
);
a
.
click
();
})
}
}]);
\ No newline at end of file
src/main/resources/static/tpl/layout/searchSpecialCard/searchSpecialCard.js
View file @
5c165924
app
.
controller
(
'
failed
CardCtrl'
,
[
'$scope'
,
'$rootScope'
,
'$http'
,
'$state'
,
'$filter'
,
'$localStorage'
,
'HttpService'
,
'ngDialog'
,
function
(
$scope
,
$rootScope
,
$http
,
$state
,
$filter
,
$localStorage
,
HttpService
,
ngDialog
)
{
app
.
controller
(
'
searchSpecial
CardCtrl'
,
[
'$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
{
...
...
src/main/resources/static/tpl/layout/yieldReport/yieldReport.html
View file @
5c165924
<div
class=
"app-content-body app-content-full fade-in-up"
ng-class=
"{'h-full': app.hideFooter }"
>
<!-- hbox layout -->
<div
class=
"hbox hbox-auto-xs hbox-auto-sm bg-light "
ng-init=
"app.settings.asideFixed = true;app.settings.asideDock = false;app.settings.container = false;app.hideAside = false;app.hideFooter = true;"
>
<div
class=
"row"
style=
"font-size: 1.3em;border-bottom:1px solid #CCCCCC;margin-bottom:10px;padding-top:10px;"
>
<div
class=
"col-md-2"
>
<div
ng-if=
"loginData.state==1||state=='01'"
>
地市质量报表
</div>
<div
ng-if=
"loginData.state==2||state=='02'"
>
生产情况统计日报表
</div>
<div
ng-if=
"loginData.username=='ping1'||loginData.username=='ydw1'||state=='014'"
>
平一日报表
</div>
<div
ng-if=
"loginData.username=='ping2'||loginData.username=='ydw2'||state=='024'"
>
平二日报表
</div>
<div
ng-if=
"loginData.state==6||state=='06'"
>
质检月报表
</div>
<div
ng-if=
"loginData.state==7||state=='07'||loginData.state==8"
>
仓库报表
</div>
</div>
<div
class=
"col-md-10"
style=
"text-align: right;"
>
<div
style=
"width: auto"
ng-if=
"loginData.state==0||loginData.state==2||state=='01'||state=='02'"
>
<span>
起始日期:
</span>
<input
type=
"text"
ng-model=
"nowDate"
id=
"wdate1"
class=
"Wdate"
onClick=
"WdatePicker({el:this,dateFmt:'yyyyMMdd',autoPickDate:'true'})"
>
<span>
结束日期:
</span>
<input
type=
"text"
ng-model=
"month_last"
id=
"wdate2"
class=
"Wdate"
onClick=
"WdatePicker({el:this,dateFmt:'yyyyMMdd',autoPickDate:'true'})"
>
<input
type=
"submit"
ng-if=
"loginData.state==1||state=='01'"
class=
"btn btn-primary"
value=
"查询"
ng-click=
"myClickLlx()"
>
<input
type=
"submit"
ng-if=
"loginData.state==2||state=='02'"
class=
"btn btn-primary"
value=
"查询"
ng-click=
"myClick()"
>
<span
ng-if=
"msgAlert"
style=
"color:red;font-size: 17px;"
>
{{msgAlert}}
</span>
</div>
<div
style=
"width: auto"
ng-if=
"loginData.state==4||state=='014'||state=='024'"
>
<span>
查询日期:
</span>
<input
type=
"text"
ng-model=
"nowDate"
id=
"wdateCj"
class=
"Wdate"
onClick=
"WdatePicker({el:this,dateFmt:'yyyyMMdd',autoPickDate:'true'})"
>
<input
type=
"submit"
class=
"btn btn-primary"
value=
"查询"
ng-click=
"myCjClick()"
>
</div>
<div
style=
"width: auto"
ng-if=
"loginData.state==6||state=='06'"
>
<span>
预定位接收月份:
</span>
<input
type=
"text"
ng-model=
"nowMonth"
id=
"wdateZj"
class=
"Wdate"
onClick=
"WdatePicker({el:this,dateFmt:'yyyyMM',autoPickDate:'true'})"
>
<input
type=
"submit"
class=
"btn btn-primary"
value=
"查询"
ng-click=
"myZjClick()"
>
</div>
<div
class=
"yx-div-header"
ng-if=
"loginData.state==7||state=='07'||loginData.state==8"
>
<span>
查询日期:
</span>
<input
type=
"text"
id=
"wdate1"
class=
"Wdate"
ng-model=
"month_first"
onClick=
"WdatePicker({el:this,dateFmt:'yyyyMMdd',autoPickDate:'true'})"
>
<span>
-
</span>
<input
type=
"text"
id=
"wdate2"
class=
"Wdate"
ng-model=
"month_last"
onClick=
"WdatePicker({el:this,dateFmt:'yyyyMMdd',autoPickDate:'true'})"
>
<input
type=
"submit"
value=
"查询"
class=
"btn btn-primary"
ng-click=
"myClick()"
>
<span
ng-if=
"msgAlert"
style=
"color:red;font-size: 17px;"
>
{{msgAlert}}
</span>
</div>
</div>
</div>
<div
id=
"mask-loading"
class=
"mask-loading"
ng-if=
"loading"
style=
"background-color: rgba(0, 0, 0, 0.17);"
>
<div
class=
"loading"
>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
<div
style=
"padding: 10px;background-color: #fff;border: 1px solid #CCC;border-radius: 10px;"
>
<div
ng-if=
"loginData.state==1||state=='01'"
>
<div
ng-if=
"dataCheckData.length>0 && dataCheckData[0][1]!='合计'"
>
<table
class=
"table table-hover"
style=
"margin-top:10px;"
>
<thead>
<th>
地市
</th>
<th>
合格数
</th>
<th>
不合格数
</th>
<th>
不合格率
</th>
</thead>
<tbody>
<tr
ng-repeat=
"city in dataCheckData"
>
<td
width=
"100px"
>
{{city[1]}}
</td>
<td
width=
"100px"
>
{{city[2]}}
</td>
<td
width=
"100px"
>
{{city[3]}}
</td>
<td
width=
"100px"
ng-if=
"city[4]==0"
>
0
</td>
<td
width=
"100px"
ng-if=
"city[4]>0"
>
{{city[4] | number:2}}
</td>
</tr>
</tbody>
</table>
<div
style=
"text-align: right"
>
<button
class=
"btn btn-primary"
ng-click=
"printQualityReport()"
>
下载报表
</button>
</div>
<div
class=
"hbox hbox-auto-xs hbox-auto-sm"
>
<div
class=
"col w-md bg-light dk b-r bg-auto"
>
<div
class=
"wrapper b-b bg"
>
<button
class=
"btn btn-sm btn-default pull-right visible-sm visible-xs"
ui-toggle-class=
"show"
target=
"#email-menu"
><i
class=
"fa fa-bars"
></i></button>
<a
class=
"w-xs font-bold"
>
{{msg}}
</a>
</div>
</div>
<div
ng-if=
"dataCheckData.length==0 || dataCheckData[0][1]=='合计'"
style=
"font-size:1.5em;"
>
当天暂无报表数据。
</div>
</div>
<div
ng-if=
"loginData.state==2||state=='02'"
>
<div
ng-if=
"printDataReport.dayInfo.length>0"
>
<table
class=
"table table-hover"
style=
"margin-top:10px;"
>
<thead>
<th></th>
<th>
普通证
</th>
<!--<th>特证</th>-->
<th>
异地KS邮
</th>
<th>
异地KS普
</th>
<th>
异地邮
</th>
<th>
异地普
</th>
<th>
KS普
</th>
<th>
KS邮
</th>
<th>
邮寄证
</th>
<th>
废证
</th>
<th>
小计
</th>
</thead>
<tbody>
<tr
ng-repeat=
"city in printDataReport.dayInfo"
>
<td
width=
"100px"
>
{{city.cityName}}
</td>
<td
width=
"100px"
ng-repeat=
"item in city.info track by $index"
ng-if=
"$index!=1 && $index!=6 && $index!=10 && $index!=11 && $index!=12"
>
<span
ng-if=
"item!=0"
>
{{item}}
</span>
<span
ng-if=
"item==0"
></span>
</td>
<td
width=
"100px"
>
{{city.info[12]}}
</td>
<td
width=
"100px"
>
{{city.info[11]}}
</td>
</tr>
</tbody>
</table>
<div
style=
"text-align: right"
>
<button
class=
"btn btn-primary"
ng-click=
"printPrintDataReport()"
>
下载报表
</button>
</div>
</div>
<div
ng-if=
"printDataReport.dayInfo == null"
style=
"font-size:1.5em;"
>
当天暂无报表数据。
</div>
</div>
<div
ng-if=
"loginData.state==4||state=='014'||state=='024'"
>
<div
ng-if=
"pingReportByDay.normalInfo.length>0 &&pingReportByDay.normalInfo[0][11]!='合计'"
>
<table
class=
"table table-hover"
style=
"margin-top:10px;"
>
<thead>
<th>
地市\制证类型
</th>
<th>
普通证
</th>
<th>
邮寄证
</th>
<!--<th>特证</th>-->
<th>
异地KS邮
</th>
<th>
异地KS普
</th>
<th>
异地邮
</th>
<th>
异地普
</th>
<th>
KS普
</th>
<th>
KS邮
</th>
<th>
小计
</th>
</thead>
<tbody>
<tr
ng-repeat=
"city in pingReportByDay.normalInfo"
>
<td
width=
"100px"
>
{{city[11]}}
</td>
<td
width=
"100px"
ng-if=
"city[0]==0"
></td>
<td
width=
"100px"
ng-if=
"city[0]!=0"
>
{{city[0]}}
</td>
<td
width=
"100px"
ng-if=
"city[9]==0"
></td>
<td
width=
"100px"
ng-if=
"city[9]!=0"
>
{{city[9]}}
</td>
<td
width=
"100px"
ng-if=
"city[2]==0"
></td>
<td
width=
"100px"
ng-if=
"city[2]!=0"
>
{{city[2]}}
</td>
<td
width=
"100px"
ng-if=
"city[3]==0"
></td>
<td
width=
"100px"
ng-if=
"city[3]!=0"
>
{{city[3]}}
</td>
<td
width=
"100px"
ng-if=
"city[4]==0"
></td>
<td
width=
"100px"
ng-if=
"city[4]!=0"
>
{{city[4]}}
</td>
<td
width=
"100px"
ng-if=
"city[5]==0"
></td>
<td
width=
"100px"
ng-if=
"city[5]!=0"
>
{{city[5]}}
</td>
<td
width=
"100px"
ng-if=
"city[7]==0"
></td>
<td
width=
"100px"
ng-if=
"city[7]!=0"
>
{{city[7]}}
</td>
<td
width=
"100px"
ng-if=
"city[8]==0"
></td>
<td
width=
"100px"
ng-if=
"city[8]!=0"
>
{{city[8]}}
</td>
<td
width=
"100px"
ng-if=
"city[10]==0"
></td>
<td
width=
"100px"
ng-if=
"city[10]!=0"
>
{{city[10]}}
</td>
</tr>
<tr>
<td
colspan=
"11"
style=
"text-align: left;"
ng-if=
"pingReportByDay.failedinfo.substring(3,4)=='0'"
>
{{pingReportByDay.failedinfo.substring(0,5)}}
</td>
<td
colspan=
"11"
style=
"text-align: left;"
ng-if=
"pingReportByDay.failedinfo.substring(3,4)!='0'"
>
{{pingReportByDay.failedinfo}}
</td>
</tr>
</tbody>
</table>
<div
style=
"text-align: right;"
>
<button
class=
"btn btn-primary"
ng-click=
"printPingReportByDay()"
>
下载报表
</button>
</div>
</div>
<div
ng-if=
"pingReportByDay.normalInfo.length==0 || pingReportByDay.normalInfo[0][11]=='合计'"
style=
"font-size:1.5em;"
>
当天暂无报表数据。
</div>
</div>
<div
ng-if=
"loginData.state==6||state=='06'"
>
<div
ng-if=
"qulityCheckData.length>0 && qulityCheckData[0][3]!='合计'"
>
<table
class=
"table table-hover"
style=
"margin-top:10px;"
>
<thead>
<th>
制证类型
</th>
<th>
制证一科
</th>
<th>
制证二科
</th>
<th>
小计
</th>
</thead>
<tbody>
<tr
ng-repeat=
"city in qulityCheckData"
>
<td
width=
"100px"
>
{{city[3]}}
</td>
<td
width=
"100px"
ng-if=
"city[4]==0"
></td>
<td
width=
"100px"
ng-if=
"city[4]!=0"
>
{{city[4]}}
</td>
<td
width=
"100px"
ng-if=
"city[5]==0"
></td>
<td
width=
"100px"
ng-if=
"city[5]!=0"
>
{{city[5]}}
</td>
<td
width=
"100px"
ng-if=
"city[0]==0"
>
0
</td>
<td
width=
"100px"
ng-if=
"city[0]!=0"
>
{{city[0]}}
</td>
</tr>
</tbody>
</table>
<div
style=
"text-align: right"
>
<button
class=
"btn btn-primary"
ng-click=
"printQualityCheckReport()"
>
下载报表
</button>
</div>
</div>
<div
ng-if=
"qulityCheckData.length==0 || qulityCheckData[0][3]=='合计'"
style=
"font-size:1.5em;"
>
当天暂无报表数据。
</div>
</div>
<div
ng-if=
"loginData.state==7||state=='07'||loginData.state==8"
>
<div
ng-if=
"StoreReportData.length==0"
style=
"font-size:1.5em;"
>
当天暂无报表数据。
</div>
<div
ng-if=
"StoreReportData.length>0"
>
<pre
style=
"font-size: 1.3em;"
>
{{totalCount}}
</pre>
<div
ng-repeat=
"city in StoreReportData"
>
<pre
style=
"font-size: 1.3em;"
ng-click=
"showTable($index)"
>
{{city.cityName}}
</pre>
<div
ng-show=
"showtable==$index"
>
<table
class=
"table table-hover"
style=
"margin-top:10px;"
border=
"1"
>
<thead>
<tr>
<th></th>
<th
colspan=
"8"
style=
"text-align: center;"
>
普通类型
</th>
<th
colspan=
"8"
style=
"text-align: center;"
>
邮寄类型
</th>
</tr>
<tr>
<th></th>
<th
colspan=
"2"
style=
"text-align: center;"
>
普通证
</th>
<th
colspan=
"2"
style=
"text-align: center;"
>
异地KS普
</th>
<th
colspan=
"2"
style=
"text-align: center;"
>
异地普
</th>
<th
colspan=
"2"
style=
"text-align: center;"
>
KS普
</th>
<th
colspan=
"2"
style=
"text-align: center;"
>
邮寄证
</th>
<th
colspan=
"2"
style=
"text-align: center;"
>
异地KS邮
</th>
<th
colspan=
"2"
style=
"text-align: center;"
>
异地邮
</th>
<th
colspan=
"2"
style=
"text-align: center;"
>
KS邮
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
区县
</td>
<td>
出库
</td>
<td>
入库
</td>
<td>
出库
</td>
<td>
入库
</td>
<td>
出库
</td>
<td>
入库
</td>
<td>
出库
</td>
<td>
入库
</td>
<td>
出库
</td>
<td>
入库
</td>
<td>
出库
</td>
<td>
入库
</td>
<td>
出库
</td>
<td>
入库
</td>
<td>
出库
</td>
<td>
入库
</td>
</tr>
<tr
ng-repeat=
"county in city.cityList"
>
<td
width=
"100px"
>
{{county.countyName}}
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[0]!=0"
>
{{county.countyInfo[0]}}
</span>
<span
ng-if=
"county.countyInfo[0]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[1]!=0"
>
{{county.countyInfo[1]}}
</span>
<span
ng-if=
"county.countyInfo[1]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[6]!=0"
>
{{county.countyInfo[6]}}
</span>
<span
ng-if=
"county.countyInfo[6]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[7]!=0"
>
{{county.countyInfo[7]}}
</span>
<span
ng-if=
"county.countyInfo[7]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[10]!=0"
>
{{county.countyInfo[10]}}
</span>
<span
ng-if=
"county.countyInfo[10]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[11]!=0"
>
{{county.countyInfo[11]}}
</span>
<span
ng-if=
"county.countyInfo[11]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[14]!=0"
>
{{county.countyInfo[14]}}
</span>
<span
ng-if=
"county.countyInfo[14]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[15]!=0"
>
{{county.countyInfo[15]}}
</span>
<span
ng-if=
"county.countyInfo[15]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[18]!=0"
>
{{county.countyInfo[18]}}
</span>
<span
ng-if=
"county.countyInfo[18]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[19]!=0"
>
{{county.countyInfo[19]}}
</span>
<span
ng-if=
"county.countyInfo[19]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[4]!=0"
>
{{county.countyInfo[4]}}
</span>
<span
ng-if=
"county.countyInfo[4]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[5]!=0"
>
{{county.countyInfo[5]}}
</span>
<span
ng-if=
"county.countyInfo[5]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[8]!=0"
>
{{county.countyInfo[8]}}
</span>
<span
ng-if=
"county.countyInfo[8]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[9]!=0"
>
{{county.countyInfo[9]}}
</span>
<span
ng-if=
"county.countyInfo[9]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[16]!=0"
>
{{county.countyInfo[16]}}
</span>
<span
ng-if=
"county.countyInfo[16]==0"
></span>
</td>
<td
width=
"100px"
>
<span
ng-if=
"county.countyInfo[17]!=0"
>
{{county.countyInfo[17]}}
</span>
<span
ng-if=
"county.countyInfo[17]==0"
></span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- /hbox layout -->
</div>
\ No newline at end of file
src/main/resources/static/tpl/layout/yieldReport/yieldReport.js
View file @
5c165924
app
.
controller
(
'yieldReportCtrl'
,
[
'$scope'
,
'$rootScope'
,
'$http'
,
'$state'
,
'$filter'
,
'$localStorage'
,
function
(
$scope
,
$rootScope
,
$http
,
$state
,
$filter
,
$localStorage
)
{
if
(
$rootScope
.
loginData
.
login
==
false
)
{
app
.
controller
(
'cycleSheetCtrl'
,
[
'$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.qualityReport"
)
}
$scope
.
userState
=
$rootScope
.
loginData
.
state
;
// $scope.userState=5;
if
(
$rootScope
.
loginData
.
login
==
false
)
{
$location
.
path
(
"/login"
);
}
$scope
.
date
=
"date"
;
//获得当前年月日
var
getNowFormatDetailDate
=
function
()
{
var
date
=
new
Date
();
var
month
=
date
.
getMonth
()
+
1
;
var
strDate
=
date
.
getDate
();
if
(
month
>=
1
&&
month
<=
9
)
{
month
=
"0"
+
month
;
}
if
(
strDate
>=
0
&&
strDate
<=
9
)
{
strDate
=
"0"
+
strDate
;
}
var
currentdate
=
date
.
getFullYear
()
+
""
+
month
+
strDate
;
return
currentdate
;
}
$scope
.
currentDetailDate
=
getNowFormatDetailDate
();
$scope
.
nowDate
=
new
Date
().
format
(
"yyyyMMdd"
);
$scope
.
nowMonth
=
new
Date
().
format
(
"yyyyMM"
);
var
getMonthFirstDay
=
function
()
{
var
month_first
=
new
Date
();
month_first
.
setDate
(
1
);
return
month_first
.
format
(
"yyyyMMdd"
);
}
var
getMonthLastDay
=
function
()
{
var
date
=
new
Date
();
var
currentMonth
=
date
.
getMonth
();
var
nextMonth
=
++
currentMonth
;
var
nextMonthFirstDay
=
new
Date
(
date
.
getFullYear
(),
nextMonth
,
1
);
var
oneDay
=
1000
*
60
*
60
*
24
;
var
month_last
=
new
Date
(
nextMonthFirstDay
-
oneDay
);
return
month_last
.
format
(
"yyyyMMdd"
);
}
$scope
.
month_first
=
getMonthFirstDay
();
$scope
.
month_last
=
getMonthLastDay
();
var
getQualityReport
=
function
(
startDate
,
endDate
)
{
HttpService
.
getQualityReport
(
startDate
,
endDate
,
function
(
data
)
{
$scope
.
dataCheckData
=
data
.
respData
;
console
.
log
(
"初始化数据核验质量报表:"
,
$scope
.
dataCheckData
)
})
}
//初始化数据核验报表
if
(
$rootScope
.
loginData
.
state
==
1
||
$rootScope
.
loginData
.
state
==
0
)
{
console
.
log
(
$scope
.
currentDetailDate
,
$scope
.
month_last
)
getQualityReport
(
$scope
.
currentDetailDate
,
$scope
.
month_last
)
}
$scope
.
myClickLlx
=
function
()
{
var
startDate
=
$
(
"#wdate1"
).
val
();
var
endDate
=
$
(
"#wdate2"
).
val
();
console
.
log
(
"时间"
)
console
.
log
(
startDate
,
endDate
)
getQualityReport
(
startDate
,
endDate
);
}
// 打印数据核验质量报表按钮
$scope
.
printQualityReport
=
function
()
{
var
startDate
=
$
(
"#wdate1"
).
val
();
var
endDate
=
$
(
"#wdate2"
).
val
();
console
.
log
(
"时间"
)
console
.
log
(
startDate
,
endDate
)
HttpService
.
printQulityReportData
(
startDate
,
endDate
,
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
href
=
URL
.
createObjectURL
(
blob
);
a
.
click
();
})
}
var
getPrintDataReport
=
function
(
startDate
,
endDate
)
{
if
(
$rootScope
.
loginData
.
state
==
2
)
{
HttpService
.
getPrintData
(
startDate
,
endDate
,
function
(
data
)
{
$scope
.
printDataReport
=
data
.
respData
;
console
.
log
(
"初始化打印卸载报表:"
,
$scope
.
printDataReport
)
})
}
if
(
$rootScope
.
loginData
.
state
==
0
)
{
HttpService
.
getAdminPrintData
(
startDate
,
endDate
,
$scope
.
state
.
substring
(
1
,
2
),
function
(
data
)
{
$scope
.
printDataReport
=
data
.
respData
;
console
.
log
(
"初始化打印卸载报表:"
,
$scope
.
printDataReport
)
})
}
}
if
(
$rootScope
.
loginData
.
state
==
2
||
$rootScope
.
loginData
.
state
==
0
)
{
console
.
log
(
$scope
.
currentDetailDate
,
$scope
.
month_last
)
getPrintDataReport
(
$scope
.
currentDetailDate
,
$scope
.
month_last
)
}
// 打印 打印卸载报表按钮
$scope
.
printPrintDataReport
=
function
()
{
var
startDate
=
$
(
"#wdate1"
).
val
();
var
endDate
=
$
(
"#wdate2"
).
val
();
console
.
log
(
"时间"
)
console
.
log
(
startDate
,
endDate
)
if
(
$rootScope
.
loginData
.
state
==
2
)
{
HttpService
.
printDataPrintUninstalreportData
(
startDate
,
endDate
,
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
href
=
URL
.
createObjectURL
(
blob
);
a
.
click
();
})
}
if
(
$rootScope
.
loginData
.
state
==
0
)
{
HttpService
.
printAdminDataPrintUninstalreportData
(
startDate
,
endDate
,
$scope
.
state
.
substring
(
1
,
2
),
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
href
=
URL
.
createObjectURL
(
blob
);
a
.
click
();
})
}
}
var
getQualityCheckReport
=
function
(
month
)
{
if
(
$rootScope
.
loginData
.
state
==
6
)
{
HttpService
.
getQualityCheckReportData
(
month
,
function
(
data
)
{
$scope
.
qulityCheckData
=
data
.
respData
;
console
.
log
(
"质检报表:"
,
$scope
.
qulityCheckData
)
})
}
if
(
$rootScope
.
loginData
.
state
==
0
)
{
HttpService
.
getAdminQualityCheckReportData
(
month
,
$scope
.
state
.
substring
(
1
,
2
),
function
(
data
)
{
$scope
.
qulityCheckData
=
data
.
respData
;
console
.
log
(
"质检报表:"
,
$scope
.
qulityCheckData
)
})
}
}
if
(
$rootScope
.
loginData
.
state
==
6
||
$rootScope
.
loginData
.
state
==
0
)
{
getQualityCheckReport
(
$scope
.
nowMonth
)
}
$scope
.
printQualityCheckReport
=
function
()
{
var
month
=
$
(
"#wdateZj"
).
val
()
console
.
log
(
"时间"
)
console
.
log
(
month
)
if
(
$rootScope
.
loginData
.
state
==
6
)
{
HttpService
.
printQualityCheckReportDatas
(
month
,
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
href
=
URL
.
createObjectURL
(
blob
);
a
.
click
();
})
}
if
(
$rootScope
.
loginData
.
state
==
0
)
{
HttpService
.
printAdminQualityCheckReportDatas
(
month
,
$scope
.
state
.
substring
(
1
,
2
),
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
href
=
URL
.
createObjectURL
(
blob
);
a
.
click
();
})
}
}
var
getPingReportByDay
=
function
(
date
)
{
if
(
$rootScope
.
loginData
.
state
==
4
)
{
HttpService
.
getPingReportByDayData
(
date
,
function
(
data
)
{
$scope
.
pingReportByDay
=
data
.
respData
;
console
.
log
(
"车间日报表:"
,
$scope
.
pingReportByDay
)
})
}
if
(
$rootScope
.
loginData
.
state
==
0
)
{
HttpService
.
getAdminPingReportByDayData
(
date
,
'p'
+
$scope
.
state
.
substring
(
1
,
2
),
function
(
data
)
{
$scope
.
pingReportByDay
=
data
.
respData
;
console
.
log
(
"车间日报表:"
,
$scope
.
pingReportByDay
)
})
}
}
if
(
$rootScope
.
loginData
.
state
==
4
||
$rootScope
.
loginData
.
state
==
0
)
{
getPingReportByDay
(
$scope
.
nowDate
);
}
$scope
.
printPingReportByDay
=
function
()
{
var
date
=
$
(
"#wdateCj"
).
val
()
console
.
log
(
"时间"
)
console
.
log
(
date
)
if
(
$rootScope
.
loginData
.
state
==
4
)
{
HttpService
.
printPingReportByDay
(
date
,
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
href
=
URL
.
createObjectURL
(
blob
);
a
.
click
();
})
}
if
(
$rootScope
.
loginData
.
state
==
0
)
{
HttpService
.
printAdminPingReportByDay
(
date
,
'p'
+
$scope
.
state
.
substring
(
1
,
2
),
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
href
=
URL
.
createObjectURL
(
blob
);
a
.
click
();
})
}
}
// var getCkReportByDay = function(date){
// HttpService.getYieldDailyReportByStorehouseData(date,function(data){
// $scope.storeRportData = data.respData;
// console.log("仓库产量日报表:",$scope.storeRportData)
// })
// }
// if($rootScope.loginData.state == 7){
// getCkReportByDay($scope.nowDate);
// }
// var getStorehouseReportDatas = function(start,end){
// HttpService.getCkReportData(start,end,function(data){
// $scope.StoreReportData= data.respData;
// for(var i=0;i<$scope.StoreReportData.length;i++){
// if(i==0){
// $scope.StoreReportData[i].isActive=true;
// }else{
// $scope.StoreReportData[i].isActive=false;
// }
// }
// console.log("初始化仓库报表:",data.respData)
// })
// }
// if($rootScope.loginData.state == 7||$rootScope.loginData.state == 0) {
// getStorehouseReportDatas($scope.month_first,$scope.month_last)
// }
$scope
.
showtable
=
-
1
;
$scope
.
showTable
=
function
(
index
)
{
if
(
$scope
.
showtable
!=
index
)
{
$scope
.
showtable
=
index
;
}
else
{
$scope
.
showtable
=
-
1
;
}
}
var
getStorehouseReportDatas
=
function
(
start
,
end
)
{
HttpService
.
getStorehouseReportDatas
(
start
,
end
,
function
(
data
)
{
$scope
.
totalCount
=
data
.
respData
.
sumInfo
;
$scope
.
StoreReportData
=
data
.
respData
.
listInfo
;
for
(
var
i
=
0
;
i
<
$scope
.
StoreReportData
.
length
;
i
++
)
{
if
(
i
==
0
)
{
$scope
.
StoreReportData
[
i
].
isActive
=
true
;
}
else
{
$scope
.
StoreReportData
[
i
].
isActive
=
false
;
}
}
console
.
log
(
"初始化仓库出入库报表:"
,
data
.
respData
)
})
}
if
(
$rootScope
.
loginData
.
state
==
7
||
$rootScope
.
loginData
.
state
==
0
||
$rootScope
.
loginData
.
state
==
8
)
{
getStorehouseReportDatas
(
$scope
.
month_first
,
$scope
.
month_last
)
}
$scope
.
printStoreDayReport
=
function
()
{
var
date
=
$
(
"#wdateCj"
).
val
()
console
.
log
(
"时间"
)
console
.
log
(
date
)
HttpService
.
printStoreReportByDay
(
date
,
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
href
=
URL
.
createObjectURL
(
blob
);
a
.
click
();
})
}
$scope
.
myClick
=
function
()
{
var
start
=
$
(
"#wdate1"
).
val
()
var
end
=
$
(
"#wdate2"
).
val
()
if
(
parseInt
(
start
)
<=
parseInt
(
end
))
{
$scope
.
msgAlert
=
''
;
if
(
$rootScope
.
loginData
.
state
==
2
||
$scope
.
state
==
'02'
)
{
getPrintDataReport
(
start
,
end
);
}
if
(
$rootScope
.
loginData
.
state
==
7
||
$scope
.
state
==
'07'
||
$rootScope
.
loginData
.
state
==
8
)
{
getStorehouseReportDatas
(
start
,
end
)
}
}
else
{
$scope
.
msgAlert
=
"起始日期不能大于结束日期,请重新选择!"
;
}
}
$scope
.
myZjClick
=
function
()
{
var
month
=
$
(
"#wdateZj"
).
val
()
getQualityCheckReport
(
month
)
}
$scope
.
myCjClick
=
function
()
{
var
date
=
$
(
"#wdateCj"
).
val
()
if
(
$rootScope
.
loginData
.
state
==
4
||
$rootScope
.
loginData
.
state
==
0
)
{
getPingReportByDay
(
date
);
}
}
$scope
.
msg
=
"报表页面"
}])
\ No newline at end of file
}]);
\ No newline at end of file
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