|
|
@@ -7,7 +7,12 @@ define(['app/app'], function(app) {
|
|
|
$scope.offer = {};
|
|
|
|
|
|
$scope.switchStatus = function (status) {
|
|
|
- $scope.status = status;
|
|
|
+ if (status == 'seek') {
|
|
|
+ $scope.getSeekPushGoodsPageInfo();
|
|
|
+ } else {
|
|
|
+ $scope.getMyOfferPageInfo();
|
|
|
+ }
|
|
|
+ $scope.status = status;
|
|
|
}
|
|
|
|
|
|
// 获取当前卖家求购成交率
|
|
|
@@ -18,26 +23,52 @@ define(['app/app'], function(app) {
|
|
|
});
|
|
|
|
|
|
// 获取当前卖家求购推送列表
|
|
|
- $scope.seekPurchaseTableParams = new ngTableParams({
|
|
|
- page : 1,
|
|
|
- count : 5
|
|
|
- }, {
|
|
|
- total : 0,
|
|
|
- getData : function ($defer, params) {
|
|
|
- const param = BaseService.parseParams(params.url());
|
|
|
- param.deadline = $scope.deadline;
|
|
|
- param.status = $scope.status;
|
|
|
- param.keyWord = $scope.keyWord;
|
|
|
- param.minReleaseDate = $scope.startDate ? $scope.startDate.getTime() : null;
|
|
|
- param.maxReleaseDate = $scope.endDate ? $scope.endDate.getTime() : null;
|
|
|
- seekPurchase.getSeekPushGoodsPageInfo(param, function (data) {
|
|
|
- params.total(data.totalElements);
|
|
|
- $defer.resolve(data.content);
|
|
|
- }, function (response) {
|
|
|
- toaster.pop('error', '获取求购列表失败');
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ $scope.getSeekPushGoodsPageInfo = function (){
|
|
|
+ $scope.seekPurchaseTableParams = new ngTableParams({
|
|
|
+ page : 1,
|
|
|
+ count : 5
|
|
|
+ }, {
|
|
|
+ total : 0,
|
|
|
+ getData : function ($defer, params) {
|
|
|
+ const param = BaseService.parseParams(params.url());
|
|
|
+ param.deadline = $scope.deadline;
|
|
|
+ param.status = $scope.status;
|
|
|
+ param.keyWord = $scope.keyWord;
|
|
|
+ param.minReleaseDate = $scope.startDate ? $scope.startDate.getTime() : null;
|
|
|
+ param.maxReleaseDate = $scope.endDate ? $scope.endDate.getTime() : null;
|
|
|
+ seekPurchase.getSeekPushGoodsPageInfo(param, function (data) {
|
|
|
+ params.total(data.totalElements);
|
|
|
+ $defer.resolve(data.content);
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '获取求购列表失败');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取我的报价列表
|
|
|
+ $scope.getMyOfferPageInfo = function () {
|
|
|
+ $scope.seekPurchaseTableParams = new ngTableParams({
|
|
|
+ page : 1,
|
|
|
+ count : 5
|
|
|
+ }, {
|
|
|
+ total : 0,
|
|
|
+ getData : function ($defer, params) {
|
|
|
+ const param = BaseService.parseParams(params.url());
|
|
|
+ param.deadline = $scope.deadline;
|
|
|
+ param.status = $scope.status;
|
|
|
+ param.keyWord = $scope.keyWord;
|
|
|
+ param.minReleaseDate = $scope.startDate ? $scope.startDate.getTime() : null;
|
|
|
+ param.maxReleaseDate = $scope.endDate ? $scope.endDate.getTime() : null;
|
|
|
+ seekPurchase.getMyOfferPageInfo(param, function (data) {
|
|
|
+ params.total(data.totalElements);
|
|
|
+ $defer.resolve(data.content);
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '获取求购列表失败');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
// 搜索
|
|
|
$scope.onSearch = function(){
|