|
|
@@ -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);
|
|
|
}
|
|
|
|