|
|
@@ -5349,7 +5349,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}]);
|
|
|
|
|
|
// 公共询价列表
|
|
|
- app.controller('PublicInquiryListCtrl', ['$scope', '$stateParams', 'PurchaseInquiry', '$filter', 'toaster', 'BaseService', 'ngTableParams', 'PurcInquiry', 'publicInquiry', 'publicInquiryList', '$modal', '$http', function ($scope, $stateParams, PurchaseInquiry, $filter, toaster, BaseService, ngTableParams, PurcInquiry, publicInquiry, publicInquiryList, $modal, $http) {
|
|
|
+ app.controller('PublicInquiryListCtrl', ['$scope', '$stateParams', 'PurchaseInquiry', '$filter', 'toaster', 'BaseService', 'ngTableParams', 'PurcInquiry', 'publicInquiry', 'publicInquiryList', '$modal', '$http', 'AccountEnterprise', function ($scope, $stateParams, PurchaseInquiry, $filter, toaster, BaseService, ngTableParams, PurcInquiry, publicInquiry, publicInquiryList, $modal, $http, AccountEnterprise) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
/**
|
|
|
* 改变单据日期范围
|
|
|
@@ -5430,15 +5430,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
- // $scope.setActive = function(state) {
|
|
|
- // if($scope.active != state) {
|
|
|
- // $scope.active = state;
|
|
|
- // if($scope.tableParams.page() == 1)
|
|
|
- // $scope.tableParams.reload();
|
|
|
- // else
|
|
|
- // $scope.tableParams.page(1);
|
|
|
- // }
|
|
|
- // };
|
|
|
|
|
|
$scope.nowdate = new Date().getTime() - 24 * 3600 * 1000;
|
|
|
var getOpenState = function (active) {
|
|
|
@@ -5469,11 +5460,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
};
|
|
|
|
|
|
var getService = function () {
|
|
|
- // if ($scope.active == 'teams') {
|
|
|
- // return PurchaseInquiry.hisquotation;
|
|
|
- // } else {
|
|
|
- // return PurchaseInquiry.publicInquiryItem;
|
|
|
- // }
|
|
|
return publicInquiryList.getInquirylist;
|
|
|
}
|
|
|
|
|
|
@@ -5497,19 +5483,51 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
fromDate: getDateTime($scope.condition.dateFrom),
|
|
|
endDate: getDateTime($scope.condition.dateTo)
|
|
|
};
|
|
|
-// AccountEnterprise.get({}, function(data){
|
|
|
-// $scope.currentEn = data;
|
|
|
-// });
|
|
|
- getService().call(null, BaseService.parseParams(pageParams), function (page) {
|
|
|
- $scope.loading = false;
|
|
|
- if (page) {
|
|
|
- params.total(page.totalElement);
|
|
|
- $defer.resolve(page.content);
|
|
|
- // $scope.keywordXls = angular.copy($scope.keyword); // 保存当前取值的关键词 做导出时需要的字段
|
|
|
- }
|
|
|
- }, function (response) {
|
|
|
- $scope.loading = false;
|
|
|
- toaster.pop('error', '数据加载失败', response.data);
|
|
|
+ /*getService().call(null, BaseService.parseParams(pageParams), function (page) {
|
|
|
+ $scope.loading = false;
|
|
|
+ if (page) {
|
|
|
+ params.total(page.totalElement);
|
|
|
+ $defer.resolve(page.content);
|
|
|
+ // $scope.keywordXls = angular.copy($scope.keyword); // 保存当前取值的关键词 做导出时需要的字段
|
|
|
+ }
|
|
|
+ }, function (response) {
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('error', '数据加载失败', response.data);
|
|
|
+ });*/
|
|
|
+ AccountEnterprise.get({}, function(data) {
|
|
|
+ $scope.currentEn = data;
|
|
|
+ publicInquiry.getUrl({}, function(data) {
|
|
|
+ var url = data.url;
|
|
|
+ $http({
|
|
|
+ method: 'get',
|
|
|
+ dataType: 'json',
|
|
|
+ url: url + '/inquiry/public',
|
|
|
+ params: {pageNumber: pageParams.page, pageSize: pageParams.count, enUU: $scope.currentEn.uu, keyword: $scope.keyword,
|
|
|
+ fromDate: getDateTime($scope.condition.dateFrom), endDate: getDateTime($scope.condition.dateTo)}
|
|
|
+ }).success(function (response) {
|
|
|
+ $scope.loading = false;
|
|
|
+ if (response) {
|
|
|
+ params.total(response.totalElements);
|
|
|
+ $defer.resolve(response.content);
|
|
|
+ // $scope.keywordXls = angular.copy($scope.keyword); // 保存当前取值的关键词 做导出时需要的字段
|
|
|
+ }
|
|
|
+ }).error(function (err) {
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('error', '数据加载失败', err);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 顶部滚动消息
|
|
|
+ $http({
|
|
|
+ method: 'get',
|
|
|
+ url: url + '/inquiry/public/messageList',
|
|
|
+ params: {enuu: $scope.currentEn.uu, size: 10},
|
|
|
+ dataType: 'json'
|
|
|
+ }).success(function(data) {
|
|
|
+ $scope.message = data;
|
|
|
+ }).error(function(error) {
|
|
|
+
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -5527,24 +5545,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
- //得到消息
|
|
|
- PurcInquiry.getMessage({}, function (data) {
|
|
|
- $scope.message = data;
|
|
|
- }, function (response) {
|
|
|
-
|
|
|
- });
|
|
|
-
|
|
|
- /*$http({
|
|
|
- method: 'GET',
|
|
|
- dataType: 'JSON',
|
|
|
- url: 'http://192.168.253.12:24000/inquiry/public/messageList',
|
|
|
- async : false,
|
|
|
- params: {enuu:10041559, size: 10},
|
|
|
- }).success(function(data) {
|
|
|
- console.log(data)
|
|
|
- }).error(function() {
|
|
|
- console.log('error')
|
|
|
- });*/
|
|
|
|
|
|
// 转客户询价
|
|
|
$scope.transtoInquiry = function (inquiryItem) {
|
|
|
@@ -23158,7 +23158,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
|
* 针对卖家,已转询价的公共询价单列表
|
|
|
*/
|
|
|
- app.controller('SalePubInquiryCtrl', ['$scope', '$filter', 'PubInquirySearchInfo', 'ngTableParams', 'toaster', 'BaseService', 'PubInquiryNoSearchInfo', '$upload', '$rootScope', 'token', '$timeout', 'CurrentRole', 'publicInquiry', '$modal', function ($scope, $filter, PubInquirySearchInfo, ngTableParams, toaster, BaseService, PubInquiryNoSearchInfo, $upload, $rootScope, token, $timeout, CurrentRole, publicInquiry, $modal) {
|
|
|
+ app.controller('SalePubInquiryCtrl', ['$scope', '$filter', 'PubInquirySearchInfo', 'ngTableParams', 'toaster', 'BaseService', 'PubInquiryNoSearchInfo', '$upload', '$rootScope', 'token', '$timeout', 'CurrentRole', 'publicInquiry', '$modal', 'AccountEnterprise', '$http', function ($scope, $filter, PubInquirySearchInfo, ngTableParams, toaster, BaseService, PubInquiryNoSearchInfo, $upload, $rootScope, token, $timeout, CurrentRole, publicInquiry, $modal, AccountEnterprise, $http) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
|
|
|
// 获取当前用户是否为普通用户
|
|
|
@@ -23244,7 +23244,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if ($scope.active == 'overdue') {
|
|
|
$scope.active = 'end';
|
|
|
}
|
|
|
- getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
|
|
|
+ /*getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
|
|
|
$scope.loading = false;
|
|
|
if (page) {
|
|
|
params.total(page.totalElement);
|
|
|
@@ -23254,6 +23254,30 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}, function (response) {
|
|
|
$scope.loading = false;
|
|
|
toaster.pop('error', '数据加载失败', response.data);
|
|
|
+ });*/
|
|
|
+ AccountEnterprise.get({}, function(data) {
|
|
|
+ $scope.currentEn = data;
|
|
|
+ publicInquiry.getUrl({}, function(data) {
|
|
|
+ var url = data.url;
|
|
|
+ var filter = {vendUU: $scope.currentEn.uu, keyword: $scope.keyword,
|
|
|
+ fromDate: getDateTime($scope.condition.dateFrom), endDate: getDateTime($scope.condition.dateTo)};
|
|
|
+ $http({
|
|
|
+ method: 'get',
|
|
|
+ dataType: 'json',
|
|
|
+ url: url + '/inquiry/public/quotation/list',
|
|
|
+ params: {pageNumber: pageParams.page, pageSize: pageParams.count, filter: filter, _state: $scope.active}
|
|
|
+ }).success(function (response) {
|
|
|
+ $scope.loading = false;
|
|
|
+ if (response) {
|
|
|
+ params.total(response.totalElements);
|
|
|
+ $defer.resolve(response.content);
|
|
|
+ // $scope.keywordXls = angular.copy($scope.keyword); // 保存当前取值的关键词 做导出时需要的字段
|
|
|
+ }
|
|
|
+ }).error(function (err) {
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('error', '数据加载失败', err);
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -23751,7 +23775,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
|
* 针对买家,已转询价的公共询价单列表
|
|
|
*/
|
|
|
- app.controller('PurcPubInquiryCtrl', ['$scope', '$filter', 'PurcPubInquirySearchInfo', 'ngTableParams', 'toaster', 'BaseService', 'PurcPubInquiryNoSearchInfo', '$upload', '$rootScope', 'token', '$timeout', 'CurrentRole', 'publicInquiry', function ($scope, $filter, PurcPubInquirySearchInfo, ngTableParams, toaster, BaseService, PurcPubInquiryNoSearchInfo, $upload, $rootScope, token, $timeout, CurrentRole, publicInquiry) {
|
|
|
+ app.controller('PurcPubInquiryCtrl', ['$scope', '$filter', 'PurcPubInquirySearchInfo', 'ngTableParams', 'toaster', 'BaseService', 'PurcPubInquiryNoSearchInfo', '$upload', '$rootScope', 'token', '$timeout', 'CurrentRole', 'publicInquiry', 'AccountEnterprise', '$http', function ($scope, $filter, PurcPubInquirySearchInfo, ngTableParams, toaster, BaseService, PurcPubInquiryNoSearchInfo, $upload, $rootScope, token, $timeout, CurrentRole, publicInquiry, AccountEnterprise, $http) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
|
|
|
// 获取当前用户是否为普通用户
|
|
|
@@ -23828,7 +23852,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if ($scope.active == 'overdue') {
|
|
|
$scope.active = 'end';
|
|
|
}
|
|
|
- getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
|
|
|
+ /* getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
|
|
|
$scope.loading = false;
|
|
|
if (page) {
|
|
|
params.total(page.totalElement);
|
|
|
@@ -23838,6 +23862,30 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}, function (response) {
|
|
|
$scope.loading = false;
|
|
|
toaster.pop('error', '数据加载失败', response.data);
|
|
|
+ });*/
|
|
|
+ AccountEnterprise.get({}, function(data) {
|
|
|
+ $scope.currentEn = data;
|
|
|
+ publicInquiry.getUrl({}, function(data) {
|
|
|
+ var url = data.url;
|
|
|
+ var filter = {enUU: $scope.currentEn.uu, keyword: $scope.keyword,
|
|
|
+ fromDate: getDateTime($scope.condition.dateFrom), endDate: getDateTime($scope.condition.dateTo)};
|
|
|
+ $http({
|
|
|
+ method: 'get',
|
|
|
+ dataType: 'json',
|
|
|
+ url: url + '/inquiry/public/quotation/list',
|
|
|
+ params: {pageNumber: pageParams.page, pageSize: pageParams.count, filter: filter, _state: $scope.active}
|
|
|
+ }).success(function (response) {
|
|
|
+ $scope.loading = false;
|
|
|
+ if (response) {
|
|
|
+ params.total(response.totalElements);
|
|
|
+ $defer.resolve(response.content);
|
|
|
+ // $scope.keywordXls = angular.copy($scope.keyword); // 保存当前取值的关键词 做导出时需要的字段
|
|
|
+ }
|
|
|
+ }).error(function (err) {
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('error', '数据加载失败', err);
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -24089,6 +24137,29 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
toaster.pop('error', '附件上传失败');
|
|
|
});
|
|
|
}
|
|
|
- }])
|
|
|
+ }]);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 首页侧边栏询价列表
|
|
|
+ */
|
|
|
+ app.controller('InquiryMessageListCtrl', ['$scope', 'publicInquiry', 'AccountEnterprise', '$http', function($scope, publicInquiry, AccountEnterprise, $http) {
|
|
|
+ AccountEnterprise.get({}, function(data) {
|
|
|
+ $scope.currentEn = data;
|
|
|
+ publicInquiry.getUrl({}, function (data) {
|
|
|
+ var url = data.url;
|
|
|
+ $http({
|
|
|
+ method: 'get',
|
|
|
+ url: url + '/inquiry/public/messageList',
|
|
|
+ params: {enuu: $scope.currentEn.uu, size: 7},
|
|
|
+ dataType: 'json'
|
|
|
+ }).success(function(data) {
|
|
|
+ $scope.message = data;
|
|
|
+ }).error(function(error) {
|
|
|
+
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }]);
|
|
|
+
|
|
|
return app;
|
|
|
});
|