|
|
@@ -12786,6 +12786,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.deOrder.bankname = data.bankname;
|
|
|
$scope.deOrder.legalrepresent = data.legalrepresent;
|
|
|
$scope.deOrder.tervendaddress = data.tervendaddress;
|
|
|
+ $scope.deOrder.enfax = data.enfax;
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
@@ -12798,6 +12799,15 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
|
|
|
+ // 上次填写记录(不关联供应商)
|
|
|
+ DeputyOrder.lastKeywords({}, function(data) {
|
|
|
+ $scope.lastkeyowrds = data;
|
|
|
+ $scope.deOrder.madealdate = $scope.lastkeyowrds.madealdate;
|
|
|
+ $scope.deOrder.madealcode = $scope.lastkeyowrds.madealcode;
|
|
|
+ }, function(response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
+ });
|
|
|
+
|
|
|
//增加商品
|
|
|
$scope.add = function(index) {
|
|
|
if($scope.deOrder.deputyOrderItems[index].prodcode == null) {
|
|
|
@@ -16049,7 +16059,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
pageParams.keyword = $scope.keyword;
|
|
|
pageParams.searchFilter = $scope.searchFilter;
|
|
|
getService().call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
- $scope.loading = false;
|
|
|
if(page) {
|
|
|
params.total(page.totalElement);
|
|
|
$defer.resolve(page.content);
|
|
|
@@ -16065,7 +16074,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
Products.matchsize({type: 'all'}, {}, function(data) {
|
|
|
$scope.size = data.size;
|
|
|
if($scope.total < $scope.size) {
|
|
|
- $scope.tableParams.reload();
|
|
|
+ $timeout(function() {
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }, 500);
|
|
|
+ } else {
|
|
|
+ $scope.loading = false;
|
|
|
}
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
@@ -16110,14 +16123,14 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
return;
|
|
|
}
|
|
|
});
|
|
|
- $scope.checks.checked = result;
|
|
|
- var checked = true;
|
|
|
- angular.forEach($scope.tableParams.data, function(message) { // 单选全部时,全选选中
|
|
|
- if (!message.checked) {
|
|
|
- checked = false;
|
|
|
- }
|
|
|
- });
|
|
|
- $scope.checks.checked = checked;
|
|
|
+// $scope.checks.checked = result;
|
|
|
+// var checked = true;
|
|
|
+// angular.forEach($scope.tableParams.data, function(message) { // 单选全部时,全选选中
|
|
|
+// if (!message.checked) {
|
|
|
+// checked = false;
|
|
|
+// }
|
|
|
+// });
|
|
|
+// $scope.checks.checked = checked;
|
|
|
};
|
|
|
|
|
|
$scope.product = {
|
|
|
@@ -16162,6 +16175,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 一键更新
|
|
|
$scope.updateAll = function() {
|
|
|
+ $scope.loading = true;
|
|
|
angular.forEach($scope.tableParams.data, function(product) {
|
|
|
if(product.checked) {
|
|
|
if(product.matchresults.length == 1) {
|
|
|
@@ -16177,6 +16191,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
});
|
|
|
Products.updateall( {}, ids, function(data) {
|
|
|
+ $scope.loading = false;
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
$scope.tableParams.page(1);
|
|
|
@@ -16184,6 +16199,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
ids = []; // 清空ids,防止重复点击出现多余的数据
|
|
|
}, function(response) {
|
|
|
+ $scope.loading = false;
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
}
|
|
|
@@ -16237,7 +16253,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
pageParams.keyword = $scope.keyword;
|
|
|
pageParams.searchFilter = $scope.searchFilter;
|
|
|
getService().call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
- $scope.loading = false;
|
|
|
if(page) {
|
|
|
params.total(page.totalElement);
|
|
|
$defer.resolve(page.content);
|
|
|
@@ -16253,7 +16268,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
Products.matchsize({type: 'sale'}, {}, function(data) {
|
|
|
$scope.size = data.size;
|
|
|
if($scope.total < $scope.size) {
|
|
|
- $scope.tableParams.reload();
|
|
|
+ $timeout(function() {
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }, 500);
|
|
|
+ } else {
|
|
|
+ $scope.loading = false;
|
|
|
}
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
@@ -16298,14 +16317,14 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
return;
|
|
|
}
|
|
|
});
|
|
|
- $scope.checks.checked = result;
|
|
|
- var checked = true;
|
|
|
- angular.forEach($scope.tableParams.data, function(message) { // 单选全部时,全选选中
|
|
|
- if (!message.checked) {
|
|
|
- checked = false;
|
|
|
- }
|
|
|
- });
|
|
|
- $scope.checks.checked = checked;
|
|
|
+// $scope.checks.checked = result;
|
|
|
+// var checked = true;
|
|
|
+// angular.forEach($scope.tableParams.data, function(message) { // 单选全部时,全选选中
|
|
|
+// if (!message.checked) {
|
|
|
+// checked = false;
|
|
|
+// }
|
|
|
+// });
|
|
|
+// $scope.checks.checked = checked;
|
|
|
};
|
|
|
|
|
|
$scope.product = {
|
|
|
@@ -16350,6 +16369,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 一键更新
|
|
|
$scope.updateAll = function() {
|
|
|
+ $scope.loading = true;
|
|
|
angular.forEach($scope.tableParams.data, function(product) {
|
|
|
if(product.checked) {
|
|
|
if(product.matchresults.length == 1) {
|
|
|
@@ -16365,6 +16385,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
});
|
|
|
Products.updateall( {}, ids, function(data) {
|
|
|
+ $scope.loading = false;
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
$scope.tableParams.page(1);
|
|
|
@@ -16372,6 +16393,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
ids = []; // 清空ids,防止重复点击出现多余的数据
|
|
|
}, function(response) {
|
|
|
+ $scope.loading = true;
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
}
|
|
|
@@ -16425,7 +16447,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
pageParams.keyword = $scope.keyword;
|
|
|
pageParams.searchFilter = $scope.searchFilter;
|
|
|
getService().call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
- $scope.loading = false;
|
|
|
if(page) {
|
|
|
params.total(page.totalElement);
|
|
|
$defer.resolve(page.content);
|
|
|
@@ -16441,7 +16462,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
Products.matchsize({type: 'purc'}, {}, function(data) {
|
|
|
$scope.size = data.size;
|
|
|
if($scope.total < $scope.size) {
|
|
|
- $scope.tableParams.reload();
|
|
|
+ $timeout(function() {
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }, 500);
|
|
|
+ } else {
|
|
|
+ $scope.loading = false;
|
|
|
}
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
@@ -16487,13 +16512,13 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
});
|
|
|
$scope.checks.checked = result;
|
|
|
- var checked = true;
|
|
|
- angular.forEach($scope.tableParams.data, function(message) { // 单选全部时,全选选中
|
|
|
- if (!message.checked) {
|
|
|
- checked = false;
|
|
|
- }
|
|
|
- });
|
|
|
- $scope.checks.checked = checked;
|
|
|
+// var checked = true;
|
|
|
+// angular.forEach($scope.tableParams.data, function(message) { // 单选全部时,全选选中
|
|
|
+// if (!message.checked) {
|
|
|
+// checked = false;
|
|
|
+// }
|
|
|
+// });
|
|
|
+// $scope.checks.checked = checked;
|
|
|
};
|
|
|
|
|
|
$scope.product = {
|
|
|
@@ -16538,6 +16563,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 一键更新
|
|
|
$scope.updateAll = function() {
|
|
|
+ $scope.loading = true;
|
|
|
angular.forEach($scope.tableParams.data, function(product) {
|
|
|
if(product.checked) {
|
|
|
if(product.matchresults.length == 1) {
|
|
|
@@ -16553,6 +16579,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
});
|
|
|
Products.updateall( {}, ids, function(data) {
|
|
|
+ $scope.loading = false;
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
$scope.tableParams.page(1);
|
|
|
@@ -16560,6 +16587,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
ids = []; // 清空ids,防止重复点击出现多余的数据
|
|
|
}, function(response) {
|
|
|
+ $scope.loading = false;
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
}
|