|
|
@@ -28,17 +28,6 @@ define(['app/app'], function (app) {
|
|
|
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) {
|
|
|
@@ -48,6 +37,16 @@ define(['app/app'], function (app) {
|
|
|
}
|
|
|
if ($scope.tab == 'waitOffer') {
|
|
|
param.state = "todo";
|
|
|
+ var filter = {};
|
|
|
+ if ($scope.userInfo.enterprise) {
|
|
|
+ param.enUU = $scope.userInfo.enterprise.uu;
|
|
|
+ }
|
|
|
+ param.userUU = $scope.userInfo.userUU;
|
|
|
+ param.keyword = $scope.keyWord;
|
|
|
+ param.fromDate = $scope.startDate
|
|
|
+ ? $scope.startDate.getTime() : null;
|
|
|
+ param.endDate = $scope.endDate ? $scope.endDate.getTime()
|
|
|
+ : null;
|
|
|
seekPurchase.getUserSeekPageInfo(param, function (data) {
|
|
|
params.total(data.totalElements);
|
|
|
$defer.resolve(data.content);
|
|
|
@@ -57,15 +56,19 @@ define(['app/app'], function (app) {
|
|
|
});
|
|
|
} 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";
|
|
|
+ var filter = {};
|
|
|
+ if ($scope.userInfo.enterprise) {
|
|
|
+ param.enUU = $scope.userInfo.enterprise.uu;
|
|
|
+ }
|
|
|
+ param.userUU = $scope.userInfo.userUU;
|
|
|
+ // param.isMallGoods = $scope.isMallGoods;
|
|
|
+ // param.deadline = $scope.deadline;
|
|
|
+ filter.keyword = $scope.keyWord;
|
|
|
+ filter.fromDate = $scope.startDate
|
|
|
+ ? $scope.startDate.getTime() : null;
|
|
|
+ filter.endDate = $scope.endDate ? $scope.endDate.getTime()
|
|
|
+ : null;
|
|
|
+ param.filter = filter;
|
|
|
seekPurchase.getUserSeekPageInfoByStatus(param, function (data) {
|
|
|
params.total(data.totalElements);
|
|
|
$defer.resolve(data.content);
|
|
|
@@ -398,6 +401,7 @@ define(['app/app'], function (app) {
|
|
|
$scope.adopt = function (id) {
|
|
|
seekPurchase.updateSeekPurchaseStatus({id: id, status: 1},{},function(){
|
|
|
toaster.pop('success', '采纳报价成功');
|
|
|
+ $scope.seekPurchaseTableParams.reload();
|
|
|
}, function(response){
|
|
|
toaster.pop('error', response.data);
|
|
|
});
|
|
|
@@ -432,12 +436,16 @@ define(['app/app'], function (app) {
|
|
|
$scope.currentSeek = seek;
|
|
|
// 查看报价
|
|
|
if (status == 2 && $scope.offerCount != 0) {
|
|
|
- seekPurchase.getSeekPurchaseOfferPageInfo(
|
|
|
- {id: seek.id}, function (data) {
|
|
|
- $scope.offer = data.inquiryItems;
|
|
|
- clearSeekStatus();
|
|
|
- seek.$status = status;
|
|
|
- });
|
|
|
+ // seekPurchase.getSeekPurchaseOfferPageInfo(
|
|
|
+ //
|
|
|
+ // {id: seek.sourceId, enUU:$scope.userInfo.enterprise.uu}, function (data) {
|
|
|
+ // $scope.offer = data.inquiryItems;
|
|
|
+ // clearSeekStatus();
|
|
|
+ // seek.$status = status;
|
|
|
+ // });
|
|
|
+ $scope.offer = seek.qutations;
|
|
|
+ clearSeekStatus();
|
|
|
+ seek.$status = status;
|
|
|
} else if (status == 1 && $scope.goodsCount != 0) {// 查看现货
|
|
|
seekPurchase.getMallGoodsList({spId: seek.spId}, function (data) {
|
|
|
$scope.goods = data;
|