Commit 85e0aabd authored by Administrator's avatar Administrator

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

parents 8a6d8bc9 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
<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
......@@ -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'] );
}]
}
})
}
]
......
......@@ -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))
})
}
......
<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
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
app.controller('failedCardCtrl', ['$scope', '$rootScope', '$http', '$state', '$filter', '$localStorage', 'HttpService', 'ngDialog', function ($scope, $rootScope, $http, $state, $filter, $localStorage, HttpService, ngDialog) {
app.controller('searchSpecialCardCtrl', ['$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 {
......
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