Просмотр исходного кода

更新公共询价明细获取详情的方式,更新首页询价跳转详情方式

hejq 8 лет назад
Родитель
Сommit
44d583e69a
2 измененных файлов с 25 добавлено и 10 удалено
  1. 20 9
      src/main/webapp/resources/js/index/app.js
  2. 5 1
      src/main/webapp/resources/tpl/index/home/left.html

+ 20 - 9
src/main/webapp/resources/js/index/app.js

@@ -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();

+ 5 - 1
src/main/webapp/resources/tpl/index/home/left.html

@@ -185,7 +185,11 @@
 			<ul class="list-unstyled detail">
 			<ul class="list-unstyled detail">
 				<li ng-repeat="msg in message | orderBy : '- inid'" class="day-unread" ng-class="!msg.lastest ? 'nonday' : 'day-read'">
 				<li ng-repeat="msg in message | orderBy : '- inid'" class="day-unread" ng-class="!msg.lastest ? 'nonday' : 'day-read'">
 					<!--<span ng-show="tender.isNew"><img src="static/img/home/newTender.png"></span>-->
 					<!--<span ng-show="tender.isNew"><img src="static/img/home/newTender.png"></span>-->
-					<a ng-click="setReadStatus(msg)" ui-sref="baseInfo.inquiryListDetail({id:msg.inid})" class="text-light">
+					<a ng-if="msg.quteId == null" ng-click="setReadStatus(msg)" ui-sref="baseInfo.inquiryListDetail({id:msg.inid})" class="text-light">
+						<em style="font-style: normal;">{{msg.pordName}}</em>
+						<img src="static/img/home/new.png" ng-if="msg.lastest"/>
+					</a>
+					<a ng-if="msg.quteId != null" ng-click="setReadStatus(msg)" ui-sref="sale.pubinquiry_detail({id:msg.quteId})" class="text-light">
 						<em style="font-style: normal;">{{msg.pordName}}</em>
 						<em style="font-style: normal;">{{msg.pordName}}</em>
 						<img src="static/img/home/new.png" ng-if="msg.lastest"/>
 						<img src="static/img/home/new.png" ng-if="msg.lastest"/>
 					</a>
 					</a>