|
|
@@ -5810,22 +5810,22 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
params.total(page.totalElement);
|
|
|
$defer.resolve(page.content);
|
|
|
$scope.keywordXls = angular.copy($scope.keyword);//保存当前取值的关键词
|
|
|
- angular.forEach(page.content, function(proofing) { // 为了支持多次送样,读取列表的时候获取送样信息作为比较依据
|
|
|
- if( !proofing.send) {
|
|
|
- proofing.getSendInfo = '加载中...';
|
|
|
- PurcSample.getSend({id: proofing.id}, function(data){
|
|
|
- if(data) {
|
|
|
- proofing.getSendInfo = null;
|
|
|
- proofing.send = data;
|
|
|
- } else {
|
|
|
- proofing.getSendInfo = '无送样信息';
|
|
|
- proofing.send = '无送样信息';
|
|
|
- }
|
|
|
- }, function(response){
|
|
|
- proofing.getSendInfo = '加载失败!';
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ // angular.forEach(page.content, function(proofing) { // 为了支持多次送样,读取列表的时候获取送样信息作为比较依据
|
|
|
+ // if( !proofing.send) {
|
|
|
+ // proofing.getSendInfo = '加载中...';
|
|
|
+ // PurcSample.getSend({id: proofing.id}, function(data){
|
|
|
+ // if(data) {
|
|
|
+ // proofing.getSendInfo = null;
|
|
|
+ // proofing.send = data;
|
|
|
+ // } else {
|
|
|
+ // proofing.getSendInfo = '无送样信息';
|
|
|
+ // proofing.send = '无送样信息';
|
|
|
+ // }
|
|
|
+ // }, function(response){
|
|
|
+ // proofing.getSendInfo = '加载失败!';
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
}
|
|
|
}, function(response){
|
|
|
$scope.loading = false;
|
|
|
@@ -5902,6 +5902,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
//确认送样
|
|
|
$scope.ok = function (form) {
|
|
|
$scope.loading = true;
|
|
|
+ // 多次送样时,由于ng-model是sendQty,所以需要加上送样历史中的数量
|
|
|
+ $scope.sampleItem.sampleSend.sendQty = $scope.sampleItem.sampleSend.sendQty + ($scope.sampleItem.send.sendQty || 0);
|
|
|
+ $scope.sampleItem.sendQty = $scope.sampleItem.sampleSend.sendQty; // 判断是否需要多次送样
|
|
|
var files = form.attachFile.$viewValue, file = files && files.length > 0 ? files[0] : null;
|
|
|
$upload.upload({
|
|
|
url: 'sale/sample/' + $scope.sampleItem.id + '/send',
|
|
|
@@ -9649,7 +9652,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
|
* 物料资料
|
|
|
*/
|
|
|
- app.controller('ProductListCtrl', ['$scope', 'GetProductInfo', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', function($scope, GetProductInfo, ngTableParams, $filter, BaseService, toaster, $timeout) {
|
|
|
+ app.controller('ProductListCtrl', ['$scope', 'GetProductInfo', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', '$rootScope', function($scope, GetProductInfo, ngTableParams, $filter, BaseService, toaster, $timeout, $rootScope) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
@@ -9729,7 +9732,13 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}), function(response) {
|
|
|
toaster.pop("error", "删除失败", response.data);
|
|
|
};
|
|
|
- }
|
|
|
+ };
|
|
|
+
|
|
|
+ $rootScope.isProductEdit = false;
|
|
|
+ // 编辑
|
|
|
+ $scope.isProductEdit = function () {
|
|
|
+ $rootScope.isProductEdit = true;
|
|
|
+ }
|
|
|
|
|
|
}]);
|
|
|
|
|
|
@@ -9785,7 +9794,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
|
* 物料详情
|
|
|
*/
|
|
|
- app.controller('ProductDetailCtrl', ['$scope', 'GetProductInfo', '$upload', 'ngTableParams', '$stateParams', 'toaster', 'AuthenticationService', '$filter', 'BaseService', function($scope, GetProductInfo, $upload, ngTableParams, $stateParams, toaster, AuthenticationService, $filter, BaseService) {
|
|
|
+ app.controller('ProductDetailCtrl', ['$scope', 'GetProductInfo', '$upload', 'ngTableParams', '$stateParams', 'toaster', 'AuthenticationService', '$filter', 'BaseService', '$rootScope', function($scope, GetProductInfo, $upload, ngTableParams, $stateParams, toaster, AuthenticationService, $filter, BaseService, $rootScope) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
// 录入人
|
|
|
AuthenticationService.getAuthentication().success(function(data) {
|
|
|
@@ -9813,7 +9822,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
})
|
|
|
}
|
|
|
$scope.prodInfo = data;
|
|
|
- $scope.prodInfo.$editing = false;
|
|
|
+ if ($rootScope.isProductEdit) { // 是否点击编辑
|
|
|
+ $scope.prodInfo.$editing = true;
|
|
|
+ } else {
|
|
|
+ $scope.prodInfo.$editing = false;
|
|
|
+ }
|
|
|
$scope.loading = false;
|
|
|
});
|
|
|
};
|