Commit be2c4b0c authored by liboyang's avatar liboyang

膜耗材和卡体耗材报表

parent b1f92810
......@@ -162,7 +162,7 @@ public class MaterialManagementApi {
*/
@RequestMapping("queryCardBodyReport")
public Map<String,Object> queryCardBodyReport(@Param("beginDate")String beginDate, @Param("endDate")String endDate, @Param("operateType")String operateType, @Param("name")String name, @Param("cardBodyType")String cardBodyType, @RequestParam("currPage")String currPage, @RequestParam("pageSize")String pageSize){
Map<String, Object> map = materialManagementService.selectCardBodyReport(replaceDate(beginDate), replaceDate(endDate), operateType, name, cardBodyType,(Long.valueOf(currPage)-1)*Long.valueOf(pageSize)+1,Long.valueOf(currPage)*Long.valueOf(pageSize));
Map<String, Object> map = materialManagementService.selectCardBodyReport(replaceDate(beginDate), replaceDate(endDate), operateType, replaceNullString(name), cardBodyType,(Long.valueOf(currPage)-1)*Long.valueOf(pageSize)+1,Long.valueOf(currPage)*Long.valueOf(pageSize));
return map;
}
......@@ -178,7 +178,7 @@ public class MaterialManagementApi {
*/
@RequestMapping("queryCardBodyReportCount")
public int queryCardBodyReportCount(@Param("beginDate")String beginDate, @Param("endDate")String endDate, @Param("operateType")String operateType, @Param("name")String name, @Param("cardBodyType")String cardBodyType){
int i = materialManagementService.selectCardBodyReportCount(replaceDate(beginDate), replaceDate(endDate), operateType, name, cardBodyType);
int i = materialManagementService.selectCardBodyReportCount(replaceDate(beginDate), replaceDate(endDate), operateType, replaceNullString(name), cardBodyType);
return i;
}
......@@ -202,7 +202,7 @@ public class MaterialManagementApi {
*/
@RequestMapping("queryPlasticFilmReport")
public Map<String,Object> queryPlasticFilmReport(@Param("beginDate")String beginDate,@Param("endDate")String endDate,@Param("operateType")String operateType,@Param("name")String name, @RequestParam("currPage")String currPage, @RequestParam("pageSize")String pageSize){
Map<String, Object> map = materialManagementService.selectPlasticFilmReport(replaceDate(beginDate), replaceDate(endDate), operateType, name,(Long.valueOf(currPage)-1)*Long.valueOf(pageSize)+1,Long.valueOf(currPage)*Long.valueOf(pageSize));
Map<String, Object> map = materialManagementService.selectPlasticFilmReport(replaceDate(beginDate), replaceDate(endDate), operateType,replaceNullString(name),(Long.valueOf(currPage)-1)*Long.valueOf(pageSize)+1,Long.valueOf(currPage)*Long.valueOf(pageSize));
return map;
}
......@@ -216,7 +216,7 @@ public class MaterialManagementApi {
*/
@RequestMapping("queryPlasticFilmReportCount")
public int queryPlasticFilmReportCount(@Param("beginDate")String beginDate, @Param("endDate")String endDate, @Param("operateType")String operateType, @Param("name")String name){
int i = materialManagementService.selectPlasticFilmReportCount(replaceDate(beginDate), replaceDate(endDate), operateType, name);
int i = materialManagementService.selectPlasticFilmReportCount(replaceDate(beginDate), replaceDate(endDate), operateType, replaceNullString(name));
return i;
}
......@@ -241,4 +241,15 @@ public class MaterialManagementApi {
return str.replace("-", "").replace(" ","").replace(":","");
}
/**
* 字符串去除空格
*
* @param str 原始字符串
* @return 返回新的字符串
*/
private String replaceNullString(String str) {
if (str == "") {
return null;
} else return str;
}
}
......@@ -121,7 +121,7 @@ public interface MaterialManagementMapper {
@Select("<script>" +
"select * from (select name,save_date,CARD_BODY_TYPE,sum(count1) count1 ,sum(count2) count2,rownum rn\n" +
"from (select name,CARD_TYPE,CARD_BODY_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from CARD_BODY where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 " +
"<if test='name != 0 '>" +
"<if test='name != null '>" +
" and name =#{name} " +
"</if>" +
"<if test='typeCode != 0 '>" +
......@@ -130,15 +130,15 @@ public interface MaterialManagementMapper {
"<if test='cardBodyType != 0 '>" +
" and card_Body_Type =#{cardBodyType} " +
"</if>" +
") \n" +
" group by name, save_date,CARD_BODY_TYPE,rownum ORDER BY rownum) where rn BETWEEN #{start} and #{end}" +
"ORDER BY save_date) \n" +
" group by name, save_date,CARD_BODY_TYPE,rownum ORDER BY save_date,rownum) where rn BETWEEN #{start} and #{end}" +
"</script>")
public List<Map<String,Object>> selectCardBodyReport(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name, @Param("cardBodyType") long cardBodyType,@Param("start") long start,@Param("end") long end);
@Select("<script>" +
"select * from (select name,save_date,CARD_BODY_TYPE,sum(count1) count1 ,sum(count2) count2,rownum rn\n" +
"from (select name,CARD_TYPE,CARD_BODY_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from CARD_BODY where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 " +
"<if test='name != 0 '>" +
"<if test='name != null '>" +
" and name =#{name} " +
"</if>" +
"<if test='typeCode != 0 '>" +
......@@ -147,57 +147,57 @@ public interface MaterialManagementMapper {
"<if test='cardBodyType != 0 '>" +
" and card_Body_Type =#{cardBodyType} " +
"</if>" +
") \n" +
" group by name, save_date,CARD_BODY_TYPE,rownum ORDER BY rownum) " +
"ORDER BY save_date) \n" +
" group by name, save_date,CARD_BODY_TYPE,rownum ORDER BY save_date,rownum) " +
"</script>")
public List<Map<String,Object>> selectCardBodyReportCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name, @Param("cardBodyType") long cardBodyType);
@Select("select sum(count1) count1 ,sum(count2) count2\n" +
"from (select name,CARD_TYPE,CARD_BODY_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from CARD_BODY)")
"from (select name,CARD_TYPE,CARD_BODY_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from CARD_BODY where state =1)")
public List<Map<String,Object>> selectCardBodyReportTotalCount();
@Select("<script>" +
"select * from (select name,save_date,sum(count1) count1 ,sum(count2) count2,rownum rn\n" +
"from (select name,CARD_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from PLASTIC_FILM where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 " +
"<if test='name != 0 '>" +
"from (select name,PLASTIC_FILM_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(PLASTIC_FILM_TYPE,2,0,total_count) count1 ,decode(PLASTIC_FILM_TYPE,1,0,total_count) count2 from PLASTIC_FILM where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 " +
"<if test='name != null '>" +
" and name =#{name} " +
"</if>" +
"<if test='typeCode != 0 '>" +
" and card_type =#{typeCode} " +
" and PLASTIC_FILM_TYPE =#{typeCode} " +
"</if>" +
") \n" +
" group by name, save_date,rownum ORDER BY rownum) where rn BETWEEN #{start} and #{end}" +
"ORDER BY save_date) \n" +
" group by name, save_date,rownum ORDER BY save_date,rownum) where rn BETWEEN #{start} and #{end}" +
"</script>")
public List<Map<String,Object>> selectPlasticFilmReport(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name,@Param("start") long start,@Param("end") long end);
@Select("<script>" +
"select * from (select name,save_date,sum(count1) count1 ,sum(count2) count2,rownum rn\n" +
"from (select name,CARD_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from PLASTIC_FILM where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 " +
"<if test='name != 0 '>" +
"from (select name,PLASTIC_FILM_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(PLASTIC_FILM_TYPE,2,0,total_count) count1 ,decode(PLASTIC_FILM_TYPE,1,0,total_count) count2 from PLASTIC_FILM where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 " +
"<if test='name != null '>" +
" and name =#{name} " +
"</if>" +
"<if test='typeCode != 0 '>" +
" and card_type =#{typeCode} " +
" and PLASTIC_FILM_TYPE =#{typeCode} " +
"</if>" +
") \n" +
" group by name, save_date,rownum ORDER BY rownum) where rn BETWEEN #{start} and #{end}" +
" ORDER BY save_date) \n" +
" group by name, save_date,rownum ORDER BY save_date,rownum)" +
"</script>")
public List<Map<String,Object>> selectPlasticFilmReportCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name);
@Select("select sum(count1) count1 ,sum(count2) count2\n" +
"from (select name,CARD_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from PLASTIC_FILM)")
"from (select name,PLASTIC_FILM_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(PLASTIC_FILM_TYPE,2,0,total_count) count1 ,decode(PLASTIC_FILM_TYPE,1,0,total_count) count2 from PLASTIC_FILM where state =1)")
public List<Map<String,Object>> selectPlasticFilmTotalCount();
@Select("select user_info.* from user_info \n" +
"left join SYS_USER_ROLE on SYS_USER_ROLE.USER_ID = user_info.ID\n" +
"where SYS_USER_ROLE.ROLE_ID = 33 or SYS_USER_ROLE.ROLE_ID = 33")
"where SYS_USER_ROLE.ROLE_ID = 33 or SYS_USER_ROLE.ROLE_ID = 90")
public List<Map<String,Object>> selectCardBodyOperation();
@Select("select user_info.* from user_info \n" +
"left join SYS_USER_ROLE on SYS_USER_ROLE.USER_ID = user_info.ID\n" +
"where SYS_USER_ROLE.ROLE_ID = 31 or SYS_USER_ROLE.ROLE_ID = 31")
"where SYS_USER_ROLE.ROLE_ID = 31 or SYS_USER_ROLE.ROLE_ID = 90")
public List<Map<String,Object>> selectPlasticFilmOperation();
}
......@@ -193,5 +193,8 @@
<script src="views/queryDeliveredReport/queryDeliveredReport.js"></script>
<script src="views/insertFilm/insertFilm.js"></script>
<script src="views/insertCardBody/insertCardBody.js"></script>
<script src="views/filmManagement/filmManagement.js"></script>
<script src="views/cardReport/cardReport.js"></script>
<script src="views/filmReport/filmReport.js"></script>
</body>
</html>
\ No newline at end of file
......@@ -35,11 +35,14 @@ angular.module('AvatarCheck', [
'AvatarCheck.saveDeliveredFailedInfo',
'AvatarCheck.queryDeliveredReport',
'AvatarCheck.insertFilm',
'AvatarCheck.insertCardBody'
'AvatarCheck.insertCardBody',
'AvatarCheck.filmManagement',
'AvatarCheck.filmReport',
'AvatarCheck.cardReport'
]).config(['$locationProvider', '$routeProvider', 'localStorageServiceProvider', '$qProvider',function ($locationProvider, $routeProvider, localStorageServiceProvider, $qProvider) {
$locationProvider.hashPrefix('!');
$routeProvider.otherwise({redirectTo: '/createTaskList'});
localStorageServiceProvider.setPrefix('AvatarCheck')
localStorageServiceProvider.setPrefix('AvatarCheck');
$qProvider.errorOnUnhandledRejections(false)
}])
......@@ -192,6 +195,17 @@ angular.module('AvatarCheck', [
if($location.path()=="/insertCardBody"){
$rootScope.tab = '/insertCardBody';
}
if($location.path()=="/filmManagement"){
$rootScope.tab = '/filmManagement';
}
if($location.path()=="/cardReport"){
$rootScope.tab = '/cardReport';
}
if($location.path()=="/filmReport"){
$rootScope.tab = '/filmReport';
}
......
......@@ -1159,7 +1159,7 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data)
})
},
insertFilm:function (totalCount,plasticFilmType,note,name,success) {
insertFilm:function (totalCount,plasticFilmType,note,name,state,success) {
$http({
method: 'GET',
url: "../MaterialManagementApi/insertFilm" + urlTimeStamp(),
......@@ -1167,7 +1167,8 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
totalCount :totalCount,
plasticFilmType :plasticFilmType,
note:note,
name:name
name:name,
state:state
}
}).then(function successCallback(response) {
......@@ -1190,7 +1191,7 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
})
},
// String cardType,@Param("totalCount")String totalCount,@Param("note")String note, @Param("name")String name
insertCardBody:function (cardType,totalCount,note,cardBodyType,name,success) {
insertCardBody:function (cardType,totalCount,note,cardBodyType,name,state,success) {
$http({
method: 'GET',
url: "../MaterialManagementApi/insertCardBody" + urlTimeStamp(),
......@@ -1199,7 +1200,8 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
totalCount :totalCount,
note:note,
name:name,
cardBodyType:cardBodyType
cardBodyType:cardBodyType,
state:state
}
}).then(function successCallback(response) {
......@@ -1222,7 +1224,125 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data)
})
},
selectMaterialManagement:function(success) {
$http({
method: 'GET',
url: "../MaterialManagementApi/selectCardBody" + urlTimeStamp()
}).then(function successCallback(response) {
success(response.data)
})
},
updateApplyStateData:function(id,success) {
$http({
method: 'GET',
url: "../MaterialManagementApi/updateCardBody" + urlTimeStamp(),
params:{
id:id
}
}).then(function successCallback(response) {
success(response.data)
})
},
selectFilmManagement:function(success) {
$http({
method: 'GET',
url: "../MaterialManagementApi/selectPlasticFilm" + urlTimeStamp()
}).then(function successCallback(response) {
success(response.data)
})
},
updateFilmStateData:function(id,success) {
$http({
method: 'GET',
url: "../MaterialManagementApi/updatePlasticFilm" + urlTimeStamp(),
params: {
id: id
}
}).then(function successCallback(response) {
success(response.data)
})
},
selectFilmCountData:function(date1, date2,operator, cardType,success) {
console.log(date1, date2,operator,cardType);
$http({
method: 'GET',
url: "../MaterialManagementApi/queryPlasticFilmReportCount" + urlTimeStamp(),
params: {
beginDate:date1,
endDate:date2,
name:operator,
operateType:cardType
}
}).then(function successCallback(response) {
success(response.data)
})
},
selectFilmData:function(date1, date2,operator, cardType,currPage,itemsPerPage,success) {
console.log(date1, date2,operator,cardType,currPage,itemsPerPage);
$http({
method: 'GET',
url: "../MaterialManagementApi/queryPlasticFilmReport" + urlTimeStamp(),
params: {
beginDate:date1,
endDate:date2,
name:operator,
operateType:cardType,
currPage:currPage,
pageSize:itemsPerPage
}
}).then(function successCallback(response) {
success(response.data)
})
},
selectCardBodyData:function(date1, date2,operator,cardBodyType1,cardType,currPage,itemsPerPage,success) {
console.log(date1, date2,operator,cardBodyType1,cardType,currPage,itemsPerPage);
$http({
method: 'GET',
url: "../MaterialManagementApi/queryCardBodyReport" + urlTimeStamp(),
params: {
beginDate:date1,
endDate:date2,
name:operator,
cardBodyType:cardBodyType1,
operateType:cardType,
currPage:currPage,
pageSize:itemsPerPage
}
}).then(function successCallback(response) {
success(response.data)
})
},
selectCardBodyCountData:function(date1, date2,operator,cardBodyType1,cardType,success) {
console.log(date1, date2,operator,cardBodyType1,cardType);
$http({
method: 'GET',
url: "../MaterialManagementApi/queryCardBodyReportCount" + urlTimeStamp(),
params: {
beginDate:date1,
endDate:date2,
name:operator,
cardBodyType:cardBodyType1,
operateType:cardType
}
}).then(function successCallback(response) {
success(response.data)
})
},
getOperator:function(success) {
$http({
method: 'GET',
url: "../MaterialManagementApi/queryPlasticFilmOperation" + urlTimeStamp()
}).then(function successCallback(response) {
success(response.data)
})
},
getCardBodyOperator:function(success) {
$http({
method: 'GET',
url: "../MaterialManagementApi/queryCardBodyOperation" + urlTimeStamp()
}).then(function successCallback(response) {
success(response.data)
})
},
}
});
\ No newline at end of file
<style>
.table th, .table td {
text-align: center;
vertical-align: middle!important;
}
.select2-search__field {
height:30px;
}
.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="box box-default">
<div class="box-header">
<strong>身份证卡体耗材统计报表</strong>
</div>
<div class="box box-primary">
<table class="table table-bordered" style="margin-bottom: 0;">
<tr>
<td> <span>起始日期:</span></td>
<td>
<input type="text" class="form-control" ng-model="choseDate" id="datepicker1" readonly/>
</td>
<td> <span>结束日期:</span></td>
<td>
<input type="text" class="form-control" ng-model="choseDate" id="datepicker2" readonly/>
</td>
<td>卡体类型:</td>
<td>
<select class="form-control select2" id="cardBodyType1">
<option value="0">全部</option>
<option value="1">身份证卡体</option>
<option value="2">香港居住证卡体</option>
<option value="3">港澳居住证卡体</option>
</select>
</td>
</tr>
<tr>
<td> <span>操作人:</span></td>
<td>
<select class="form-control select2" id="operator">
<option value="">全部</option>
<option value="{{item.NAME}}" ng-repeat="item in operator">{{item.NAME}}</option>
</select>
</td>
<td>操作:</td>
<td>
<select class="form-control select2" id="cardType2">
<option value="0">全部</option>
<option value="1">出库</option>
<option value="2">入库</option>
</select>
</td>
<td colspan="2"><div style="text-align: left;">
<button class="btn btn-primary" ng-click="selectCardBodyCount()">查询</button>
</div></td>
</tr>
</table>
<!--<div ng-if="cardBodyCountData.list.length==0">
<h4 style="padding-left: 10px;">暂无数据</h4>
</div>-->
<div class="box-info" style="padding: 7px;padding-top: 0px;">
<table class="table table-bordered table-hover postTable" ng-if="cardBodyCountData.list.length>1">
<thead>
<tr>
<th>保存时间</th>
<th>出库数</th>
<th>入库数</th>
<th>卡体类型</th>
<th>提交人</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in cardBodyCountData.list">
<td>{{item.SAVE_DATE}}</td>
<td>{{item.COUNT1}}</td>
<td>{{item.COUNT2}}</td>
<td ng-if="item.CARD_BODY_TYPE==0"></td>
<td ng-if="item.CARD_BODY_TYPE==1">身份证卡体</td>
<td ng-if="item.CARD_BODY_TYPE==2">香港居住证卡体</td>
<td ng-if="item.CARD_BODY_TYPE==3">港澳居住证卡体</td>
<td>{{item.NAME}}</td>
</tr>
</tbody>
</table>
<table class="table table-bordered bg-info">
<th>总计</th>
<th>
出库数:
<span ng-if="cardBodyCountData.total1==null">0</span>
<span ng-if="cardBodyCountData.total1!=null">{{cardBodyCountData.total1}}</span>
</th>
<th>
入库数
<span ng-if="cardBodyCountData.total2==null">0</span>
<span ng-if="cardBodyCountData.total2!=null">{{cardBodyCountData.total2}}</span>
</th>
<th colspan="2">
库存:{{cardBodyCountData.total2-cardBodyCountData.total1}}
</th>
</table>
<div style="padding-left: 27%;" ng-if="cardBodyCountData.list.length>1">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
'use strict';
angular.module('AvatarCheck.cardReport', ['ngRoute', 'AvatarCheck.http', 'tm.pagination'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/cardReport', {
templateUrl: 'views/cardReport/cardReport.html' + urlTimeStamp(),
controller: 'cardReportCtrl',
cache: false
});
}])
.controller('cardReportCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
//Date picker
$('#datepicker1').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-mm-dd',
todayBtn: 1,
autoclose: 1
});
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
//Date picker
$('#datepicker2').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-mm-dd',
todayBtn: 1,
autoclose: 1
});
$scope.paginationConf = {
currentPage: 1,
itemsPerPage: 10,
perPageOptions: [10, 20, 30, 40, 50]
};
HttpService.getCardBodyOperator(function(data) {
$scope.operator = data;
console.log($scope.operator)
})
$scope.selectCardBodyCount=function(){
if($scope.paginationConf.currentPage!=1){
$scope.paginationConf.currentPage=1;
$scope.paginationConf.itemsPerPage=10;
}else{
$scope.selectCardBodyCountPage();
}
}
$scope.selectCardBodyCountPage = function() {
var cardType = $("#cardType2").val();
var operator = $("#operator").val();
var cardBodyType1 = $("#cardBodyType1").val();
var date1 = $("#datepicker1").val();
var date2 = $("#datepicker2").val();
if (date1==""){
date1=$scope.choseDate;
}
if (date2==""){
date2=$scope.choseDate;
}
HttpService.selectCardBodyCountData(date1, date2,operator,cardBodyType1,cardType,function(data) {
$scope.paginationConf.totalItems = data;
console.log($scope.paginationConf.totalItems)
});
HttpService.selectCardBodyData(date1, date2,operator,cardBodyType1,cardType,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data) {
$scope.cardBodyCountData = data;
console.log(data)
})
};
$scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', $scope.selectCardBodyCountPage);
});
\ No newline at end of file
'use strict';
angular.module('AvatarCheck.filmManagement', ['ngRoute', 'AvatarCheck.http'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/filmManagement', {
templateUrl: 'views/filmManagement/filmManagement.html' + urlTimeStamp(),
controller: 'filmManagementCtrl',
cache: false
});
}])
.controller('filmManagementCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
$scope.insertFilm = function () {
var totalCount = $scope.totalCount;
var note = $scope.note;
var plasticFilmType = $scope.plasticFilmType;
var name = $rootScope.loginData.name;
if(angular.isUndefined(plasticFilmType)){
plasticFilmType="1";
}
console.log(totalCount, plasticFilmType, note, name)
HttpService.insertFilm(totalCount, plasticFilmType, note, name,1,function (data) {
$scope.totalCount="";
$scope.note=""
if(data==false){
MessageService.showAlert("添加失败")
}else{
MessageService.showAlert("添加成功")
}
})
}
$scope.selectFilmManagement=function(){
HttpService.selectFilmManagement(function (data) {
$scope.filmManagement = data;
console.log($scope.filmManagement,"$scope.filmManagement")
})
}
$scope.selectFilmManagement();
$scope.updateFilmState = function(item) {
HttpService.updateFilmStateData(item.plasticFilmId,function(data) {
$scope.selectFilmManagement();
})
}
});
\ No newline at end of file
<style>
.table th, .table td {
text-align: center;
vertical-align: middle!important;
}
.select2-search__field {
height:30px;
}
.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="box box-default">
<div class="box-header">
<strong>身份证膜耗材统计报表</strong>
</div>
<div class="box box-primary">
<table class="table table-bordered" style="margin-bottom: 0;">
<tr>
<td> <span>起始日期:</span></td>
<td>
<input type="text" class="form-control" ng-model="choseDate" id="datepicker1" readonly/>
</td>
<td> <span>结束日期:</span></td>
<td>
<input type="text" class="form-control" ng-model="choseDate" id="datepicker2" readonly/>
</td>
<td> <span>提交人:</span></td>
<td>
<select class="form-control select2" id="operator">
<option value="">全部</option>
<option value="{{item.NAME}}" ng-repeat="item in operator">{{item.NAME}}</option>
</select>
</td>
<td>操作:</td>
<td>
<select class="form-control select2" id="cardType2">
<option value="0">全部</option>
<option value="1">出库</option>
<option value="2">入库</option>
</select>
</td>
<td><div style="text-align: left;">
<button class="btn btn-primary" ng-click="selectFilmCount()">查询</button>
</div></td>
</tr>
</table>
<div class="box-info" style="padding: 7px;padding-top: 0px;">
<table class="table table-bordered table-hover postTable" ng-if="filmCountData.list.length>1">
<thead>
<tr>
<th>保存时间</th>
<th>出库数</th>
<th>入库数</th>
<th>提交人</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in filmCountData.list">
<td>{{item.SAVE_DATE}}</td>
<td>{{item.COUNT1}}</td>
<td>{{item.COUNT2}}</td>
<td>{{item.NAME}}</td>
</tr>
</tbody>
</table>
<table class="table table-bordered bg-info">
<th>总计</th>
<th>
出库数:
<span ng-if="filmCountData.total1==null">0</span>
<span ng-if="filmCountData.total1!=null">{{filmCountData.total1}}</span>
</th>
<th>
入库数
<span ng-if="filmCountData.total2==null">0</span>
<span ng-if="filmCountData.total2!=null">{{filmCountData.total2}}</span>
</th>
<th>
库存:{{filmCountData.total2-filmCountData.total1}}
</th>
</table>
<div style="padding-left: 27%;" ng-if="filmCountData.list.length>1">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
'use strict';
angular.module('AvatarCheck.filmReport', ['ngRoute', 'AvatarCheck.http','tm.pagination'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/filmReport', {
templateUrl: 'views/filmReport/filmReport.html' + urlTimeStamp(),
controller: 'filmReportCtrl',
cache: false
});
}])
.controller('filmReportCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
//Date picker
$('#datepicker1').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-mm-dd',
todayBtn: 1,
autoclose: 1
});
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
//Date picker
$('#datepicker2').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-mm-dd',
todayBtn: 1,
autoclose: 1
});
HttpService.getOperator(function(data) {
$scope.operator = data;
console.log($scope.operator)
})
$scope.paginationConf = {
currentPage: 1,
itemsPerPage: 10,
perPageOptions: [10, 20, 30, 40, 50]
};
$scope.selectFilmCount=function(){
if($scope.paginationConf.currentPage!=1){
$scope.paginationConf.currentPage=1;
$scope.paginationConf.itemsPerPage=10;
}else{
$scope.selectFilmCountPage();
}
}
$scope.selectFilmCountPage = function() {
var cardType = $("#cardType2").val();
var operator = $("#operator").val();
var date1 = $("#datepicker1").val();
var date2 = $("#datepicker2").val();
if (date1==""){
date1=$scope.choseDate;
}
if (date2==""){
date2=$scope.choseDate;
}
HttpService.selectFilmCountData(date1, date2,operator,cardType,function(data) {
$scope.paginationConf.totalItems = data;
console.log($scope.paginationConf.totalItems)
});
HttpService.selectFilmData(date1, date2,operator, cardType,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function (data) {
$scope.filmCountData = data;
console.log(data)
})
}
$scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', $scope.selectFilmCountPage);
});
\ No newline at end of file
......@@ -68,7 +68,7 @@
</div>
<div class="box">
<div class="box-header">
<strong>查询卡体耗材统计数据</strong>
<strong>身份证卡体耗材出入库</strong>
</div>
<div class="box box-primary">
<table class="table table-bordered" style="margin-bottom: 0;">
......@@ -104,49 +104,43 @@
</tr>
</table>
<div ng-if="cardBodyManagement.cardBody.length==0">
<h4>暂无数据</h4>
<h4 style="padding-left: 10px;">暂无数据</h4>
</div>
<div class="box-info" style="padding: 7px;padding-top: 0px;">
<table class="table table-bordered table-hover postTable" ng-if="cardBodyManagement.cardBody.length>0">
<thead>
<tr>
<th>卡基统计信息表ID</th>
<th>NO.</th>
<th>保存时间</th>
<th>数量</th>
<th>卡基类型</th>
<th>备注</th>
<th>提交人</th>
<!--<th>出库总数</th>-->
<!--<th>入库总数</th>-->
<th>状态</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in cardBodyManagement.cardBody">
<td>{{item.cardBodyId}}</td>
<td>{{item.saveDate}}</td>
<td>{{item.totalCount}}</td>
<!--<td>-->
<!--({{item.cardType}}==1)?出库:入库-->
<!---->
<!--</td>-->
<td ng-if="item.cardType==1">出库</td>
<td ng-if="item.cardType==2">入库</td>
<td>{{item.note}}</td>
<td>{{item.name}}</td>
<!--<td>{{item.plasticFilmCount1}}</td>-->
<!--<td>{{item.plasticFilmCount2}}</td>-->
<td ng-if="item.state==0" class="text-danger">未审核</td>
<td ng-if="item.state==1" class="text-success">已审核</td>
</tr>
<tr>
<tr class="bg-info">
<th>合计</th>
<td class="colSpan" colspan="2" ng-if="cardType2==1" >{{cardBodyManagement.cardCount1}}</td>
<td class="colSpan" colspan="2" ng-if="cardType2==2" >{{cardBodyManagement .cardCount2}}</td>
<th colspan="2">出库数:</th>
<th ng-if="cardBodyManagement.cardCount1==null">0</th>
<th ng-if="cardBodyManagement.cardCount1!=null">{{cardBodyManagement.cardCount1}}</th>
<th colspan="2">入库数:</th>
<th ng-if="cardBodyManagement.cardCount2==null">0</th>
<th ng-if="cardBodyManagement.cardCount2!=null">{{cardBodyManagement.cardCount2}}</th>
</tr>
</tbody>
</table>
......
......@@ -38,13 +38,14 @@ angular.module("AvatarCheck.insertCardBody",['ngRoute', 'AvatarCheck.http'])
cardType="1";
}
console.log(totalCount,note,cardType,cardBodyType,name);
HttpService.insertCardBody(cardType,totalCount,note,cardBodyType,name, function (data) {
HttpService.insertCardBody(cardType,totalCount,note,cardBodyType,name,0,function (data) {
$scope.totalCount="";
$scope.note=""
if(data==false){
MessageService.showAlert("插入失败")
MessageService.showAlert("添加失败")
}else{
MessageService.showAlert("插入成功")
MessageService.showAlert("添加成功,请等待审核")
}
console.log(data)
})
}
......@@ -61,7 +62,7 @@ angular.module("AvatarCheck.insertCardBody",['ngRoute', 'AvatarCheck.http'])
}
var name = $rootScope.loginData.name;
console.log(date1, date2, cardType,cardBodyType1, name)
HttpService.selectCardBodyManagement(date1, date2, cardType,cardBodyType1,name, function (data) {
HttpService.selectCardBodyManagement(date1, date2, cardType,cardBodyType1,name,function (data) {
$scope.cardBodyManagement = data;
console.log(data)
})
......
......@@ -57,18 +57,14 @@
</div>
<div class="box box-default">
<div class="box-header">
<strong>查询膜耗材统计数据</strong>
<strong>身份证膜耗材出入库</strong>
</div>
<div class="box box-primary">
<table class="table table-bordered" style="margin-bottom: 0;">
<tr>
<td> <span>起始日期:</span></td>
<td>
<input type="text" class="form-control" ng-model="choseDate" id="datepicker1" readonly/>
</td>
<td> <span>结束日期:</span></td>
<td>
<input type="text" class="form-control" ng-model="choseDate" id="datepicker2" readonly/>
<td> <span>查询日期:</span></td>
<td width="30%">
<input type="text" class="form-control" ng-model="choseDate" id="datepicker" readonly/>
</td>
<td>操作:</td>
<td>
......@@ -84,18 +80,19 @@
</tr>
</table>
<div ng-if="plasticFilmdata.plasticFilm.length==0">
<h4>暂无数据</h4>
<h4 style="padding-left: 10px;">暂无数据</h4>
</div>
<div class="box-info" style="padding: 7px;padding-top: 0px;">
<table class="table table-bordered table-hover postTable" ng-if="plasticFilmdata.plasticFilm.length>0">
<thead>
<tr>
<th>塑料膜表流水号</th>
<th>保存时间</th>
<th>NO.</th>
<th>提交时间</th>
<th>数量</th>
<th>操作</th>
<th>备注</th>
<th>提交人</th>
<th>状态</th>
</tr>
</thead>
......@@ -108,11 +105,13 @@
<td ng-if="item.plasticFilmType==2">入库</td>
<td>{{item.note}}</td>
<td>{{item.name}}</td>
<td ng-if="item.state==0" class="text-danger">未审核</td>
<td ng-if="item.state==1" class="text-success">已审核</td>
</tr>
<tr class="bg-info">
<th>合计</th>
<th>出库数:</th>
<th colspan="2">出库数:</th>
<th ng-if="plasticFilmdata.plasticFilmCount1==null">0</th>
<th ng-if="plasticFilmdata.plasticFilmCount1!=null">{{plasticFilmdata.plasticFilmCount1}}</th>
<th colspan="2">入库数:</th>
......@@ -120,8 +119,6 @@
<th ng-if="plasticFilmdata.plasticFilmCount2!=null">{{plasticFilmdata.plasticFilmCount2}}</th>
</tr>
</tbody>
</table>
......
......@@ -10,17 +10,7 @@ angular.module("AvatarCheck.insertFilm",['ngRoute', 'AvatarCheck.http'])
.controller('insertFilmContr', function ($scope, $rootScope, $timeout, HttpService, $filter, $interval, MessageService, ngDialog) {
//Date picker
$('#datepicker1').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-mm-dd',
todayBtn: 1,
autoclose: 1
});
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
//Date picker
$('#datepicker2').datetimepicker({
$('#datepicker').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-mm-dd',
......@@ -38,23 +28,24 @@ angular.module("AvatarCheck.insertFilm",['ngRoute', 'AvatarCheck.http'])
plasticFilmType="1";
}
console.log(totalCount, plasticFilmType, note, name)
HttpService.insertFilm(totalCount, plasticFilmType, note, name, function (data) {
HttpService.insertFilm(totalCount, plasticFilmType, note, name, 0,function (data) {
$scope.totalCount="";
$scope.note="";
$scope.selectPlasticFilmManagement();
if(data==false){
MessageService.showAlert("添加失败")
}else{
MessageService.showAlert("添加成功,请等待审核")
}
})
}
$scope.selectPlasticFilmManagement=function(){
var plasticFilmType = $("#cardType2").val();
var date1 = $("#datepicker1").val();
var date2 = $("#datepicker2").val();
var date1 = $("#datepicker").val();
if (date1==""){
date1=$scope.choseDate;
}
if (date2==""){
date2=$scope.choseDate;
}
var date2 = date1;
var name = $rootScope.loginData.name;
console.log(date1, date2, plasticFilmType, name)
HttpService.selectPlasticFilmManagement(date1, date2, plasticFilmType, name, function (data) {
......
......@@ -48,8 +48,8 @@ angular.module('AvatarCheck.login', ['ngRoute', 'AvatarCheck.http'])
$rootScope.tab = '/uploadExcelAndSearch';
break;
case 9:
$location.path("/createTaskList");
$rootScope.tab = '/createTaskList';
$location.path("/filmReport");
$rootScope.tab = '/filmReport';
break;
}
}
......
<style>
.table th, .table td {
text-align: center;
vertical-align: middle!important;
}
.select2-search__field {
height:30px;
}
.ul li{
cursor: pointer;
}
.table .colSpan{
column-span: 5;
}
.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">
<!-- /.col -->
<div class="col-md-12">
<div class="box box-primary" >
<div class="box-header">
<strong ng-if="state==2">膜打印数据报表</strong>
<strong ng-if="state==3">耗材管理</strong>
<div class="box-tools pull-right">
<span>查询日期:</span><input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate1" id="datepicker1" readonly/> <span></span>
<input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate2" id="datepicker2" readonly/>
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;margin-left: 10px;" ng-click="searchReport()">查询</button>
<div class="box">
<strong class="box-header">添加卡体耗材数据</strong>
<div class="box box-primary">
<table class="table table-bordered" style="margin-bottom: 0;">
<tr>
<td>数量:</td>
<td><input type="number" class="form-control" ng-model="totalCount" placeholder="数量"></td>
<td>卡体类型:</td>
<td>
<select class="form-control select2" id="cardBodyType">
<option value="1">身份证卡体</option>
<option value="2">香港居住证卡体</option>
<option value="3">港澳居住证卡体</option>
</select>
</td>
<td>操作:</td>
<td>
<input type="radio" ng-model="cardType" name="type" value="1" ng-checked="true">出库
<input style="margin-left: 10px;" type="radio" ng-model="cardType" name="type" value="2">入库
</td>
<td>备注:</td>
<td>
<input type="text" class="form-control" ng-model="note" placeholder="备注">
</td>
<td>
<div style="text-align: left;">
<button class="btn btn-primary" ng-click="insertCardBody()">提交</button>
</div>
<!-- /.box-tools -->
</td>
</tr>
</table>
</div>
<!-- /.box-header -->
<div class="box-body">
<div ng-if="reportData.length==1">
<h4>暂无数据</h4>
</div>
<div ng-if="reportData.length>1">
<div class="table-responsive mailbox-messages" >
<div class="mailbox-messages">
<table class="table table-hover postTable">
<div class="box">
<div class="box-header">
<strong>查询未审核卡体耗材统计数据</strong>
</div>
<div class="box box-primary">
<div ng-if="materialManagement.length==0">
<h4 style="padding-left: 10px;">暂无数据</h4>
</div>
<div class="box-info" style="padding: 7px;padding-top: 0px;">
<table class="table table-bordered table-hover postTable" ng-if="materialManagement.length>0">
<thead>
<tr>
<th ng-if="2">打印日期</th>
<th ng-if="3">预定位日期</th>
<th>大批证</th>
<th>邮寄证</th>
<th>军人证</th>
<th>快证</th>
<th>废证</th>
<th>NO.</th>
<th>保存时间</th>
<th>数量</th>
<th>卡基类型</th>
<th>备注</th>
<th>提交人</th>
<th>操作</th>
</tr>
</thead>
<tbody ng-repeat="item in reportData">
<tr style="background-color: #eee">
<td>{{item.date}}</td>
<td style="color: #3c8dbc">{{item.pu}}</td>
<td>{{item.you}}</td>
<td>{{item.jun}}</td>
<td>{{item.kuai}}</td>
<td>{{item.fei}}</td>
<tbody>
<tr ng-repeat="item in materialManagement">
<td>{{item.cardBodyId}}</td>
<td>{{item.saveDate}}</td>
<td>{{item.totalCount}}</td>
<td ng-if="item.cardType==1">出库</td>
<td ng-if="item.cardType==2">入库</td>
<td>{{item.note}}</td>
<td>{{item.name}}</td>
<td><a ng-click="updateApplyState(item)">确认</a></td>
</tr>
</tbody>
</table>
<!-- /.table -->
</div>
<!-- /.table -->
</div>
</div>
<!-- /.mail-box-messages -->
</div>
<!-- /.box-body -->
</div>
<!-- /. box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
</div>
\ No newline at end of file
......@@ -10,40 +10,40 @@ angular.module('AvatarCheck.materialManagement', ['ngRoute', 'AvatarCheck.http']
}])
.controller('materialManagementCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
$scope.state = 3;
//Date picker
$('#datepicker1').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-mm-dd',
todayBtn: 1,
autoclose: 1
});
$('#datepicker2').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-mm-dd',
todayBtn: 1,
autoclose: 1
});
$scope.choseDate1 = $filter("date")(new Date(), "yyyy-MM-dd");
$scope.choseDate2 = $filter("date")(new Date(), "yyyy-MM-dd");
$scope.searchReport = function () {
var date1=$('#datepicker1').val();
var date2=$('#datepicker2').val();
if(date1==''){
date1= $filter("date")(new Date(), "yyyy-MM-dd");
$scope.insertCardBody = function () {
var totalCount = $scope.totalCount;
var note = $scope.note;
var cardType = $scope.cardType;
var cardBodyType = $("#cardBodyType").val();
var name = $rootScope.loginData.name;
if(angular.isUndefined(cardType)){
cardType="1";
}
console.log(totalCount,note,cardType,cardBodyType,name);
HttpService.insertCardBody(cardType,totalCount,note,cardBodyType,name,1,function (data) {
$scope.totalCount="";
$scope.note=""
if(data==false){
MessageService.showAlert("添加失败")
}else{
MessageService.showAlert("添加成功")
}
if(date2==''){
date2= $filter("date")(new Date(), "yyyy-MM-dd");
})
}
HttpService.getReport(date1,date2,function(data){
$scope.reportData=data;
$scope.selectMaterialManagement=function(){
HttpService.selectMaterialManagement(function (data) {
$scope.materialManagement = data;
console.log($scope.materialManagement,"$scope.materialManagement")
})
}
$scope.searchReport();
$scope.selectMaterialManagement();
$scope.updateApplyState = function(item) {
HttpService.updateApplyStateData(item.cardBodyId,function(data) {
$scope.selectMaterialManagement();
})
}
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment