Commit f73676d5 authored by Administrator's avatar Administrator

添加废证页面

添加查询证件页面
添加受理信息页面
添加特殊证件页面
parent 53b2cac0
...@@ -19,6 +19,7 @@ public class UserInfo implements Serializable { ...@@ -19,6 +19,7 @@ public class UserInfo implements Serializable {
private String password; private String password;
private String salt; private String salt;
private byte state; private byte state;
private String workshop;
@ManyToMany(fetch= FetchType.EAGER) @ManyToMany(fetch= FetchType.EAGER)
@JoinTable(name = "SysUserRole", joinColumns = { @JoinColumn(name = "userId") }, inverseJoinColumns ={@JoinColumn(name = "roleId") }) @JoinTable(name = "SysUserRole", joinColumns = { @JoinColumn(name = "userId") }, inverseJoinColumns ={@JoinColumn(name = "roleId") })
private List<SysRole> roleList; private List<SysRole> roleList;
...@@ -78,4 +79,12 @@ public class UserInfo implements Serializable { ...@@ -78,4 +79,12 @@ public class UserInfo implements Serializable {
public void setRoleList(List<SysRole> roleList) { public void setRoleList(List<SysRole> roleList) {
this.roleList = roleList; this.roleList = roleList;
} }
public String getWorkshop() {
return workshop;
}
public void setWorkshop(String workshop) {
this.workshop = workshop;
}
} }
\ No newline at end of file
<div class="ui-dialog-title">
特殊证件列表
</div>
<div class="ui-dialog-content">
<table>
<tr>
<td colspan="4">
<table style="font-size:0.9em;color: #000;" class="table">
<thead>
<th>受理号</th>
<th>类型</th>
</thead>
<tbody>
<tr ng-repeat="specialCard in specialCardList">
<td>{{specialCard.acceptNo}}</td>
<td ng-if="specialCard.specialType==0">余证</td>
<td ng-if="specialCard.specialType==1">快证</td>
<td ng-if="specialCard.specialType==2">退证</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>
<div class="ui-dialog-title"> <div class="ui-dialog-title">
添加权限 添加权限
</div> </div>
...@@ -6,15 +5,15 @@ ...@@ -6,15 +5,15 @@
<form name="form" class="form-validation"> <form name="form" class="form-validation">
<div class="form-group"> <div class="form-group">
<label>名称</label> <label>名称</label>
<input type="text" class="form-control" ng-model="name" required > <input type="text" class="form-control" ng-model="name" required>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>资源路径</label> <label>资源路径</label>
<input type="text" class="form-control" ng-model="url" required > <input type="text" class="form-control" ng-model="url" required>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>权限字符串</label> <label>权限字符串</label>
<input type="text" class="form-control" ng-model="permission" required > <input type="text" class="form-control" ng-model="permission" required>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>资源类型</label> <label>资源类型</label>
......
<div class="ui-dialog-title"> <div class="ui-dialog-title">
添加角色 添加角色
</div> </div>
...@@ -6,16 +5,17 @@ ...@@ -6,16 +5,17 @@
<form name="form" class="form-validation"> <form name="form" class="form-validation">
<div class="form-group"> <div class="form-group">
<label>角色名称</label> <label>角色名称</label>
<input type="text" class="form-control" ng-model="role" required > <input type="text" class="form-control" ng-model="role" required>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>角色描述</label> <label>角色描述</label>
<input type="text" class="form-control" ng-model="description" required > <input type="text" class="form-control" ng-model="description" required>
</div> </div>
<div class="form-group pull-in clearfix"> <div class="form-group pull-in clearfix">
<div class="col-sm-6"> <div class="col-sm-6">
<label>权限</label> <label>权限</label>
<select ui-jq="chosen" multiple class="form-control w-md" ng-model="permissionId" ng-options="perm.id as perm.name for perm in activePermissionList"></select> <select ui-jq="chosen" multiple class="form-control w-md" ng-model="permissionId"
ng-options="perm.id as perm.name for perm in activePermissionList"></select>
</div> </div>
</div> </div>
</form> </form>
......
<div class="ui-dialog-title"> <div class="ui-dialog-title">
添加用户 添加用户
</div> </div>
...@@ -6,27 +5,29 @@ ...@@ -6,27 +5,29 @@
<form name="form" class="form-validation"> <form name="form" class="form-validation">
<div class="form-group"> <div class="form-group">
<label>用户名</label> <label>用户名</label>
<input type="text" class="form-control" ng-model="username" required > <input type="text" class="form-control" ng-model="username" required>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>昵称</label> <label>昵称</label>
<input type="text" class="form-control" ng-model="name" required > <input type="text" class="form-control" ng-model="name" required>
</div> </div>
<div class="form-group pull-in clearfix"> <div class="form-group pull-in clearfix">
<div class="col-sm-6"> <div class="col-sm-6">
<label>密码</label> <label>密码</label>
<input type="password" class="form-control" name="password" ng-model="password" required > <input type="password" class="form-control" name="password" ng-model="password" required>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<label>确认密码</label> <label>确认密码</label>
<input type="password" class="form-control" name="confirm_password" required ng-model="confirm_password" ui-validate=" '$value==password' " ui-validate-watch=" 'password' "> <input type="password" class="form-control" name="confirm_password" required ng-model="confirm_password"
ui-validate=" '$value==password' " ui-validate-watch=" 'password' ">
<span ng-show='form.confirm_password.$error.validator' style="color:red;">两次密码不一致!</span> <span ng-show='form.confirm_password.$error.validator' style="color:red;">两次密码不一致!</span>
</div> </div>
</div> </div>
<div class="form-group pull-in clearfix"> <div class="form-group pull-in clearfix">
<div class="col-sm-6"> <div class="col-sm-6">
<label>角色</label> <label>角色</label>
<select class="form-control w-md" ng-model="roleId" ng-options="role.id as role.role for role in activeRoleList"></select> <select class="form-control w-md" ng-model="roleId"
ng-options="role.id as role.role for role in activeRoleList"></select>
</div> </div>
</div> </div>
</form> </form>
......
<div class="ui-dialog-title">
<div class="ui-dialog-title">
提示 提示
</div> </div>
<div class="ui-dialog-content"> <div class="ui-dialog-content">
<div>{{msgText}}</div> <div>{{msgText}}</div>
<div><span style="color: red">{{errText}}</span></div> <div><span style="color: red">{{errText}}</span></div>
</div> </div>
<div class="ui-dialog-confirm"> <div class="ui-dialog-confirm">
<button class="btn btn-info" ng-click="confirmYes()">确定</button> <button class="btn btn-info" ng-click="confirmYes()">确定</button>
</div> </div>
<div class="ui-dialog-title">
<div class="ui-dialog-title">
特殊证件列表 特殊证件列表
</div> </div>
<div class="ui-dialog-content"> <div class="ui-dialog-content">
<table> <table>
<tr > <tr>
<td colspan="4"> <td colspan="4">
<table style="font-size:0.9em;color: #000;" class="table"> <table style="font-size:0.9em;color: #000;" class="table">
<thead> <thead>
...@@ -24,5 +23,5 @@ ...@@ -24,5 +23,5 @@
</tr> </tr>
</table> </table>
</div> </div>
<div class="ui-dialog-title"> <div class="ui-dialog-title">
修改权限 修改权限
</div> </div>
...@@ -6,11 +5,12 @@ ...@@ -6,11 +5,12 @@
<form name="form" class="form-validation"> <form name="form" class="form-validation">
<div class="form-group"> <div class="form-group">
<label>名称</label> <label>名称</label>
<input type="text" class="form-control" ng-model="thisPerm.name" ng-value="thisPerm.name" required > <input type="text" class="form-control" ng-model="thisPerm.name" ng-value="thisPerm.name" required>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>权限字符串</label> <label>权限字符串</label>
<input type="text" class="form-control" ng-model="thisPerm.permission" ng-value="thisPerm.permission" required > <input type="text" class="form-control" ng-model="thisPerm.permission" ng-value="thisPerm.permission"
required>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>资源类型</label> <label>资源类型</label>
......
<div class="ui-dialog-title"> <div class="ui-dialog-title">
修改角色 修改角色
</div> </div>
...@@ -6,16 +5,18 @@ ...@@ -6,16 +5,18 @@
<form name="form" class="form-validation"> <form name="form" class="form-validation">
<div class="form-group"> <div class="form-group">
<label>角色名称</label> <label>角色名称</label>
<input type="text" class="form-control" ng-value="thisRole.role" ng-model="thisRole.role" required > <input type="text" class="form-control" ng-value="thisRole.role" ng-model="thisRole.role" required>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>角色描述</label> <label>角色描述</label>
<input type="text" class="form-control" ng-value="thisRole.description" ng-model="thisRole.description" required > <input type="text" class="form-control" ng-value="thisRole.description" ng-model="thisRole.description"
required>
</div> </div>
<div class="form-group pull-in clearfix"> <div class="form-group pull-in clearfix">
<div class="col-sm-6"> <div class="col-sm-6">
<label>权限</label> <label>权限</label>
<select ui-jq="chosen" multiple class="form-control w-md" ng-model="permissionId" ng-options="perm.id as perm.name for perm in activePermissionList"></select> <select ui-jq="chosen" multiple class="form-control w-md" ng-model="permissionId"
ng-options="perm.id as perm.name for perm in activePermissionList"></select>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -452,6 +452,21 @@ app.service('MessageService', function (ngDialog) { ...@@ -452,6 +452,21 @@ app.service('MessageService', function (ngDialog) {
var errA = {Error:true, ReturnCode:err.status, ReturnMsg:"API访问返回错误"} var errA = {Error:true, ReturnCode:err.status, ReturnMsg:"API访问返回错误"}
MessageService.httpRequestFailed(JSON.stringify(errA)) MessageService.httpRequestFailed(JSON.stringify(errA))
}) })
},
findFailedinfo:function(state,workShop,success){
$http({
method: 'GET',
url: "../user/findFailedinfo" + urlTimeStamp(),
params:{
workShop:workShop,
state:state
}
}).then(function successCallback(response) {
success(response.data)
},function(err){
var errA = {Error:true, ReturnCode:err.status, ReturnMsg:"API访问返回错误"}
MessageService.httpRequestFailed(JSON.stringify(errA))
})
} }
......
...@@ -73,8 +73,8 @@ ...@@ -73,8 +73,8 @@
ng-show="city.printer_Id!=null">机器<span>{{city.printer_Id}}</span></span> ng-show="city.printer_Id!=null">机器<span>{{city.printer_Id}}</span></span>
</td> </td>
<td>{{city.state}}</td> <td>{{city.state}}</td>
<td ng-if="userState<=4" ><a ng-click="showTable(city.task_Id)">组号列表</a></td> <td ng-if="userState<=4"><a ng-click="showTable(city.task_Id)">组号列表</a></td>
<td ng-if="userState>4" ><a ng-click="showTable(city.task_Id)">区县列表</a></td> <td ng-if="userState>4"><a ng-click="showTable(city.task_Id)">区县列表</a></td>
<td><a ng-click="finishClick(city.task_Id,userState)">完成</a></td> <td><a ng-click="finishClick(city.task_Id,userState)">完成</a></td>
</tr> </tr>
<tr ng-show="showtable==city.task_Id && userState<=4"> <tr ng-show="showtable==city.task_Id && userState<=4">
...@@ -128,7 +128,6 @@ ...@@ -128,7 +128,6 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
......
...@@ -7,128 +7,44 @@ ...@@ -7,128 +7,44 @@
<div class="wrapper b-b bg"> <div class="wrapper b-b bg">
<button class="btn btn-sm btn-default pull-right visible-sm visible-xs" ui-toggle-class="show" <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> target="#email-menu"><i class="fa fa-bars"></i></button>
<a class="w-xs font-bold">任务循环单</a> <a class="w-xs font-bold">废证任务单</a>
</div>
<div class="wrapper hidden-sm hidden-xs" id="email-menu">
<ul class="nav nav-pills nav-stacked nav-sm">
<li ng-repeat="type in typeList" ui-sref-active="active"
ng-class="{true: 'active', false: ''}[type.isActive]">
<a ng-click="check_type(type.typeCode)">
{{type.typeName}}({{type.typeCount}})
</a>
</li>
</ul>
</div> </div>
</div> </div>
<div class="col"> <div class="col">
<!-- header -->
<div class="row" style="padding-top:15px;padding-left:20px;">
<span class="col-lg-2">
<div class="input-group w-md">
<input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt"
is-open="opened" datepicker-options="dateOptions" ng-required="true"
close-text="Close"/>
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="open($event)"><i
class="glyphicon glyphicon-calendar"></i></button>
</span>
</div>
</span>
<span class="col-lg-1" style="margin-left: 1em">
<button type="button" class="btn btn-primary" ng-click="task_click()">查询</button>
</span>
</div>
<!-- / header -->
<div class="wrapper-md"> <div class="wrapper-md">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
证任务 证任务
</div> </div>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped b-t b-light"> <table class="table table-striped b-t b-light">
<thead> <thead>
<th>循环单编号</th> <th>废证受理号</th>
<th>地市</th> <th>循环单号</th>
<th>组数</th> <th>废证原因</th>
<th>组号</th> <th>打印时间</th>
<th>数据核验</th> <th>分配时间</th>
<th>不合格</th> <th>预订位时间</th>
<th>机器号</th>
<th>状态</th> <th>状态</th>
<th>操作</th> <th>操作</th>
</thead> </thead>
<tbody ng-repeat="city in cityList| orderBy:citycode:desc"> <tbody ng-repeat="failedCard in failedCardList">
<tr> <tr>
<td>{{city.task_Id}}</td> <td>{{failedCard.acceptNo}}</td>
<td><span class="city" <td>{{failedCard.taskID}}</td>
style="color: #337ab7;display:inline-block">{{city.cityName}}</span></td> <td>{{failedCard.failedCardReason}}</td>
<td>{{city.groupCount}}</td> <td>{{failedCard.printDate}}</td>
<td>{{city.groupNO}}</td>
<td>{{city.groupSum}}</td>
<td>{{city.groupInvailedSum}}</td>
<td> <td>
<span style="padding-left:10px;" <span style="padding-left:10px;"
ng-show="city.printer_Id==null">未分配</span> ng-show="failedCard.allotDate==null">未分配</span>
<span style="padding-left:10px;" <span style="padding-left:10px;"
ng-show="city.printer_Id!=null">机器<span>{{city.printer_Id}}</span></span> ng-show="failedCard.allotDate!=null">{{failedCard.allotDate}}}</span></span>
</td>
<td>{{city.state}}</td>
<td ng-if="userState<=4" ><a ng-click="showTable(city.task_Id)">组号列表</a></td>
<td ng-if="userState>4" ><a ng-click="showTable(city.task_Id)">区县列表</a></td>
<td><a ng-click="finishClick(city.task_Id,userState)">完成</a></td>
</tr>
<tr ng-show="showtable==city.task_Id && userState<=4">
<td></td>
<td colspan="4">
<table style="font-size:0.9em;color: #000;" class="table">
<thead>
<th>组号</th>
<th>合格数量</th>
<th>不合格数量</th>
<th>特殊证件数量</th>
<th>特殊证件列表</th>
</thead>
<tbody>
<tr ng-repeat="group in groupList">
<td>{{group.groupNO}}</td>
<td>{{group.vaildCount}}</td>
<td>{{group.invaildCount}}</td>
<td>{{group.specialCardCount}}</td>
<td><a ng-click="showTableGroup(group.specialCardList)">特殊证件列表</a></td>
</tr>
</tbody>
</table>
</td> </td>
<td>{{failedCard.positionDate}}</td>
<td>{{failedCard.state}}</td>
<td><a ng-click="finishClick(failedCard.failedCardId,userState)">完成</a></td>
</tr> </tr>
<tr ng-show="showtable==city.task_Id && userState>4">
<td></td>
<td colspan="4">
<table style="font-size:0.9em;color: #000;" class="table">
<thead>
<th>区县名称</th>
<th>卸载数量</th>
<th>完成数量</th>
<th>电写入数量</th>
<th>出库数量</th>
<th>入库数量</th>
</thead>
<tbody>
<tr ng-repeat="county in countyList">
<td>{{county.countyName}}</td>
<td>{{county.downloadCount}}</td>
<td>{{county.finish_Count}}</td>
<td>{{county.electric_writerCount}}</td>
<td>{{county.out_Storage_Count}}</td>
<td>{{county.in_Storage_Count}}</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
......
app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$filter','$localStorage','HttpService','ngDialog', function($scope,$rootScope, $http,$state, $filter,$localStorage,HttpService,ngDialog) { app.controller('failedCardCtrl', ['$scope', '$rootScope', '$http', '$state', '$filter', '$localStorage', 'HttpService', 'ngDialog', function ($scope, $rootScope, $http, $state, $filter, $localStorage, HttpService, ngDialog) {
if($rootScope.loginData.login === false){ if ($rootScope.loginData.login === false) {
$state.go("signin") $state.go("signin")
}else { } else {
$state.go("layout.cycleSheet") $state.go("layout.failedCard")
} }
$scope.userState=$rootScope.loginData.state; $scope.userState = $rootScope.loginData.state;
var getNowFormatDate = function () { var getNowFormatDate = function () {
var date = new Date(); var date = new Date();
var month = date.getMonth() + 1; var month = date.getMonth() + 1;
...@@ -16,10 +16,10 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi ...@@ -16,10 +16,10 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi
if (strDate >= 0 && strDate <= 9) { if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate; strDate = "0" + strDate;
} }
var currentdate = date.getFullYear() + "/" + month +"/"+ strDate; var currentdate = date.getFullYear() + "/" + month + "/" + strDate;
return currentdate; return currentdate;
} }
$scope.today = function() { $scope.today = function () {
$scope.dt = getNowFormatDate(); $scope.dt = getNowFormatDate();
}; };
$scope.today(); $scope.today();
...@@ -27,16 +27,16 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi ...@@ -27,16 +27,16 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi
$scope.clear = function () { $scope.clear = function () {
$scope.dt = null; $scope.dt = null;
}; };
$scope.disabled = function(date, mode) { $scope.disabled = function (date, mode) {
return ( mode === 'day' && ( date.getDay() === 0 || date.getDay() === 6 ) ); return (mode === 'day' && (date.getDay() === 0 || date.getDay() === 6));
}; };
$scope.toggleMin = function() { $scope.toggleMin = function () {
$scope.minDate = $scope.minDate ? null : new Date(); $scope.minDate = $scope.minDate ? null : new Date();
}; };
$scope.toggleMin(); $scope.toggleMin();
$scope.open = function($event) { $scope.open = function ($event) {
$event.preventDefault(); $event.preventDefault();
$event.stopPropagation(); $event.stopPropagation();
...@@ -52,62 +52,73 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi ...@@ -52,62 +52,73 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi
$scope.initDate = new Date('2016-15-20'); $scope.initDate = new Date('2016-15-20');
$scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate']; $scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
$scope.format = $scope.formats[1]; $scope.format = $scope.formats[1];
$scope.task_click = function(){ $scope.task_click = function () {
console.log($rootScope.loginData.state,"----测试-----",$scope.dt,"===="); console.log($rootScope.loginData.state, "----测试-----", $scope.dt, "====");
}
$scope.cardType =0;
$scope.check_type = function(typeCode){
cardType=typeCode;
console.log($rootScope.loginData.state,"----测试-----",$scope.dt,"====",typeCode,"+++++++++++++");
}
// 查询废证列表
var getFailedCardListData = function (state) {
HttpService.getTypeListByTaskStateId(1,function (data) {
$scope.typeList = data.respData;
console.log("---制证类型--数据源:")
console.log(data.respData)
})
} }
getFailedCardListData($rootScope.loginData.state);
$scope.groupList =[
{"groupNO":45,"vaildCount":45,invaildCount:25,specialCardCount:5,specialCardList:[{acceptNo:20180401,specialType:1},{acceptNo:20180401,specialType:1}]},
{"groupNO":45,"vaildCount":45,invaildCount:25,specialCardCount:5,specialCardList:[{acceptNo:20180401,specialType:1},{acceptNo:20180401,specialType:1}]},
{"groupNO":45,"vaildCount":45,invaildCount:25,specialCardCount:5,specialCardList:[{acceptNo:20180401,specialType:1},{acceptNo:20180401,specialType:1}]}
]
$scope.showtable = -1; $scope.cardType = 0;
$scope.showTable = function (taskID) { $scope.check_type = function (typeCode) {
if ($scope.showtable != taskID) { cardType = typeCode;
$scope.showtable = taskID; console.log($rootScope.loginData.state, "----测试-----", $scope.dt, "====", typeCode, "+++++++++++++");
} else {
$scope.showtable = -1;
} }
// // 查询废证列表
// var getFailedCardListData = function (state,workshop) {
// HttpService.findFailedinfo(1,workshop,function (data) {
// $scope.failedCardList = data.respData;
// console.log("---制证类型--数据源:")
// console.log(data.respData)
//
// })
// }
// getFailedCardListData($rootScope.loginData.state,$rootScope.loginData.workshop);
$scope.failedCardList = [
{
"acceptNo": "201802",
"failedCardReason": "切废",
failedCardId: 201811205,
taskID: 201811203,
positionDate: "20181108",
finishDate: "20181109",
allotDate: "20181203",
printDate: "20181204",
state: 2
},
{
"acceptNo": "2018035",
"failedCardReason": "电写入废",
failedCardId: 201811206,
taskID: 201811204,
positionDate: "20181108",
finishDate: "20181109",
allotDate: "20181203",
printDate: "20181204",
state: 2
},
{
"acceptNo": "2018036",
"failedCardReason": "冲切废",
failedCardId: 201811207,
taskID: 201811205,
positionDate: "20181108",
finishDate: "20181109",
allotDate: "20181203",
printDate: "20181204",
state: 2
} }
]
$scope.showTableGroup = function (specialCardList) {
ngDialog.open({
template: 'dialogs/specialCardList.html' + urlTimeStamp(),
width: 800,
cache: false,
controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService,$rootScope) {
$scope.specialCardList = specialCardList;
}]
}) $scope.finishClick = function (taskId, userState) {
} HttpService.updateProductionTask(taskId, userState, function (data) {
//点击确认成功后 再次废证列表
$scope.finishClick= function(taskId,userState){ getFailedCardListData($rootScope.loginData.state, $rootScope.loginData.workshop);
HttpService.updateProductionTask(taskId,userState,function (data) {
//点击确认成功后 再次查询城市列表
getCityListData(cardType,$rootScope.loginData.state);
}) })
} }
$scope.folds = [ $scope.folds = [
{id:1,name: '普通证', count:10000,filter:'',isActive:true, dataTable:{ {
id: 1, name: '普通证', count: 10000, filter: '', isActive: true, dataTable: {
"aaData": [ "aaData": [
{ {
"engine": "Trident", "engine": "Trident",
...@@ -123,8 +134,10 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi ...@@ -123,8 +134,10 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi
"version": "5", "version": "5",
"grade": "C" "grade": "C"
}] }]
}}, }
{id:2,name: '邮寄证', count:20000,filter:'starred', dataTable:{ },
{
id: 2, name: '邮寄证', count: 20000, filter: 'starred', dataTable: {
"aaData": [ "aaData": [
{ {
"engine": "Trident", "engine": "Trident",
...@@ -147,8 +160,10 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi ...@@ -147,8 +160,10 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi
"version": "7", "version": "7",
"grade": "A" "grade": "A"
}] }]
}}, }
{id:3,name: '军人证', count:32000,filter:'sent', dataTable:{ },
{
id: 3, name: '军人证', count: 32000, filter: 'sent', dataTable: {
"aaData": [ "aaData": [
{ {
"engine": "Trident", "engine": "Trident",
...@@ -157,8 +172,10 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi ...@@ -157,8 +172,10 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi
"version": "5.5", "version": "5.5",
"grade": "A" "grade": "A"
}] }]
}}, }
{id:4,name: '快证', count:40,filter:'important', dataTable:{ },
{
id: 4, name: '快证', count: 40, filter: 'important', dataTable: {
"aaData": [ "aaData": [
{ {
"engine": "Webkit", "engine": "Webkit",
...@@ -195,15 +212,16 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi ...@@ -195,15 +212,16 @@ app.controller('failedCardCtrl', ['$scope','$rootScope', '$http', '$state', '$fi
"version": "420.1", "version": "420.1",
"grade": "A" "grade": "A"
}] }]
}} }
}
]; ];
$scope.currentTab = 1; $scope.currentTab = 1;
$scope.func = function (id) { $scope.func = function (id) {
for (var i=0;i<$scope.folds.length;i++){ for (var i = 0; i < $scope.folds.length; i++) {
if(id == $scope.folds[i].id){ if (id == $scope.folds[i].id) {
$scope.folds[i].isActive = true; $scope.folds[i].isActive = true;
}else{ } else {
$scope.folds[i].isActive = false; $scope.folds[i].isActive = false;
} }
} }
......
<!-- navbar --> <!-- navbar -->
<div class="app-header navbar"> <div class="app-header navbar">
<!-- navbar header --> <!-- navbar header -->
<div class="navbar-header {{app.settings.navbarHeaderColor}}"> <div class="navbar-header {{app.settings.navbarHeaderColor}}">
<button class="pull-right visible-xs dk" ui-toggle-class="show" data-target=".navbar-collapse"> <button class="pull-right visible-xs dk" ui-toggle-class="show" data-target=".navbar-collapse">
...@@ -28,12 +28,18 @@ ...@@ -28,12 +28,18 @@
<!-- / buttons --> <!-- / buttons -->
<!-- search form --> <!-- search form -->
<form class="navbar-form navbar-form-sm navbar-left shift" ui-shift="prependTo" target=".navbar-collapse" role="search" ng-controller="TypeaheadDemoCtrl"> <form class="navbar-form navbar-form-sm navbar-left shift" ui-shift="prependTo" target=".navbar-collapse"
role="search" ng-controller="TypeaheadDemoCtrl">
<div class="form-group"> <div class="form-group">
<div class="input-group"> <div class="input-group">
<input type="text" ng-model="selected" typeahead="state for state in states | filter:$viewValue | limitTo:8" class="form-control input-sm bg-light no-border rounded padder" placeholder="Search projects..."> <input type="text" ng-model="selected"
typeahead="state for state in states | filter:$viewValue | limitTo:8"
class="form-control input-sm bg-light no-border rounded padder"
placeholder="Search projects...">
<span class="input-group-btn"> <span class="input-group-btn">
<button type="submit" class="btn btn-sm bg-light rounded"><i class="fa fa-search"></i></button> <button type="submit" class="btn btn-sm bg-light rounded">
<i class="fa fa-search"></i>
</button>
</span> </span>
</div> </div>
</div> </div>
...@@ -51,7 +57,8 @@ ...@@ -51,7 +57,8 @@
<img src="../img/a0.jpg" alt="..."> <img src="../img/a0.jpg" alt="...">
<i class="on md b-white bottom"></i> <i class="on md b-white bottom"></i>
</span> </span>
<span class="hidden-sm hidden-md">{{loginData.username}}</span> <b class="caret"></b> <span class="hidden-sm hidden-md">{{loginData.username}}</span>
<b class="caret"></b>
</a> </a>
<!-- dropdown --> <!-- dropdown -->
<ul class="dropdown-menu animated fadeInRight w"> <ul class="dropdown-menu animated fadeInRight w">
...@@ -66,11 +73,11 @@ ...@@ -66,11 +73,11 @@
</div> </div>
<!-- / navbar collapse --> <!-- / navbar collapse -->
</div> </div>
<!-- / navbar --> <!-- / navbar -->
<!-- menu --> <!-- menu -->
<div class="app-aside hidden-xs {{app.settings.asideColor}}"> <div class="app-aside hidden-xs {{app.settings.asideColor}}">
<div class="aside-wrap"> <div class="aside-wrap">
<!-- if you want to use a custom scroll when aside fixed, use the slimScroll <!-- if you want to use a custom scroll when aside fixed, use the slimScroll
<div class="navi-wrap" ui-jq="slimScroll" ui-options="{height:'100%', size:'8px'}"> <div class="navi-wrap" ui-jq="slimScroll" ui-options="{height:'100%', size:'8px'}">
...@@ -87,7 +94,7 @@ ...@@ -87,7 +94,7 @@
<li ui-sref-active="active" ng-repeat="menu in menuList"> <li ui-sref-active="active" ng-repeat="menu in menuList">
<a ui-sref="{{menu.url}}"> <a ui-sref="{{menu.url}}">
<i class="{{icons[$index]}}"></i> <i class="{{icons[$index]}}"></i>
<span class="font-bold" >{{menu.name}}</span> <span class="font-bold">{{menu.name}}</span>
</a> </a>
</li> </li>
<li class="line dk"></li> <li class="line dk"></li>
...@@ -97,22 +104,21 @@ ...@@ -97,22 +104,21 @@
<!-- nav --> <!-- nav -->
</div> </div>
</div> </div>
</div> </div>
<!-- / menu --> <!-- / menu -->
<!-- view --> <!-- view -->
<div class="app-content" ng-class="{'m-n': app.hideAside, 'h-full': app.hideFooter }"> <div class="app-content" ng-class="{'m-n': app.hideAside, 'h-full': app.hideFooter }">
<div ui-view></div> <div ui-view></div>
</div> </div>
<!-- / view --> <!-- / view -->
<!-- footer --> <!-- footer -->
<div class="app-footer wrapper b-t bg-white"> <div class="app-footer wrapper b-t bg-white">
<span class="pull-right">version:{{app.version}}</span> <span class="pull-right">version:{{app.version}}</span>
&copy; 2018 Copyright. &copy; 2018 Copyright.
</div> </div>
<!-- / footer --> <!-- / footer -->
\ No newline at end of file \ No newline at end of file
app.controller('layOutCtrl', ['$scope','$rootScope', '$http', '$state', '$filter','$localStorage','HttpService', function($scope,$rootScope, $http,$state, $filter,$localStorage,HttpService) { app.controller('layOutCtrl', ['$scope', '$rootScope', '$http', '$state', '$filter', '$localStorage', 'HttpService', function ($scope, $rootScope, $http, $state, $filter, $localStorage, HttpService) {
if ($rootScope.loginData.login == false) {
if($rootScope.loginData.login == false){
$state.go("signin") $state.go("signin")
}else{ } else {
$scope.logout = function(){ $scope.logout = function () {
HttpService.logout(function(data) {}) HttpService.logout(function (data) {
})
$state.go("signin") $state.go("signin")
localStorage.removeItem("ngStorage-loginData"); localStorage.removeItem("ngStorage-loginData");
location.reload(); location.reload();
......
<div class="app-content-body app-content-full fade-in-up" ng-class="{'h-full': app.hideFooter }"> <div class="app-content-body app-content-full fade-in-up" ng-class="{'h-full': app.hideFooter }">
<!-- hbox layout --> <!-- 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="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 style="padding: 20px;" class="layui-anim layui-anim-up"> <div style="padding: 20px;" class="layui-anim layui-anim-up">
<xblock> <xblock>
<button class="layui-btn" ng-click="addPerms()"><i class="layui-icon" ></i>添加</button> <button class="layui-btn" ng-click="addPerms()"><i class="layui-icon"></i>添加</button>
</xblock> </xblock>
<table class="layui-table"> <table class="layui-table">
<thead> <thead>
...@@ -30,13 +31,17 @@ ...@@ -30,13 +31,17 @@
<!--<td>{{permission.parent_id}}</td>--> <!--<td>{{permission.parent_id}}</td>-->
<!--<td>{{permission.parent_ids}}</td>--> <!--<td>{{permission.parent_ids}}</td>-->
<td class="td-status"> <td class="td-status">
<span ng-if="permission.available==1" class="layui-btn layui-btn-normal layui-btn-mini layui-btn-disabled">已停用</span> <span ng-if="permission.available==1"
<span ng-if="permission.available==0" class="layui-btn layui-btn-normal layui-btn-mini">已启用</span> class="layui-btn layui-btn-normal layui-btn-mini layui-btn-disabled">已停用</span>
<span ng-if="permission.available==0"
class="layui-btn layui-btn-normal layui-btn-mini">已启用</span>
</td> </td>
<td> <td>
<a class="layui-btn layui-btn" ng-click="updatePerms(permission.id)">修改</a> <a class="layui-btn layui-btn" ng-click="updatePerms(permission.id)">修改</a>
<a class="layui-btn layui-btn-danger" ng-if="permission.available==0" ng-click="permissionDel(permission.id)">删除</a> <a class="layui-btn layui-btn-danger" ng-if="permission.available==0"
<a class="layui-btn layui-btn-info" ng-if="permission.available==1" ng-click="permissionOpen(permission.id)">启用</a> ng-click="permissionDel(permission.id)">删除</a>
<a class="layui-btn layui-btn-info" ng-if="permission.available==1"
ng-click="permissionOpen(permission.id)">启用</a>
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -44,6 +49,6 @@ ...@@ -44,6 +49,6 @@
</div> </div>
</div> </div>
<!-- /hbox layout --> <!-- /hbox layout -->
</div> </div>
\ No newline at end of file
app.controller('permissionListCtrl', ['$scope','$rootScope', '$http', '$state', '$filter','$localStorage','HttpService','ngDialog', app.controller('permissionListCtrl', ['$scope', '$rootScope', '$http', '$state', '$filter', '$localStorage', 'HttpService', 'ngDialog',
function($scope,$rootScope, $http,$state, $filter,$localStorage,HttpService,ngDialog) { function ($scope, $rootScope, $http, $state, $filter, $localStorage, HttpService, ngDialog) {
if($rootScope.loginData.login === false){ if ($rootScope.loginData.login === false) {
$state.go("signin") $state.go("signin")
}else { } else {
$state.go("layout.permissionList") $state.go("layout.permissionList")
} }
$scope.id = 'id'; $scope.id = 'id';
var getPermissionList = function(){ var getPermissionList = function () {
HttpService.getPermissionListData(function(data) { HttpService.getPermissionListData(function (data) {
$scope.permissionList = data; $scope.permissionList = data;
console.log($scope.permissionList); console.log($scope.permissionList);
}) })
...@@ -17,35 +17,35 @@ app.controller('permissionListCtrl', ['$scope','$rootScope', '$http', '$state', ...@@ -17,35 +17,35 @@ app.controller('permissionListCtrl', ['$scope','$rootScope', '$http', '$state',
getPermissionList(); getPermissionList();
// 删除权限 // 删除权限
$scope.permissionDel = function(id){ $scope.permissionDel = function (id) {
HttpService.delPermission(id,function(data){ HttpService.delPermission(id, function (data) {
getPermissionList(); getPermissionList();
}) })
} }
// 启用权限 // 启用权限
$scope.permissionOpen = function(id){ $scope.permissionOpen = function (id) {
HttpService.openPermission(id,function(data){ HttpService.openPermission(id, function (data) {
getPermissionList(); getPermissionList();
}) })
} }
// 添加 // 添加
$scope.addPerms = function(){ $scope.addPerms = function () {
ngDialog.open({ ngDialog.open({
template: 'dialogs/addPermission.html' + urlTimeStamp(), template: 'dialogs/addPermission.html' + urlTimeStamp(),
width:800, width: 800,
cache: false, cache: false,
closeByDocument:false, closeByDocument: false,
controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService) { controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService) {
$scope.permissionAdd = function(resourceType){ $scope.permissionAdd = function (resourceType) {
var permission={}; var permission = {};
permission.name=$scope.name; permission.name = $scope.name;
permission.url=$scope.url; permission.url = $scope.url;
permission.permission=$scope.permission; permission.permission = $scope.permission;
permission.resourceType=resourceType; permission.resourceType = resourceType;
console.log(permission) console.log(permission)
HttpService.addPermission(permission,function(data){ HttpService.addPermission(permission, function (data) {
$scope.closeThisDialog(); $scope.closeThisDialog();
getPermissionList(); getPermissionList();
}) })
...@@ -54,26 +54,26 @@ app.controller('permissionListCtrl', ['$scope','$rootScope', '$http', '$state', ...@@ -54,26 +54,26 @@ app.controller('permissionListCtrl', ['$scope','$rootScope', '$http', '$state',
}) })
} }
// 修改 // 修改
$scope.updatePerms = function(id){ $scope.updatePerms = function (id) {
ngDialog.open({ ngDialog.open({
template: 'dialogs/updatePerms.html' + urlTimeStamp(), template: 'dialogs/updatePerms.html' + urlTimeStamp(),
width:800, width: 800,
cache: false, cache: false,
closeByDocument:false, closeByDocument: false,
controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService) { controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService) {
HttpService.getPermsById(id,function(data){ HttpService.getPermsById(id, function (data) {
$scope.thisPerm = data.permission; $scope.thisPerm = data.permission;
console.log($scope.thisPerm) console.log($scope.thisPerm)
}) })
$scope.permUpdate = function(resourceType){ $scope.permUpdate = function (resourceType) {
var jsonPerm = {}; var jsonPerm = {};
jsonPerm.id = $scope.thisPerm.id; jsonPerm.id = $scope.thisPerm.id;
jsonPerm.name=$scope.thisPerm.name; jsonPerm.name = $scope.thisPerm.name;
// jsonPerm.url=$scope.thisPerm.url; // jsonPerm.url=$scope.thisPerm.url;
jsonPerm.permission =$scope.thisPerm.permission; jsonPerm.permission = $scope.thisPerm.permission;
jsonPerm.resourceType=resourceType; jsonPerm.resourceType = resourceType;
console.log(jsonPerm) console.log(jsonPerm)
HttpService.updatePerm(jsonPerm,function(data){ HttpService.updatePerm(jsonPerm, function (data) {
$scope.closeThisDialog(); $scope.closeThisDialog();
getPermissionList(); getPermissionList();
}) })
...@@ -85,4 +85,4 @@ app.controller('permissionListCtrl', ['$scope','$rootScope', '$http', '$state', ...@@ -85,4 +85,4 @@ app.controller('permissionListCtrl', ['$scope','$rootScope', '$http', '$state',
} }
}]) }])
\ No newline at end of file \ No newline at end of file
<div class="app-content-body app-content-full fade-in-up" ng-class="{'h-full': app.hideFooter }"> <div class="app-content-body app-content-full fade-in-up" ng-class="{'h-full': app.hideFooter }">
<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="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 style="padding: 20px;" class="layui-anim layui-anim-up"> <div style="padding: 20px;" class="layui-anim layui-anim-up">
<xblock> <xblock>
...@@ -34,5 +35,5 @@ ...@@ -34,5 +35,5 @@
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file
app.controller('roleListCtrl', ['$scope','$rootScope', '$http', '$state', '$filter','$localStorage','HttpService','ngDialog', app.controller('roleListCtrl', ['$scope', '$rootScope', '$http', '$state', '$filter', '$localStorage', 'HttpService', 'ngDialog',
function($scope,$rootScope, $http,$state, $filter,$localStorage,HttpService,ngDialog){ function ($scope, $rootScope, $http, $state, $filter, $localStorage, HttpService, ngDialog) {
if($rootScope.loginData.login === false){ if ($rootScope.loginData.login === false) {
$state.go("signin") $state.go("signin")
}else { } else {
$state.go("layout.roleList") $state.go("layout.roleList")
} }
$scope.id = 'id'; $scope.id = 'id';
var getRoleList = function(){ var getRoleList = function () {
HttpService.getRoleListData(function(data) { HttpService.getRoleListData(function (data) {
$scope.roleList = data; $scope.roleList = data;
console.log($scope.roleList); console.log($scope.roleList);
}) })
} }
getRoleList(); getRoleList();
$scope.addRole = function(){ $scope.addRole = function () {
ngDialog.open({ ngDialog.open({
template: 'dialogs/addRole.html' + urlTimeStamp(), template: 'dialogs/addRole.html' + urlTimeStamp(),
width:600, width: 600,
cache: false, cache: false,
closeByDocument:false, closeByDocument: false,
controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService) { controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService) {
HttpService.getAllActivePermissionList(function(data) { HttpService.getAllActivePermissionList(function (data) {
$scope.activePermissionList = data; $scope.activePermissionList = data;
}) })
$scope.roleAdd = function(permissionId){ $scope.roleAdd = function (permissionId) {
var permission={}; var permission = {};
permission.role=$scope.role; permission.role = $scope.role;
permission.description=$scope.description; permission.description = $scope.description;
permission.permissionIds=permissionId; permission.permissionIds = permissionId;
console.log(permission) console.log(permission)
HttpService.rolesAdd(permission,function(data){ HttpService.rolesAdd(permission, function (data) {
$scope.closeThisDialog(); $scope.closeThisDialog();
getRoleList(); getRoleList();
}) })
...@@ -45,32 +45,32 @@ app.controller('roleListCtrl', ['$scope','$rootScope', '$http', '$state', '$filt ...@@ -45,32 +45,32 @@ app.controller('roleListCtrl', ['$scope','$rootScope', '$http', '$state', '$filt
} }
$scope.updateRoles = function(id){ $scope.updateRoles = function (id) {
ngDialog.open({ ngDialog.open({
template: 'dialogs/updateRole.html' + urlTimeStamp(), template: 'dialogs/updateRole.html' + urlTimeStamp(),
width:800, width: 800,
cache: false, cache: false,
closeByDocument:false, closeByDocument: false,
controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService) { controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService) {
HttpService.getRoleById(id,function(data){ HttpService.getRoleById(id, function (data) {
$scope.thisRole = data.role; $scope.thisRole = data.role;
console.log($scope.thisRole) console.log($scope.thisRole)
}) })
HttpService.getAllActivePermissionList(function(data) { HttpService.getAllActivePermissionList(function (data) {
$scope.activePermissionList = data; $scope.activePermissionList = data;
}) })
$scope.roleUpdate = function(permissionId){ $scope.roleUpdate = function (permissionId) {
var jsonRole = {}; var jsonRole = {};
jsonRole.oldPermissionIds=[]; jsonRole.oldPermissionIds = [];
jsonRole.role=$scope.thisRole.role; jsonRole.role = $scope.thisRole.role;
jsonRole.roleId =$scope.thisRole.id; jsonRole.roleId = $scope.thisRole.id;
jsonRole.description =$scope.thisRole.description; jsonRole.description = $scope.thisRole.description;
for (var i=0;i<$scope.thisRole.permissions.length;i++){ for (var i = 0; i < $scope.thisRole.permissions.length; i++) {
jsonRole.oldPermissionIds.push($scope.thisRole.permissions[i].id); jsonRole.oldPermissionIds.push($scope.thisRole.permissions[i].id);
} }
jsonRole.permissionId=permissionId; jsonRole.permissionId = permissionId;
console.log(jsonRole) console.log(jsonRole)
HttpService.updateRole(jsonRole,function(data){ HttpService.updateRole(jsonRole, function (data) {
$scope.closeThisDialog(); $scope.closeThisDialog();
getRoleList(); getRoleList();
}) })
...@@ -80,4 +80,4 @@ app.controller('roleListCtrl', ['$scope','$rootScope', '$http', '$state', '$filt ...@@ -80,4 +80,4 @@ app.controller('roleListCtrl', ['$scope','$rootScope', '$http', '$state', '$filt
}) })
} }
}]) }])
\ No newline at end of file \ 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) {
if($rootScope.loginData.login === false){
$state.go("signin")
}else {
$state.go("layout.searchSpecialCard")
}
$scope.goBack = function(){
$state.go("layout.cycleSheet")
}
$scope.userState=$rootScope.loginData.state;
var getNowFormatDate = 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.today = function() {
$scope.dt = getNowFormatDate();
};
$scope.today();
$scope.clear = function () {
$scope.dt = null;
};
$scope.disabled = function(date, mode) {
return ( mode === 'day' && ( date.getDay() === 0 || date.getDay() === 6 ) );
};
$scope.toggleMin = function() {
$scope.minDate = $scope.minDate ? null : new Date();
};
$scope.toggleMin();
$scope.open = function($event) {
$event.preventDefault();
$event.stopPropagation();
$scope.opened = true;
};
$scope.dateOptions = {
formatYear: 'yy',
startingDay: 1,
class: 'datepicker'
};
$scope.initDate = new Date('2016-15-20');
$scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
$scope.format = $scope.formats[1];
$scope.task_click = function(){
console.log($rootScope.loginData.state,"----测试-----",$scope.dt,"====");
}
$scope.createCycleSheet = function (groupState, acceptNo, type) {
$("#addBtn").attr("disabled", true);
var arr = [];
var json = {};
json.acceptNo = acceptNo;
json.type = type;
arr.push(json);
if (groupState == '新组' || groupState == '正在审核') {
MessageService.showAlert("未核验的组不能添加特证!");
$("#addBtn").removeAttr("disabled");
} else {
console.log(arr)
HttpService.saveSpecialCycle(arr, function (data) {
console.log(data)
console.log("------------")
if (data.respData.string == 1) {
MessageService.showAlert("加入特证成功。")
console.log($rootScope.searchInput)
HttpService.querySpecialCardInfo($rootScope.searchInput, function (data) {
if (data != null) {
$rootScope.specialCardInfo = data.respData;
console.log("搜索结果")
console.log(data.respData)
}
})
} else {
MessageService.showAlert("添加特证失败。");
}
})
}
}
$scope.returnCard = function (acceptNo) {
$("#returnBtn").attr("disabled", true);
HttpService.createSpecailCardPkg(cardid, function (data) {
MessageService.showAlert("退证成功。")
})
}
}]);
\ No newline at end of file
<div class="app-content-body app-content-full fade-in-up" ng-class="{'h-full': app.hideFooter }"> <div class="app-content-body app-content-full fade-in-up" ng-class="{'h-full': app.hideFooter }">
<!-- hbox layout --> <!-- 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="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 style="padding: 20px;" class="layui-anim layui-anim-up"> <div style="padding: 20px;" class="layui-anim layui-anim-up">
<xblock> <xblock>
...@@ -30,12 +31,14 @@ ...@@ -30,12 +31,14 @@
</span> </span>
</td> </td>
<td class="td-status"> <td class="td-status">
<span ng-if="user.state==1" class="layui-btn layui-btn-normal layui-btn-mini layui-btn-disabled">已停用</span> <span ng-if="user.state==1"
class="layui-btn layui-btn-normal layui-btn-mini layui-btn-disabled">已停用</span>
<span ng-if="user.state==0" class="layui-btn layui-btn-normal layui-btn-mini">已启用</span> <span ng-if="user.state==0" class="layui-btn layui-btn-normal layui-btn-mini">已启用</span>
</td> </td>
<td> <td>
<a class="layui-btn layui-btn" ng-click="updateUser(user.id)">修改</a> <a class="layui-btn layui-btn" ng-click="updateUser(user.id)">修改</a>
<a class="layui-btn layui-btn-danger" ng-if="user.state==0&&user.username!='admin'" ng-click="delUser(user.id)">删除</a> <a class="layui-btn layui-btn-danger" ng-if="user.state==0&&user.username!='admin'"
ng-click="delUser(user.id)">删除</a>
<a class="layui-btn layui-btn-danger layui-btn-disabled" ng-if="user.username=='admin'">删除</a> <a class="layui-btn layui-btn-danger layui-btn-disabled" ng-if="user.username=='admin'">删除</a>
<a class="layui-btn layui-btn-info" ng-if="user.state==1" ng-click="openUser(user.id)">启用</a> <a class="layui-btn layui-btn-info" ng-if="user.state==1" ng-click="openUser(user.id)">启用</a>
</td> </td>
...@@ -45,6 +48,6 @@ ...@@ -45,6 +48,6 @@
</div> </div>
</div> </div>
<!-- /hbox layout --> <!-- /hbox layout -->
</div> </div>
\ No newline at end of file
app.controller('userListCtrl', ['$scope','$rootScope', '$http', '$state', '$filter','$localStorage','ngDialog','HttpService', app.controller('userListCtrl', ['$scope', '$rootScope', '$http', '$state', '$filter', '$localStorage', 'ngDialog', 'HttpService',
function($scope,$rootScope, $http,$state, $filter,$localStorage,ngDialog,HttpService) { function ($scope, $rootScope, $http, $state, $filter, $localStorage, ngDialog, HttpService) {
if($rootScope.loginData.login === false){ if ($rootScope.loginData.login === false) {
$state.go("signin") $state.go("signin")
}else { } else {
$state.go("layout.userList") $state.go("layout.userList")
} }
$scope.id = 'id'; $scope.id = 'id';
// 用户列表 // 用户列表
var getUserList = function(){ var getUserList = function () {
HttpService.getUserListData(function(data) { HttpService.getUserListData(function (data) {
$scope.userList = data; $scope.userList = data;
console.log($scope.userList); console.log($scope.userList);
}) })
...@@ -17,23 +17,23 @@ app.controller('userListCtrl', ['$scope','$rootScope', '$http', '$state', '$filt ...@@ -17,23 +17,23 @@ app.controller('userListCtrl', ['$scope','$rootScope', '$http', '$state', '$filt
getUserList(); getUserList();
// 添加 // 添加
$scope.addUser = function(){ $scope.addUser = function () {
ngDialog.open({ ngDialog.open({
template: 'dialogs/addUser.html' + urlTimeStamp(), template: 'dialogs/addUser.html' + urlTimeStamp(),
width:800, width: 800,
cache: false, cache: false,
closeByDocument:false, closeByDocument: false,
controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService) { controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService) {
HttpService.getAllActiveRoleList(function(data) { HttpService.getAllActiveRoleList(function (data) {
$scope.activeRoleList = data; $scope.activeRoleList = data;
}) })
$scope.userAdd = function(roleId){ $scope.userAdd = function (roleId) {
var user={}; var user = {};
user.username=$scope.username; user.username = $scope.username;
user.name=$scope.name; user.name = $scope.name;
user.password=$scope.password; user.password = $scope.password;
user.roleId=roleId; user.roleId = roleId;
HttpService.addUser(user,function(data){ HttpService.addUser(user, function (data) {
$scope.closeThisDialog(); $scope.closeThisDialog();
getUserList(); getUserList();
}) })
...@@ -45,43 +45,43 @@ app.controller('userListCtrl', ['$scope','$rootScope', '$http', '$state', '$filt ...@@ -45,43 +45,43 @@ app.controller('userListCtrl', ['$scope','$rootScope', '$http', '$state', '$filt
} }
// 删除 // 删除
$scope.delUser = function(id){ $scope.delUser = function (id) {
HttpService.userDelete(id,function(data){ HttpService.userDelete(id, function (data) {
getUserList(); getUserList();
}) })
} }
// 启用 // 启用
$scope.openUser = function(id){ $scope.openUser = function (id) {
HttpService.userOpen(id,function(data){ HttpService.userOpen(id, function (data) {
getUserList(); getUserList();
}) })
} }
// 修改 // 修改
$scope.updateUser = function(id){ $scope.updateUser = function (id) {
ngDialog.open({ ngDialog.open({
template: 'dialogs/updateUser.html' + urlTimeStamp(), template: 'dialogs/updateUser.html' + urlTimeStamp(),
width:800, width: 800,
cache: false, cache: false,
closeByDocument:false, closeByDocument: false,
controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService) { controller: ['$scope', 'HttpService', '$rootScope', function ($scope, HttpService) {
HttpService.getUserById(id,function(data){ HttpService.getUserById(id, function (data) {
$scope.thisUser = data.user; $scope.thisUser = data.user;
console.log($scope.thisUser) console.log($scope.thisUser)
}) })
HttpService.getAllActiveRoleList(function(data) { HttpService.getAllActiveRoleList(function (data) {
$scope.activeRoleList = data; $scope.activeRoleList = data;
}) })
$scope.userUpdate = function(roleId){ $scope.userUpdate = function (roleId) {
var jsonUser = {}; var jsonUser = {};
jsonUser.username=$scope.thisUser.username; jsonUser.username = $scope.thisUser.username;
jsonUser.name=$scope.thisUser.name; jsonUser.name = $scope.thisUser.name;
jsonUser.id =$scope.thisUser.id; jsonUser.id = $scope.thisUser.id;
jsonUser.oldRoleId=$scope.thisUser.roleList[0].id; jsonUser.oldRoleId = $scope.thisUser.roleList[0].id;
jsonUser.roleId=roleId; jsonUser.roleId = roleId;
console.log(jsonUser) console.log(jsonUser)
HttpService.updateUser(jsonUser,function(data){ HttpService.updateUser(jsonUser, function (data) {
$scope.closeThisDialog(); $scope.closeThisDialog();
getUserList(); getUserList();
}) })
...@@ -92,4 +92,4 @@ app.controller('userListCtrl', ['$scope','$rootScope', '$http', '$state', '$filt ...@@ -92,4 +92,4 @@ app.controller('userListCtrl', ['$scope','$rootScope', '$http', '$state', '$filt
} }
}]) }])
\ No newline at end of file \ No newline at end of file
<div class="app-content-body fade-in-up"> <div class="app-content-body fade-in-up">
<!-- main header --> <!-- main header -->
<div class="col"> <div class="col">
<div class="bg-light lter b-b wrapper-md"> <div class="bg-light lter b-b wrapper-md">
<div class="row"> <div class="row">
...@@ -10,5 +10,5 @@ ...@@ -10,5 +10,5 @@
</div> </div>
</div> </div>
</div> </div>
<!-- / main header --> <!-- / main header -->
</div> </div>
\ No newline at end of file
app.controller('welcomeCtrl', ['$scope','$rootScope', '$http', '$state', '$filter','$localStorage', function($scope,$rootScope, $http,$state, $filter,$localStorage) { app.controller('welcomeCtrl', ['$scope', '$rootScope', '$http', '$state', '$filter', '$localStorage', function ($scope, $rootScope, $http, $state, $filter, $localStorage) {
if($rootScope.loginData.login == false){ if ($rootScope.loginData.login == false) {
$state.go("signin") $state.go("signin")
} }
}]) }])
\ No newline at end of file
<div class="app-content-body app-content-full fade-in-up" ng-class="{'h-full': app.hideFooter }"> <div class="app-content-body app-content-full fade-in-up" ng-class="{'h-full': app.hideFooter }">
<!-- hbox layout --> <!-- 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="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="hbox hbox-auto-xs hbox-auto-sm"> <div class="hbox hbox-auto-xs hbox-auto-sm">
<div class="col w-md bg-light dk b-r bg-auto"> <div class="col w-md bg-light dk b-r bg-auto">
<div class="wrapper b-b bg"> <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> <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> <a class="w-xs font-bold">{{msg}}</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- /hbox layout --> <!-- /hbox layout -->
</div> </div>
\ No newline at end of file
app.controller('yieldReportCtrl', ['$scope','$rootScope', '$http', '$state', '$filter','$localStorage', function($scope,$rootScope, $http,$state, $filter,$localStorage) { app.controller('yieldReportCtrl', ['$scope', '$rootScope', '$http', '$state', '$filter', '$localStorage', function ($scope, $rootScope, $http, $state, $filter, $localStorage) {
if ($rootScope.loginData.login == false) {
if($rootScope.loginData.login == false){
$state.go("signin") $state.go("signin")
} }
......
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