|
@@ -4691,22 +4691,22 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
app.controller('PurchaseApCheckListCtrl',['$scope', 'FaApCheck', 'toaster', '$state','$filter', '$modal', function($scope, FaApCheck, toaster, $state, $filter, $modal){
|
|
app.controller('PurchaseApCheckListCtrl',['$scope', 'FaApCheck', 'toaster', '$state','$filter', '$modal', function($scope, FaApCheck, toaster, $state, $filter, $modal){
|
|
|
$scope.data = {};// 列表数据
|
|
$scope.data = {};// 列表数据
|
|
|
$scope.loading = true;
|
|
$scope.loading = true;
|
|
|
- $scope.getData = function(){
|
|
|
|
|
- FaApCheck.getAll(function(data){
|
|
|
|
|
- $scope.data = data;
|
|
|
|
|
- angular.forEach($scope.data, function(item) {
|
|
|
|
|
- item:{
|
|
|
|
|
- $selected:true;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- $scope.loading = false;
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// $scope.getData = function(){
|
|
|
|
|
+// FaApCheck.getAll(function(data){
|
|
|
|
|
+// $scope.data = data;
|
|
|
|
|
+// angular.forEach($scope.data, function(item) {
|
|
|
|
|
+// item:{
|
|
|
|
|
+// $selected:true;
|
|
|
|
|
+// }
|
|
|
|
|
+// });
|
|
|
|
|
+// $scope.loading = false;
|
|
|
|
|
+// });
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
document.getElementById('suuorname').focus();//光标默认在客户
|
|
document.getElementById('suuorname').focus();//光标默认在客户
|
|
|
|
|
|
|
|
- $scope.getData();
|
|
|
|
|
|
|
+// $scope.getData();
|
|
|
|
|
|
|
|
$scope.condition = {
|
|
$scope.condition = {
|
|
|
$fromOpened:false
|
|
$fromOpened:false
|
|
@@ -4774,31 +4774,35 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
$scope.condition.dateTo = ($scope.sdateTo || 0);
|
|
$scope.condition.dateTo = ($scope.sdateTo || 0);
|
|
|
}
|
|
}
|
|
|
$scope.condition.venduuorname = $scope.vuuorname;
|
|
$scope.condition.venduuorname = $scope.vuuorname;
|
|
|
- //物料名称和物料规格存在特殊符号,用|作分割符
|
|
|
|
|
- $scope.keywordXls = angular.copy(($scope.condition.uuorname == null ? "" : $scope.condition.uuorname)
|
|
|
|
|
- + "|"+ ($scope.condition.venduuorname == null ? "" : $scope.condition.venduuorname)
|
|
|
|
|
- + "|"+ ($scope.condition.factory == null ? "" : $scope.condition.factory)
|
|
|
|
|
- + "|"+ ($scope.condition.prodTitle == null ? "" : $scope.condition.prodTitle)
|
|
|
|
|
- + "|"+ ($scope.condition.prodSpec == null ? "" : $scope.condition.prodSpec));//保存当前取值的关键词
|
|
|
|
|
- $scope.fromDateXls = angular.copy($scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null);//保存当前取值的起始日期
|
|
|
|
|
- $scope.endDateXls = angular.copy($scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null);//保存当前取值的截止日期
|
|
|
|
|
- if($scope.keywordXls.length == 4){
|
|
|
|
|
- if($scope.condition.dateFrom != null || $scope.condition.dateTo != null) {
|
|
|
|
|
- $scope.fromDate =$scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null;
|
|
|
|
|
- $scope.endDate = $scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null;
|
|
|
|
|
- FaApCheck.getAllByDate({fromDate: $scope.fromDate, endDate: $scope.endDate}, function(data) {
|
|
|
|
|
- $scope.data = data;
|
|
|
|
|
- angular.forEach($scope.data, function(item) {
|
|
|
|
|
- item:{
|
|
|
|
|
- $selected:true;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- $scope.loading = false;
|
|
|
|
|
- }, function(response) {
|
|
|
|
|
- toaster.pop('error', '提示', response.data);
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// //物料名称和物料规格存在特殊符号,用|作分割符
|
|
|
|
|
+// $scope.keywordXls = angular.copy(($scope.condition.uuorname == null ? "" : $scope.condition.uuorname)
|
|
|
|
|
+// + "|"+ ($scope.condition.venduuorname == null ? "" : $scope.condition.venduuorname)
|
|
|
|
|
+// + "|"+ ($scope.condition.factory == null ? "" : $scope.condition.factory)
|
|
|
|
|
+// + "|"+ ($scope.condition.prodTitle == null ? "" : $scope.condition.prodTitle)
|
|
|
|
|
+// + "|"+ ($scope.condition.prodSpec == null ? "" : $scope.condition.prodSpec));//保存当前取值的关键词
|
|
|
|
|
+// $scope.fromDateXls = angular.copy($scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null);//保存当前取值的起始日期
|
|
|
|
|
+// $scope.endDateXls = angular.copy($scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null);//保存当前取值的截止日期
|
|
|
|
|
+ if($scope.condition.dateFrom != null || $scope.condition.dateTo != null || $scope.keywordXls != null) {
|
|
|
|
|
+ $scope.fromDate =$scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null;
|
|
|
|
|
+ $scope.endDate = $scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null;
|
|
|
|
|
+ $scope.keywordXls = angular.copy(($scope.condition.uuorname == null ? "" : $scope.condition.uuorname)
|
|
|
|
|
+ + "|"+ ($scope.condition.venduuorname == null ? "" : $scope.condition.venduuorname)
|
|
|
|
|
+ + "|"+ ($scope.condition.factory == null ? "" : $scope.condition.factory)
|
|
|
|
|
+ + "|"+ ($scope.condition.prodTitle == null ? "" : $scope.condition.prodTitle)
|
|
|
|
|
+ + "|"+ ($scope.condition.prodSpec == null ? "" : $scope.condition.prodSpec));//保存当前取值的关键词
|
|
|
|
|
+ FaApCheck.getAllByKeywords({fromDate: $scope.fromDate, endDate: $scope.endDate, keyword:$scope.keywordXls}, function(data) {
|
|
|
|
|
+ $scope.data = data;
|
|
|
|
|
+ angular.forEach($scope.data, function(item) {
|
|
|
|
|
+ item:{
|
|
|
|
|
+ $selected:true;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ $scope.loading = false;
|
|
|
|
|
+ }, function(response) {
|
|
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -7843,11 +7847,11 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
*/
|
|
*/
|
|
|
app.controller('SearchCustInfoCtrl', ['$scope', '$modalInstance', 'suuorname', 'FaApCheck', function($scope, $modalInstance, suuorname, FaApCheck) {
|
|
app.controller('SearchCustInfoCtrl', ['$scope', '$modalInstance', 'suuorname', 'FaApCheck', function($scope, $modalInstance, suuorname, FaApCheck) {
|
|
|
$scope.getData = function(){
|
|
$scope.getData = function(){
|
|
|
- FaApCheck.getAll(function(data){
|
|
|
|
|
|
|
+ FaApCheck.getAllCustomers(function(data) {
|
|
|
$scope.custs= data;
|
|
$scope.custs= data;
|
|
|
angular.forEach($scope.data, function(item) {
|
|
angular.forEach($scope.data, function(item) {
|
|
|
item:{
|
|
item:{
|
|
|
- $selected:true;
|
|
|
|
|
|
|
+ $selected: true;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
$scope.loading = false;
|
|
$scope.loading = false;
|