|
|
@@ -21,8 +21,63 @@ define(['app/app'], function (app) {
|
|
|
$scope.tab = 'waitOffer';
|
|
|
$scope.toogleTab = function (tab) {
|
|
|
$scope.tab = tab;
|
|
|
+ $scope.seekPurchaseTableParams = new ngTableParams({
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 10
|
|
|
+ }, {
|
|
|
+ total: 0,
|
|
|
+ getData: function ($defer, params) {
|
|
|
+ const param = BaseService.parseParams(params.url());
|
|
|
+ if ($scope.userInfo.enterprise) {
|
|
|
+ param.enUU = $scope.userInfo.enterprise.uu;
|
|
|
+ }
|
|
|
+ param.recorderUU = $scope.userInfo.userUU;
|
|
|
+ // param.isMallGoods = $scope.isMallGoods;
|
|
|
+ // param.deadline = $scope.deadline;
|
|
|
+ param.keyword = $scope.keyWord;
|
|
|
+ param.fromDate = $scope.startDate
|
|
|
+ ? $scope.startDate.getTime() : null;
|
|
|
+ param.endDate = $scope.endDate ? $scope.endDate.getTime()
|
|
|
+ : null;
|
|
|
+ param.pageNumber = param.page;
|
|
|
+ param.pageSize = param.count;
|
|
|
+ if ($scope.isSearch) {
|
|
|
+ param.page = 1;
|
|
|
+ params.page(1);
|
|
|
+ $scope.isSearch = false;
|
|
|
+ }
|
|
|
+ if ($scope.tab == 'waitOffer') {
|
|
|
+ param.state = "todo";
|
|
|
+ seekPurchase.getUserSeekPageInfo(param, function (data) {
|
|
|
+ params.total(data.totalElements);
|
|
|
+ $defer.resolve(data.content);
|
|
|
+ $scope.seekListData = data;
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', response.data);
|
|
|
+ });
|
|
|
+ } else if($scope.tab == 'offered') {
|
|
|
+ param._state = "done";
|
|
|
+ seekPurchase.getUserSeekPageInfoByStatus(param, function (data) {
|
|
|
+ params.total(data.totalElements);
|
|
|
+ $defer.resolve(data.content);
|
|
|
+ $scope.seekListData = data;
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', response.data);
|
|
|
+ });
|
|
|
+ } else if ($scope.tab == 'accepted') {
|
|
|
+ param._state = "agreed";
|
|
|
+ seekPurchase.getUserSeekPageInfoByStatus(param, function (data) {
|
|
|
+ params.total(data.totalElements);
|
|
|
+ $defer.resolve(data.content);
|
|
|
+ $scope.seekListData = data;
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', response.data);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
+ $scope.toogleTab('waitOffer');
|
|
|
$scope.applyObj = {
|
|
|
code: '',
|
|
|
brand: '',
|
|
|
@@ -43,43 +98,7 @@ define(['app/app'], function (app) {
|
|
|
|
|
|
// 买家求购列表
|
|
|
$scope.searchStatus = 0;
|
|
|
- $scope.seekPurchaseTableParams = new ngTableParams({
|
|
|
- pageNumber: 1,
|
|
|
- pageSize: 10
|
|
|
- }, {
|
|
|
- total: 0,
|
|
|
- getData: function ($defer, params) {
|
|
|
- const param = BaseService.parseParams(params.url());
|
|
|
- if ($scope.userInfo.enterprise) {
|
|
|
- param.enUU = $scope.userInfo.enterprise.uu;
|
|
|
- } else {
|
|
|
- param.recorderUU = $scope.userInfo.userUU;
|
|
|
- }
|
|
|
- // param.isMallGoods = $scope.isMallGoods;
|
|
|
- // param.deadline = $scope.deadline;
|
|
|
- param.keyword = $scope.keyWord;
|
|
|
- param.state = "todo";
|
|
|
- param.overdue = $scope.overdue;
|
|
|
- param.fromDate = $scope.startDate
|
|
|
- ? $scope.startDate.getTime() : null;
|
|
|
- param.endDate = $scope.endDate ? $scope.endDate.getTime()
|
|
|
- : null;
|
|
|
- param.pageNumber = param.page;
|
|
|
- param.pageSize = param.count;
|
|
|
- if ($scope.isSearch) {
|
|
|
- param.page = 1;
|
|
|
- params.page(1);
|
|
|
- $scope.isSearch = false;
|
|
|
- }
|
|
|
- seekPurchase.getUserSeekPageInfo(param, function (data) {
|
|
|
- params.total(data.totalElements);
|
|
|
- $defer.resolve(data.content);
|
|
|
- $scope.seekListData = data;
|
|
|
- }, function (response) {
|
|
|
- toaster.pop('error', response.data);
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
|
|
|
$scope.bomSearch = {};
|
|
|
$scope.bomTableParams = new ngTableParams({
|