Commit 3fecf261 authored by liboyang's avatar liboyang

修改膜打印和预定位转出以及下发任务单显示勾选数量

parent c4b0da7f
......@@ -4,7 +4,7 @@ server:
spring:
datasource:
driver-class-name: oracle.jdbc.driver.OracleDriver
url: jdbc:oracle:thin:@192.168.1.16:1521:yingxin
url: jdbc:oracle:thin:@192.168.1.102:1521:yingxin
username: yingxin
password: yingxin
servlet:
......
<div class="ui-dialog-content">
<table class="table table-hover" >
<thead>
<tr>
<th>任务单编号</th>
<th>证件数量</th>
<th>卸载数量</th>
<th>废证数量</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in select">
<td>{{item.taskId}}</td>
<td>{{item.countyValidCount-item.specialCount-item.faileCount}}</td>
<td>{{item.downloadCount}}</td>
<td>{{item.faileCount}}</td>
</tr>
</tbody>
</table>
</div>
<div class="ui-dialog-confirm">
<div style="text-align: right;margin-bottom: 10px;">本次转出总数:{{selectCount}}</div>
<button type="submit" class="btn btn-info create" ng-click="confirmGoTo()">确认下发</button>
<button type="submit" class="btn btn-danger" ng-click="closeThisDialog()">取消</button>
</div>
<div class="ui-dialog-content">
<table class="table table-hover" >
<thead>
<tr>
<th>任务单编号</th>
<th>证件数量</th>
<th>电写入数量</th>
<th>电质检数量</th>
<th>废证数量</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in select">
<td>{{item.taskId}}</td>
<td>{{item.countyValidCount-item.specialCount-item.faileCount}}</td>
<td>{{item.eWriteCount}}</td>
<td>{{item.checkCount}}</td>
<td>{{item.faileCount}}</td>
</tr>
</tbody>
</table>
</div>
<div class="ui-dialog-confirm">
<div style="text-align: right;margin-bottom: 10px;">本次转出总数:{{selectCount}}</div>
<button type="submit" class="btn btn-info create" ng-click="confirmGoTo()">确认下发</button>
<button type="submit" class="btn btn-danger" ng-click="closeThisDialog()">取消</button>
</div>
......@@ -147,7 +147,7 @@
</section>
<!-- /.sidebar -->
</aside>
<div class="content-wrapper" ng-view style="min-height: 589px;"></div>
<div class="content-wrapper" ng-view style="min-height: 1000px;"></div>
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Version:</b>1.0.1.110
......
......@@ -27,6 +27,10 @@
</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">
......
......@@ -68,10 +68,22 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
};
//更新某一列数据的选择
$rootScope.cardsTotal = 0;
$scope.restCount=0;
$scope.updateSelection = function ($event, task) {
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
updateSelected(action, task);
$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.selectAll = function (task,$event) {
......@@ -82,6 +94,16 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
updateSelected(action, contact);
}
$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;
......@@ -141,54 +163,56 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
for (var i = 0; i < $scope.selected.length; i++) {
$rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount-$scope.selected[i].specialCount);
}
$scope.restCount = $rootScope.selectCount%8;
console.log("for",$rootScope.selectCount)
var go = function () {
$rootScope.closeBtn();
var checks = $(".checkOneBox:checked");
if(checks.length>0){
var arr = [];
var failedArr = [];
for (var i=0;i<checks.length;i++){
if(checks[i].value.length<11){
failedArr.push(checks[i].value)
}else {
arr.push(checks[i].value)
}
}
var json={
process:$rootScope.loginData.roleList[0].process,
name:$rootScope.loginData.name,
workGroup:$("#group").val(),
taskIdList:arr,
failedList:failedArr
var arr = [];
var failedArr = [];
for (var i=0;i<checks.length;i++){
if(checks[i].value.length<11){
failedArr.push(checks[i].value)
}else {
arr.push(checks[i].value)
}
console.log(json)
HttpService.updateTaskListProcess(json,function(data){
$scope.searchTaskList();
$scope.selected=[];
$rootScope.ableBtn();
$rootScope.closeThis();
})
}else{
MessageService.showAlert("请选择下发的任务单")
}
var json={
process:$rootScope.loginData.roleList[0].process,
name:$rootScope.loginData.name,
workGroup:$("#group").val(),
taskIdList:arr,
failedList:failedArr
}
console.log(json)
HttpService.updateTaskListProcess(json,function(data){
$scope.searchTaskList();
$scope.selected=[];
$rootScope.ableBtn();
$rootScope.closeThis();
})
}
ngDialog.open({
template: 'dialogs/gotoDistribute.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.closeThis=$scope.closeThisDialog;
$rootScope.ableBtn = function(){
$(".create").prop("disabled","false");
}
$rootScope.closeBtn = function(){
$(".create").prop("disabled","true");
}
$scope.confirmGoTo = go;
}]
})
if($scope.selected.length>0){
ngDialog.open({
template: 'dialogs/gotoDistribute.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.closeThis=$scope.closeThisDialog;
$rootScope.ableBtn = function(){
$(".create").prop("disabled","false");
}
$rootScope.closeBtn = function(){
$(".create").prop("disabled","true");
}
$scope.confirmGoTo = go;
}]
})
}else{
MessageService.showAlert("请选择下发的任务单")
}
}
......
......@@ -114,13 +114,8 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
var action = (checkbox.checked ? 'add' : 'remove');
console.log(task)
for (var i = 0; i < task.length; i++) {
if((task[i].countyValidCount-task[i].specialCount)==task[i].downloadCount){
var contact = task[i];
updateSelected(action, contact);
}else{
continue;
}
var contact = task[i];
updateSelected(action, contact);
}
$rootScope.cardsTotal=0;
......@@ -189,40 +184,38 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
console.log("for",$rootScope.selectCount)
var go = function () {
var checks = $("#checkOneBox:checked");
if(checks.length>0){
var arr = [];
var failedArr=[];
for (var i=0;i<checks.length;i++){
if(checks[i].value.length<11){
failedArr.push(checks[i].value)
}else{
arr.push(checks[i].value)
}
var arr = [];
var failedArr=[];
for (var i=0;i<checks.length;i++){
if(checks[i].value.length<11){
failedArr.push(checks[i].value)
}else{
arr.push(checks[i].value)
}
}
var json={
process:$rootScope.loginData.roleList[0].process,
name:$rootScope.loginData.name,
printer:$("#print").val(),
taskIdList:arr,
failedList:failedArr
}
console.log(json)
HttpService.updatePrintTaskListProcess(json,function(data){
$scope.searchTaskList();
$scope.selected=[];
$rootScope.closeThis();
})
}else{
MessageService.showAlert("请选择转出的任务单")
var json={
process:$rootScope.loginData.roleList[0].process,
name:$rootScope.loginData.name,
printer:$("#print").val(),
taskIdList:arr,
failedList:failedArr
}
console.log(json)
HttpService.updatePrintTaskListProcess(json,function(data){
$scope.searchTaskList();
$scope.selected=[];
$rootScope.closeThis();
})
}
var selectList = $scope.selected;
ngDialog.open({
template: 'dialogs/gotoDistribute.html' + urlTimeStamp(),
template: 'dialogs/gotoDistributeByMdy.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) {
$scope.select =selectList;
$scope.confirmGoTo = go;
$rootScope.closeThis = $scope.closeThisDialog;
}]
......@@ -468,12 +461,8 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
for (var i = 0; i < task.length; i++) {
if((task[i].countyValidCount-task[i].specialCount)==task[i].eWriteCount){
var contact = task[i];
updateSelected(action, contact);
}else{
continue;
}
var contact = task[i];
updateSelected(action, contact);
}
};
$scope.isSelected = function (task) {
......@@ -531,49 +520,52 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
var go = function () {
$rootScope.closeBtn();
var checks = $(".checkOneBox:checked");
if(checks.length>0){
var arr = [];
var failedArr=[];
for (var i=0;i<checks.length;i++){
if(checks[i].value.length<11){
failedArr.push(checks[i].value)
}else{
arr.push(checks[i].value);
}
}
var json={
process:$rootScope.loginData.roleList[0].process,
name:$rootScope.loginData.name,
taskIdList:arr,
failedList:failedArr
var arr = [];
var failedArr=[];
for (var i=0;i<checks.length;i++){
if(checks[i].value.length<11){
failedArr.push(checks[i].value)
}else{
arr.push(checks[i].value);
}
console.log(json)
HttpService.updateTaskListProcess(json,function(data){
$scope.searchTaskList();
$scope.selected=[];
$rootScope.ableBtn();
$rootScope.closeThis();
})
}else{
MessageService.showAlert("请选择转出的任务单");
}
var json={
process:$rootScope.loginData.roleList[0].process,
name:$rootScope.loginData.name,
taskIdList:arr,
failedList:failedArr
}
console.log(json)
HttpService.updateTaskListProcess(json,function(data){
$scope.searchTaskList();
$scope.selected=[];
$rootScope.ableBtn();
$rootScope.closeThis();
})
};
var selectList = $scope.selected;
if(selectList.length>0){
ngDialog.open({
template: 'dialogs/gotoDistributeByYdw.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) {
$scope.select =selectList;
$rootScope.ableBtn = function(){
$(".create").prop("disabled","false");
}
$rootScope.closeBtn = function(){
$(".create").prop("disabled","true");
}
$scope.confirmGoTo = go;
$rootScope.closeThis = $scope.closeThisDialog;
}]
})
}else{
MessageService.showAlert("请选择转出的任务单");
}
ngDialog.open({
template: 'dialogs/gotoDistribute.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.ableBtn = function(){
$(".create").prop("disabled","false");
}
$rootScope.closeBtn = function(){
$(".create").prop("disabled","true");
}
$scope.confirmGoTo = go;
$rootScope.closeThis = $scope.closeThisDialog;
}]
})
}
......
......@@ -48,8 +48,7 @@
</thead>
<tbody ng-repeat="task in type.countyList | orderBy:countyCode:desc">
<tr>
<td ng-if="(task.countyValidCount-task.specialCount-task.faileCount)==task.eWriteCount"><input type="checkbox" class="checkOneBox" ng-checked="isSelected(task)" value="{{task.taskId}}" ng-click="updateSelection($event,task)"></td>
<td ng-if="(task.countyValidCount-task.specialCount-task.faileCount)!=task.eWriteCount"></td>
<td><input type="checkbox" class="checkOneBox" ng-checked="isSelected(task)" value="{{task.taskId}}" ng-click="updateSelection($event,task)"></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">{{task.groupList.length}}</td>
......
......@@ -53,8 +53,7 @@
</thead>
<tbody ng-repeat="task in type.countyList | orderBy:countyCode:desc">
<tr>
<td ng-if="(task.countyValidCount-task.specialCount-task.faileCount)<=task.downloadCount"><input type="checkbox" id="checkOneBox" class="checkOneBox" ng-checked="isSelected(task)" value="{{task.taskId}}" name="{{task.countyValidCount-task.specialCount}}" ng-click="updateSelection($event,task)"></td>
<td ng-if="(task.countyValidCount-task.specialCount-task.faileCount)!=task.downloadCount"></td>
<td><input type="checkbox" id="checkOneBox" class="checkOneBox" ng-checked="isSelected(task)" value="{{task.taskId}}" name="{{task.countyValidCount-task.specialCount}}" ng-click="updateSelection($event,task)"></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">{{task.groupList.length}}</td>
......
......@@ -51,7 +51,7 @@
<th>废证数量</th>
<th>复核数量</th>
<th></th>
<th></th>
<!--<th></th>-->
</tr>
</thead>
<tbody ng-repeat="task in type.countyList | orderBy:countyCode:desc">
......@@ -75,9 +75,9 @@
<td class="mailbox-subject">{{task.recheckCount}}</td>
<td class="mailbox-date"><a
ng-click="getPoliceList(task.groupList,task.taskId)">组号列表</a></td>
<td class="mailbox-subject">
<!--<td class="mailbox-subject">
<button class="btn btn-primary">打印封条</button>
</td>
</td>-->
</tr>
<tr ng-if="task.taskId==taskId">
<td></td>
......
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