Browse Source

修改公开招标

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@7909 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
dongbw 9 years ago
parent
commit
6962f20056

+ 7 - 6
src/main/java/com/uas/platform/b2b/controller/PurchaseTenderController.java

@@ -136,7 +136,7 @@ public class PurchaseTenderController {
             saleTenderAttaches = FlexJsonUtils.fromJsonArray(attaches, Attach.class);
         }
         purchaseTenderService.reply(saleTenderItems, vendor, saleTenderAttaches);
-//        logger.log("供应商投标", "供应商对招标单进行投标",  "供应商名称" + item.getEnterpriseBaseInfo().getEnName() + ",价格" + item.getPrice() + ",税率" + item.getTaxrate()+ item.getCode());
+        logger.log("供应商投标", "供应商对招标单进行投标",  "供应商名称" + saleTenderItems.get(0).getSaleTender().getEnterpriseBaseInfo().getEnName() + ",招标单号: "+ saleTenderItems.get(0).getTenderProd().getTender().getCode());
         return new ResponseEntity<String>(HttpStatus.OK);
     }
 
@@ -160,10 +160,12 @@ public class PurchaseTenderController {
      * @param id
      * @return
      */
-    @RequestMapping(value = "/addItems/{id}", method = RequestMethod.GET)
+    @RequestMapping(value = "/addItems/{id}", method = RequestMethod.POST)
     @ResponseBody
-    public PurchaseTender addTenderItemById(@PathVariable("id") Long id) {
-        return purchaseTenderService.addTenderItemById(id);
+    public ResponseEntity<String> addTenderItemById(@PathVariable("id") Long id) {
+        PurchaseTender purchaseTender = purchaseTenderService.addTenderItemById(id);
+        logger.log("我要投标", "供应商转投标单", "招标标题:" + purchaseTender.getTitle()+ "供应商企业" + SystemSession.getUser().getEnterprise().getEnName() + "供应商企业uu" + SystemSession.getUser().getEnterprise().getUu());
+        return new ResponseEntity<String>(HttpStatus.OK);
     }
 
 
@@ -711,8 +713,7 @@ public class PurchaseTenderController {
      *
      * @param attachId
      */
-    @RequestMapping(value = "/removeAttach", method = RequestMethod.POST)
-    @ResponseBody
+    @RequestMapping(value = "/removeAttach/{attachId}", method = RequestMethod.POST)
     public void deleteAttach(@PathVariable ("attachId") Long attachId) {
         purchaseTenderService.deleteAttach(attachId);
     }

+ 6 - 0
src/main/java/com/uas/platform/b2b/service/PurchaseTenderService.java

@@ -127,6 +127,12 @@ public interface PurchaseTenderService {
 
     ModelMap releaseByWorkbook(Workbook workbook);
 
+    /**
+     * 公开招标单转投标单操作
+     *
+     * @param id
+     * @return
+     */
     PurchaseTender addTenderItemById(Long id);
 
     /**

+ 9 - 6
src/main/java/com/uas/platform/b2b/service/impl/PurchaseTenderServiceImpl.java

@@ -269,10 +269,15 @@ public class PurchaseTenderServiceImpl implements PurchaseTenderService {
         return purchaseTenderDao.findOne(id);
     }
 
+    /**
+     * 公开招标单转投标单
+     *
+     * @param id
+     * @return
+     */
     @Override
     public PurchaseTender addTenderItemById(Long id) {
         PurchaseTender tender = purchaseTenderDao.findOne(id);
-        // 转投标单方法
         for (PurchaseTenderProd tenderProd : tender.getPurchaseTenderProds()) {
             Long vendUU = SystemSession.getUser().getEnterprise().getUu();
             EnterpriseBaseInfo enBaseInfo = enterpriseBaseInfoDao.findOne(vendUU);
@@ -517,11 +522,9 @@ public class PurchaseTenderServiceImpl implements PurchaseTenderService {
         SaleTender saleTender = item.getSaleTender();
         saleTender.setStatus("已投标");
         Set<Attach> attachSet = new HashSet<>();
-        if (!CollectionUtils.isEmpty(attaches)) {
-            attachSet.addAll(attaches);
-            saleTender.setBidAttaches(attachSet);
-            saleTenderDao.save(saleTender);
-        }
+        attachSet.addAll(attaches);
+        saleTender.setBidAttaches(attachSet);
+        saleTenderDao.save(saleTender);
         for (SaleTenderItem tenderItem : tenderItems) {
             SaleTenderItem saleTenderItem = saleTenderItemDao.findOne(tenderItem.getId());
             // 需要修改见索引主表中的字段来触发索引更新

+ 105 - 97
src/main/webapp/resources/js/index/app.js

@@ -189,19 +189,15 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
             url : "/tender",
             templateUrl : "static/tpl/index/sale/tenderlist.html",
             controller : 'SaleTenderCtrl'
-        //     /* 平台公开招标列表 */
-        // }).state('sale.opentenderlist', {
-        //     url : "/opentender",
-        //     templateUrl : "static/tpl/index/sale/opentenderlist.html",
-        //     controller : 'SaleOpenTenderCtrl'
-        // }).state('sale.todo.opentenderlist', {
-        //     url : "/opentender",
-        //     templateUrl : "static/tpl/index/sale/opentenderlist.html",
-        //     controller : 'SaleOpenTenderCtrl'
-            /* 公开招标单转投标单 */
-        }).state('sale.opentender', {
-            url : "/opentender/:id",
-            templateUrl : "static/tpl/index/sale/tender.html",
+            /* 平台公开招标列表 */
+        }).state('baseInfo.openTenderList', {
+            url : "/openTenderList",
+            templateUrl : "static/tpl/index/sale/open_tender_list.html",
+            controller: 'SaleOpenTenderCtrl'
+            /* 查看公开招标详情 */
+        }).state('baseInfo.open_tender_detail', {
+            url : "/openTenderDetail/:id",
+            templateUrl : "static/tpl/index/sale/open_tender_detail.html",
             controller : 'OpenSaleTenderDetailCtrl'
             /* 投标 */
         }).state('sale.tender', {
@@ -419,10 +415,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
             url : "/enterpriseList",
             templateUrl : "static/tpl/index/baseInfo/enterpriseList.html",
             controller: 'EnterpriseListCtrl'
-        }).state('baseInfo.openTenderList', {
-            url : "/openTenderList",
-            templateUrl : "static/tpl/index/baseInfo/open_tender.html",
-            controller: 'SaleOpenTenderCtrl'
         }).state('baseInfo.home', {
             url : "/enterpriseList",
             templateUrl : "static/tpl/index/baseInfo/enterpriseList.html",
@@ -8317,7 +8309,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 
 		//提交
 		$scope.submit = function(prodInfo){
-			console.log(prodInfo);
 			var file = $scope.myFiles, file = file && file.length > 0 ? file[0] : null;// 可以不传附件
 			$upload.upload({
 				url: 'product/baseInfo/addNewProduct',
@@ -8744,25 +8735,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			});
 		};
 		
-		// 联想词 start
-		// 获取供应商
-        $scope.getSimilarVendors = function(value) {
-        	console.log(value);
-            if (value) {
-                return Vendor.getSimilarVendors({keyword : value}).$promise.then(function(data) {
-                    return data.map(function(item) {
-                        return item;
-                    });
-                });
-            }
-        };
-	    
-        $scope.onAssociateCmpClick = function(vendor, order) {
-        	$scope.order.cust.uu = vendor.venduu;
-        	$rootScope.venduu = $scope.order.cust.uu;
-        }
-     // 联想词 end
-        
+	
 //		$scope.order.orderItems.push(item);
 		if($rootScope.prodId) {
 			VendorInfo.getProdInfo({id: $rootScope.prodId}, {}, function(data) {
@@ -9026,6 +8999,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
   		
   		$scope.ensure = false;
   		$scope.check = function(vendor) { // 需要进行判断的选择
+  			console.log(vendor);
   			$scope.vendorInfo = vendor;
   			$scope.ensure = true;
   		};
@@ -10502,12 +10476,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 
 
         $scope.loading = false;
-        
-        $scope.tender = {};
+
         // 获取收货地址列表
         ShipAddress.shipAddList({}, function(data) {
             $scope.ships = data;
-            $scope.tender.shipAdd = $scope.ships[0];
+            $scope.tender.shipadd = $scope.ships[0];
         });
 
         // 获取地址信息
@@ -10515,7 +10488,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
         }).then(function(response) {
             $scope.provinces = response.data;
         });
-      
+
         // 新增收货地址保存
         $scope.saveShipAddress = function(ship) {
             ship.address = ship.province + ship.city + ship.district;
@@ -10523,8 +10496,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
                 if(data.success) {
                     // 获取收货地址列表
                     ShipAddress.shipAddList({}, function(data) {
-                		$scope.ships = data;
-                		$scope.tender.shipAdd = $scope.ships[0];
+                        $scope.ships = data;
+                        $scope.tender.shipadd = $scope.ships[0];
                     });
                     toaster.pop('success', '提示', data.success);
                 }
@@ -10999,7 +10972,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
                     $scope.tender.purchaseTenderProds[i].index = i + 1;
                 }
                 $scope.tender.tenderAttaches = $scope.attaches;
-                $scope.tender.shipAddress = $scope.tender.shipAdd.address + $scope.tender.shipAdd.addressdet + ' ' + $scope.tender.shipAdd.receiver + ' ' + $scope.tender.shipAdd.usertel;
+                $scope.tender.shipAddress = $scope.tender.shipadd.address + $scope.tender.shipadd.addressdet + ' ' + $scope.tender.shipadd.receiver + ' ' + $scope.tender.shipadd.usertel;
                 console.log($scope.tender.shipAddress);
                 var vendorUUs = [];
                 angular.forEach($scope.tenderProd.enterpriseBaseInfo, function(enterpriseBaseInfo){
@@ -11066,7 +11039,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
                     $scope.tender.purchaseTenderProds[i].index = i + 1;
                 }
                 $scope.tender.tenderAttaches = $scope.attaches;
-                $scope.tender.shipAddress = $scope.tender.shipAdd.address + $scope.tender.shipAdd.addressdet + ' ' + $scope.tender.shipAdd.receiver + ' ' + $scope.tender.shipAdd.usertel;
+                $scope.tender.shipAddress = $scope.tender.shipadd.address + $scope.tender.shipadd.addressdet + ' ' + $scope.tender.shipadd.receiver + ' ' + $scope.tender.shipadd.usertel;
                 var vendorUUs = [];
                 angular.forEach($scope.tenderProd.enterpriseBaseInfo, function(enterpriseBaseInfo){
                     vendorUUs.push(enterpriseBaseInfo.uu);
@@ -11135,7 +11108,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
             // var minDate = angular.copy($scope.tender.endDate);
             // minDate = minDate.setDate(minDate.getDate() + 1);
             if ($scope.tender.endDate instanceof Date) {
-                var minDate = $scope.tender.endDate.getTime() + 24*60*60*1000 + 1; // 不能选相同一天
+                var minDate = new Date($scope.tender.endDate.getTime() + 24*60*60*1000 + 1); // 不能选相同一天
             }
             return $scope.tender.endDate ? $filter('date')(minDate, 'yyyy-MM-dd'):$filter('date')(new Date(), 'yyyy-MM-dd');
         };
@@ -11144,7 +11117,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
             // var maxDate = angular.copy($scope.tender.publishDate);
             // maxDate = maxDate.setDate(maxDate.getDate() - 1);
             if ($scope.tender.publishDate instanceof Date) {
-                var maxDate = $scope.tender.publishDate.getTime() - 1; // 不能选同一天
+                var maxDate = new Date($scope.tender.publishDate.getTime() - 1); // 不能选同一天
             }
             return $scope.tender.publishDate ? $filter('date')(maxDate, 'yyyy-MM-dd'):"";
         };
@@ -11584,24 +11557,28 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
             }
         });
 
-        var stautsItem = [];
-        $scope.getTenderStatus = function (tender) {
-            angular.forEach(tender.purchaseTenderItems, function(thisItem){
-                if ($scope.currentEn.uu == thisItem.enterpriseBaseInfo.uu) {
-                    stautsItem = thisItem;
-                }
-            });
-            if (!stautsItem.price) {
-                return "daitoubiao";
-            } else if (!stautsItem.applystatus) {
-                return "yitoubiao";
-            } else if (stautsItem.applystatus == 1) {
-                return "zhongbiao";
-            } else if (stautsItem.applystatus == 0) {
-                return "weizhongbiao";
-            }
+        $scope.toDetail = function(id) {
+            window.location.hash = '#/sale/openTenderDetail/' + id;
         };
 
+        // var stautsItem = [];
+        // $scope.getTenderStatus = function (tender) {
+        //     angular.forEach(tender.purchaseTenderItems, function(thisItem){
+        //         if ($scope.currentEn.uu == thisItem.enterpriseBaseInfo.uu) {
+        //             stautsItem = thisItem;
+        //         }
+        //     });
+        //     if (!stautsItem.price) {
+        //         return "daitoubiao";
+        //     } else if (!stautsItem.applystatus) {
+        //         return "yitoubiao";
+        //     } else if (stautsItem.applystatus == 1) {
+        //         return "zhongbiao";
+        //     } else if (stautsItem.applystatus == 0) {
+        //         return "weizhongbiao";
+        //     }
+        // };
+
 
         // 搜索框回车
         $scope.onSearch = function() {
@@ -11703,11 +11680,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
             });
         };
 
-        $scope.removeAttach = function(id, index) {
+        $scope.removeAttach = function(attachId, index) {
             $scope.attaches.splice(index, 1);
-            PurcTender.removeAttach({attachId:id}, function() {
-
-            });
+            // PurcTender.removeAttach({attachId : id}, {}, function() {
+            //
+            // });
         };
 
         var taxrateYes = false;
@@ -11767,7 +11744,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
             // /^(0|[0-9][0-9]{0,9})(\.[0-9]{1,6})?$/;
             // 判断填写过的有为0或不符合正则式的,设置不能保存
             console.log(tenderProd.currentItem.cycle);
-            if (tenderProd.currentItem.cycle && (!cycleRegex.test(tenderProd.currentItem.cycle)) || (tenderProd.currentItem.taxrate && !taxrateRegex.test(tenderProd.currentItem.taxrate)) || (tenderProd.currentItem.price && (!priceRegex.test(tenderProd.currentItem.price) && tenderProd.currentItem.price !== 0))) {
+            if (tenderProd.currentItem.cycle !== null && (!cycleRegex.test(tenderProd.currentItem.cycle)) || (tenderProd.currentItem.taxrate !== null && !taxrateRegex.test(tenderProd.currentItem.taxrate)) || (tenderProd.currentItem.price !== null && (!priceRegex.test(tenderProd.currentItem.price) && tenderProd.currentItem.price !== 0))) {
                 $scope.canSave = false;
             } else {
                 $scope.canSave = true;
@@ -11790,14 +11767,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
                     }
                 });
             } else {
-                console.log(tender);
                 angular.forEach(tender.purchaseTenderProds, function(tenderProd) {
                     if (tenderProd.currentItem) {
                         saleTenderItems.push(tenderProd.currentItem);
                     }
                 });
             }
-            console.log(saleTenderItems);
             PurcTender.reply({tenderItems: saleTenderItems, enBaseInfo: currentEnBaseInfo, attaches:$scope.attaches}, {}, function(data){
                 $scope.loading = false;
                 toaster.pop('info', '成功', '投标成功');
@@ -11844,38 +11819,71 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
             $scope.currentEn = data;
         });
 
-        PurcTender.addItems({id: $stateParams.id}, function(data){
-            $scope.bid = data;
-            angular.forEach(data.purchaseTenderProds, function(tenderProd) {
-                angular.forEach(tenderProd.saleTenderItems, function(saleTenderItem) {
-                    if (!$scope.currentEn) {
-                        AccountEnterprise.get({}, function(data){
-                            $scope.currentEn = data;
-                        });
-                    }
-                    if (saleTenderItem.saleTender.vendUU === $scope.currentEn.uu) {
-                        tenderProd.currentItem = saleTenderItem;
-                        $scope.saleTender = saleTenderItem.saleTender;
-                        $scope.attaches = saleTenderItem.saleTender.bidAttaches;
-                        $scope.currentEnBaseInfo = saleTenderItem.saleTender.enterpriseBaseInfo;
+        if( ! angular.isUndefined($stateParams.id)) { // 获取招标单详情
+            $scope.loading  = true;
+            PurcTender.getOne({id: $stateParams.id}, function(data){
+                data.$editing = false;
+                $scope.tender = data;
+                $scope.tenderProd = data.purchaseTenderProds;
+                // parseCertificate($scope.tender.certificate);
+                // $scope.firstProd = data.purchaseTenderProds[0];
+
+                $scope.currentHasBid = false; // 默认当前企业未转投标单
+                angular.forEach(data.purchaseTenderProds[0].saleTenderItems, function(item) {
+                    if ($scope.currentEn.uu === item.saleTender.vendUU) { // 存在当前企业为供应商的投标单,判断已转
+                        $scope.currentHasBid = true;
                     }
                 });
+                // $rootScope.tenderVendor = $scope.tenderProd.enterpriseBaseInfo;
+                // console.log($scope.tenderProd.enterpriseBaseInfo);
+                $scope.loading  = false;
+
+                $scope.attaches = $scope.tender.tenderAttaches;
+            }, function(response){
+                $scope.loading  = false;
+                toaster.pop('error', '数据加载失败', response.data);
             });
-        }, function(response){
-            toaster.pop('error', '数据加载失败', response.data);
-        });
+        }
 
-        $scope.upload = function(myFile) {  // 上传附件
-            var file = $scope.myFile, file = file && file.length > 0 ? file : null;
-            $upload.upload({
-                url: 'tender/addTenderItemAttach',
-                file: file,
-                method: 'POST'
-            }).success(function (attach) {
-                $scope.attaches.push(attach);
+        $scope.iWantToBid = function(id) {
+            PurcTender.addItems({id: id}, function(data){ // 添加明细
+                // $scope.tender = data;
+                // angular.forEach(data.purchaseTenderProds, function(tenderProd) {
+                //     angular.forEach(tenderProd.saleTenderItems, function(saleTenderItem) {
+                //         if (!$scope.currentEn) {
+                //             AccountEnterprise.get({}, function(data){
+                //                 $scope.currentEn = data;
+                //             });
+                //         }
+                //         if (saleTenderItem.saleTender.vendUU === $scope.currentEn.uu) {
+                //             tenderProd.currentItem = saleTenderItem;
+                //             $scope.saleTender = saleTenderItem.saleTender;
+                //             $scope.attaches = saleTenderItem.saleTender.bidAttaches;
+                //             $scope.currentEnBaseInfo = saleTenderItem.saleTender.enterpriseBaseInfo;
+                //         }
+                //     });
+                // });
+                if (data.success) {
+                    toaster.pop('success', '成功', '转投标单成功');
+                    window.location.hash = '#/sale/tender';
+                }
+            }, function(response){
+                toaster.pop('error', '操作失败', response.data);
             });
+
+            $scope.upload = function(myFile) {  // 上传附件
+                var file = $scope.myFile, file = file && file.length > 0 ? file : null;
+                $upload.upload({
+                    url: 'tender/addTenderItemAttach',
+                    file: file,
+                    method: 'POST'
+                }).success(function (attach) {
+                    $scope.attaches.push(attach);
+                });
+            };
         };
 
+
         $scope.removeAttach = function(id, index) {
             $scope.attaches.splice(index, 1);
             PurcTender.removeAttach({attachId:id}, function() {
@@ -11910,7 +11918,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
                     if (regex.test(value) && value !== 0) {
                         priceYes = true;
                     } else {
-                        if (!(value instanceof Number)) {
+                        if (!(value instanceof Number) || value) {
                             toaster.pop('warning', '警告', '单价不合法,请重新填写');
                         }
                     }
@@ -11936,7 +11944,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
             // /^(0|[0-9][0-9]{0,9})(\.[0-9]{1,6})?$/;
             // 判断填写过的有为0或不符合正则式的,设置不能保存
             console.log(tenderProd.currentItem.cycle);
-            if (tenderProd.currentItem.cycle && (!cycleRegex.test(tenderProd.currentItem.cycle)) || (tenderProd.currentItem.taxrate && !taxrateRegex.test(tenderProd.currentItem.taxrate)) || (tenderProd.currentItem.price && (!priceRegex.test(tenderProd.currentItem.price) && tenderProd.currentItem.price !== 0))) {
+            if (tenderProd.currentItem.cycle !== null && (!cycleRegex.test(tenderProd.currentItem.cycle)) || (tenderProd.currentItem.taxrate !== null && !taxrateRegex.test(tenderProd.currentItem.taxrate)) || (tenderProd.currentItem.price !==null && (!priceRegex.test(tenderProd.currentItem.price) && tenderProd.currentItem.price !== 0))) {
                 $scope.canSave = false;
             } else {
                 $scope.canSave = true;

+ 2 - 3
src/main/webapp/resources/js/index/services/Purc.js

@@ -242,7 +242,7 @@ define([ 'ngResource'], function() {
 			},
             addItems: {
                 url: 'tender/addItems/:id',
-                method: 'GET',
+                method: 'POST',
                 params: {
                     id: 'id'
                 }
@@ -288,14 +288,13 @@ define([ 'ngResource'], function() {
             },
             publishSaved: {
                 url: 'tender/publishSaved',
-                method: 'POST'
             },
             updateSaved: {
                 url: 'tender/updateSaved',
                 method: 'POST'
             },
             removeAttach: {
-                url: 'tender/removeAttach',
+                url: 'tender/removeAttach/:attachId',
                 method: 'POST',
                 params: {
                     attachId: 'attachId'

+ 3 - 4
src/main/webapp/resources/tpl/index/home/left.html

@@ -137,9 +137,8 @@
 		</div>
 		<div class="pane-body">
 			<ul class="list-unstyled detail">
-				<li ng-repeat="tender in tenders | orderBy : - date ">
-					<!--<span ng-show="tender.isNew"><img src="static/img/home/newTender.png"></span>-->
-					<a ui-sref="purc.open_tender_detail({id:tender.id})" class="text-light"><em ng-bind="::tender.title"></em><img src="resources/img/home/new.png"/></a>
+				<li ng-repeat="tender in openTenders | orderBy: '-date' ">
+					<a ui-sref="baseInfo.open_tender_detail({id:tender.id})" class="text-light"><em ng-bind="::tender.title"></em><img src="resources/img/home/new.png"/></a>
 				</li>
 				<li class="pull-right"><a href="#/baseInfo/openTenderList" class="text-light">更多>></a></li>
 				<li ng-show="tenders == null || tenders == ''" class="grey">
@@ -154,7 +153,7 @@
 		</div>
 		<div class="pane-body">
 			<ul class="list-unstyled detail">
-				<li ng-repeat="msg in message | orderBy : - inid">
+				<li ng-repeat="msg in message | orderBy : '- inid'">
 					<!--<span ng-show="tender.isNew"><img src="static/img/home/newTender.png"></span>-->
 					<a ui-sref="sale.inquiry_detail({id:msg.inid})"class="text-light"><em style="color: #d32526;font-style: normal;">{{msg.pordName}}</em><img src="resources/img/home/new.png"/></a>
 				</li>

+ 4 - 4
src/main/webapp/resources/tpl/index/purc/saved_tender.html

@@ -498,8 +498,8 @@
                     <div class = "col-xs-4">
                         <div class="tender-desc">是否含税:</div>
                         <select class="select-menu"  ng-model="tender.ifTax">
-                            <option value ="yes">是</option>
-                            <option value ="no">否</option>
+                            <option value ="1">是</option>
+                            <option value ="0">否</option>
                         </select>
                     </div>
                     <div class="col-xs-12">
@@ -571,7 +571,7 @@
                         <div class="fileInputContainer">
                             <input class="fileInput" type="file" ng-file-select name="file" ng-model="myFile" ng-change="upload(myFile)" />
                             <!-- href="file/{{attach.id}}" -->
-                            <div class="attach-file" ng-repeat="attach in attaches">{{attach.name}}&nbsp;&nbsp;<a ng-click="removeAttach(attach.id, $index)" title="删除"><i class="fa fa-trash-o"></i></a></div>
+                            <div class="attach-file" ng-repeat="attach in attaches">{{attach.name}}&nbsp;&nbsp;<a ng-click="removeAttach(attach.id, $index)" title="删除"><i class="fa fa-trash-o fa-lg"></i></a></div>
                         </div>
                         <div style="margin-left: 100px; color: #969595; font-size: 12px; font-family: 'Microsoft Yahei Regular';">
                             提示:选择附件大小不超过5MB,可上传JPG,PNG,EXCEL,WORD,PDF
@@ -665,7 +665,7 @@
                                    ng-required="tender.ifOpen == 0">
                         </div>
                         <div class="col-xs-1">
-                            <a class="remove-vendor" href="javascript:void(0)" ng-click="removeVendor($index);removeSaleTender(tender, en.uu);" title="删除"><i class="fa fa-trash-o"></i></a>
+                            <a class="remove-vendor" href="javascript:void(0)" ng-click="removeVendor($index);removeSaleTender(tender, en.uu);" title="删除"><i class="fa fa-trash-o fa-lg"></i></a>
                         </div>
                     </div>
                     <div class="col-xs-12" style="border-bottom: 1px dashed #327ebe;">

+ 27 - 11
src/main/webapp/resources/tpl/index/purc/tender.html

@@ -195,6 +195,7 @@
         opacity: 0;
         filter:alpha(opacity=0);
         cursor:pointer;
+        overflow: hidden;
     }
     /* 图片点击上传 */
     /*.upload-bg {*/
@@ -476,7 +477,7 @@
                             <option value ="RMB">RMB</option>
                             <option value ="USD">USD</option>
                             <option value ="HKD">HKD</option>
-                            <option value = "EUR">EUR</option>
+                            <option value ="EUR">EUR</option>
                         </select>
                     </div>
                     <div class = "col-xs-4">
@@ -488,9 +489,8 @@
                     </div>
                     <div class="col-xs-12">
                         <div class="tender-desc">收货地址:</div>
-                        <span>
-                             <select class="select fl" style="width: 70%; height: 34px; line-height: 34px;" ng-model="tender.shipAdd"
-                                     ng-options="(ship.address + ship.addressdet + ' ' + ship.receiver + ' ' + ship.usertel) for ship in ships">
+                        <span required="required">
+                             <select class="select fl" style="width: 70%; height: 34px; line-height: 34px; font-size: 14px;" ng-model="tender.shipadd" required="required" ng-options="(ship.address + ship.addressdet + ' ' + ship.receiver + ' ' + ship.usertel) for ship in ships">
 								<option value="">请选择收货地址</option>
 							</select>
                             <a href="javascript:void(0);" class="add-address">+新增收货信息</a>
@@ -547,7 +547,7 @@
                         <div class="fileInputContainer">
                             <input class="fileInput" type="file" ng-file-select name="file" ng-model="myFile" ng-change="upload(myFile)" />
                             <!-- href="file/{{attach.id}}" -->
-                            <div class="attach-file" ng-repeat="attach in attaches">{{attach.name}}&nbsp;&nbsp;<a ng-click="removeAttach(attach.id, $index)" title="删除"><i class="fa fa-trash-o"></i></a></div>
+                            <div class="attach-file" ng-repeat="attach in attaches">{{attach.name}}&nbsp;&nbsp;<a ng-click="removeAttach(attach.id, $index)" title="删除"><i class="fa fa-trash-o fa-lg"></i></a></div>
                         </div>
                         <div style="margin-left: 100px; color: #969595; font-size: 12px; ">
                             提示:选择附件大小不超过5MB,可上传JPG,PNG,EXCEL,WORD,PDF
@@ -637,7 +637,7 @@
                                    ng-required="tender.ifOpen == 0">
                         </div>
                         <div class="col-xs-1">
-                            <a class="remove-vendor" href="javascript:void(0)" ng-click="removeVendor($index)" title="删除"><i class="fa fa-trash-o"></i></a>
+                            <a class="remove-vendor" href="javascript:void(0)" ng-click="removeVendor($index)" title="删除"><i class="fa fa-trash-o fa-lg"></i></a>
                         </div>
                     </div>
                     <div class="col-xs-12" style="border-bottom: 1px dashed #327ebe;">
@@ -673,10 +673,10 @@
                 </div>
                 <div class="col-xs-12" style="padding: 30px;">
                     <div class="col-xs-2 pull-right btn-publish">
-                        <button class="btn" ng-disabled="tenderForm.$invalid || !tender.shipAdd" ng-click="save(true)">发布</button>
+                        <button class="btn" ng-disabled="tenderForm.$invalid || !tender.shipadd" ng-click="save(true)">发布</button>
                     </div>
                     <div class="col-xs-2 pull-right btn-save">
-                        <button class="btn" ng-disabled="tenderForm.$invalid || !tender.shipAdd" ng-click="save(false)">保存</button>
+                        <button class="btn" ng-disabled="tenderForm.$invalid || !tender.shipadd" ng-click="save(false)">保存</button>
                     </div>
                 </div>
             </div>
@@ -687,12 +687,12 @@
 <div class="bomb-box" style="display: none">
     <form class="box04 box" name="shipAddress" id="shipAddress">
         <i class="off"><img src="resources/img/purc/close.png" alt="" /></i>
-        <p>人资料</p>
+        <p>收货人资料</p>
         <ul>
             <li class="line01">
                 <div class="fl">
                     <span class="fl">收货人<em>*</em>:</span>
-                    <span class="fr"><input type="text" placeholder="填写收货人" ng-model="ship.receiver" required="true"/></span>
+                    <span class="fr"><input type="text" placeholder="填写收货人" ng-model="ship.receiver" required="true" ng-pattern="/^[\u4e00-\u9fa5]{1,6}$|^[\dA-Za-z]{1,12}$/"/></span>
                 </div>
                 <div class="fr">
                     <span class="fl">手机<em>*</em>:</span>
@@ -702,7 +702,7 @@
             <li class="line01">
                 <div class="fl">
                     <span class="fl">固定电话<em></em>:</span>
-                    <span class="fr"><input type="text" ng-model="ship.phone"/></span>
+                    <span class="fr"><input type="text" ng-model="ship.phone"  ng-pattern="/([0-9]{3,4}-)?[0-9]{7,8}/"/></span>
                 </div>
                 <div class="fr">
                     <span class="fl">邮箱:</span>
@@ -750,6 +750,22 @@
             $(".scroll-y").removeClass("active");
         }
 
+        /*下拉效果*/
+        $('.select p').click(function(e){
+            $('.select').toggleClass('open');
+            e.stopPropagation();
+        });
+        $('.select ul li').click(function(e){
+            var title=$(this).html();
+            $('.select p').html(title);
+            $(this).addClass('selected').siblings().removeClass('selected');
+            $('.select').removeClass('open');
+            e.stopPropagation();
+        });
+        $(document).click(function(){
+            $('.select').removeClass('open');
+        })
+
         //新增收货地址
         $(".tender-content .base-info .add-address").click(function(){
             document.getElementById('shipAddress').reset();

+ 525 - 0
src/main/webapp/resources/tpl/index/sale/open_tender_detail.html

@@ -0,0 +1,525 @@
+<!--  查看公共招标单  -->
+<style>
+
+    /* 标题 */
+    .tender-label {
+        /*height: 30px;*/
+        /*margin-left: 10px;*/
+        /*margin-right: 10px;*/
+        /*background-color: #e8e8e8;*/
+        /*box-shadow: 0 0 5px #6f6f6f;*/
+        /*border-top-right-radius: 20px;*/
+        width: 100%;
+        height: 40px;
+        line-height: 42px;
+        background: url(static/img/comm_bg01.png) no-repeat center;
+        background-size: 100%;
+
+    }
+    /* 主体 */
+    .purc-tender {
+        line-height: 2;
+        font-family: "Microsoft Yahei Regular";
+        font-size: 14px;
+    }
+    .purc-tender .row {
+        margin-left: 0px;
+        margin-right: 0px;
+        padding-left: 15px;
+        padding-right: 15px;
+    }
+    .tender-content {
+        background-color: #fff;
+    }
+
+    .tender-content>div>div {
+        margin-top: 3px;
+        margin-bottom: 3px;
+    }
+    /* 二级标题栏 */
+    .title-div {
+        font-family: "Microsoft Yahei Regular";
+        font-size: 14px;
+        font-weight: 600;
+        padding-left: 30px;
+        height: 50px;
+        padding-top: 11px;
+    }
+
+    /* 输入框前描述 */
+    .tender-desc {
+        width: 100px;
+        float: left;
+    }
+    /* 输入框 */
+    .tender-input {
+        border: none;
+        border-bottom: 1px solid #323232;
+        text-align: center;
+    }
+    .tender-input:focus{
+        outline:none;
+        border-bottom: 1px solid #5078cb;
+    }
+
+    /* 收货地址 */
+    .address-group {
+        border-bottom: 1px solid #323232;
+        border-bottom-left-radius: 0;
+        margin-right: 20px;
+    }
+    .address-group>input:focus{
+        outline: none;
+    }
+
+    /* 基本信息 */
+    .base-info {
+        border-bottom: 1px solid #e8e8e8;
+        padding-bottom: 30px;
+        padding-top: 20px;
+        margin-bottom: 0; /* 去除index中公共样式影响 */
+    }
+
+    /* 地址附加图标 */
+    .address-addon {
+        border: none;
+        background: none;
+    }
+
+    /* 下拉选项 */
+    .select-menu {
+        margin: 4px;
+        width: 100px;
+        padding: 0 5%;
+        height: 30px;
+    }
+
+    select {
+        /*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/
+        border: solid 1px #5078cb;
+
+        /*很关键:将默认的select选择框样式清除*/
+        appearance:none;
+        -moz-appearance:none;
+        -webkit-appearance:none;
+
+        /*在选择框的最右侧中间显示小箭头图片*/
+        background: url("resources/img/tender/select.png") no-repeat scroll right center transparent;
+
+
+        /*为下拉小箭头留出一点位置,避免被文字覆盖*/
+        padding-right: 14px;
+    }
+
+
+    /*清除ie的默认选择框样式清除,隐藏下拉箭头*/
+    select::-ms-expand { display: none; }
+
+    /* 日期选择器 */
+    .purc-tender .date-picker {
+        padding-top: 10px;
+    }
+    .purc-tender .date-picker input {
+        border-radius: 0;
+        border: 1px solid #5078cb;
+        border-right: none;
+        font-size: 12px;
+    }
+    .purc-tender .date-picker span .btn-open {
+        color: #fff;
+        background-color: #5078cb;
+        border-radius: 0;
+        border: 1px solid #5078cb;
+        border-left: none;
+    }
+
+    /* 修改本页内btn的样式 及datepicker中的btn-success的样式 */
+    .tender-content .date-picker .btn {
+        border-radius: 0;
+    }
+
+    .tender-content .date-picker .btn-success {
+        background-color: #327EBE;
+    }
+    .tender-content .date-picker ul {
+        border-radius: 0;
+    }
+    .tender-content .date-picker ul div:focus {
+        outline: none;
+        border-radius: 0;
+        border: none;
+    }
+
+    /* 附件上传 */
+    .purc-tender .base-info .attach-upload {
+        display: inline;
+    }
+    .purc-tender .base-info .attach-upload input {
+        height: 100px;
+        width: 100px;
+        margin: 6px 0 0 100px;
+        opacity: 0;
+        z-index: 1;
+        position: relative;
+    }
+    .purc-tender .base-info .attach-upload input:hover {
+        cursor: pointer;
+    }
+    .fileInputContainer{
+        height:100px;
+        background-image: url('resources/img/tender/upload.png');
+        position:relative;
+        width: 100px;
+        margin-left: 100px;
+        margin-top: 20px;
+    }
+    .fileInput{
+        height:100px;
+        font-size: 100px;
+        position:absolute;
+        margin-left: 100px;
+        margin-top: 20px;
+        right:0;
+        top:0;
+        opacity: 0;
+        filter:alpha(opacity=0);
+        cursor:pointer;
+    }
+    /* 图片点击上传 */
+    /*.upload-bg {*/
+    /*width: 100px;*/
+    /*height: 100px;*/
+    /*background-image: url('resources/img/tender/upload.png');*/
+    /*margin-top: 10px;*/
+    /*margin-left: 100px;*/
+    /*border: 1px solid #e8e8e8;*/
+    /*z-index: 2;*/
+    /*}*/
+    /* 供应商信息 添加供应商 */
+    .vend-info  a.add-vendor {
+        color: #5078cb;
+    }
+    .vend-info  a.add-vendor:hover {
+        cursor: pointer;
+        color: #55b6ff;
+    }
+    .vend-info  a.remove-vendor {
+        color: #FF2E2F;
+    }
+    .vend-info  a.remove-vendor:hover {
+        cursor: pointer;
+        color: #D32526;
+    }
+
+    /* 单选框 复选框 */
+    input[type="radio"],input[type="checkbox"] {
+        vertical-align:text-bottom;
+        margin-bottom:2px;
+        margin-bottom:-2px\9;
+    }
+    .vend-info .input-select {
+        float: left;
+        padding-top: 4px;
+        margin-left: -20px;
+    }
+
+    .vend-info .input-select input {
+        margin-right: 8px;
+    }
+
+    /* 右下角按钮 */
+    .tender-content>div {
+        background-color: #fff;
+    }
+    .tender-content>div>div>button {
+        width: 94px;
+        height: 36px;
+        font-size: 14px;
+        font-family: "Microsoft Yahei Regular";
+        color: #fff;
+        border-radius: 0;
+    }
+    .tender-content>div>div.btn-publish>button {
+        background-color: #FF2E2F;
+        width: 150px;
+        height: 60px;
+        font-size: 16px;
+        font-family: "Microsoft Yahei Regular";
+        color: #fff;
+        border-radius: 0;
+    }
+
+    .tender-content>div>div.btn-disabled>button {
+        background-color: #999;
+        width: 150px;
+        height: 60px;
+        font-size: 16px;
+        font-family: "Microsoft Yahei Regular";
+        color: #fff;
+        border-radius: 0;
+    }
+
+    .read-only {
+        border: none;
+        color: #969595;
+    }
+
+    .read-only:focus {
+        border: none;
+    }
+
+    .attach-file {
+        margin-left: 100px;
+        width: 400px;
+    }
+
+
+    .com_head{width:100%;height:40px;line-height:42px;background:url(static/img/comm_bg01.png) no-repeat center;background-size: 100%;}
+    .com_head span{margin-left:30px;color:#000;font-size:14px;}
+    .com_head a{color:#327ebe;float:right;margin-right:40px;font-size: 14px;}
+    .com_head a i{margin-left: 5px;line-height: 40px;}
+    .com_head a:hover{color: #d2272d;}
+
+    .com_title{width:100%;margin:0px auto;height:40px;line-height:40px;font-size:14px;color:#323232;background:#f5f5f5;}
+    .com_title font{color:#327ebe;}
+
+
+    .com_title01{height: 50px;line-height:50px;width:100%;border-bottom:#3578ba 1px dotted;border-top:#e8e8e8 1px solid;margin-top: -4px;} /*  这里修改过 margin-top*/
+    .com_title01 span{margin-left:20px;font-size: 14px;line-height: 50px;color: #555;font-weight: bold;}
+
+    .com_title01  a {
+        color: #5078cb;
+    }
+    .com_title01  a:hover {
+        cursor: pointer;
+        color: #55b6ff;
+    }
+
+    /*招标单*/
+    .tender-list02 dl{width: 100%;margin:0 auto;}
+    .tender-list02 dl dt{width: 100%;margin:0 auto;height: 40px;}
+    .tender-list02 dl dt span{height: 50px;line-height: 50px;display: inline-block;color: #999;}
+    .tender-list02 dl dd{width: 100%;margin:0 auto;height: 50px;border-bottom: #ccc 1px dotted;overflow: hidden; position: relative;}
+    .tender-list02 dl dd:hover{border: #d32526 1px solid;}
+    .tender-list02 dl dd span{height: 50px;line-height: 50px;display: inline-block;}
+    .tender-list02 dl span{width:11%;font-size: 14px;float: left;text-align: center;}
+    .tender-list02 dl span.wid01{ width:22%;}
+    .tender-list02 dl span.wid02{ width:18%;}
+    .tender-list02 dl span.wid03{ width:5%;}
+    .tender-list02 .editable{ text-align: center; width: 100%;}
+    .tender-list02  .scroll-y dd input{width: 100%; height: 34px; border: none; font-size: 14px; padding-left: 4px; text-align: center; vertical-align: middle; line-height: 34px;}
+    .tender-list02 dl span.wid03 a{ display: none;}
+    .tender-list02 dl span.wid03 a.active{ display: inline-block;}
+    .tender-list02 dl span.wid03 a i{width: 20px;height: 20px;display: inline-block;line-height: 20px;background: #d2272d;text-align: center;border-radius: 100%;color: #fff;}
+    .tender-list02 .com_title01 a{float: right;margin-right: 45px;font-size: 14px;line-height: 50px;}
+    .scroll-y{width: 100%;margin: 0 auto;max-height: 500px;}
+    .scroll-y.active{overflow-y: scroll;  overflow-x: hidden;  }
+
+</style>
+
+<div class="ng-scope">
+    <form name="tenderForm">
+        <div class="purc-tender">
+            <div class="com_title">服务>招标<font>>招标单</font></div>
+            <!--<div class="loading in" ng-class="{'in': loading}">
+            <i></i>
+            </div>-->
+            <div class="tender-label list-unstyled">
+                <div class="com_head"><span>公开招标单</span></div>
+            </div>
+            <div class="tender-content ng-scope" ng-controller="OpenSaleTenderDetailCtrl">
+                <div class="title-div" style="border-bottom: 1px dashed #327ebe;">
+                    <span>招标信息</span>&nbsp;
+                    <span style="color: rgb(211,37,38);">*</span>
+                </div>
+                <div class="row base-info">
+                    <div class = "col-xs-4">
+                        <div class="tender-desc">招标编号:</div>
+                        <div ng-bind="tender.code"></div>
+                    </div>
+                    <div class = "col-xs-4">
+                        <div class="tender-desc">招标标题:</div>
+                        <div ng-bind="tender.title"></div>
+                    </div>
+                    <div class = "col-xs-4">
+                        <div class="tender-desc">联系人:</div>
+                        <div ng-bind="tender.user"></div>
+                    </div>
+                    <div class = "col-xs-4">
+                        <div class="tender-desc">联系电话:</div>
+                        <div ng-bind="tender.userTel"></div>
+                    </div>
+                    <div class="col-xs-4">
+                        <span class="tender-desc">投标截止时间:</span>
+                        <div ng-bind="tender.endDate | date:'yyyy-MM-dd'"></div>
+                    </div>
+                    <div class="col-xs-4">
+                        <span class="tender-desc">公布结果时间:</span>
+                        <div ng-bind="tender.publishDate | date:'yyyy-MM-dd'"></div>
+                    </div>
+                    <div class="col-xs-4">
+                    </div>
+                    <div class="col-xs-12">
+                        <div class="tender-desc">招标文件:</div>
+                        <div ng-if="tender.tenderAttaches.length" class="col-xs-10">
+                            <a class="file" ng-repeat="attach in tender.tenderAttaches" href="file/{{attach.id}}">{{::attach.name}}</a>
+                        </div>
+                        <div ng-if="tender.tenderAttaches.length == 0">无</div>
+                    </div>
+                </div>
+
+                <div class="wrap">
+                    <div class="content">
+                        <div class="tender-list02">
+                            <!--产品信息-->
+                            <div class="com_title01"><span>产品明细</span></div>
+                            <dl>
+                                <dt>
+                                    <span>序号</span>
+                                    <span class="wid01">产品名称</span>
+                                    <span class="wid01">型号</span>
+                                    <span class="wid02">品牌</span>
+                                    <span>单位</span>
+                                    <span>采购数量</span>
+                                </dt>
+                                <div class="scroll-y">
+                                    <dd ng-repeat="prod in tender.purchaseTenderProds | orderBy : 'index'">
+                                        <span>{{$index + 1}}</span>
+                                        <span class="wid01" ng-bind="prod.prodTitle"></span>
+                                        <span class="wid01" ng-bind="prod.prodCode"></span>
+                                        <span class="wid02" ng-bind="prod.brand"></span>
+                                        <span ng-bind="prod.unit"></span>
+                                        <span ng-bind="prod.qty"></span>
+                                    </dd>
+                                </div>
+                            </dl>
+                        </div>
+                    </div>
+                </div>
+                <div  class="title-div" style="border-bottom: 1px dashed #327ebe;">
+                    <span>招标要求</span>
+                </div>
+                <!--<div class="row vend-info">
+                    <div class="col-xs-12">
+                        <div class="tender-desc">是否开放报名:</div>
+                        <div class="input-select col-xs-4">
+                            <input  class="tender-input" name="ifOpen" type="radio" value="0" ng-model="tender.ifOpen"/>
+                            <span>只允许我邀请的供应商参与</span>
+                        </div>
+                        <div class="input-select col-xs-4">
+                            <input class="tender-input" name="ifOpen" type="radio" value="1" ng-model="tender.ifOpen"/>
+                            <span>允许优软平台的供应商参与</span>
+                        </div>
+                    </div>
+                    <div class="col-xs-12" ng-show="tender.ifOpen == 0">
+                        <a class="add-vendor tender-desc" ng-click="dbfindVendor()" href="javascript:void(0)">
+                            <i class="fa fa-plus-square"></i>添加供应商&nbsp;
+                        </a>
+                    </div>
+                    <div class="col-xs-12" style="" ng-repeat="en in tenderProd.enterpriseBaseInfo" ng-show="tender.ifOpen == 0">
+                        <div class="col-xs-2 control-label" style="width: 100px;">供应商{{$index + 1}}</div>
+                        <div for="uu{{$index + 1}}" class="col-xs-1" style="width: 20px;">UU</div>
+                        <div class="col-xs-2">
+                            <input class="tender-input" ng-model="en.uu" type="number" id="uu{{$index + 1}}" readonly ng-required="tender.ifOpen == 0">
+                        </div>
+                        <div for="enName{{$index + 1}}" class="col-xs-1" style="width: 60px; margin-left: 20px; margin-right: -20px;">名称</div>
+                        <div class="col-xs-3">
+                            <input ng-model="en.enName" type="text" style="width: 100%;" class="tender-input" readonly id="enName{{$index + 1}}"
+                                   ng-required="tender.ifOpen == 0">
+                        </div>
+                        <div class="col-xs-1">
+                            <a class="remove-vendor" href="javascript:void(0)" ng-click="removeVendor($index)" title="删除"><i class="fa fa-trash-o"></i></a>
+                        </div>
+                    </div>
+                    <div class="col-xs-12" style="border-bottom: 1px dashed #327ebe;">
+                        <div class="tender-desc">供应商报名要求</div>
+                    </div>
+                    <div class="col-xs-12">
+                        <div class="tender-desc">交易方式:</div>
+                        <input class="tender-input" style="width: 80%; text-align: left;" required name="payment" type="text" ng-model="tender.payment" placeholder="必填,填写付款方式,如现金、月结30天等"/>
+                    </div>
+                    <div class="col-xs-2"></div>
+                    <div class="col-xs-12">
+                        <div class="tender-desc">发票要求:</div>
+                        <div class="input-select col-xs-3">
+                            <input class="tender-input"  name="invoiceType" type="radio" value="2" ng-model="tender.invoiceType"/>
+                            <span>增值税专用发票</span>
+                        </div>
+                        <div class="input-select col-xs-3">
+                            <input class="tender-input" name="invoiceType" type="radio" value="1" ng-model="tender.invoiceType" />
+                            <span>增值税普通发票</span>
+                        </div>
+                        <div class="input-select col-xs-3">
+                            <input class="tender-input"  name="invoiceType" type="radio" value="0" ng-model="tender.invoiceType" />
+                            <span>不需要发票</span>
+                        </div>
+                    </div>
+                    <div class="col-xs-12">
+                        <div class="tender-desc">证照要求:<span class="tender-desc" style="font-size: 12px; font-family: 'Microsoft Yahei'; color: #969595;margin-top:-10px;">(多选)</span></div>
+                        <div class="input-select col-xs-3" ng-repeat="certificate in certificates">
+                            <input type="checkbox" name="certificate" ng-model="certificate.checked" value="certificate">
+                            <span ng-bind="certificate.name"></span>
+                        </div>
+                    </div>-->
+
+
+                    <div class="row vend-info">
+                        <!--<div class="col-xs-12" ng-repeat="item in firstProd.saleTenderItems">
+                            <div class="col-xs-2 control-label" style="width: 100px;">供应商{{$index + 1}}</div>
+                            <div for="uu{{$index + 1}}" class="col-xs-1" style="width: 20px;">UU</div>
+                            <div class="col-xs-2">
+                                <div>{{item.saleTender.enterpriseBaseInfo.uu}}</div>
+                            </div>
+                            <div for="enName{{$index + 1}}" class="col-xs-1"
+                                 style="width: 60px; margin-left: 20px; margin-right: -20px;">名称
+                            </div>
+                            <div class="col-xs-3">
+                                <div>{{item.saleTender.enterpriseBaseInfo.enName}}</div>
+                            </div>
+                        </div>-->
+                        <!--<div class="col-xs-12" style="border-bottom: 1px dashed #327ebe;">
+                            <div class="tender-desc">供应商报名要求</div>
+                        </div>-->
+                        <div class = "col-xs-4">
+                            <div class="tender-desc">交易币别:</div>
+                            <div ng-bind="tender.currency"></div>
+                        </div>
+                        <div class = "col-xs-4">
+                            <div class="tender-desc">是否含税:</div>
+                            <div ng-bind="tender.ifTax == 1 ? '是' : '否'"></div>
+                        </div>
+                        <div class="col-xs-4">
+                            <div class="tender-desc">发票要求:</div>
+                            <div ng-if="tender.invoiceType == 2">增值税专用发票</div>
+                            <div ng-if="tender.invoiceType == 1">增值税普通发票</div>
+                            <div ng-if="tender.invoiceType == 0">不需要发票</div>
+                        </div>
+                        <div class="col-xs-4">
+                            <div class="tender-desc">交易方式:</div>
+                            <div>{{tender.payment}}</div>
+                        </div>
+                        <div class="col-xs-4">
+                            <div class="tender-desc">证照要求:
+                            </div>
+                            <div>
+                                {{tender.certificate}}
+                            </div>
+                        </div>
+                        <div class="col-xs-12">
+                            <div class="tender-desc">收货地址:</div>
+                            <div ng-bind="tender.shipAddress"></div>
+                            </span>
+                        </div>
+                </div>
+                <div class="col-xs-12" style="padding: 30px;">
+                    <div ng-show="!currentHasBid" class="col-xs-2 pull-right btn-publish">
+                        <button class="btn" ng-click="iWantToBid(tender.id)">我要投标</button>
+                    </div>
+                    <div ng-show="currentHasBid" class="col-xs-2 pull-right btn-disabled">
+                        <button class="btn" ng-disabled="disabled">已转投标</button>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </form>
+</div>

+ 7 - 430
src/main/webapp/resources/tpl/index/baseInfo/open_tender.html → src/main/webapp/resources/tpl/index/sale/open_tender_list.html

@@ -2,434 +2,6 @@
 <link rel="stylesheet" href="static/css/add.css "/>
 <style>
 
-    /* 标题 */
-    .tender-label {
-        /*height: 30px;*/
-        /*margin-left: 10px;*/
-        /*margin-right: 10px;*/
-        /*background-color: #e8e8e8;*/
-        /*box-shadow: 0 0 5px #6f6f6f;*/
-        /*border-top-right-radius: 20px;*/
-        width: 100%;
-        height: 40px;
-        line-height: 42px;
-        background: url(static/img/comm_bg01.png) no-repeat center;
-        background-size: 100%;
-
-    }
-    /* 主体 */
-    .purc-tender {
-        line-height: 2;
-        font-size: 14px;
-    }
-    .purc-tender .row {
-        margin-left: 0px;
-        margin-right: 0px;
-        padding-left: 15px;
-        padding-right: 15px;
-    }
-    .tender-content {
-        background-color: #fff;
-    }
-
-    .tender-content>div>div {
-        margin-top: 3px;
-        margin-bottom: 3px;
-    }
-    /* 二级标题栏 */
-    .title-div {
-        font-size: 14px;
-        font-weight: 600;
-        padding-left: 30px;
-        height: 50px;
-        padding-top: 11px;
-    }
-
-    /* 输入框前描述 */
-    .tender-desc {
-        width: 100px;
-        float: left;
-        padding-top: 4px;
-    }
-    /* 输入框 */
-    .tender-input {
-        /*border: #bfbfbf 1px solid !important;
-        padding-left: 10px;
-        height: 34px;
-        line-height: 34px;
-        width: 160px;*/
-    }
-    .tender-input01{
-        border: #bfbfbf 1px solid !important;
-        padding-left: 10px;
-        height: 34px;
-        line-height: 34px;
-        width: 160px;
-    }
-    .tender-input:focus{
-        border: #3578ba 1px solid !important;
-    }
-
-    /* 收货地址 */
-    .address-group {
-        border-bottom: 1px solid #323232;
-        border-bottom-left-radius: 0;
-        margin-right: 20px;
-    }
-    .address-group>input:focus{
-        outline: none;
-    }
-
-    /* 基本信息 */
-    .base-info {
-        border-bottom: 1px solid #e8e8e8;
-        padding-bottom: 30px;
-        padding-top: 20px;
-        margin-bottom: 0; /* 去除index中公共样式影响 */
-    }
-
-    /* 地址附加图标 */
-    .address-addon {
-        border: none;
-        background: none;
-    }
-
-    /* 下拉选项 */
-    .select-menu {
-        margin: 4px 0;
-        width: 100px;
-        padding: 0 5%;
-        height: 30px;
-    }
-
-    select.select-menu {
-        /*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/
-        border: solid 1px #bfbfbf;
-        height: 34px;
-        line-height: 34px;
-        width: 160px;
-        /*很关键:将默认的select选择框样式清除*/
-       /* appearance:none;
-        -moz-appearance:none;
-        -webkit-appearance:none;*/
-
-        /*在选择框的最右侧中间显示小箭头图片*/
-        /*background: url("resources/img/tender/select.png") no-repeat scroll right center transparent;*/
-
-
-        /*为下拉小箭头留出一点位置,避免被文字覆盖*/
-        padding-right: 14px;
-    }
-
-
-    /*清除ie的默认选择框样式清除,隐藏下拉箭头*/
-    select.select-menu::-ms-expand { display: none; }
-
-    /* 日期选择器 */
-    .purc-tender .date-picker {
-        padding-top: 10px;
-    }
-    .purc-tender .date-picker input {
-        border-radius: 0;
-        border: 1px solid #5078cb;
-        border-right: none;
-        font-size: 12px;
-    }
-    .purc-tender .date-picker span .btn-open {
-        color: #fff;
-        background-color: #5078cb;
-        border-radius: 0;
-        border: 1px solid #5078cb;
-        border-left: none;
-    }
-
-    /* 修改本页内btn的样式 及datepicker中的btn-success的样式 */
-    .tender-content .date-picker .btn {
-        border-radius: 0;
-    }
-
-    .tender-content .date-picker .btn-success {
-        background-color: #327EBE;
-    }
-    .tender-content .date-picker ul {
-        border-radius: 0;
-    }
-    .tender-content .date-picker ul div:focus {
-        outline: none;
-        border-radius: 0;
-        border: none;
-    }
-
-    /* 附件上传 */
-    .purc-tender .base-info .attach-upload {
-        display: inline;
-    }
-    .purc-tender .base-info .attach-upload input {
-        height: 100px;
-        width: 100px;
-        margin: 6px 0 0 100px;
-        opacity: 0;
-        z-index: 1;
-        position: relative;
-    }
-    .purc-tender .base-info .attach-upload input:hover {
-        cursor: pointer;
-    }
-    .fileInputContainer{
-        height:100px;
-        background-image: url('resources/img/tender/upload.png');
-        position:relative;
-        width: 100px;
-        margin-left: 100px;
-        margin-top: 20px;
-    }
-    .fileInput{
-        height: 100px;
-        width: 100px;
-        font-size: 100px;
-        position:absolute;
-        margin-left: 100px;
-        margin-top: 20px;
-        right:0;
-        top:0;
-        opacity: 0;
-        filter:alpha(opacity=0);
-        cursor:pointer;
-    }
-    /* 图片点击上传 */
-    /*.upload-bg {*/
-        /*width: 100px;*/
-        /*height: 100px;*/
-        /*background-image: url('resources/img/tender/upload.png');*/
-        /*margin-top: 10px;*/
-        /*margin-left: 100px;*/
-        /*border: 1px solid #e8e8e8;*/
-        /*z-index: 2;*/
-    /*}*/
-    /* 供应商信息 添加供应商 */
-    .vend-info  a.add-vendor {
-         color: #5078cb;
-     }
-    .vend-info  a.add-vendor:hover {
-        cursor: pointer;
-        color: #55b6ff;
-    }
-    .vend-info  a.remove-vendor {
-        color: #FF2E2F;
-    }
-    .vend-info  a.remove-vendor:hover {
-        cursor: pointer;
-        color: #D32526;
-    }
-
-    /* 单选框 复选框 */
-    input[type="radio"],input[type="checkbox"] {
-        vertical-align:text-bottom;
-        margin-bottom:2px;
-        margin-bottom:-2px\9;
-    }
-    .vend-info .input-select {
-        float: left;
-        padding-top: 4px;
-        margin-left: -20px;
-    }
-
-    .vend-info .input-select input {
-        margin-right: 8px;
-    }
-
-    /* 右下角按钮 */
-    .tender-content>div {
-        background-color: #fff;
-    }
-    .tender-content>div>div>button {
-        width: 94px;
-        height: 36px;
-        font-size: 14px;
-        color: #fff;
-        border-radius: 0;
-    }
-    .tender-content>div>div.btn-publish>button {
-        background-color: #327EBE;
-    }
-    .tender-content>div>div.btn-save>button {
-        background-color: #32bebc;
-    }
-
-
-    .read-only {
-        border: none;
-        color: #969595;
-    }
-
-    .read-only:focus {
-        border: none;
-    }
-
-    .attach-file {
-        margin-left: 100px;
-        width: 400px;
-    }
-
-
-    .com_head{width:100%;height:40px;line-height:42px;background:url(static/img/comm_bg01.png) no-repeat center;background-size: 100%;}
-    .com_head span{margin-left:30px;color:#000;font-size:14px;}
-    .com_head a{color:#327ebe;float:right;margin-right:40px;font-size: 14px;}
-    .com_head a i{margin-left: 5px;line-height: 40px;}
-    .com_head a:hover{color: #d2272d;}
-
-    .com_title{width:100%;margin:0px auto;height:40px;line-height:40px;font-size:14px;color:#323232;background:#f5f5f5;}
-    .com_title font{color:#327ebe;}
-
-
-    .com_title01{height: 50px;line-height:50px;width:100%;border-bottom:#3578ba 1px dotted;border-top:#e8e8e8 1px solid;margin-top: -4px;} /*  这里修改过 margin-top*/
-    .com_title01 span{margin-left:20px;font-size: 14px;line-height: 50px;color: #555;font-weight: bold;}
-
-    .com_title01  a {
-        color: #5078cb;
-    }
-    .com_title01  a:hover {
-        cursor: pointer;
-        color: #55b6ff;
-    }
-
-    /*招标单*/
-    .tender-list02 dl{width: 100%;margin:0 auto;position: relative;}
-    .tender-list02 dl dt{width: 100%;margin:0 auto;height: 40px;}
-    .tender-list02 dl dt span{height: 50px;line-height: 50px;display: inline-block;color: #323232;}
-    .tender-list02 dl dd{width: 100%;margin:0 auto;height: 50px;border-bottom: #ccc 1px dotted;overflow: hidden; }
-    .tender-list02 dl dd:hover{border: #d32526 1px solid;}
-    .tender-list02 dl dd:hover span a{ display: inline-block;}
-    .tender-list02 dl dd span{height: 50px;line-height: 50px;display: inline-block;}
-    .tender-list02 dl span{width:11%;font-size: 14px;float: left;text-align: center;}
-    .tender-list02 dl span.wid01{ width:22%;}
-    .tender-list02 dl span.wid02{ width:18%;}
-    .tender-list02 dl span.wid03{ width:5%;}
-    .tender-list02 .editable{ text-align: center; width: 100%;}
-    .tender-list02  .scroll-y dd input{width: 100%; height: 34px; border: none; font-size: 14px; padding-left: 4px; text-align: center; vertical-align: middle; line-height: 34px;}
-    .tender-list02 dl span.wid03 a{ display: none;}
-    .tender-list02 dl span.wid03 a.active{ display: inline-block;}
-    .tender-list02 dl span.wid03 a i{width: 20px;height: 20px;display: inline-block;line-height: 20px;background: #d2272d;text-align: center;border-radius: 100%;color: #fff;}
-    .tender-list02 .com_title01 a{float: right;margin-right: 45px;font-size: 14px;line-height: 50px;}
-    .scroll-y{width: 100%;margin: 0 auto;max-height: 500px; overflow-y: auto;}
-    .scroll-y.active{overflow-y: scroll;  overflow-x: hidden;  }
-
-    /* 弹框 */
-    .bomb-box{width: 100%;height: 100%;position: fixed;z-index: 11111;background: rgba(0, 0, 0, 0.2);top: 0;left: 0;}
-    .bomb-box .box{position: absolute;left: 0;right: 0;top: 0;bottom: 0;margin: auto;box-shadow:0 0 3px #888 ;}
-    .bomb-box .box01{width:580px;height: 406px;border-radius: 5px;background: #fff;}
-    .bomb-box .box i.off{width:20px;height:20px;display:inline-block;position:absolute;right:8px;top:8px;text-align:center; cursor: pointer;}
-    .bomb-box .box p{height: 40px;line-height: 40px;font-size: 14px;width:100%;margin: 0 auto;border-bottom: #e8e8e8 1px solid;padding-left: 20px;}
-    .per-data{width:90%;margin: 0 auto;}
-    .per-data ul,.per-data ul li{width:100%;margin: 0 auto;}
-    .per-data ul li{height: 34px;line-height: 34px;margin-top: 15px;}
-    .per-data ul li em{width: 60px;font-size: 14px;float: left;}
-    .per-data ul li input,.per-data ul li select{width: 236px;height: 34px;border: #e8e8e8 1px solid;font-size: 14px;padding-left: 10px;}
-    .per-data ul li select{background: url("../images/select.png") no-repeat right;-webkit-appearance: none;appearance: none;-o-appearance: none;-moz-appearance: none;-ms-appearance: none;}
-    .per-data ul li select option{line-height: 30px;}
-    .per-data ul li span{color: #959595;line-height: 18px;float: right;width: 215px;display: inline-block;}
-    .per-data ul li.per-btn{margin-top: 30px;}
-    .per-data ul li a{width: 94px;height: 36px;display: inline-block;font-size: 14px;color: #fff;text-align: center;line-height: 34px;float: left;}
-    .per-data ul li a.save{margin-left: 60px;background: #327ebe;}
-    .per-data ul li a.mod-psd{background: #8dc7f9;margin-left: 30px;}
-    .per-data ul li a:hover{background: #3578ba;}
-
-    .add-address {
-        color: #327ebe;
-        font-size: 14px;
-        padding-left: 30px;
-    }
-
-    .add-address:hover {
-        color: #8dc7f9;
-    }
-
-    .tender-content  ul.association {
-        position: absolute;
-        left: 0;
-        top: 100%;
-        right: 61px;
-        list-style: none;
-        -webkit-padding-start: 0;
-        background: #ffffff;
-        border: 1px solid #dddddd;
-        z-index: 21;
-    }
-    .tender-content  ul.association li {
-        padding: 0 15px;
-        line-height: 30px;
-        text-align: left;
-    }
-
-    .tender-content  ul.association li.active, .tender-content  ul.association li.active:hover {
-        background: #dddddd;
-    }
-    .tender-content  ul.association li:hover {
-        background: #EEEEEE;
-        cursor: pointer;
-    }
-
-    .tender-list02 dl div.wid01{ width:22%; float: left; margin-top: 9px;}
-
-    .tender-list02 dl div.wid02{ width:18%; float: left; margin-top: 9px;}
-
-    .tender-list02 dl div.wid03{ width:5%; float: left; margin-top: 9px;}
-
-    .tender-list02 dl div.input-group>input {
-        border: 1px solid #ccc;
-        border-right: 0;
-        margin-left: 5px;
-    }
-
-    .tender-list02 dl dd input {
-        border: 1px solid #ccc;
-        padding-left: 5px;
-    }
-
-    /*.tender-list02 dl div.input-group .input-group-addon {*/
-        /*border-bottom-right-radius: 0;*/
-        /*border-top-right-radius: 0;*/
-        /*border: 1px solid #ccc;*/
-        /*border-left: 0;*/
-    /*}*/
-
-    #li01 ul {
-        width: 200px;
-    }
-
-    #li01 ul li{
-        height: 30px;
-        line-height: 30px;
-        padding: 0;
-    }
-    #li01 ul li a{
-        display: inline-block;
-        height:30px;
-        width: 100%;
-    }
-    #li01 .input-group{
-        position: absolute;
-        width: 155px;
-    }
-    #li01 .input-group-addon{
-        width: 30px;
-        line-height: 34px;
-        height: 34px;
-        padding: 0;
-        display: inline-block;
-        position: absolute;
-        top: 8.5px;
-        right: -7px;
-        border-top-right-radius: 0;
-        border-bottom-right-radius: 0;
-    }
-    .dropdown-menu {
-        min-width: 150px;
-    }
-
-    .tender-list02 dl dd span.codeInput input {
-        border: 1px solid #ccc;
-    }
 /*新增样式 2017-04-19*/
 #tender-list{
     width: 1170px;
@@ -600,6 +172,11 @@
     .tender-list-tab table tbody a:hover{
         cursor: pointer;
     }
+
+    .tender-list tbody tr:hover {
+        cursor: pointer;
+        background-color: #f5f5f5;
+    }
 </style>
 
 <div class="ng-scope">
@@ -647,7 +224,7 @@
                                     <!--</a>-->
                                 <!--</dd>-->
                             <!--</dl>-->
-                            <table ng-table="tableParams">
+                            <table class="tender-list" ng-table="tableParams">
                                 <thead>
                                 <tr>
                                     <th colspan="12">
@@ -658,7 +235,7 @@
                                 </thead>
                                 <tbody  ng-repeat="tender in $data">
                                 <tr>
-                                    <td>
+                                    <td ng-click="toDetail(tender.id)">
                                         <span><em>招标公告</em><a ui-sref="purc.open_tender_detail({id:tender.id})" title="点击查看详情">{{tender.title}}</a></span>
                                         <strong>{{tender.date | date:'yyyy-MM-dd'}}</strong>
                                     </td>

+ 4 - 3
src/main/webapp/resources/tpl/index/sale/tender.html

@@ -90,10 +90,10 @@
         cursor: pointer;
     }
     .fileInputContainer{
+        width: 100px;
         height:100px;
         background-image: url('resources/img/tender/upload.png');
         position:relative;
-        width: 100px;
         margin-left: 100px;
         margin-top: 20px;
     }
@@ -109,6 +109,7 @@
         opacity: 0;
         filter:alpha(opacity=0);
         cursor:pointer;
+        overflow: hidden;
     }
 
     .attach-file {
@@ -283,7 +284,7 @@
                     </div>
                     <div ng-if="bid.tenderAttaches.length" class="col-xs-12" style="height: 50px;">
                         <span class="bid-desc">招标附件:</span>
-                        <a class="col-xs-3" ng-repeat="attach in bid.tenderAttaches" href="file/{{attach.id}}">{{::attach.name}}</a>
+                        <a class="col-xs-10" ng-repeat="attach in bid.tenderAttaches" href="file/{{attach.id}}">{{::attach.name}}</a>
                     </div>
                 </div>
                 <div class="wrap">
@@ -332,7 +333,7 @@
                     <div class="fileInputContainer">
                         <input class="fileInput" type="file" ng-file-select name="file" ng-model="myFile" ng-change="upload(myFile)" />
                         <!-- href="file/{{attach.id}}" -->
-                        <div class="attach-file" ng-repeat="attach in attaches">{{attach.name}}&nbsp;&nbsp;<a ng-click="removeAttach(attach.id, $index)" title="删除"><i class="fa fa-trash-o"></i></a></div>
+                        <div class="attach-file" ng-repeat="attach in attaches">{{attach.name}}&nbsp;&nbsp;<a ng-click="removeAttach(attach.id, $index, bid.id)" title="删除"><i class="fa fa-trash-o fa-lg"></i></a></div>
                     </div>
                     <span style="margin-left: 100px; color: #969595; font-size: 12px; font-family: 'Microsoft Yahei Regular';">提示:选择附件大小不超过5MB,可上传JPG,PNG,EXCEL,WORD,PDF</span>
                 </div>