|
|
@@ -18,6 +18,9 @@ define(['app/app'], function (app) {
|
|
|
}
|
|
|
$scope.initInquiryItem();
|
|
|
|
|
|
+ //卖家待报价推送信息,self为与我相关,all为全部
|
|
|
+ $scope.vendorType = 'self';
|
|
|
+
|
|
|
// 获取当前卖家求购推送列表
|
|
|
$scope.seekPurchaseTableParams = new ngTableParams({
|
|
|
pageNumber: 1,
|
|
|
@@ -28,7 +31,6 @@ define(['app/app'], function (app) {
|
|
|
const param = BaseService.parseParams(params.url());
|
|
|
// param.deadline = $scope.deadline;
|
|
|
// param.status = $scope.status;
|
|
|
- param.enUU = $scope.userInfo.enterprise.uu;
|
|
|
param.keyword = $scope.keyWord;
|
|
|
param.fromDate = $scope.startDate
|
|
|
? $scope.startDate.getTime() : null;
|
|
|
@@ -41,10 +43,19 @@ define(['app/app'], function (app) {
|
|
|
params.page(1);
|
|
|
$scope.isSearch = false;
|
|
|
}
|
|
|
+ var isSelf = $scope.vendorType == 'self';
|
|
|
+ if (!isSelf) {
|
|
|
+ param.enUU = $scope.userInfo.enterprise.uu;
|
|
|
+ param.userUU = $scope.userInfo.userUU;
|
|
|
+ } else {
|
|
|
+ param.enuu = $scope.userInfo.enterprise.uu;
|
|
|
+ param.useruu = $scope.userInfo.userUU;
|
|
|
+ }
|
|
|
+ var target = isSelf ? '/inquiry/sale/remind' : '/inquiry/public';
|
|
|
$http({
|
|
|
method: 'get',
|
|
|
dataType: 'json',
|
|
|
- url: seekUrl + '/inquiry/public',
|
|
|
+ url: seekUrl + target,
|
|
|
params: param
|
|
|
}).success(function (data) {
|
|
|
params.total(data.totalElements);
|
|
|
@@ -56,6 +67,15 @@ define(['app/app'], function (app) {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ // 更换待报价状态
|
|
|
+ $scope.onVendorTypeChange = function () {
|
|
|
+ $scope.keyword = '';
|
|
|
+ $scope.startDate = null;
|
|
|
+ $scope.endDate = null;
|
|
|
+ $scope.seekPurchaseTableParams.page(1);
|
|
|
+ $scope.seekPurchaseTableParams.reload();
|
|
|
+ }
|
|
|
+
|
|
|
// 搜索
|
|
|
$scope.onSearch = function () {
|
|
|
$scope.isSearch = true;
|