|
|
@@ -1,15 +1,29 @@
|
|
|
define([ 'app/app' ], function(app) {
|
|
|
'use strict';
|
|
|
- app.register.controller('vendor_materialCtrl', ['$scope', '$rootScope', 'Material', 'toaster', 'ComponentActive', 'Enterprise', '$q', 'NumberService', '$location', function ($scope, $rootScope, Material, toaster, ComponentActive, Enterprise, $q, NumberService, $location) {
|
|
|
+ app.register.controller('vendor_materialCtrl', ['$scope', '$rootScope', 'Material', 'toaster', 'ComponentActive', 'Enterprise', '$q', 'NumberService', '$location', '$stateParams', function ($scope, $rootScope, Material, toaster, ComponentActive, Enterprise, $q, NumberService, $location, $stateParams) {
|
|
|
$rootScope.active = 'vendor_material';
|
|
|
|
|
|
$scope.tab = 'material';
|
|
|
- $scope.standard_tab = 'standard';
|
|
|
+ $scope.standard_tab = $stateParams.standardParam?$stateParams.standardParam:'standard';
|
|
|
$scope.choosedIds = [];
|
|
|
$scope.deleteDiv = false;
|
|
|
+
|
|
|
+ $scope.param = {
|
|
|
+ page : 1,
|
|
|
+ count : 10,
|
|
|
+ sorting : {
|
|
|
+ id : 'DESC'
|
|
|
+ },
|
|
|
+ isStandard : true,
|
|
|
+ type : "standard"
|
|
|
+ };
|
|
|
+
|
|
|
if ($location.$$path.endsWith('vendor_material_unstandard_erp')) {
|
|
|
$scope.tab = 'unstandard_material';
|
|
|
- $scope.standard_tab = 'unstandard';
|
|
|
+ // $scope.standard_tab = 'unstandard';
|
|
|
+ $scope.param.type = "nStandard";
|
|
|
+ // $scope.param.sorting = {code : 'ASC'};
|
|
|
+ $scope.isBatch = false;
|
|
|
}
|
|
|
/**
|
|
|
* 最大
|
|
|
@@ -25,16 +39,6 @@ define([ 'app/app' ], function(app) {
|
|
|
//只包含中文和英文的字符
|
|
|
var pattern = /^[\u4e00-\u9fa5a-zA-Z]+$/;
|
|
|
|
|
|
- $scope.param = {
|
|
|
- page : 1,
|
|
|
- count : 10,
|
|
|
- sorting : {
|
|
|
- id : 'DESC'
|
|
|
- },
|
|
|
- isStandard : true,
|
|
|
- type : "standard"
|
|
|
- };
|
|
|
-
|
|
|
$scope.goods = { breakUp: 1, isSelfSupport: 1, prices: [{}] };
|
|
|
$scope.isSelfSupport = true;
|
|
|
$scope.showShelfArea = showShelfArea;
|