|
@@ -10320,8 +10320,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
/**
|
|
|
* 物料资料
|
|
* 物料资料
|
|
|
*/
|
|
*/
|
|
|
- app.controller('ProductListCtrl', ['$scope', 'GetProductInfo', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', '$rootScope', '$modal', 'Products', 'GetProductInfoNewest', function($scope, GetProductInfo, ngTableParams, $filter, BaseService, toaster, $timeout, $rootScope, $modal, Products, GetProductInfoNewest) {
|
|
|
|
|
|
|
+ app.controller('ProductListCtrl', ['$scope', 'GetProductInfo', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', '$rootScope', '$modal', 'Products', 'GetProductInfoNewest', 'AccountEnterprise', function($scope, GetProductInfo, ngTableParams, $filter, BaseService, toaster, $timeout, $rootScope, $modal, Products, GetProductInfoNewest, AccountEnterprise) {
|
|
|
BaseService.scrollBackToTop();
|
|
BaseService.scrollBackToTop();
|
|
|
|
|
+ var loadAccount = function() {
|
|
|
|
|
+ AccountEnterprise.get({}, function(data){
|
|
|
|
|
+ $scope.loading = false;
|
|
|
|
|
+ $scope.enterprise = data;
|
|
|
|
|
+ $scope.saleStatus = $scope.enterprise.prodsale;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ loadAccount();
|
|
|
$scope.active = 'all';
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
$scope.dateZoneText = '一个月内';
|
|
@@ -10419,10 +10427,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
|
|
// 一键开启关闭
|
|
// 一键开启关闭
|
|
|
$scope.toggle = function(status) {
|
|
$scope.toggle = function(status) {
|
|
|
|
|
+ if($scope.saleStatus = 0) {
|
|
|
|
|
+ $scope.saleStatus = 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $scope.saleStatus = 0;
|
|
|
|
|
+ }
|
|
|
$scope.loading = true;
|
|
$scope.loading = true;
|
|
|
GetProductInfo.toggle({status: status}, {}, function(data) {
|
|
GetProductInfo.toggle({status: status}, {}, function(data) {
|
|
|
$scope.loading = false;
|
|
$scope.loading = false;
|
|
|
toaster.pop('success', '提示', '操作成功');
|
|
toaster.pop('success', '提示', '操作成功');
|
|
|
|
|
+ loadAccount();
|
|
|
$scope.tableParams.reload();
|
|
$scope.tableParams.reload();
|
|
|
}, function(response) {
|
|
}, function(response) {
|
|
|
$scope.loading = false;
|
|
$scope.loading = false;
|
|
@@ -17589,8 +17603,17 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
/**
|
|
|
* 采购物料资料
|
|
* 采购物料资料
|
|
|
*/
|
|
*/
|
|
|
- app.controller('PurcProductCtrl', ['$scope', 'PurcProduct', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', 'Products', '$modal', 'GetProductInfo', '$rootScope', 'PurcProductNewest', function($scope, PurcProduct, ngTableParams, $filter, BaseService, toaster, $timeout, Products, $modal, GetProductInfo, $rootScope, PurcProductNewest) {
|
|
|
|
|
|
|
+ app.controller('PurcProductCtrl', ['$scope', 'PurcProduct', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', 'Products', '$modal', 'GetProductInfo', '$rootScope', 'PurcProductNewest', 'AccountEnterprise', function($scope, PurcProduct, ngTableParams, $filter, BaseService, toaster, $timeout, Products, $modal, GetProductInfo, $rootScope, PurcProductNewest, AccountEnterprise) {
|
|
|
BaseService.scrollBackToTop();
|
|
BaseService.scrollBackToTop();
|
|
|
|
|
+
|
|
|
|
|
+ var loadAccount = function () {
|
|
|
|
|
+ AccountEnterprise.get({}, function(data){
|
|
|
|
|
+ $scope.loading = false;
|
|
|
|
|
+ $scope.enterprise = data;
|
|
|
|
|
+ $scope.purcStatus = $scope.enterprise.prodpurc;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ loadAccount();
|
|
|
$scope.active = 'all';
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
$scope.agreedText = '全部';
|
|
|
$scope.dateZoneText = '一个月内';
|
|
$scope.dateZoneText = '一个月内';
|
|
@@ -17681,10 +17704,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
|
|
// 一键开启关闭
|
|
// 一键开启关闭
|
|
|
$scope.toggle = function(status) {
|
|
$scope.toggle = function(status) {
|
|
|
|
|
+ if($scope.purcStatus = 0) {
|
|
|
|
|
+ $scope.purcStatus = 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $scope.purcStatus = 0;
|
|
|
|
|
+ }
|
|
|
$scope.loading = true;
|
|
$scope.loading = true;
|
|
|
Products.toggle({status: status}, {}, function(data) {
|
|
Products.toggle({status: status}, {}, function(data) {
|
|
|
$scope.loading = false;
|
|
$scope.loading = false;
|
|
|
toaster.pop('success', '提示', '操作成功');
|
|
toaster.pop('success', '提示', '操作成功');
|
|
|
|
|
+ loadAccount();
|
|
|
$scope.tableParams.reload();
|
|
$scope.tableParams.reload();
|
|
|
}, function(response) {
|
|
}, function(response) {
|
|
|
$scope.loading = false;
|
|
$scope.loading = false;
|