Browse Source

更新新增物料和物料详情UI

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@7569 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 9 years ago
parent
commit
4ba7f6e9c4
1 changed files with 18 additions and 5 deletions
  1. 18 5
      src/main/webapp/resources/js/index/app.js

+ 18 - 5
src/main/webapp/resources/js/index/app.js

@@ -7489,7 +7489,14 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 	/**
 	 * 物料详情
 	 */
-	app.controller('ProductDetailCtrl', ['$scope', 'GetProductInfo', '$upload', 'ngTableParams', '$stateParams', 'toaster', function($scope, GetProductInfo, $upload, ngTableParams, $stateParams, toaster) {
+	app.controller('ProductDetailCtrl', ['$scope', 'GetProductInfo', '$upload', 'ngTableParams', '$stateParams', 'toaster', 'AuthenticationService', '$filter', function($scope, GetProductInfo, $upload, ngTableParams, $stateParams, toaster, AuthenticationService, $filter) {
+		// 录入人
+		AuthenticationService.getAuthentication().success(function(data) {
+			$scope.loading = false;
+			$scope.user = data;
+		});
+		$scope.time = $filter('date')(new Date, 'yyyy-MM-dd HH:mm');
+		
 		var loadData = function() {
 			GetProductInfo.getOne({id: $stateParams.id}, function(data) {
 				if(data.attach) {
@@ -7599,8 +7606,14 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 	/**
 	 * 新增物料
 	 */
-	app.controller('NewProdInfoCtrl', ['$scope', 'GetProductInfo', '$upload', 'ngTableParams', '$stateParams', 'toaster', '$modal', 'ComponentActive', 'KindAPI', '$timeout', function($scope, GetProductInfo, $upload, ngTableParams, $stateParams, toaster, $modal, ComponentActive, KindAPI, $timeout) {
-
+	app.controller('NewProdInfoCtrl', ['$scope', 'GetProductInfo', '$upload', 'ngTableParams', '$stateParams', 'toaster', '$modal', 'ComponentActive', 'KindAPI', '$timeout', '$filter', 'AuthenticationService', function($scope, GetProductInfo, $upload, ngTableParams, $stateParams, toaster, $modal, ComponentActive, KindAPI, $timeout, $filter, AuthenticationService) {
+		
+		// 录入人
+		AuthenticationService.getAuthentication().success(function(data) {
+			$scope.loading = false;
+			$scope.user = data;
+		});
+		$scope.time = $filter('date')(new Date, 'yyyy-MM-dd HH:mm');
 		$scope.prodInfo = {unit: 'PCS'};
 		// 选择类目
 	    $scope.selectKind = function(uuids) {
@@ -7649,14 +7662,14 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 					toaster.pop('success', '提示', data.success);
 					$timeout(function() {
 						//提交后跳转到详情页面,防止重复提交
-						window.location.href="#/baseInfo/prodList/"+data.id;
+						window.location.href="#/sale/prodList/"+data.id;
 					}, 500);
 				}
 				if(data.error) {
 					toaster.pop('error', '提示', data.error);
 					$timeout(function() {
 						//提交后跳转到详情页面,防止重复提交
-						window.location.href="#/baseInfo/prodList/"+data.id;
+						window.location.href="#/sale/prodList/"+data.id;
 					}, 500);
 				}