|
@@ -5733,18 +5733,29 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
/**
|
|
|
* 公共询价详情
|
|
* 公共询价详情
|
|
|
*/
|
|
*/
|
|
|
- app.controller('PublicInquiryListDetailCtrl', ['$scope', '$stateParams', 'PurchaseInquiry', '$filter', 'toaster', 'BaseService', 'ngTableParams', 'AccountEnterprise', 'publicInquiry', 'publicInquiryList', '$modal', function ($scope, $stateParams, PurchaseInquiry, $filter, toaster, BaseService, ngTableParams, AccountEnterprise, publicInquiry, publicInquiryList, $modal) {
|
|
|
|
|
|
|
+ app.controller('PublicInquiryListDetailCtrl', ['$scope', '$stateParams', 'PurchaseInquiry', '$filter', 'toaster', 'BaseService', 'ngTableParams', 'AccountEnterprise', 'publicInquiry', 'publicInquiryList', '$modal', '$http', function ($scope, $stateParams, PurchaseInquiry, $filter, toaster, BaseService, ngTableParams, AccountEnterprise, publicInquiry, publicInquiryList, $modal, $http) {
|
|
|
BaseService.scrollBackToTop();
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.currentHasBid = false;
|
|
$scope.currentHasBid = false;
|
|
|
var loadData = function () {
|
|
var loadData = function () {
|
|
|
- publicInquiryList.getDetail({id: $stateParams.id}, function (data) {
|
|
|
|
|
- $scope.inquiryItem = data.inquiryItem;
|
|
|
|
|
- if (data.id) {
|
|
|
|
|
- $scope.id = data.id;
|
|
|
|
|
- $scope.currentHasBid = true;
|
|
|
|
|
- }
|
|
|
|
|
- }, function (response) {
|
|
|
|
|
- toaster.pop('error', '提示', response.data);
|
|
|
|
|
|
|
+ // 当前企业
|
|
|
|
|
+ AccountEnterprise.get({}, function (data) {
|
|
|
|
|
+ $scope.enterprise = data
|
|
|
|
|
+ publicInquiry.getUrl({}, function(data) {
|
|
|
|
|
+ var url = data.url;
|
|
|
|
|
+ $http({
|
|
|
|
|
+ method: 'get',
|
|
|
|
|
+ dataType: 'json',
|
|
|
|
|
+ url: url + '/inquiry/sale/publicInquiry/detail',
|
|
|
|
|
+ params: {id: $stateParams.id, enuu: $scope.enterprise.uu}
|
|
|
|
|
+ }).success(function (response) {
|
|
|
|
|
+ if (response) {
|
|
|
|
|
+ $scope.inquiryItem = response.inquiryItem;
|
|
|
|
|
+ }
|
|
|
|
|
+ }).error(function (err) {
|
|
|
|
|
+ toaster.pop('error', '数据加载失败', err);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
loadData();
|
|
loadData();
|