Commit ee5f91f2 authored by dahai's avatar dahai

Merge remote-tracking branch 'origin/dev' into dev

parents 7efbdb4f acd11e59
......@@ -672,6 +672,19 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
}).then(function successCallback(response) {
success(response.data)
})
},
updateIsValidData:function(slh,isValid,success){
console.log(slh,isValid)
$http({
method: 'GET',
url: "../queryPreproPerson/updatePreproPerson"+urlTimeStamp(),
params:{
uploadNo:slh,
isValid:isValid
}
}).then(function successCallback(response) {
success(response.data)
})
}
}
});
\ No newline at end of file
......@@ -103,21 +103,19 @@
</thead>
<tbody>
<tr ng-repeat="item in packageData">
<td>1</td>
<td>411032546565445</td>
<td>张三</td>
<td>130133195608240013</td>
<td>1321454113</td>
<td>1213134556</td>
<td>普通证</td>
<td>
<input type="radio" name="isPackage" value="1" checked>
<input type="radio" name="isPackage" value="2">
</td>
<td>{{$index+1}}</td>
<td>{{item.JMSFZSLH}}</td>
<td>{{item.XM}}</td>
<td>{{item.GMSFHM}}</td>
<td>{{item.SOURCE_FILE_NAME}}</td>
<td>{{item.NEW_FILE_NAME}}</td>
<td>{{item.CARD_TYPE}}</td>
<td ng-if="item.IS_VALID==1"><button class="btn btn-primary" ng-click="updateIsValid(item.JMSFZSLH,0)">禁用</button></td>
<td ng-if="item.IS_VALID==0"><button class="btn btn-info" ng-click="updateIsValid(item.JMSFZSLH,1)">启用</button></td>
</tr>
</tbody>
</table>
<p style="color:#9f191f;"><span style="margin-right: 15px;">普通证:3000</span><span style="margin-right: 15px;">邮寄证:2000</span><span>禁用数:2</span></p>
<p style="color:#9f191f;"><span style="margin-right: 15px;">普通证:{{simpleCardCount}}</span><span style="margin-right: 15px;">邮寄证:{{postCardCount}}</span><span>禁用数:{{forbiddenCount}}</span></p>
<div style="padding-left: 27%;">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
......
......@@ -69,6 +69,7 @@ angular.module('AvatarCheck.cardProdPackage', ['ngRoute', 'AvatarCheck.http', 't
$scope.paginationConf.totalItems=data.total;
$scope.simpleCardCount = data.puSum;
$scope.postCardCount = data.youSum;
$scope.forbiddenCount= data.invaildCount;
$scope.packageData = data.list;
console.log(data)
})
......@@ -76,8 +77,65 @@ angular.module('AvatarCheck.cardProdPackage', ['ngRoute', 'AvatarCheck.http', 't
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', $scope.doPackageQuery);
$scope.downloadXml = function(){
$scope.updateIsValid = function (slh,isValid) {
HttpService.updateIsValidData(slh,isValid,function(data) {
$scope.doPackageQuery();
MessageService.showAlert("更新成功")
})
};
var getCountAndDownloadUrl = function (url) {
var date = $("#datepicker").val();
var packageType = $("#packageType").val();
if(angular.isUndefined($scope.uploadNo)){
url = url + 'uploadNo=' + $scope.uploadNo + '&';
}else{
url = url + 'uploadNo=&';
}
if(angular.isUndefined($scope.idCard)){
url = url + 'IDCard=' + $scope.idCard + '&';
}else{
url = url + 'IDCard=&';
}
if(angular.isUndefined($scope.oldPackageNo)){
url = url + 'oldFile=' + $scope.oldPackageNo + '&';
}else{
url = url + 'oldFile=&';
}
if(angular.isUndefined($scope.newPackageNo)){
url = url + 'newFile=' + $scope.newPackageNo + '&';
}else{
url = url + 'newFile=&';
}
if(angular.isUndefined($scope.sljg)){
url = url + 'SSXQDM=' + $scope.sljg + '&';
}else{
url = url + 'SSXQDM=&';
}
if(angular.isUndefined($scope.typeCode)){
url = url + 'cardType=' + $scope.typeCode + '&';
}else{
url = url + 'cardType=&';
}
if(angular.isUndefined(packageType)){
url = url + 'state=' + packageType + '&';
}else{
url = url + 'state=&';
}
if (date==''){
date=$filter("date")(new Date(), "yyyy-MM-dd");
url = url + 'uploadDate=' + date + '&';
}else{
url = url + 'uploadDate=' + date + '&';
}
return url + 't=' + Math.floor(Date.now());
}
$scope.downloadXml = function(){
var url = '../exportXML/printXmlData?';
var a = document.createElement("a");
document.body.appendChild(a);
a.href = encodeURI(getCountAndDownloadUrl(url));
a.click();
}
});
\ No newline at end of file
......@@ -86,23 +86,20 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
if (action === 'remove' && $scope.selected.indexOf(task) !== -1) $scope.selected.splice($scope.selected.indexOf(task), 1);
};
//更新某一列数据的选择
var temp = 0;
$rootScope.cardsTotal = 0;
$scope.updateSelection = function ($event, task,typeCode) {
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
updateSelected(action, task);
$rootScope.cardsTotal=0;
var sum = 0;
var checks = document.getElementsByClassName("checkOneBox"+typeCode);
for (var i=0;i<checks.length;i++){
if (checks[i].checked&&!checks[i].disabled) {
sum += parseInt(checks[i].name);
}
for (var i = 0; i < $scope.selected.length; i++) {
sum += parseInt($scope.selected[i].countyValidCount)-parseInt($scope.selected[i].specialCount);
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum - temp;
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
$scope.restCount=$rootScope.cardsTotal%8;
temp = sum;
console.log(sum)
console.log($rootScope.cardsTotal)
};
//全选操作
......@@ -115,20 +112,16 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
updateSelected(action, contact);
}
if(checkbox.checked){
var sum = 0;
var checks = document.getElementsByClassName("checkOneBox"+typeCode);
for (var i = 0; i < checks.length; i++) {
sum += parseInt(checks[i].name);
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum - temp;
$scope.restCount=$rootScope.cardsTotal%8;
temp = sum;
}else{
$rootScope.cardsTotal=0;
var sum = 0;
for (var i = 0; i < $scope.selected.length; i++) {
sum += parseInt($scope.selected[i].countyValidCount)-parseInt($scope.selected[i].specialCount);
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
$scope.restCount=$rootScope.cardsTotal%8;
console.log(sum)
console.log($rootScope.cardsTotal)
};
$scope.isSelected = function (task) {
return $scope.selected.indexOf(task) >= 0;
......@@ -442,23 +435,11 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
if (action === 'remove' && $scope.selected.indexOf(task) !== -1) $scope.selected.splice($scope.selected.indexOf(task), 1);
};
//更新某一列数据的选择
var temp = 0;
$rootScope.cardsTotal = 0;
$scope.updateSelection = function ($event, task) {
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
updateSelected(action, task);
var sum = 0;
var checks = document.getElementsByClassName("checkOneBox");
for (var i=0;i<checks.length;i++){
if (checks[i].checked) {
sum += parseInt(checks[i].value);
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum - temp;
temp = sum;
};
//全选操作
$scope.selectAll = function (task,$event) {
......@@ -468,21 +449,6 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
var contact = task[i];
updateSelected(action, contact);
}
if(checkbox.checked){
var sum = 0;
var checks = document.getElementsByClassName("checkOneBox");
for (var i = 0; i < checks.length; i++) {
sum += parseInt(checks[i].value);
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum - temp;
temp = sum;
}else{
$rootScope.cardsTotal =0;
temp = 0;
}
};
$scope.isSelected = function (task) {
return $scope.selected.indexOf(task) >= 0;
......
......@@ -15,104 +15,104 @@
</div>
<!-- /.box-header -->
<div class="box-body" ng-if="isHistory==0">
<div ng-if="cycleSheetData.length>0">
<div class="nav-tabs-custom clearfix" style="margin-bottom: 0;">
<ul class="nav nav-tabs">
<li ng-class="{true: 'active', false: 'inactive'}[tab.isActive]"
ng-repeat="tab in cycleSheetData track by $index">
<a ng-click="func($index,tab.typeCode)">
<ul style="margin: 0;padding: 0;">
<li style="font-size: 16px;">{{tab.typeName}}</li>
<li style="text-align: center;">{{tab.typeSum}}</li>
</ul>
</a>
</li>
<li class="pull-right" style="padding-right: 20px;">
<h5>任务总数:{{cardsTotal}}</h5>
<h4>余证数:{{restCount}}</h4>
</li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
<table class="table table-hover table-striped">
<thead>
<tr>
<th><input type="checkbox" ng-click="selectAll(type.countyList,type.typeCode,$event)" ng-checked="isSelectedAll($index)"></th>
<th>任务单编号</th>
<th>核验日期</th>
<th>地区</th>
<th>组数</th>
<th>组号</th>
<th>核验数量</th>
<th>证件数量</th>
<th>特殊证件数量</th>
<th>废证数量</th>
<th></th>
</tr>
</thead>
<tbody ng-repeat="task in type.countyList">
<tr>
<td><input type="checkbox" ng-disabled="task.faileCount>0" id="checkOneBox" class="checkOneBox{{type.typeCode}}" ng-checked="isSelected(task)" value="{{task.taskId}}" name="{{task.countyValidCount-task.specialCount}}" ng-click="updateSelection($event,task,type.typeCode)"></td>
<td class="mailbox-star"><b>{{task.taskId}}</b></td>
<td class="mailbox-subject">{{task.saveDate | date:'yyyy-MM-dd'}}</td>
<td class="mailbox-subject"><a>{{task.countyName}}</a></td>
<td class="mailbox-subject">{{task.groupList.length}}</td>
<td class="mailbox-subject">{{task.groupNum}}</td>
<td class="mailbox-subject">{{task.countyValidCount}}</td>
<td class="mailbox-subject">{{task.countyValidCount-task.specialCount}}</td>
<td class="mailbox-attachment">{{task.specialCount}}</td>
<td ng-if="task.faileCount!=0" class="mailbox-subject" style="color: red;">{{task.faileCount}}</td>
<td ng-if="task.faileCount==0" class="mailbox-subject">{{task.faileCount}}</td>
<td class="mailbox-date"><a ng-click="getPoliceList(task.groupList,task.taskId)">组号列表</a></td>
</tr>
<tr ng-if="task.taskId==taskId">
<td></td>
<td colspan="10">
<table class="table">
<thead>
<th>组号</th>
<th>核验数量</th>
<th>证件数量</th>
<th>特殊证件数量</th>
<th>废证数量</th>
<th></th>
</thead>
<tbody>
<tr ng-repeat="item in policeList">
<td>{{item.GROUP_NO}}</td>
<td>{{item.VALID_COUNT}}</td>
<td>{{item.VALID_COUNT-item.SPECIAL_CARD_COUNT}}</td>
<td>{{item.SPECIAL_CARD_COUNT}}</td>
<td>{{item.FAILECOUNT}}</td>
<td><a ng-click="getSpecialCardsInfo(item.GROUP_NO,item.SPECIAL_CARD_COUNT)">特殊证件详情</a></td>
</tr>
</tbody>
</table>
</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<!-- /.table -->
<div class="box-footer">
<div class="pull-right" style="margin-left: 10px;">
<button class="btn btn-primary" ng-click="goes()">转出任务单</button>
</div>
<div class="pull-right">
<select class="form-control select2" id="print" style="border-radius:5px">
<option value="1">一号打印机</option>
<option value="2">二号打印机</option>
</select>
<div ng-if="cycleSheetData.length>0">
<div class="nav-tabs-custom clearfix" style="margin-bottom: 0;">
<ul class="nav nav-tabs">
<li ng-class="{true: 'active', false: 'inactive'}[tab.isActive]"
ng-repeat="tab in cycleSheetData track by $index">
<a ng-click="func($index,tab.typeCode)">
<ul style="margin: 0;padding: 0;">
<li style="font-size: 16px;">{{tab.typeName}}</li>
<li style="text-align: center;">{{tab.typeSum}}</li>
</ul>
</a>
</li>
<li class="pull-right" style="padding-right: 20px;">
<h5>任务总数:{{cardsTotal}}</h5>
<h4>余证数:{{restCount}}</h4>
</li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
<table class="table table-hover table-striped">
<thead>
<tr>
<th><input type="checkbox" ng-click="selectAll(type.countyList,type.typeCode,$event)" ng-checked="isSelectedAll($index)"></th>
<th>任务单编号</th>
<th>核验日期</th>
<th>地区</th>
<th>组数</th>
<th>组号</th>
<th>核验数量</th>
<th>证件数量</th>
<th>特殊证件数量</th>
<th>废证数量</th>
<th></th>
</tr>
</thead>
<tbody ng-repeat="task in type.countyList">
<tr>
<td><input type="checkbox" ng-disabled="task.faileCount>0" id="checkOneBox" class="checkOneBox{{type.typeCode}}" ng-checked="isSelected(task)" value="{{task.taskId}}" name="{{task.countyValidCount-task.specialCount}}" ng-click="updateSelection($event,task,type.typeCode)"></td>
<td class="mailbox-star"><b>{{task.taskId}}</b></td>
<td class="mailbox-subject">{{task.saveDate | date:'yyyy-MM-dd'}}</td>
<td class="mailbox-subject"><a>{{task.countyName}}</a></td>
<td class="mailbox-subject">{{task.groupList.length}}</td>
<td class="mailbox-subject">{{task.groupNum}}</td>
<td class="mailbox-subject">{{task.countyValidCount}}</td>
<td class="mailbox-subject">{{task.countyValidCount-task.specialCount}}</td>
<td class="mailbox-attachment">{{task.specialCount}}</td>
<td ng-if="task.faileCount!=0" class="mailbox-subject" style="color: red;">{{task.faileCount}}</td>
<td ng-if="task.faileCount==0" class="mailbox-subject">{{task.faileCount}}</td>
<td class="mailbox-date"><a ng-click="getPoliceList(task.groupList,task.taskId)">组号列表</a></td>
</tr>
<tr ng-if="task.taskId==taskId">
<td></td>
<td colspan="10">
<table class="table">
<thead>
<th>组号</th>
<th>核验数量</th>
<th>证件数量</th>
<th>特殊证件数量</th>
<th>废证数量</th>
<th></th>
</thead>
<tbody>
<tr ng-repeat="item in policeList">
<td>{{item.GROUP_NO}}</td>
<td>{{item.VALID_COUNT}}</td>
<td>{{item.VALID_COUNT-item.SPECIAL_CARD_COUNT}}</td>
<td>{{item.SPECIAL_CARD_COUNT}}</td>
<td>{{item.FAILECOUNT}}</td>
<td><a ng-click="getSpecialCardsInfo(item.GROUP_NO,item.SPECIAL_CARD_COUNT)">特殊证件详情</a></td>
</tr>
</tbody>
</table>
</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<!-- /.table -->
<div class="box-footer">
<div class="pull-right" style="margin-left: 10px;">
<button class="btn btn-primary" ng-click="goes()">转出任务单</button>
</div>
<div class="pull-right">
<select class="form-control select2" id="print" style="border-radius:5px">
<option value="1">一号打印机</option>
<option value="2">二号打印机</option>
</select>
</div>
</div>
</div>
</div>
</div>
<!-- /.mail-box-messages -->
<div ng-if="cycleSheetData.length==0">
<h4>暂无数据</h4>
</div>
</div>
</div>
<!-- /.mail-box-messages -->
<div ng-if="cycleSheetData.length==0">
<h4>暂无数据</h4>
</div>
</div>
<div class="box-body" ng-if="isHistory==1">
<div ng-if="cycleSheetData.length>0">
......
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