|
|
@@ -35,28 +35,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
"right-view" : {
|
|
|
templateUrl : "static/tpl/index/sale/right.html"
|
|
|
}
|
|
|
- },
|
|
|
- controller: function($rootScope) {
|
|
|
- $rootScope.active = null;
|
|
|
}
|
|
|
}).state('sale.index', {
|
|
|
url : "",
|
|
|
- templateUrl : "static/tpl/index/sale/index.html",
|
|
|
- controller: function($rootScope) {
|
|
|
- $rootScope.active = null;
|
|
|
- }
|
|
|
+ templateUrl : "static/tpl/index/sale/index.html"
|
|
|
}).state('sale.home', {
|
|
|
url : "/",
|
|
|
- templateUrl : "static/tpl/index/sale/index.html",
|
|
|
- controller: function($rootScope) {
|
|
|
- $rootScope.active = null;
|
|
|
- }
|
|
|
+ templateUrl : "static/tpl/index/sale/index.html"
|
|
|
}).state('sale.todo', {
|
|
|
url : "/todo",
|
|
|
- templateUrl : "static/tpl/index/sale/todo.html",
|
|
|
- controller: function($rootScope) {
|
|
|
- $rootScope.active = null;
|
|
|
- }
|
|
|
+ templateUrl : "static/tpl/index/sale/todo.html"
|
|
|
}).state('sale.todo.inquiry', {
|
|
|
url : "/inquiry",
|
|
|
templateUrl : "static/tpl/index/sale/inquiry.html",
|
|
|
@@ -89,6 +77,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
url : "/order",
|
|
|
templateUrl : "static/tpl/index/sale/order.html",
|
|
|
controller: 'SaleOrderCtrl'
|
|
|
+ }).state('sale.order.*', {
|
|
|
+ url : "/order/:id",
|
|
|
+ templateUrl : "static/tpl/index/sale/order.html",
|
|
|
+ controller: 'SaleOrderCtrl'
|
|
|
}).state('sale.change', {
|
|
|
url : "/change",
|
|
|
templateUrl : "static/tpl/index/sale/change.html",
|
|
|
@@ -133,16 +125,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
}
|
|
|
}).state('account.index', {
|
|
|
url : "",
|
|
|
- templateUrl : "static/tpl/index/account/index.html",
|
|
|
- controller: function($rootScope) {
|
|
|
- $rootScope.active = null;
|
|
|
- }
|
|
|
+ templateUrl : "static/tpl/index/account/index.html"
|
|
|
}).state('account.home', {
|
|
|
url : "/",
|
|
|
- templateUrl : "static/tpl/index/account/index.html",
|
|
|
- controller: function($rootScope) {
|
|
|
- $rootScope.active = null;
|
|
|
- }
|
|
|
+ templateUrl : "static/tpl/index/account/index.html"
|
|
|
}).state('account.enterprise', {
|
|
|
url : "/enterprise",
|
|
|
templateUrl : "static/tpl/index/account/enterprise.html",
|
|
|
@@ -421,8 +407,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
});
|
|
|
});
|
|
|
app.controller('CustomerCtrl', function($scope, $rootScope, VendorService, BaseService, ngTableParams){
|
|
|
- $rootScope.active = 'customer';
|
|
|
-
|
|
|
$scope.customerParams = new ngTableParams({
|
|
|
page : 1,
|
|
|
count : 10,
|
|
|
@@ -446,7 +430,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
});
|
|
|
});
|
|
|
app.controller('VendorCtrl', function($scope, $rootScope, VendorService){
|
|
|
- $rootScope.active = 'customer';
|
|
|
});
|
|
|
var getState = function(active) {
|
|
|
var fn = 'get';
|
|
|
@@ -462,7 +445,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
};
|
|
|
app.controller('SaleOrderCtrl', function($scope, $rootScope, $filter, PurcOrderItem, ngTableParams,
|
|
|
toaster, ReportService, BaseService, PurcOrderItemHis){
|
|
|
- $rootScope.active = 'order';
|
|
|
$scope.active = 'todo';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
$scope.condition = {dateZone: 1};
|
|
|
@@ -612,7 +594,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
};
|
|
|
});
|
|
|
app.controller('SaleChangeCtrl', function($scope, $rootScope, $filter, PurcChange, ngTableParams, toaster, BaseService, PurcChangeHis){
|
|
|
- $rootScope.active = 'change';
|
|
|
$scope.active = 'todo';
|
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
@@ -682,7 +663,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
};
|
|
|
});
|
|
|
app.controller('SaleInquiryCtrl', function($scope, $rootScope, $filter, PurcInquiry, ngTableParams, toaster, BaseService, PurcInquiryHis){
|
|
|
- $rootScope.active = 'inquiry';
|
|
|
$scope.active = 'todo';
|
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
@@ -811,7 +791,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
};
|
|
|
});
|
|
|
app.controller('SaleNoticeCtrl', function($scope, $rootScope, $filter, PurcNotice, ngTableParams, toaster, BaseService, PurcNoticeHis){
|
|
|
- $rootScope.active = 'notice';
|
|
|
$scope.active = 'todo';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
$scope.condition = {dateZone: 1};
|
|
|
@@ -882,7 +861,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
* 发货单
|
|
|
*/
|
|
|
app.controller('SaleSendCtrl', function($scope, $rootScope, $filter, PurcChange, ngTableParams, toaster, BaseService, PurcChangeHis){
|
|
|
- $rootScope.active = 'change';
|
|
|
$scope.active = 'todo';
|
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
@@ -956,7 +934,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
* 客户打样申请
|
|
|
*/
|
|
|
app.controller('SaleSampleCtrl', function($scope, $rootScope, $filter, PurcSample, ngTableParams, toaster, $modal, BaseService, Symbol){
|
|
|
- $rootScope.active = 'sample';
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
@@ -1078,7 +1055,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
* 客户认定单
|
|
|
*/
|
|
|
app.controller('SaleApprovalCtrl', function($scope, $rootScope, $filter, PurcApproval, ngTableParams, toaster, BaseService, Symbol){
|
|
|
- $rootScope.active = 'approval';
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
@@ -1140,7 +1116,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
* 客户采购预测
|
|
|
*/
|
|
|
app.controller('SaleForecastCtrl', function($scope, $rootScope, $filter, PurcForecast, ngTableParams, toaster, BaseService, Symbol){
|
|
|
- $rootScope.active = 'forecast';
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
@@ -1202,7 +1177,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
* 客户采购验收
|
|
|
*/
|
|
|
app.controller('SaleAcceptCtrl', function($scope, $rootScope, $filter, PurcAccept, ngTableParams, toaster, BaseService, Symbol){
|
|
|
- $rootScope.active = 'accept';
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
@@ -1264,7 +1238,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
* 客户采购验退
|
|
|
*/
|
|
|
app.controller('SaleReturnsCtrl', function($scope, $rootScope, $filter, PurcReturn, ngTableParams, toaster, BaseService, Symbol){
|
|
|
- $rootScope.active = 'returns';
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
@@ -1325,7 +1298,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
* 客户不良品入库
|
|
|
*/
|
|
|
app.controller('SaleBadInCtrl', function($scope, $rootScope, $filter, PurcBadIn, ngTableParams, toaster, BaseService, Symbol){
|
|
|
- $rootScope.active = 'badIn';
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
@@ -1386,7 +1358,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
* 客户不良品出库
|
|
|
*/
|
|
|
app.controller('SaleBadOutCtrl', function($scope, $rootScope, $filter, PurcBadOut, ngTableParams, toaster, BaseService, Symbol){
|
|
|
- $rootScope.active = 'badOut';
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
@@ -1447,7 +1418,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
* 客户MRB
|
|
|
*/
|
|
|
app.controller('SaleMRBCtrl', function($scope, $rootScope, $filter, PurcMRB, ngTableParams, toaster, BaseService, Symbol){
|
|
|
- $rootScope.active = 'MRB';
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
@@ -1508,7 +1478,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
* 客户应付发票
|
|
|
*/
|
|
|
app.controller('SaleApBillCtrl', function($scope, $rootScope, $filter, PurcApBill, ngTableParams, toaster, BaseService, Symbol){
|
|
|
- $rootScope.active = 'apBill';
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
@@ -1567,14 +1536,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
});
|
|
|
|
|
|
app.controller('EnterpriseCtrl', function($scope, $rootScope, AccountEnterprise){
|
|
|
- $rootScope.active = 'enterprise';
|
|
|
AccountEnterprise.get({}, function(data){
|
|
|
$scope.enterprise = data;
|
|
|
});
|
|
|
});
|
|
|
|
|
|
app.controller('UserCtrl', function($scope, $rootScope, $filter, AuthenticationService, AccountUser, BaseService, ngTableParams){
|
|
|
- $rootScope.active = 'user';
|
|
|
AuthenticationService.getAuthentication().success(function(data) {
|
|
|
$scope.user = data;
|
|
|
});
|
|
|
@@ -1603,7 +1570,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
});
|
|
|
|
|
|
app.controller('LogCtrl', function($scope, $rootScope, BaseService, ngTableParams, ErpLog, UsageLog){
|
|
|
- $rootScope.active = 'log';
|
|
|
$scope.erpParams = new ngTableParams({
|
|
|
page : 1,
|
|
|
count : 5,
|
|
|
@@ -1647,15 +1613,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
});
|
|
|
|
|
|
app.controller('ResourceCtrl', function($scope, $rootScope){
|
|
|
- $rootScope.active = 'resource';
|
|
|
});
|
|
|
|
|
|
app.controller('AuthorityCtrl', function($scope, $rootScope){
|
|
|
- $rootScope.active = 'authority';
|
|
|
});
|
|
|
|
|
|
app.controller('RoleCtrl', function($scope, $rootScope){
|
|
|
- $rootScope.active = 'role';
|
|
|
});
|
|
|
|
|
|
/**
|