|
|
@@ -10200,6 +10200,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
*/
|
|
|
app.controller('UploadByBatchCtrl', ['$scope', '$upload', 'toaster', 'BaseService', function($scope, $upload, toaster, BaseService) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
+ $scope.$watch('myFiles', function(){
|
|
|
+ if($scope.myFiles) {
|
|
|
+ var file = $scope.myFiles[0];
|
|
|
+ $scope.fileName = file.name;
|
|
|
+ }
|
|
|
+ })
|
|
|
// 通过excel批量上传物料
|
|
|
$scope.upload = function() {
|
|
|
if($scope.myFiles) {
|
|
|
@@ -10220,6 +10226,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.alters = $scope.result.alters;
|
|
|
$scope.infos = $scope.result.infos;
|
|
|
$scope.myFiles[0] = "";
|
|
|
+ $scope.fileName = "";
|
|
|
}).error(function(response) {
|
|
|
toaster.pop('error', response.data || response);
|
|
|
});
|
|
|
@@ -16685,8 +16692,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
*/
|
|
|
app.controller('UploadProductCtrl', ['$scope', '$upload', 'toaster', 'BaseService', function($scope, $upload, toaster, BaseService) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
+
|
|
|
+ $scope.$watch('myFiles', function(){
|
|
|
+ if($scope.myFiles) {
|
|
|
+ var file = $scope.myFiles[0];
|
|
|
+ $scope.fileName = file.name;
|
|
|
+ }
|
|
|
+ })
|
|
|
// 通过excel批量上传物料
|
|
|
$scope.upload = function() {
|
|
|
+ var file = $scope.myFiles[0];
|
|
|
if($scope.myFiles) {
|
|
|
var file = $scope.myFiles[0];
|
|
|
if(file.name) {
|
|
|
@@ -16705,6 +16720,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.alters = $scope.result.alters;
|
|
|
$scope.infos = $scope.result.infos;
|
|
|
$scope.myFiles[0] = "";
|
|
|
+ $scope.fileName = "";
|
|
|
}).error(function(response) {
|
|
|
toaster.pop('error', response.data || response);
|
|
|
});
|