Browse Source

卖家——商机管理

huangb 7 years ago
parent
commit
d2f62c9303
41 changed files with 7948 additions and 37 deletions
  1. 230 0
      src/main/webapp/resources/css/b2bPublic.css
  2. BIN
      src/main/webapp/resources/img/tender/daipingbiao.png
  3. BIN
      src/main/webapp/resources/img/tender/daitoubiao.png
  4. BIN
      src/main/webapp/resources/img/tender/liubiao.png
  5. BIN
      src/main/webapp/resources/img/tender/select.png
  6. BIN
      src/main/webapp/resources/img/tender/toubiaozhong.png
  7. BIN
      src/main/webapp/resources/img/tender/upload.png
  8. BIN
      src/main/webapp/resources/img/tender/weizhongbiao.png
  9. BIN
      src/main/webapp/resources/img/tender/yijiebiao.png
  10. BIN
      src/main/webapp/resources/img/tender/yitoubiao.png
  11. BIN
      src/main/webapp/resources/img/tender/zailuru.png
  12. BIN
      src/main/webapp/resources/img/tender/zhaobiao.png
  13. BIN
      src/main/webapp/resources/img/tender/zhongbiao.png
  14. 602 0
      src/main/webapp/resources/js/common/b2bServices.js
  15. 42 0
      src/main/webapp/resources/js/common/controllers/b2bCommonCtrls.js
  16. 1 0
      src/main/webapp/resources/js/usercenter/controllers/forstore/seek_purchase_ctrl.js
  17. 61 2
      src/main/webapp/resources/js/vendor/app.js
  18. 210 0
      src/main/webapp/resources/js/vendor/controllers/b2b/change/sale_inquiry_details.js
  19. 190 0
      src/main/webapp/resources/js/vendor/controllers/b2b/change/sale_inquiry_mould_detail.js
  20. 178 0
      src/main/webapp/resources/js/vendor/controllers/b2b/sale/saleTenderDetailCtrl.js
  21. 489 0
      src/main/webapp/resources/js/vendor/controllers/b2b/saleInquiryCtrl.js
  22. 443 0
      src/main/webapp/resources/js/vendor/controllers/b2b/saleInquiryMouldCtrl.js
  23. 237 0
      src/main/webapp/resources/js/vendor/controllers/b2b/saleQuotationListCtrl.js
  24. 307 0
      src/main/webapp/resources/js/vendor/controllers/b2b/saleTenderCtrl.js
  25. 30 0
      src/main/webapp/resources/js/vendor/controllers/b2b/saleTenderQuestionDetailCtrl.js
  26. 262 0
      src/main/webapp/resources/js/vendor/controllers/b2b/saleTenderQuestionListCtrl.js
  27. 1 0
      src/main/webapp/resources/js/vendor/controllers/forstore/purchasAttendtion_ctrl.js
  28. 511 0
      src/main/webapp/resources/view/vendor/b2b/change/sale_inquiry_details.html
  29. 400 0
      src/main/webapp/resources/view/vendor/b2b/change/sale_inquiry_mould_detail.html
  30. 21 0
      src/main/webapp/resources/view/vendor/b2b/sale/quotation_new.html
  31. 606 0
      src/main/webapp/resources/view/vendor/b2b/sale/sale_tender_detail.html
  32. 126 0
      src/main/webapp/resources/view/vendor/b2b/sale/sale_tender_question.html
  33. 323 0
      src/main/webapp/resources/view/vendor/b2b/sale/sale_tender_question_detail.html
  34. 684 0
      src/main/webapp/resources/view/vendor/b2b/sale_inquiry.html
  35. 531 0
      src/main/webapp/resources/view/vendor/b2b/sale_inquiryMould.html
  36. 488 0
      src/main/webapp/resources/view/vendor/b2b/sale_quotationList.html
  37. 517 0
      src/main/webapp/resources/view/vendor/b2b/sale_tenderList.html
  38. 401 0
      src/main/webapp/resources/view/vendor/b2b/sale_tender_question_list.html
  39. 25 23
      src/main/webapp/resources/view/vendor/forstore/purchasAttendtion.html
  40. 13 3
      src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html
  41. 19 9
      src/main/webapp/resources/view/vendor/forstore/seekPurchase.html

+ 230 - 0
src/main/webapp/resources/css/b2bPublic.css

@@ -0,0 +1,230 @@
+#public .com_title{width: 100%;margin: 0px auto;height: 40px;line-height: 40px;font-size: 14px;color: #323232;background: #f5f5f5;}
+#public .com_title font{color: #3f84f6;}
+#public .com_title .search{position: relative;}
+#public .com_title .search input{width: 300px;padding-left: 10px;height: 36px;background: #fff;float: left;vertical-align: middle;border: #3578ba 1px solid;font-size: 14px;text-align: center;padding-right: 85px;line-height: 36px;}
+#public .com_title .search a.seek{vertical-align: middle;display: inline-block;line-height: 36px;text-align: center;height: 36px;width: 85px;border-left: 0;background: #3578ba;color: #fff;text-align: center;font-size: 16px;float: right;border: #3578ba 1px solid;position: absolute;right: 0;}
+#public .com_title .search a.seek:hover{background: #1f6199;color: #fff;}
+.fl{float: left;}
+.fr{float: right;}
+/*切换导航*/
+#public .menu{background: #fff;padding: 0;}
+/*#public .menu .btn-group{width: 100px;border: none;height: 45px;}*/
+#public .menu .row{height: 40px;line-height: 40px;}
+#public .menu .btn-group > .btn-info{border-bottom: #000 1px solid;}
+#public .menu .btn-group .btn{color: #000;}
+#public .menu .btn-group .btn-info{color: #d32526;background: #fff;border-bottom: #d32526 2px solid !important;}
+#public .menu .btn-group .btn{border: none;font-size: 16px;font-family: "Microsoft YaHei", "微软雅黑";}
+#public .menu .btn-group .btn em{color: #d32526;font-style: inherit;}
+#public .menu .btn-group .btn:hover{background: #fff;color: #d32526;}
+#public #topSearch{font-size: 16px;}
+#public .form-group-sm .form-control{height: 36px;/*line-height: 36px;*/border: #3f84f6 1px solid;border-radius: 0px;font-size: 14px;}
+#public .search-bg .col-xs-6{/*margin-left: 90px;*/}
+#public .search-bg .input-group-addon{width: 70px;height: 36px;display: inline-block;background: #3f84f6;font-size: 16px;text-align: center;line-height: 36px;color: #fff;padding: 0;border: none;border-radius: 0;position: absolute;top: 0;right: 0;}
+#public .order-table .header th,#public .inquiry-table .header th{height: 40px;line-height: 40px;background: none;font-size: 14px;}
+#public .order-table .order-hd,#public .inquiry-table .inquiry-hd{font-size: 14px;}
+#public .order-table .order-hd{ line-height: normal;}
+#public .order-table .order-bd,#public .inquiry-table .inquiry-bd{height: 100px;}
+#public .order-table .order-bd .product,#public .inquiry-table .inquiry-bd .product{line-height: 30px;font-size: 14px;}
+.height10{width: 100%;height: 10px;background: #f5f5f5;}
+#public .order-table .order-bd>td,#public .inquiry-table .inquiry-bd>td{ font-size: 14px;}
+#public .order-table,#public .inquiry-table{  background: #fff; }
+/*购物车*/
+#public .cart-table .header th{height: 40px;line-height: 40px;background: none;font-size: 14px;}
+#public .cart-table .cart-hd{font-size: 14px;}
+#public .cart-table .cart-bd{height: 100px;}
+#public .cart-table .cart-bd .product{line-height: 30px;font-size: 14px;}
+#public .cart-table .cart-bd>td{ font-size: 14px;}
+#public .cart-table{background: #fff;}
+#public .toolbar-top{font-size: 14px;}
+.com-text-1{
+    font-size: 14px;
+    margin-left: 20px;
+}
+
+#public .condition .toggle{
+    font-size: 14px;
+}
+#public .search-bg .col-xs-6{
+    width: 40%;
+    padding: 0;
+}
+#public .search-bg #topSearch{
+    width: 47%;
+}
+#public .toolbar-top .text-center .text-simple{
+    color: #3a89d1;
+    font-size: 14px;
+}
+#public #bg-white,#public #bg-white .search-bg{
+    background: #f5f5f5;
+}
+
+#public .menu .btn-group-justified{
+    width: 100%;
+    margin: 0 auto;
+    height: 40px;
+    line-height: 40px;
+    background: #fff;
+    border-bottom: 1px solid #f15601;
+}
+#public .menu .btn-group-justified .btn-group {
+    min-width: 100px;
+    height: 40px;
+    text-align: center;
+    float: left;
+    margin-left: 25px;
+}
+#public .menu .btn-group-justified .btn-group button {
+    height: 40px;
+    font-size: 13px;
+    font-weight: bold;
+    border-top: 3px solid #fff;
+    min-width: 110px;
+    outline: none;
+}
+#public .menu .btn-group-justified .btn-group button.btn-info{
+    border-top: 3px solid #f15601;
+    border-left: 1px solid #f15601;
+    border-right: 1px solid #f15601;
+    border-bottom: 1px solid #fff !important;
+    color: #f15601;
+    height: 42px;
+    line-height: 29px;
+}
+#public .form-group-sm .form-control {
+    width: 215px;
+    border: #5078cb 1px solid;
+    height: 32px;
+    box-shadow: none;
+}
+#public .screen .sreach a.input-group-addon {
+    width: 58px;
+    height: 32px;
+    background: #5078cb;
+    color: #fff;
+    line-height: 18px;
+    float: none;
+    broder-radius: 2px;
+    vertical-align: unset;
+}
+#public .screen .sreach .sreach-input >.form-control{
+    width: 220px;
+}
+#public .order-table, #public .inquiry-table {
+    width: 1026px;
+}
+#public .ng-table-pager{
+    margin-top: 20px;
+}
+.order-table .order-hd .order-main span.icon{
+    position: absolute;
+    top: 0;
+    left: 0;
+}
+.no-circle-icon {
+    display: inline-block;
+    padding: 0 5px;
+    line-height: 20px;
+    height: 20px;
+    color: #fff !important;
+    background: #ea5a60;
+    cursor: pointer;
+}
+.circle-icon {
+    display: inline-block;
+    padding: 0 5px;
+    line-height: 20px;
+    height: 20px;
+    color: #fff !important ;
+    background: #15b262;
+    cursor: pointer;
+}
+#public .tab_top ul li.down-purchase{
+    float: right;
+    margin-right: 24px;
+    font-size: 14px;
+    color: #5078cb;
+}
+#public .order-table .order-hd td.first{
+    position: relative;
+}
+#public .order-table .order-hd .order-main span.text-num {
+    margin-left: 20px;
+    font-size: 14px;
+    color: #333;
+    font-weight: normal;
+}
+#public .order-table .order-hd .order-main span {
+    font-size: 14px;
+}
+#public .order-table .order-hd .order-main span img {
+    margin: 0px 5px 0 11px;
+    vertical-align: sub;
+}
+#public .order-table>tbody:hover{
+    border-color: #3c7cf5;
+    border-width: 2px;
+}
+#public .menu .new-dot{
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    font-size: 14px;
+    color: #333;
+    font-weight: inherit;
+    top: -2px;
+}
+#public .menu .btn-group-justified .btn-group button.btn-info .new-dot,#public .menu .btn-group-justified .btn-group button:hover .new-dot{
+    color: #f15601;
+}
+#public .order-table .order-hd .order-main span a.text-num {
+    color: #3f84f6;
+    font-size: 14px;
+}
+/*截止日期*/
+tbody td.enddate span{
+    font-size: 14px;
+    color: red;
+}
+/*历史报价*/
+.dropdown>.dropdown-toggle.text-default {
+    color: #333333;
+}
+.dropdown>.dropdown-toggle:hover {
+    display: inline-block;
+    width: 78px;
+    height: 21px;
+    line-height: 21px;
+    color: #ff0101;
+    font-size: 13px;
+    background-color: #e8e8e8;
+}
+#public .tender-table{
+    width: 1026px;
+}
+#public .pro-line-sty01 td div {
+    margin-bottom: 10px;
+    padding-left: 10px;
+    font-size: 14px;
+    color: #666;
+}
+#public .pro-line-sty01 td div:last-child {
+    margin-bottom: 0;
+}
+#public .pro-line-sty02 td div {
+    line-height: 25px;
+    font-size: 14px;
+    color: #666;
+}
+#public .list-notnum {
+    position: relative;
+    text-align: left;
+    padding-left: 35px;
+    font-size: 14px;
+    color: #666;
+}
+#public .icon{
+    position: absolute;
+    top: 0;
+    left: 0;
+}

BIN
src/main/webapp/resources/img/tender/daipingbiao.png


BIN
src/main/webapp/resources/img/tender/daitoubiao.png


BIN
src/main/webapp/resources/img/tender/liubiao.png


BIN
src/main/webapp/resources/img/tender/select.png


BIN
src/main/webapp/resources/img/tender/toubiaozhong.png


BIN
src/main/webapp/resources/img/tender/upload.png


BIN
src/main/webapp/resources/img/tender/weizhongbiao.png


BIN
src/main/webapp/resources/img/tender/yijiebiao.png


BIN
src/main/webapp/resources/img/tender/yitoubiao.png


BIN
src/main/webapp/resources/img/tender/zailuru.png


BIN
src/main/webapp/resources/img/tender/zhaobiao.png


BIN
src/main/webapp/resources/img/tender/zhongbiao.png


+ 602 - 0
src/main/webapp/resources/js/common/b2bServices.js

@@ -950,6 +950,608 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
               isArray: true
             }
           });
+    }])
+        .factory('B2bPurcInquiry', ['$resource', 'BaseService', function($resource, BaseService) {
+            var b2bPath = BaseService.getB2bUrl();
+            return $resource(b2bPath + '/sale/inquiry/info/search', {}, {
+                getAll: {
+                    url: b2bPath + '/sale/inquiry/:id/info',
+                    isArray: true
+                },
+                getTodo: {
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                getDone: {
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                getEnd: {
+                    params: {
+                        _state: 'end'
+                    }
+                },
+                getAgreed: {
+                    params: {
+                        _state: 'agreed'
+                    }
+                },
+                getRefused: {
+                    params: {
+                        _state: 'refused'
+                    }
+                },
+                getInvalid: {
+                    params: {
+                        _state: 'invalid'
+                    }
+                },
+                reply: {
+                    url: b2bPath + '/sale/inquiry/items/:itemId/reply',
+                    method: 'POST',
+                    params: {
+                        itemId: 'itemId'
+                    }
+                },
+                getItem: {
+                    url: b2bPath + '/sale/inquiry/:itemId/info/mobile',
+                    method: 'GET',
+                    params: {
+                        itemId: 'itemId'
+                    }
+                },
+                saveItem: {
+                    url: b2bPath + '/sale/inquiry/items/:itemId/save',
+                    method: 'POST',
+                    params: {
+                        itemId: 'itemId'
+                    }
+                },
+                getHistory: {
+                    url: b2bPath + '/sale/inquiry/items/:itemId/history',
+                    method: 'GET',
+                    params: {
+                        itemId: 'itemId'
+                    },
+                    isArray: true
+                },
+                getMessage: {
+                    url: b2bPath + '/sale/inquiry/messageList',
+                    isArray: true,
+                    method: 'GET'
+                },
+                getUnreadIds:{
+                    url: b2bPath + '/sale/inquiry/getUnreadIds',
+                    method: 'GET'
+                },
+                getUnreadCount:{
+                    url: b2bPath + '/sale/inquiry/unread',
+                    method: 'GET'
+                },
+                setRead:{
+                    url: b2bPath + '/sale/inquiry/setRead',
+                    method: 'POST'
+                },
+                setReadByState:{
+                    url: b2bPath + '/sale/inquiry/setReadByState',
+                    method: 'GET'
+                },
+                exportXls: {
+                    url: b2bPath + '/sale/inquiry/xls/permission',
+                    method: 'GET'
+                },
+                setStatus: {
+                    url: b2bPath + '/sale/inquiry/setReadStatus',
+                    method: 'POST'
+                }
+            });
+            // 数据库直接获取
+        }])
+        .factory('B2bPurcInquiryInfo', ['$resource', 'BaseService', function($resource, BaseService) {
+            var b2bPath = BaseService.getB2bUrl();
+            return $resource(b2bPath + '/sale/inquiry/info/nosearch', {}, {
+                getAll: {
+                    isArray: true
+                },
+                getTodo: {
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                getDone: {
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                getEnd: {
+                    params: {
+                        _state: 'end'
+                    }
+                },
+                getAgreed: {
+                    params: {
+                        _state: 'agreed'
+                    }
+                },
+                getRefused: {
+                    params: {
+                        _state: 'refused'
+                    }
+                },
+                getInvalid: {
+                    params: {
+                        _state: 'invalid'
+                    }
+                }
+            });
+            // 数据库直接获取
+        }])
+        .factory('B2bCurrentRole', ['$resource', 'BaseService', function($resource, BaseService) {
+            var b2bPath = BaseService.getB2bUrl();
+            return $resource(b2bPath + '/account/role', {}, {
+                //当前企业对应的角色是否是销售经理或管理员
+                roles: {
+                    url: b2bPath + '/account/role/currentRole',
+                    method: 'GET'
+                },
+                isManager: {
+                    url: b2bPath + '/account/role/isManager',
+                    method: 'GET'
+                },
+                isUser: {
+                    url: b2bPath + '/account/role/isUser',
+                    method: 'GET'
+                }
+            })
+        }])
+        .factory('B2bPurcInquiryMould', ['$resource', 'BaseService', function($resource, BaseService) {
+            var b2bPath = BaseService.getB2bUrl();
+            return $resource(b2bPath + '/sale/mould/info/search', {}, {
+                getAll: {
+                    url: b2bPath + '/sale/mould/:id/info',
+                    method: 'GET'
+                },
+                getTodo: {
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                getDone: {
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                getEnd: {
+                    params: {
+                        _state: 'end'
+                    }
+                },
+                getInvalid: {
+                    params: {
+                        _state: 'invalid'
+                    }
+                },
+                saveHistory: {
+                    url: b2bPath + '/sale/mould/:id/saveHistory',
+                    method: 'POST',
+                    params: {
+                        id: 'id'
+                    }
+                },reply: {
+                    url: b2bPath + '/sale/mould/detail/:id/reply',
+                    method: 'POST',
+                    params: {
+                        id: 'id'
+                    }
+                }, getItem: {
+                    url: b2bPath + '/sale/mould/:id',
+                    method: 'GET',
+                    params: {
+                        id: 'id'
+                    }
+                }, saveItem: {
+                    url: b2bPath + '/sale/mould/detail/:id/save',
+                    method: 'POST',
+                    params: {
+                        id: 'id'
+                    }
+                }, getHistory: {
+                    url: b2bPath + '/sale/mould/:id/history',
+                    method: 'GET',
+                    params: {
+                        id: 'id'
+                    }
+                },
+                setRead:{
+                    url: b2bPath + '/sale/mould/setRead',
+                    method: 'POST'
+                },
+                setReadByState:{
+                    url: b2bPath + '/sale/mould/setReadByState',
+                    method: 'GET'
+                },
+                getUnreadIds:{
+                    url: b2bPath + '/sale/mould/getUnreadIds',
+                    method: 'GET'
+                },
+                getUnreadCount:{
+                    url: b2bPath + '/sale/mould/unread',
+                    method: 'GET'
+                },
+                exportXls: {
+                    url: b2bPath + '/sale/mould/xls/permission',
+                    method: 'GET'
+                }
+            });
+        }])
+        .factory('B2bPurcInquiryMouldSql', ['$resource', 'BaseService', function($resource, BaseService) {
+            var b2bPath = BaseService.getB2bUrl();
+            return $resource(b2bPath + '/sale/mould/info/nosearch', {}, {
+                getAll: {
+
+                },
+                getTodo: {
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                getDone: {
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                getInvalid: {
+                    params: {
+                        _state: 'invalid'
+                    }
+                }
+            });
+        }])
+        .factory('B2bQuotationInfo', ['$resource', 'BaseService', function($resource, BaseService){
+            var b2bPath = BaseService.getB2bUrl();
+            return $resource(b2bPath + '/sale/quotation/info/nosearch', {}, {
+                getTodo: {
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                getDone: {
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                getInvalid: {
+                    params: {
+                        _state: 'invalid'
+                    }
+                },
+                getAgreed: {
+                    params: {
+                        _state: 'agreed'
+                    }
+                },
+                getRefused: {
+                    params: {
+                        _state: 'refused'
+                    }
+                }
+            });
+        }])
+        .factory('B2bPurcTender', ['$resource', 'BaseService', function($resource, BaseService) {
+            var b2bPath = BaseService.getB2bUrl();
+            return $resource(b2bPath + '/tender/sale/info/search', {}, {
+                getMyAll: {
+                    url: b2bPath + '/tender/purc/info/search'
+                },
+                getMyDone: {
+                    url: b2bPath + '/tender/purc/info/search',
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                getMyTodo: {
+                    url: b2bPath + '/tender/purc/info/search',
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                getMyWaiting: {
+                    url: b2bPath + '/tender/purc/info/search',
+                    params: {
+                        _state: 'waiting'
+                    }
+                },
+                getAll: {
+                },
+                getEnd: {
+                    params: {
+                        _state: 'end'
+                    }
+                },
+                getWaiting: {
+                    params: {
+                        _state: 'waiting'
+                    }
+                },
+                getDone: {
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                getTodo: {
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                getInvalid: {
+                    params: {
+                        _state: 'invalid'
+                    }
+                },
+                getOpenAll: {
+                    url: b2bPath + '/tender/open'
+                },
+                // getOpenDone: {
+                //     url: 'tender/open',
+                //     params: {
+                //         _state: 'done'
+                //     }
+                // },
+                // getOpenTodo: {
+                //     url: 'tender/open',
+                //     params: {
+                //         _state: 'todo'
+                //     }
+                // },
+                // getOpenEnd: {
+                //     url: 'tender/open',
+                //     params: {
+                //         _state: 'end'
+                //     }
+                // },
+                getPurcTenderDetail: {
+                    url: b2bPath + '/tender/purc/:id/info',
+                    method: 'GET',
+                    params: {
+                        id: 'id'
+                    }
+                },
+                getSaleTenderDetail: {
+                    url: b2bPath + '/tender/sale/:tenderId/info',
+                    method: 'GET',
+                    params: {
+                        tenderId: 'tenderId'
+                    }
+                },
+                getVendorSaleTenderDetail: {
+                    url: b2bPath + '/tender/getVendorSaleTenderDetail/:vendUU/:tenderId',
+                    method: 'GET',
+                    params: {
+                        vendUU: 'vendUU',
+                        tenderId: 'tenderId'
+                    }
+                },
+                addItems: {
+                    url: b2bPath + '/tender/addItems/:id',
+                    method: 'POST',
+                    params: {
+                        id: 'id'
+                    }
+                },
+                getVendorTenderItem: {
+                    url: b2bPath + '/tender/vendorTenderDetail/:vendUU/:id',
+                    method: 'GET',
+                    params: {
+                        vendUU: 'vendUU',
+                        id: 'id'
+                    }
+                },
+                // getItems: {
+                //     url: 'tender/items/:id',
+                //     method: 'GET',
+                //     params: {
+                //         id: 'id'
+                //     },
+                //     isArray: true
+                // },
+                save: {
+                    url: b2bPath + '/tender/save/new',
+                    method: 'POST'
+                },
+                publish: {
+                    url: b2bPath + '/tender/publish/new',
+                    method: 'POST'
+                },
+                reply: {
+                    url: b2bPath + '/tender/reply',
+                    method: 'POST'
+                },
+                decide: {
+                    url: b2bPath + '/tender/decide',
+                    method: 'POST'
+                },
+                deleteOne: {
+                    url: b2bPath + '/tender/delete/:id',
+                    method: 'DELETE',
+                    params: {
+                        id: 'id'
+                    }
+                },
+                publishSaved: {
+                    url: b2bPath + '/tender/publish/update',
+                    method: 'POST'
+                },
+                updateSaved: {
+                    url: b2bPath + '/tender/save/update',
+                    method: 'POST'
+                },
+                removeAttach: {
+                    url: b2bPath + '/tender/removeAttach/:attachId',
+                    method: 'POST',
+                    params: {
+                        attachId: 'attachId'
+                    }
+                },
+                removeSaleTender: {
+                    url: b2bPath + '/tender/removeSaleTender',
+                    method: 'POST'
+                },
+                deleteProd: {
+                    url: b2bPath + '/tender/deleteProd/:tenderProdId',
+                    method: 'POST',
+                    params: {
+                        tenderProdId: 'tenderProdId'
+                    }
+                },
+                setRead:{
+                    url: b2bPath + '/tender/setRead',
+                    method: 'POST'
+                },
+                getUnreadIds:{
+                    url: b2bPath + '/tender/getUnreadIds',
+                    method: 'GET'
+                },
+                getUnreadCount:{
+                    url: b2bPath + '/tender/unread',
+                    method: 'GET'
+                },
+                setPurcRead:{
+                    url: b2bPath + '/tender/setRead/purc',
+                    method: 'POST'
+                },
+                getPurcUnreadIds:{
+                    url: b2bPath + '/tender/getUnreadIds/purc',
+                    method: 'GET'
+                },
+                getPurcUnreadCount:{
+                    url: b2bPath + '/tender/unread/purc',
+                    method: 'GET'
+                }
+            });
+        }])
+        .factory('B2bAccountEnterprise', ['$resource', 'BaseService', function($resource, BaseService) {
+            var b2bPath = BaseService.getB2bUrl();
+            return $resource(b2bPath + '/account/enterprise', {}, {
+                growth: {
+                    url: b2bPath + '/account/enterprise/growth',
+                    isArray: true
+                },
+                applySaas: {
+                    url: b2bPath + '/account/enterprise/applySaas',
+                    method: 'POST'
+                },
+                getB2cUrl: {
+                    url: b2bPath + '/account/enterprise/getB2cUrl',
+                    method: 'GET'
+                }
+            });
+        }])
+        // 数据库直接获取
+        .factory('B2bPurcTenderInfo', ['$resource', 'BaseService', function($resource, BaseService) {
+            var b2bPath = BaseService.getB2bUrl();
+            return $resource(b2bPath + '/tender/sale/info/search', {}, {
+                getMyAll: {
+                    url: b2bPath + '/tender/purc/info/nosearch'
+                },
+                getMyDone: {
+                    url: b2bPath + '/tender/purc/info/search',
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                getMyTodo: {
+                    url: b2bPath + '/tender/purc/info/nosearch',
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                getMyWaiting: {
+                    url: b2bPath + '/tender/purc/info/nosearch',
+                    params: {
+                        _state: 'waiting'
+                    }
+                },
+                getOpenAll: {
+                    url: b2bPath + '/tender/open'
+                },
+                getAll: {
+                },
+                getEnd: {
+                    params: {
+                        _state: 'end'
+                    }
+                },
+                getWaiting: {
+                    params: {
+                        _state: 'waiting'
+                    }
+                },
+                getDone: {
+                    url: b2bPath + '/tender/sale/info/nosearch',
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                getTodo: {
+                    url: b2bPath + '/tender/sale/info/nosearch',
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                getInvalid: {
+                    params: {
+                        _state: 'invalid'
+                    }
+                }
+            });
+        }])
+        .factory('B2bSaleTenderQuestion', ['$resource', 'BaseService', function($resource, BaseService) {
+            var b2bPath = BaseService.getB2bUrl();
+            return $resource(b2bPath + '/tender/question', {}, {
+                getAll: {
+                },
+                getDone: {
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                getTodo: {
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                getAllAnswer: {
+                    url: b2bPath + '/tender/question/purc'
+                },
+                getDoneAnswer: {
+                    url: b2bPath + '/tender/question/purc',
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                getTodoAnswer: {
+                    url: b2bPath + '/tender/question/purc',
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                getDetail: {
+                    url: b2bPath + '/tender/question/:id',
+                    method: 'GET',
+                    params: {
+                        id: 'id'
+                    }
+                },
+                getAnswerDetail: {
+                    url: b2bPath + '/tender/question/answer/:id',
+                    method: 'GET',
+                    params: {
+                        id: 'id'
+                    }
+                }
+            });
         }])
         .factory('B2bPagingRelease', ['$resource', 'BaseService', function($resource, BaseService){
           var b2bPath = BaseService.getB2bUrl();

+ 42 - 0
src/main/webapp/resources/js/common/controllers/b2bCommonCtrls.js

@@ -26,5 +26,47 @@ define([ 'app/app' ], function(app) {
             $modalInstance.dismiss();
         }
     }]);
+    /**
+     * 投标单提问
+     */
+    app.controller('SaleTenderQuestionCtrl', ['$scope', 'saleTender','$modalInstance', '$upload', 'toaster', function($scope, saleTender, $modalInstance, $upload ,toaster){
+        $scope.saleTender = saleTender;
+
+        // 当前日期,用作新增提问
+        $scope.currentDay = new Date();
+
+        $scope.question = {
+            inDate : null,
+            replyDate : null,
+            topic : null,
+            status : null,
+            content : null,
+            questionAttaches : []
+        };
+
+        $scope.cancel = function() {
+            $modalInstance.dismiss();
+        };
+
+        //确认提问
+        $scope.ok = function (form) {
+            $scope.loading = true;
+            var files = form.attachFile.$viewValue, file = files && files.length > 0 ? files[0] : null;
+            $upload.upload({
+                url: 'tender/question/send/' + $scope.saleTender.id,
+                method: 'POST',
+                file: file,
+                data: {
+                    json: $scope.question
+                }
+            }).success(function (data) {
+                $scope.loading = false;
+                $modalInstance.close('success');
+            }).error(function (data) {
+                $scope.loading = false;
+                toaster.pop('error', '错误', '出现异常,提问失败');
+            });
+        };
+    }]);
 
 });

+ 1 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/seek_purchase_ctrl.js

@@ -9,6 +9,7 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
         'ngTableParams', 'Order', 'SessionService', '$filter', '$upload', '$stateParams', 'Search', '$http', 'Authority',
         function ($scope, $location, $rootScope, seekPurchase, toaster, BaseService,
             ngTableParams, Order, SessionService, $filter, $upload, $stateParams, Search, $http, Authority) {
+           $scope.storeType = 'seekPurchase';
           $rootScope.active = 'seek_purchase';
           document.title = '我的求购-优软商城';
           $scope.activeType = $stateParams.type ? $stateParams.type :'seekManage';

+ 61 - 2
src/main/webapp/resources/js/vendor/app.js

@@ -628,7 +628,61 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 			templateUrl: 'static/view/vendor/forstore/purchaseOffer.html',
 			controller: 'purchaseOfferCtrl',
 			controllerUrl: 'app/controllers/forstore/purchase_offer_ctrl'
-		})).state('vendorPurchaseAccept', angularAMD.route({
+		})).state('saleInquiry', angularAMD.route({
+                url: '/saleInquiry',
+                title: 'b2b客户采购询价',
+                templateUrl: 'static/view/vendor/b2b/sale_inquiry.html',
+                controller: 'saleInquiryCtrl',
+                controllerUrl: 'app/controllers/b2b/saleInquiryCtrl'
+        })).state('sale_inquiry_detail', angularAMD.route({
+					url: '/inquiry/:id',
+					title: 'b2b客户采购询价单详情',
+					templateUrl: 'static/view/vendor/b2b/change/sale_inquiry_details.html',
+					controller: 'saleInquiryDetailCtrl',
+					controllerUrl: 'app/controllers/b2b/change/sale_inquiry_details'
+        })).state('saleInquiryMould', angularAMD.route({
+				url: '/mould',
+				title: 'b2b客户模具询价',
+				templateUrl: 'static/view/vendor/b2b/sale_inquiryMould.html',
+				controller: 'saleInquiryMouldCtrl',
+				controllerUrl: 'app/controllers/b2b/saleInquiryMouldCtrl'
+        })).state('saleInquiryMouldDetail', angularAMD.route({
+					url: '/mould/:id',
+					title: 'b2b客户模具询价单',
+					templateUrl: 'static/view/vendor/b2b/change/sale_inquiry_mould_detail.html',
+					controller: 'saleInquiryMouldDetailCtrl',
+					controllerUrl: 'app/controllers/b2b/change/sale_inquiry_mould_detail'
+        })).state('saleQuotationList', angularAMD.route({
+            url: '/sale/quotationList',
+            title: 'b2b卖家-主动报价',
+            templateUrl: 'static/view/vendor/b2b/sale_quotationList.html',
+            controller: 'saleQuotationListCtrl',
+            controllerUrl: 'app/controllers/b2b/saleQuotationListCtrl'
+        })).state('saleTenderList', angularAMD.route({
+            url: '/sale/tender',
+            title: 'b2b卖家-客户招标',
+            templateUrl: 'static/view/vendor/b2b/sale_tenderList.html',
+            controller: 'saleTenderCtrl',
+            controllerUrl: 'app/controllers/b2b/saleTenderCtrl'
+        })).state('saleTenderDetail', angularAMD.route({
+            url: '/sale/tender/:id',
+            title: 'b2b卖家-投标单',
+            templateUrl: 'static/view/vendor/b2b/sale/sale_tender_detail.html',
+            controller: 'saleTenderDetailCtrl',
+            controllerUrl: 'app/controllers/b2b/sale/saleTenderDetailCtrl'
+        })).state('saleTenderQuestionList', angularAMD.route({
+            url: '/sale/tender/question/list',
+            title: 'b2b卖家-招标提问列表',
+            templateUrl: 'static/view/vendor/b2b/sale_tender_question_list.html',
+            controller: 'saleTenderQuestionListCtrl',
+            controllerUrl: 'app/controllers/b2b/saleTenderQuestionListCtrl'
+        })).state('saleTenderQuestionDetail', angularAMD.route({
+            url: '/sale/tender/question/:id',
+            title: 'b2b卖家-投标提问单',
+            templateUrl: 'static/view/vendor/b2b/sale/sale_tender_question_detail.html',
+            controller: 'saleTenderQuestionDetailCtrl',
+            controllerUrl: 'app/controllers/b2b/sale/saleTenderQuestionDetailCtrl'
+        })).state('vendorPurchaseAccept', angularAMD.route({
 			url: '/vendorPurchaseAccept',
 			templateUrl: 'static/view/vendor/forstore/purchaseAccept.html',
 			controller: 'purchaseAcceptCtrl',
@@ -760,7 +814,12 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 				'inquiryItem': null
 			},
 			controllerUrl: 'app/controllers/b2b/sale/saleQuotationNewCtrl'
-		})).state('sale_customer_detail', angularAMD.route({
+		})).state('sale_quotation_item', angularAMD.route({
+            url: "/sale/quotation/:id",
+            templateUrl: "static/view/vendor/b2b/sale/quotation_new.html",
+            controller: 'SaleQuotationNewCtrl',
+            controllerUrl: 'app/controllers/b2b/sale/saleQuotationNewCtrl'
+        })).state('sale_customer_detail', angularAMD.route({
 			url: "/sale/customer/:id",
 			templateUrl: "static/view/vendor/b2b/sale/customer_detail.html",
 			controller: 'CustomerDetailCtrl',

+ 210 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/change/sale_inquiry_details.js

@@ -0,0 +1,210 @@
+// 询价单明细
+define(['app/app'], function (app) {
+  app.register.controller('saleInquiryDetailCtrl', ['$rootScope', '$scope', '$stateParams', 'B2bPurcInquiry', '$filter', 'toaster', '$upload', 'token', 'B2bCurrentRole', function ($rootScope, $scope, $stateParams, PurcInquiry, $filter, toaster, $upload, token, CurrentRole) {
+      $rootScope.active = 'vendor_seek_purchase';
+      // 获取当前用户是否为普通用户
+      CurrentRole.isUser({}, {}, function (data) {
+          $scope.isUser = data.isUser;
+      });
+
+      var loadData = function () {
+          PurcInquiry.getAll({id: $stateParams.id}, function (data) {
+              $scope.newinquiryItems = data;
+              var inquiry = data[0].inquiry;
+              //inquiry.inquiryItems = data;
+              angular.forEach(inquiry.attachs, function (attach) {
+                  attach.type = attach.name.substr(attach.name.lastIndexOf('.') + 1);
+              });
+              $scope.inquiry = inquiry;
+          }, function (response) {
+              $scope.loading = false;
+              toaster.pop('error', '', response.data);
+          });
+      };
+      loadData();
+      $scope.getMinDate = function (item) {
+          return $filter('date')(item.inquiry.date, 'yyyy-MM-dd');
+      };
+
+      $scope.replyPrices = [];
+      $scope.replylapQtys = [];
+      $scope.replyPrices.push(true);
+      $scope.replylapQtys.push(true);
+      $scope.addStep = function (inquiryItem) {
+          if (inquiryItem.replies.length >= 10) {
+              toaster.pop('warning', '提示', '最多支持10个分段!');
+          } else
+              inquiryItem.replies.push({});
+      };
+
+      $scope.removeStep = function (inquiryItem, stepIndex) {
+          inquiryItem.replies.splice(stepIndex, 1);
+      };
+
+      $scope.openDatePicker = function ($event, item, openParam) {
+          $event.preventDefault();
+          $event.stopPropagation();
+          item[openParam] = !item[openParam];
+      };
+
+      $scope.getHistory = function (item) {
+          if (!item.history) {
+              PurcInquiry.getHistory({itemId: item.id}, function (data) {
+                  item.history = data;
+              });
+          }
+      };
+
+      $scope.minOrderQtyVerify = $scope.minPackQtyVerify = $scope.leadtimeVerify = true;
+      $scope.verify = function (value, type) {
+          var regex = /^\d+(.\d{1,6})?$/;//
+          switch (type) {
+              case 'minOrderQty':
+                  $scope.minOrderQtyVerify = regex.test(value);
+                  break;
+              case 'minPackQty':
+                  $scope.minPackQtyVerify = regex.test(value);
+                  break;
+              case 'leadtime':
+                  $scope.leadtimeVerify = regex.test(value);
+                  break;
+              default:
+                  $scope.replyPrices[type] = regex.test(value);
+                  break;
+          }
+      }
+
+      $scope.verifylapQty = function (value, index, inquiryItem) {
+          value = parseInt(value);
+          var regex = /^\d+(.\d{1,6})?$/;
+          var valid = true;
+          angular.forEach(inquiryItem.replies, function(reply, $index) {
+              if ($index < index && reply.lapQty >= value) {
+                  valid = false;
+              }
+          });
+          $scope.replylapQtys[index] = regex.test(value) && valid;
+      };
+
+      $scope.isValid = function (item, withSteps) {
+          var bool = item.leadtime && item.replies && item.replies[0].price > 0;
+          if (!withSteps || !bool)
+              return bool;
+          angular.forEach(item.replies, function (r, i) {
+              $scope.verifylapQty(r.lapQty, i, item);
+              bool = (i > 0 ? r.lapQty : 1) && r.price && $scope.replylapQtys[i];
+          });
+          return bool;
+      };
+
+      // 获取token信息
+      $scope.getToken = function() {
+          token.info({userType: 'saleinquiry'}, {}, function(data) {
+              $scope.token = data.token;
+          }, function(response) {
+              toaster.pop('error', '提示', response.data);
+          });
+      };
+
+      $scope.deleteAttach = function (attaches, index) {
+          attaches.splice(index, 1);
+      };
+
+      $scope.onReplyClick = function (item, withSteps) {
+          if (item.vendFromDate instanceof Date) {
+              item.vendFromDate = item.vendFromDate.getTime();
+          }
+          if (item.vendToDate instanceof Date) {
+              item.vendToDate = item.vendToDate.getTime();
+          }
+          if (item.vendFromDate > item.vendToDate) {
+              toaster.pop('warning', '警告', '有效开始日期不能超过有效截止日期');
+              return;
+          }
+          var replies = [];
+          var valid = true;
+          var validLapQty = 0;
+          angular.forEach(item.replies, function (r, i) {
+              // 直接比较是字符串比较,需要先转换再比较  2017年9月7日 15:05:51
+              if (i > 0 && parseInt(r.lapQty) <= parseInt(item.replies[i - 1].lapQty) || r.lapQty == null) {
+                  valid = false;
+                  validLapQty = r.lapQty;
+              }
+              if ((i > 0 ? r.lapQty : 1) || r.price)
+                  replies.push(r);
+          });
+          item.replies = replies;
+          $scope.loading = true;
+          if (!valid) { // 不合法时给出提示
+              if (validLapQty) {
+                  toaster.pop('info', '提示', '分段' + validLapQty + '小于等于了上一分段数,不能保存!');
+              } else {
+                  toaster.pop('info', '提示', '分段数量不合法,不能保存!');
+              }
+              $scope.loading = false;
+          } else {
+              var file = item.myFiles, file = file && file.length > 0 ? file[0] : null;
+              if (withSteps) {
+                  if(null != file) {
+                      $upload.upload({
+                          url: 'sale/inquiry/addAttach',
+                          file: file,
+                          method: 'POST',
+                          data: {
+                              item: item,
+                              method: 'reply'
+                          }
+                      }).success(function (data) {
+                          if (data.item) {
+                              item = data.item;
+                          }
+                          window.location.reload();
+                      });
+                  } else {
+                      PurcInquiry.reply({itemId: item.id, token: $scope.token}, item, function () {
+                          $scope.loading = false;
+                          toaster.pop('info', '提示', '报价成功');
+                          // loadData();
+                          window.location.reload();
+                      }, function (response) {
+                          $scope.loading = false;
+                          toaster.pop('error', '询价失效', response.data);
+                      });
+                  }
+              } else {
+                  if(null != file) {
+                      $upload.upload({
+                          url: 'sale/inquiry/addAttach',
+                          file: file,
+                          method: 'POST',
+                          data: {
+                              item: item,
+                              method: 'save'
+                          }
+                      }).success(function (data) {
+                          if (data.item) {
+                              item = data.item;
+                          }
+                          window.location.reload();
+                      });
+                  } else {
+                      PurcInquiry.saveItem({itemId: item.id, token: $scope.token}, item, function () {
+                          $scope.loading = false;
+                          toaster.pop('info', '提示', '保存成功');
+                          // loadData();
+                          window.location.reload();
+                      }, function (response) {
+                          $scope.loading = false;
+                          toaster.pop('error', '保存失败', response.data);
+                      });
+                  }
+              }
+          }
+      };
+
+      // 取消
+      $scope.cancel = function () {
+          $scope.tableParams.reload();
+      }
+  }]);
+});

+ 190 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/change/sale_inquiry_mould_detail.js

@@ -0,0 +1,190 @@
+// 客户模具询价单
+define(['app/app'], function (app) {
+  app.register.controller('saleInquiryMouldDetailCtrl', ['$scope', '$stateParams', 'B2bPurcInquiryMould', '$filter', 'toaster', '$upload', 'B2bCurrentRole', function ($scope, $stateParams, PurcInquiryMould, $filter, toaster, $upload, CurrentRole) {
+      // 获取当前用户是否为普通用户
+      CurrentRole.isUser({}, {}, function (data) {
+          $scope.isUser = data.isUser;
+      });
+      var inquiryMould_copy = {};
+      var loadData = function () {
+          PurcInquiryMould.getAll({id: $stateParams.id}, function (data) {
+              // 用来验证价格修改
+              inquiryMould_copy = angular.copy(data);
+              $scope.inquiryMould_copy = inquiryMould_copy;
+              $scope.newinquirymould = data;
+              var mould = data;
+              angular.forEach(mould.attachs, function (attach) {
+                  attach.type = attach.name.substr(attach.name.lastIndexOf('.') + 1);
+              });
+              $scope.inquiryMould = mould;
+          }, function (response) {
+              toaster.pop('error', '数据加载失败', response.data);
+          });
+      };
+      loadData();
+      $scope.getMinDate = function (item) {
+          return $filter('date')(item.inquiry.date, 'yyyy-MM-dd');
+      };
+
+
+      // 取消
+      $scope.reload = function () {
+          loadData();
+          $scope.canSave = false;
+      }
+
+      //有价格为0,则不能报价
+      $scope.notZero = function (mould) {
+          var regex = /^(0|[1-9][0-9]{0,9})(\.[0-9]{1,6})?$/;
+          angular.forEach(mould.inquiryMouldItems, function (item) {
+              if (item.price == 0 || !regex.test(item.price)) {
+                  $scope.canSave = false;
+              }
+              angular.forEach(item.inquiryMouldDetails, function (detail) {
+                  if (detail.price == 0 || !regex.test(detail.price)) {
+                      $scope.canSave = false;
+                  }
+              })
+
+          });
+      }
+
+      $scope.blurPrice = function (price) {
+          var regex = /^(0|[1-9][0-9]{0,9})(\.[0-9]{1,6})?$/;
+          if (!regex.test(price)) {
+              toaster.pop('warning', '格式错误', '请输入有效价格');
+          }
+      }
+
+      // 获取历史报价
+      $scope.getHistory = function (mould) {
+          if (!mould.history) {
+              PurcInquiryMould.getHistory({id: mould.id},{}, function (data) {
+                  $scope.historyShow = true;
+                  mould.history = data;
+              },function (response) {
+                  $scope.historyShow = false;
+                  //toaster.pop('error', '提示', response.data);
+              });
+          }
+      };
+
+
+      $scope.canSave = false;
+
+      // items价格验证
+      $scope.verifyItems = function (price, index) {
+          var regex = /^(0|[1-9][0-9]{0,9})(\.[0-9]{1,6})?$/;//
+          if (regex.test(price) && price != 0) {
+              var itemprice = $scope.inquiryMould.inquiryMouldItems[index].price;
+              if (itemprice != inquiryMould_copy.inquiryMouldItems[index].price) {
+                  $scope.canSave = true;
+              } else {
+                  $scope.canSave = false;
+              }
+          } else {
+              $scope.canSave = false;
+          }
+      }
+
+      // prod下prods价格验证
+      $scope.verifyProds = function (price, index, parentIndex) {
+          var regex = /^(0|[1-9][0-9]{0,9})(\.[0-9]{1,6})?$/;//
+          if (regex.test(price) && price != 0) {
+              var prodPrice = $scope.inquiryMould.inquiryMouldItems[parentIndex].inquiryMouldDetails[index].price;
+              if (prodPrice != inquiryMould_copy.inquiryMouldItems[parentIndex].inquiryMouldDetails[index].price) {
+                  $scope.canSave = true;
+              } else {
+                  $scope.canSave = false;
+              }
+          } else {
+              $scope.canSave = false;
+          }
+      }
+
+      // 上传附件
+      var uploadAttach = function(file) {
+//			var file = mould.attachFile.$viewValue, file = file && file.length > 0 ? file[0] : null;
+          $scope.mould  = $scope.inquiryMould;
+          $upload.upload({
+              url: 'sale/mould/' + $scope.mould.id + '/send',
+              method: 'POST',
+              file: file,
+              data: {
+                  json: $scope.mould
+              }
+          }).success(function(attach){
+              if (attach){
+                  $scope.inquiryMould.sellAttachs.push(attach);
+              }
+          }).error(function(res){
+              console.log("failure");
+              console.log(res);
+          });
+      }
+
+      $scope.pushFile = function(file) {
+          // var file = $scope.myFiles;
+          if (file.length > 0) {
+              for (var i = 0; i < file.length; i++) {
+                  console.log(file[i].name);
+                  var flag = true;
+
+                  if ($scope.inquiryMould.sellAttachs.length > 0) {
+                      for (var j = 0; j < $scope.inquiryMould.sellAttachs.length; j++) {
+                          if ($scope.inquiryMould.sellAttachs[j].name == file[i].name
+                              && $scope.inquiryMould.sellAttachs[j].size == file[i].size) {
+                              flag = false;
+                              break;
+                          }
+                      }
+                  }
+                  if (flag) {
+                      uploadAttach(file[i]);
+                  }
+              }
+          }
+      };
+
+      $scope.removeFile = function(file) {
+          if ($scope.inquiryMould.sellAttachs != null && $scope.inquiryMould.sellAttachs.length > 0) {
+              for (var i = 0; i < $scope.inquiryMould.sellAttachs.length; i++) {
+                  if ($scope.inquiryMould.sellAttachs[i].name == file.name
+                      && $scope.inquiryMould.sellAttachs[i].size == file.size) {
+                      $scope.inquiryMould.sellAttachs.splice(i, 1);
+                      document.getElementById("file").value = "";
+                  }
+              }
+          }
+      };
+
+      $scope.onReplyClick = function (mould, withSteps) {
+          $scope.loading = true;
+          if (withSteps) {
+              PurcInquiryMould.reply({id: mould.id}, mould, function () {
+                  $scope.loading = false;
+                  toaster.pop('info', '提示', '报价成功');
+                  loadData();
+                  $scope.canSave = false;
+              }, function (response) {
+                  $scope.loading = false;
+                  toaster.pop('error', '报价失败', response.data);
+              });
+              PurcInquiryMould.saveHistory({id: mould.id}, mould, function () {
+
+              }, function (response) {
+
+              });
+          } else {
+              PurcInquiryMould.saveItem({id: mould.id}, mould, function () {
+                  $scope.loading = false;
+                  toaster.pop('info', '提示', '保存成功');
+                  loadData();
+              }, function (response) {
+                  $scope.loading = false;
+                  toaster.pop('error', '保存失败', response.data);
+              });
+          }
+      };
+  }]);
+});

+ 178 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/sale/saleTenderDetailCtrl.js

@@ -0,0 +1,178 @@
+define(['app/app'], function (app) {
+    "use strict";
+    /**
+     * 查看投标单详情
+     */
+    app.register.controller('saleTenderDetailCtrl', ['$scope', '$filter', 'B2bPurcTender', 'ngTableParams', 'toaster', 'BaseService', '$stateParams', '$modal', '$rootScope', '$upload', 'B2bAccountEnterprise', 'B2bCurrentRole', function ($scope, $filter, PurcTender, ngTableParams, toaster, BaseService, $stateParams, $modal, $rootScope, $upload, AccountEnterprise, CurrentRole) {
+        BaseService.scrollBackToTop();
+        $scope.b2bUrl = BaseService.getB2bUrl();
+        if (!$scope.attaches) {
+            $scope.attaches = []; // 存放上传了的附件
+        }
+        AccountEnterprise.get({}, function (data) {
+            $scope.currentEn = data;
+        });
+        // 获取当前用户是否为普通用户
+        CurrentRole.isUser({}, {}, function (data) {
+            $scope.isUser = data.isUser;
+        });
+        $scope.loading = true;
+        PurcTender.getSaleTenderDetail({tenderId: $stateParams.id}, function (data) {
+            $scope.saleTender = data.saleTender;
+            $scope.tender = data.tender;
+            $scope.loading = false;
+        }, function (response) {
+            $scope.loading = false;
+            toaster.pop('error', '数据加载失败', response.data);
+        });
+
+        // 提问
+        $scope.sendQuestion = function (){
+            var modalInstance = $modal.open({
+                animation: true,
+                templateUrl: 'static/view/vendor/b2b/sale/sale_tender_question.html',
+                controller: 'SaleTenderQuestionCtrl',
+                size: 'lg',
+                resolve: {
+                    saleTender: function () {
+                        return $scope.saleTender;
+                    }	//传递当前投标单到模态框Controller
+                }
+            });
+            modalInstance.result.then(function () {
+                toaster.pop('success', '提问成功');
+            }, function () {
+
+            });
+        };
+
+        $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 (attachId, index) {
+            $scope.attaches.splice(index, 1);
+        };
+
+        var taxrateYes = false;
+        var cycleYes = false;
+        var priceYes = false;
+        $scope.canSave = false;
+        $scope.validateThis = function (value, type) {
+            if ("" != value) {
+                switch (type) {
+                    case 'taxrate':
+                        var regex = /^\+?[0-9][0-9]{0,1}$/;
+                        if (regex.test(value)) {
+                            taxrateYes = true;
+                        } else {
+                            toaster.pop('warning', '警告', '税率不合法,请重新填写');
+                        }
+                        break;
+                    case 'cycle':
+                        regex = /^\+?[1-9][0-9]*$/;
+                        if (regex.test(value)) {
+                            cycleYes = true;
+                        } else {
+                            toaster.pop('warning', '警告', '周期不合法,请重新填写');
+                        }
+                        break;
+                    case 'price':
+                        regex = /^(0|[0-9][0-9]{0,9})(\.[0-9]{1,6})?$/;
+                        if (regex.test(value) && value !== 0) {
+                            priceYes = true;
+                        } else {
+                            toaster.pop('warning', '警告', '请确认单价是否填写正确');
+                        }
+                        break;
+                }
+            }
+        };
+
+        $scope.emNumYes = true;
+
+        $scope.validEmNum = function (value) {
+            var regex = /^\+?[1-9][0-9]*$/;
+            if (!regex.test(value) || value === 0 || value !== null) {
+                $scope.emNumYes = false;
+                toaster.pop('warning', '警告', '人数不合法,请重新填写');
+            }
+        };
+
+        $scope.validateProds = function (saleTender) {
+            $scope.canSave = true;
+            var cycleRegex = /^\+?[1-9][0-9]*$/;
+            var taxrateRegex = /^\+?[0-9][0-9]{0,1}$/;
+            var priceRegex = /^(([0-9]+\.[0-9]{1,6})|([0-9]*[1-9][0-9]*\.[0-9]{1,6})|([0-9]*[1-9][0-9]*))$/; // 非零最多六位小数正实数
+            if ($scope.tender.ifAll == 1) { // 全包时需要所有信息都填写并合法才可以投标
+                // 全包全部需要填写,且需要符合正则式
+                angular.forEach(saleTender.saleTenderItems, function(item) {
+                    if ((!item.cycle || !item.price) || (!cycleRegex.test(item.cycle) || !priceRegex.test(item.price))) {
+                        $scope.canSave = false;
+                    }
+                });
+                if (!saleTender.cycle || !saleTender.taxrate || !cycleRegex.test(saleTender.cycle) || !taxrateRegex.test(saleTender.taxrate)) {
+                    $scope.canSave = false;
+                }
+            } else { // 非全包模式
+                angular.forEach(saleTender.saleTenderItems, function(item) {
+                    if (item.cycle || item.taxrate || item.price) {
+                        // /^(0|[0-9][0-9]{0,9})(\.[0-9]{1,6})?$/;
+                        // 判断填写过的有为0或不符合正则式的,设置不能保存
+                        if (!cycleRegex.test(item.cycle) || !taxrateRegex.test(item.taxrate) || !priceRegex.test(item.price)) {
+                            $scope.canSave = false;
+                        } else {
+                            $scope.canSave = true;
+                        }
+                    }
+                });
+            }
+        };
+
+        // 投标
+        $scope.bidIt = function (saleTender) {
+            $scope.loading = true;
+            if (saleTender.enterpriseBaseInfo.enEstablishDate instanceof Date) {
+                saleTender.enterpriseBaseInfo.enEstablishDate = saleTender.enterpriseBaseInfo.enEstablishDate.getTime();
+            }
+            saleTender.bidAttaches.push.apply(saleTender.bidAttaches, $scope.attaches);
+            angular.forEach(saleTender.saleTenderItems, function (item) {
+                item.tenderProd = {};
+                if ("" == item.price && "" == item.taxrate && "" == item.cycle) {
+                    item.price = 0;
+                    item.cycle = 0;
+                    item.taxrate = 0;
+                }
+            });
+            PurcTender.reply({}, saleTender, function (data) {
+                $scope.loading = false;
+                toaster.pop('info', '成功', '投标成功');
+                window.location.hash = '#/sale/tender';
+            }, function (response) {
+                $scope.loading = false;
+                toaster.pop('error', '投标失败', response.data);
+            });
+        };
+
+        $scope.condition = {
+            $fromOpened: false
+        };
+
+        $scope.getMaxDate = function () {
+            return $filter('date')(new Date(), 'yyyy-MM-dd');
+        };
+
+        $scope.openDatePicker = function ($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
+        };
+    }]);
+});

+ 489 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/saleInquiryCtrl.js

@@ -0,0 +1,489 @@
+/**
+ * B2B客户采购询价
+ *
+ * @author hejq
+ * @date 2018-08-29 15:41
+ */
+define(['app/app'], function (app) {
+    "use strict";
+
+    /**
+     * 客户采购询价
+     */
+    app.register.controller('saleInquiryCtrl', ['$scope', '$filter', 'B2bPurcInquiry', 'ngTableParams', 'toaster', 'BaseService', 'B2bPurcInquiryInfo', '$upload', '$rootScope', 'token', '$timeout', 'B2bCurrentRole', function ($scope, $filter, PurcInquiry, ngTableParams, toaster, BaseService, PurcInquiryInfo, $upload, $rootScope, token, $timeout, CurrentRole) {
+        BaseService.scrollBackToTop();
+        $scope.storeType = 'purchase';
+        $scope.active = 'todo';
+        // 获取当前用户是否为普通用户
+        CurrentRole.isUser({}, {}, function (data) {
+            $scope.isUser = data.isUser;
+        });
+
+        if ($rootScope.active) {
+            $scope.active = $rootScope.active;
+            $rootScope.active = null;
+        } else {
+            $scope.active = 'todo';
+        }
+        $scope.agreedText = '全部';
+        $scope.dateZoneText = '最近一个月';
+        $scope.condition = {dateZone: 1};
+
+        /**
+         * 将日期转化为整数日期
+         */
+        var getDateTime = function (date) {
+            if (angular.isDate(date)) {
+                return date.getTime();
+            } else {
+                return null;
+            }
+        };
+
+        /**
+         * 页面状态按钮过滤
+         */
+        var getState = function (active) {
+            var fn = 'get';
+            switch (active) {
+                case 'done':
+                    fn = 'getDone';
+                    break;
+                case 'todo':
+                    fn = 'getTodo';
+                    break;
+                case 'end':
+                    fn = 'getEnd';
+                    break;
+                case 'waiting':
+                    fn = 'getWaiting';
+                    break;
+                case 'received':
+                    fn = 'getReceived';
+                    break;
+                case 'invalid':
+                    fn = 'getInvalid';
+                    break;
+                // 已采纳
+                case 'agreed':
+                    fn = 'getAgreed';
+                    break;
+                // 未采纳
+                case 'refused':
+                    fn = 'getRefused';
+                    break;
+                // 个人
+                case 'personal':
+                    fn = 'getPersonal';
+                    break;
+                // 集体
+                case 'teams':
+                    fn = 'getTeams';
+                    break;
+                // 非标准
+                case 'nonstandard':
+                    fn = 'getNonstandard';
+                    break;
+                // 标准
+                case 'standard':
+                    fn = 'getStandard';
+                    break;
+                // 变更单无需确认
+                case 'unread':
+                    fn = 'getUnread';
+                    break;
+            }
+            return fn;
+        };
+
+        var getDateCondition = function (zone, condition) {
+            var fromDate = new Date();
+            var toDate = new Date();
+            //去除时分秒限制,dateFrom设置成0时0分0秒,dateTo设置成23时59分59秒
+            fromDate.setHours(0, 0, 0, 0);
+            toDate.setHours(23, 59, 59, 999);
+            if (zone == -1) { // 自定义时间,什么都不做
+
+            } else if (zone == 1) {
+                fromDate.setMonth(fromDate.getMonth() - 1);
+                condition.dateFrom = fromDate;
+                condition.dateTo = toDate;
+            } else if (zone == 3) {
+                fromDate.setMonth(fromDate.getMonth() - 3);
+                condition.dateFrom = fromDate;
+                condition.dateTo = toDate;
+            } else if (zone == 6) {
+                fromDate.setMonth(fromDate.getMonth() - 6);
+                condition.dateFrom = fromDate;
+                condition.dateTo = toDate;
+            } else {
+                condition.dateFrom = null;
+                condition.dateTo = null;
+            }
+        };
+
+        /* 时间筛选初始化*/
+        var fromDate = new Date();
+        var toDate = new Date();
+        fromDate.setMonth(fromDate.getMonth() - 1);
+        fromDate.setHours(0, 0, 0, 0);
+        toDate.setHours(23, 59, 59, 999);
+        $scope.condition.dateFrom = fromDate;
+        $scope.condition.dateTo = toDate;
+
+        $scope.changeAgreed = function (agreed) {
+            $scope.condition.agreed = agreed;
+            $scope.agreedText = typeof agreed == 'undefined' ? '全部' : (agreed == 1 ? '已采纳' : '未采纳');
+            $scope.condition.$agreedOpen = false;
+        };
+        $scope.changeDateZone = function (zone) {
+            $scope.condition.dateZone = zone;
+            $scope.dateZoneText = zone == 1 ? '最近一个月' : (zone == 3 ? '最近三个月' : (zone == 3 ? '最近六个月' : '自定义'));
+            $scope.condition.$dateZoneOpen = false;
+            getDateCondition(zone, $scope.condition);
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
+        };
+        $scope.setActive = function (state) {
+            if ($scope.active != state) {
+                $scope.active = state;
+                if ($scope.tableParams.page() == 1)
+                    $scope.tableParams.reload();
+                else
+                    $scope.tableParams.page(1);
+            }
+        };
+
+        // 设置阅读状态
+        $scope.setReadStatus = function(msg) {
+            if(!msg.read) {
+                PurcInquiry.setStatus({id: msg.inid}, {}, function(data) {
+
+                });
+            }
+        }
+
+        $scope.searchMethod = false;
+        var getService = function () {
+            return $scope.searchMethod ? PurcInquiry : PurcInquiryInfo;
+        };
+        $scope.tableParams = new ngTableParams({
+            page: 1,
+            count: 20,
+            sorting: {
+                'inquiry.date': 'desc',
+                'inquiry.enterprise.enName': 'asc',
+                'inquiry.code': 'asc'
+            }
+        }, {
+            total: 0,
+            counts: [5, 10, 25, 50],
+            getData: function ($defer, params) {
+                $scope.loading = true;
+                var pageParams = params.url();
+                var realActive = {};
+                pageParams.searchFilter = { // 筛选条件
+                    keyword: $scope.keyword,
+                    fromDate: getDateTime($scope.condition.dateFrom),
+                    endDate: getDateTime($scope.condition.dateTo)
+                };
+                if ($scope.active == 'overdue') {
+                    $scope.active = 'end';
+                }
+                getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
+                    $scope.loading = false;
+                    if (page) {
+                        params.total(page.totalElement);
+                        $defer.resolve(page.content);
+                        $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的关键词
+                    }
+                }, function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '数据加载失败', response.data);
+                });
+            }
+        });
+
+        //获得各分类未阅读数量
+        var getUnreadCount = function () {
+            PurcInquiry.getUnreadCount(null, function (data) {
+                $scope.unread = data;
+            });
+        };
+        getUnreadCount();
+
+        //设置单据已读
+        $scope.setOrdersRead = function (id) {
+            // 如果单据本身已读,则不发送请求修改数据
+            if (!$scope.isUnread(id)){
+                return;
+            }
+            var sourceId = [];
+            sourceId.push(id);
+            PurcInquiry.setRead({}, sourceId, function (message) {
+                getUnreadCount();
+                removeByValue($scope.unreadCode, id);
+            });
+        };
+
+        $scope.setOrdersReadByState = function () {
+            if (!$scope.unread.replied || $scope.unread.replied == 0) {
+                return;
+            }
+            PurcInquiry.setReadByState({}, function () {
+                getUnreadIds();
+                getUnreadCount();
+            });
+        };
+
+        var getUnreadIds = function () {
+            PurcInquiry.getUnreadIds({}, "", function (message) {
+                $scope.unreadCode = message.content;
+            });
+        };
+        getUnreadIds();
+
+        $scope.isUnread = function (id) {
+            for (var i in $scope.unreadCode) {
+                if (id == $scope.unreadCode[i]) {
+                    return true;
+                }
+            }
+        };
+
+        $scope.getMinDate = function (item) {
+            return $filter('date')(item.inquiry.date, 'yyyy-MM-dd');
+        };
+        $scope.replyPrices = [];
+        $scope.replylapQtys = [];
+        $scope.replyPrices.push(true);
+        $scope.replylapQtys.push(true);
+        $scope.addStep = function (inquiryItem) {
+            $scope.replyPrices.push(true);
+            if (inquiryItem.replies.length >= 10) {
+                toaster.pop('warning', '提示', '最多支持10个分段!');
+            } else {
+                inquiryItem.replies.push({});
+                if (inquiryItem.replies.length != 1) {
+                    $scope.replyPrices.push(true);
+                    $scope.replylapQtys.push(true);
+                }
+            }
+        };
+        $scope.removeStep = function (inquiryItem, stepIndex) {
+            inquiryItem.replies.splice(stepIndex, 1);
+            $scope.replyPrices.splice(stepIndex, 1);
+            $scope.replylapQtys.splice(stepIndex, 1);
+        };
+
+        $scope.openDatePicker = function ($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
+        };
+
+        $scope.openFilterDatePicker = function ($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
+            if ($scope.condition.dateFrom && $scope.condition.dateTo && !item[openParam]) {
+                $scope.tableParams.reload();
+            }
+        };
+
+        $scope.getHistory = function (item) {
+            if (!item.history) {
+                PurcInquiry.getHistory({itemId: item.id},function (data) {
+                    $scope.historyShow = true;
+                    item.history = data;
+                }, function (response) {
+                    $scope.historyShow = false;
+                    //toaster.pop('error', '数据加载失败', response.data);
+                });
+            }
+        };
+
+        // 获取token信息
+        $scope.getToken = function() {
+            token.info({userType: 'saleinquiry'}, {}, function(data) {
+                $scope.token = data.token;
+            }, function(response) {
+                toaster.pop('error', '提示', response.data);
+            });
+        };
+
+        $scope.deleteAttach = function (attaches, index) {
+            attaches.splice(index, 1);
+        };
+
+        $scope.onReplyClick = function (item, withSteps) {
+            if (item.vendFromDate instanceof Date) {
+                item.vendFromDate = item.vendFromDate.getTime();
+            }
+            if (item.vendToDate instanceof Date) {
+                item.vendToDate = item.vendToDate.getTime();
+            }
+            if (item.vendFromDate > item.vendToDate) {
+                toaster.pop('warning', '警告', '有效开始日期不能超过有效截止日期');
+                return;
+            }
+            var replies = [];
+            // 判断分段数是否合法
+            var valid = true;
+            var validLapQty = 0;
+            angular.forEach(item.replies, function (r, i) {
+                if ((i > 0 ? r.lapQty : 1) || r.price) {
+                    replies.push(r);
+                }
+                // 直接比较是字符串比较,需要先转换再比较  2017年9月7日 15:05:51
+                if (i > 0 && parseInt(r.lapQty) <= parseInt(item.replies[i - 1].lapQty) || r.lapQty == null) {
+                    valid = false;
+                    validLapQty = r.lapQty;
+                }
+            });
+            item.replies = replies;
+            $scope.loading = true;
+            if (!valid) {
+                if (validLapQty) {
+                    toaster.pop('info', '提示', '分段' + validLapQty + '小于等于了上一分段数,不能保存!');
+                } else {
+                    toaster.pop('info', '提示', '分段数量不合法,不能保存!');
+                }
+                $scope.loading = false;
+            } else {
+                var file = item.myFiles, file = file && file.length > 0 ? file[0] : null;
+                if (withSteps) { // 保存并报价
+                    if(null != file) {
+                        $upload.upload({
+                            url: 'sale/inquiry/addAttach',
+                            file: file,
+                            method: 'POST',
+                            data: {
+                                item: item,
+                                method: 'reply'
+                            }
+                        }).success(function (data) {
+                            if (data.item) {
+                                item = data.item;
+                            }
+                            $scope.loading = false;
+                            toaster.pop('info', '提示', '报价成功');
+                            $scope.tableParams.reload();
+                        }).error(function (data) {
+                            $scope.loading = false;
+                            toaster.pop('error', '附件上传失败');
+                        });
+                    } else {
+                        PurcInquiry.reply({itemId: item.id, token: $scope.token}, item, function (data) {
+                            $scope.loading = false;
+                            toaster.pop('info', '提示', '报价成功');
+                            $scope.tableParams.reload();
+                        }, function (response) {
+                            $scope.loading = false;
+                            toaster.pop('error', '询价失效', response.data);
+                        });
+                    }
+                } else {  // 保存
+                    if(null != file) {
+                        $upload.upload({
+                            url: 'sale/inquiry/addAttach',
+                            file: file,
+                            method: 'POST',
+                            data: {
+                                item: item,
+                                method: 'save'
+                            }
+                        }).success(function (data) {
+                            if (data.item) {
+                                item = data.item;
+                            }
+                            $scope.loading = false;
+                            toaster.pop('info', '提示', '保存成功');
+                            $scope.tableParams.reload();
+                        }).error(function (data) {
+                            $scope.loading = false;
+                            toaster.pop('error', '附件上传失败');
+                        });
+                    } else {
+                        PurcInquiry.saveItem({itemId: item.id, token: $scope.token}, item, function (data) {
+                            $scope.loading = false;
+                            toaster.pop('info', '提示', '保存成功');
+                            $scope.tableParams.reload();
+                        }, function (response) {
+                            $scope.loading = false;
+                            toaster.pop('error', '保存失败', response.data);
+                        });
+                    }
+                }
+            }
+        };
+
+        $scope.isValid = function (item, withSteps) {
+            var bool = item.leadtime && item.replies && item.replies[0].price > 0;
+            if (!withSteps || !bool)
+                return bool;
+            angular.forEach(item.replies, function (r, i) {
+                $scope.verifylapQty(r.lapQty, i, item);
+                bool = (i > 0 ? r.lapQty : 1) && r.price && $scope.replylapQtys[i];
+            });
+            return bool;
+        };
+
+        $scope.verifylapQty = function (value, index, inquiryItem) {
+            value = parseInt(value);
+            var regex = /^\d+(.\d{1,6})?$/;
+            var valid = true;
+            angular.forEach(inquiryItem.replies, function(reply, $index) {
+                if ($index < index && reply.lapQty >= value) {
+                    valid = false;
+                }
+            });
+            $scope.replylapQtys[index] = regex.test(value) && valid;
+        };
+
+        $scope.minOrderQtyVerify = $scope.minPackQtyVerify = $scope.leadtimeVerify = true;
+        $scope.verify = function (value, type) {
+            var regex = /^\d+(.\d{1,6})?$/;//
+            switch (type) {
+                case 'minOrderQty':
+                    $scope.minOrderQtyVerify = regex.test(value);
+                    break;
+                case 'minPackQty':
+                    $scope.minPackQtyVerify = regex.test(value);
+                    break;
+                case 'leadtime':
+                    $scope.leadtimeVerify = regex.test(value);
+                    break;
+                default:
+                    $scope.replyPrices[type] = regex.test(value);
+                    break;
+            }
+        }
+        // 搜索框回车
+        $scope.onSearch = function (keyword) {
+            // 每次搜索重置获取数据方法
+            $scope.searchMethod = false;
+            if(keyword != null && keyword != '') {
+                $scope.searchMethod = true;
+            }
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
+        };
+
+        // 取消
+        $scope.cancel = function () {
+            $scope.tableParams.reload();
+        }
+
+        // 导出
+        $scope.exportXls = function () {
+            PurcInquiry.exportXls({}, {}, function (data) {
+                if (data.success) {
+                    window.location.href = 'sale/inquiry/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                }
+            }, function (response) {
+                toaster.pop('error', '数据加载失败', response.data);
+            })
+        }
+    }]);
+});

+ 443 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/saleInquiryMouldCtrl.js

@@ -0,0 +1,443 @@
+/**
+ * B2B客户模具询价
+ *
+ * @author hejq
+ * @date 2018-08-29 15:41
+ */
+define(['app/app'], function (app) {
+    "use strict";
+
+    /**
+     * 客户模具询价
+     */
+    app.register.controller('saleInquiryMouldCtrl', ['$scope', '$filter', 'B2bPurcInquiryMould', 'ngTableParams', 'toaster', 'BaseService', '$upload', 'B2bPurcInquiryMouldSql', 'B2bCurrentRole', function ($scope, $filter, PurcInquiryMould, ngTableParams, toaster, BaseService, $upload, PurcInquiryMouldSql, CurrentRole) {
+        BaseService.scrollBackToTop();
+        // 获取当前用户是否为普通用户
+        CurrentRole.isUser({}, {}, function (data) {
+            $scope.isUser = data.isUser;
+        });
+        $scope.storeType = 'mould';
+        $scope.active = 'todo';
+        $scope.agreedText = '全部';
+        $scope.dateZoneText = '不限';
+        $scope.condition = {dateZone: 1};
+
+        /**
+         * 将日期转化为整数日期
+         */
+        var getDateTime = function (date) {
+            if (angular.isDate(date)) {
+                return date.getTime();
+            } else {
+                return null;
+            }
+        };
+
+        /**
+         * 页面状态按钮过滤
+         */
+        var getState = function (active) {
+            var fn = 'get';
+            switch (active) {
+                case 'done':
+                    fn = 'getDone';
+                    break;
+                case 'todo':
+                    fn = 'getTodo';
+                    break;
+                case 'end':
+                    fn = 'getEnd';
+                    break;
+                case 'waiting':
+                    fn = 'getWaiting';
+                    break;
+                case 'received':
+                    fn = 'getReceived';
+                    break;
+                case 'invalid':
+                    fn = 'getInvalid';
+                    break;
+                // 已采纳
+                case 'agreed':
+                    fn = 'getAgreed';
+                    break;
+                // 未采纳
+                case 'refused':
+                    fn = 'getRefused';
+                    break;
+                // 个人
+                case 'personal':
+                    fn = 'getPersonal';
+                    break;
+                // 集体
+                case 'teams':
+                    fn = 'getTeams';
+                    break;
+                // 非标准
+                case 'nonstandard':
+                    fn = 'getNonstandard';
+                    break;
+                // 标准
+                case 'standard':
+                    fn = 'getStandard';
+                    break;
+                // 变更单无需确认
+                case 'unread':
+                    fn = 'getUnread';
+                    break;
+            }
+            return fn;
+        };
+
+        var getDateCondition = function (zone, condition) {
+            var fromDate = new Date();
+            var toDate = new Date();
+            //去除时分秒限制,dateFrom设置成0时0分0秒,dateTo设置成23时59分59秒
+            fromDate.setHours(0, 0, 0, 0);
+            toDate.setHours(23, 59, 59, 999);
+            if (zone == -1) { // 自定义时间,什么都不做
+
+            } else if (zone == 1) {
+                fromDate.setMonth(fromDate.getMonth() - 1);
+                condition.dateFrom = fromDate;
+                condition.dateTo = toDate;
+            } else if (zone == 3) {
+                fromDate.setMonth(fromDate.getMonth() - 3);
+                condition.dateFrom = fromDate;
+                condition.dateTo = toDate;
+            } else if (zone == 6) {
+                fromDate.setMonth(fromDate.getMonth() - 6);
+                condition.dateFrom = fromDate;
+                condition.dateTo = toDate;
+            } else {
+                condition.dateFrom = null;
+                condition.dateTo = null;
+            }
+        };
+
+        /* 时间筛选初始化*/
+        var fromDate = new Date();
+        var toDate = new Date();
+        fromDate.setMonth(fromDate.getMonth() - 1);
+        fromDate.setHours(0, 0, 0, 0);
+        toDate.setHours(23, 59, 59, 999);
+        $scope.condition.dateFrom = fromDate;
+        $scope.condition.dateTo = toDate;
+
+        var inquiryMould_copy = {};
+        $scope.changeAgreed = function (agreed) {
+            $scope.condition.agreed = agreed;
+            $scope.agreedText = typeof agreed == 'undefined' ? '全部' : (agreed == 1 ? '已采纳' : '未采纳');
+            $scope.condition.$agreedOpen = false;
+        };
+        $scope.changeDateZone = function (zone) {
+            $scope.condition.dateZone = zone;
+            $scope.dateZoneText = zone == 1 ? '最近一个月' : (zone == 3 ? '最近三个月' : (zone == 6 ? '最近六个月' : '自定义'));
+            $scope.condition.$dateZoneOpen = false;
+            getDateCondition(zone, $scope.condition);
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
+        };
+
+        $scope.setActive = function (state) {
+            if ($scope.active != state) {
+                $scope.active = state;
+                if ($scope.tableParams.page() == 1) {
+                    $scope.tableParams.reload();
+                } else {
+                    $scope.tableParams.page(1);
+                }
+            }
+        };
+
+        var getService = function () {
+            if ($scope.keyword) {
+                return PurcInquiryMould;
+            } else {
+                return PurcInquiryMouldSql;
+            }
+        };
+
+        $scope.tableParams = new ngTableParams({
+            page: 1,
+            count: 5
+        }, {
+            total: 0,
+            counts: [5, 10, 25, 50],
+            getData: function ($defer, params) {
+                $scope.loading = true;
+                var pageParams = params.url();
+                var realActive = {};
+                pageParams.searchFilter = {
+                    keyword: $scope.keyword,
+                    fromDate: getDateTime($scope.condition.dateFrom),
+                    endDate: getDateTime($scope.condition.dateTo)
+                };
+                getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
+                    $scope.loading = false;
+                    // 用来验证价格修改
+                    var mould = page.content;
+                    inquiryMould_copy = angular.copy(mould);
+                    if (page) {
+                        params.total(page.totalElement);
+                        $defer.resolve(page.content);
+                        $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的关键词 $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的关键词
+                    }
+                }, function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '数据加载失败', response.data);
+                });
+            }
+        });
+
+        //获得各分类未阅读数量
+        var getUnreadCount = function () {
+            PurcInquiryMould.getUnreadCount(null, function(data){
+                $scope.unread = data;
+            });
+        };
+        getUnreadCount();
+
+        //设置单据已读
+        $scope.setOrdersRead = function (id) {
+            // 如果单据本身已读,则不发送请求修改数据
+            if (!$scope.isUnread(id)){
+                return;
+            }
+            var sourceId = [];
+            sourceId.push(id);
+            PurcInquiryMould.setRead({}, sourceId, function (message) {
+                // $scope.getUnreadIds();
+                getUnreadCount();
+            });
+        };
+
+        $scope.setOrdersReadByState = function () {
+            if (!$scope.unread.replied || $scope.unread.replied == 0) {
+                return;
+            }
+            PurcInquiryMould.setReadByState({}, function () {
+                getUnreadIds();
+                getUnreadCount();
+            });
+        };
+
+        //获取未读单据id
+        var getUnreadIds = function (){
+            PurcInquiryMould.getUnreadIds({}, "", function (message) {
+                $scope.unreadCode = message.content;
+            });
+        };
+        getUnreadIds();
+        //判断单据是否未读
+        $scope.isUnread = function (id){
+            for (var i in $scope.unreadCode) {
+                if (id == $scope.unreadCode[i]) {
+                    return true;
+                }
+            }
+        };
+
+        $scope.getMinDate = function (item) {
+            return $filter('date')(item.inquiryMould.date, 'yyyy-MM-dd');
+        };
+        $scope.replyPrices = [];
+        $scope.replyPrices.push(true);
+
+        // 取消
+        $scope.reload = function () {
+            $scope.tableParams.reload();
+            $scope.canSave = false;
+        }
+
+        // 能否保存设置
+        $scope.canSave = false;
+
+
+        // items价格验证
+        $scope.verifyItems = function (price, reply) {
+            var regex = /^(0|[0-9][0-9]{0,9})(\.[0-9]{1,6})?$/;//  ^[0-9]+(\.[0-9]{1,6})?$
+            if (regex.test(price) && price != 0) {
+                if (price != reply) {
+                    $scope.canSave = true;
+                } else {
+                    $scope.canSave = false;
+                }
+            } else {
+                $scope.canSave = false;
+            }
+        }
+
+
+        // prod下prods价格验证
+        $scope.verifyProds = function (price, reply) {
+            var regex = /^(0|[1-9][0-9]{0,9})(\.[0-9]{1,6})?$/;//
+            if (regex.test(price) && price != 0) {
+                if (price != reply) {
+                    $scope.canSave = true;
+                } else {
+                    $scope.canSave = false;
+                }
+            } else {
+                $scope.canSave = false;
+            }
+        }
+
+        //有价格为0或者不符合正则式,则不能报价
+        $scope.notZero = function (mould) {
+            var regex = /^(0|[1-9][0-9]{0,9})(\.[0-9]{1,6})?$/;
+            angular.forEach(mould.inquiryMouldItems, function (item) {
+                if (item.price == 0 || !regex.test(item.price)) {
+                    $scope.canSave = false;
+                }
+                angular.forEach(item.inquiryMouldDetails, function (detail) {
+                    if (detail.price == 0 || !regex.test(detail.price)) {
+                        $scope.canSave = false;
+                    }
+                })
+
+            });
+        }
+
+        $scope.blurPrice = function (price) {
+            var regex = /^(0|[1-9][0-9]{0,9})(\.[0-9]{1,6})?$/;
+            if (!regex.test(price)) {
+                toaster.pop('warning', '格式错误', '请输入有效价格');
+            }
+        }
+
+        // 获取历史报价
+        $scope.getHistory = function (mould) {
+            if (!mould.history) {
+                PurcInquiryMould.getHistory({id: mould.id},{}, function (data) {
+                    $scope.historyShow = true;
+                    mould.history = data;
+                },function (response) {
+                    $scope.historyShow = false;
+                });
+            }
+        };
+
+        var uploadAttach = function (mould, file) {
+//			var file = mould.attachFile.$viewValue, file = file && file.length > 0 ? file[0] : null;
+            $scope.mould = mould;
+            $upload.upload({
+                url: 'sale/mould/' + mould.id + '/send',
+                method: 'POST',
+                file: file,
+                data: {
+                    json: $scope.mould
+                }
+            }).success(function (res) {
+                $scope.mould.sellAttachs.push(res);
+            }).error(function (res) {
+            });
+        }
+
+        $scope.pushFile = function(mould, file) {
+            // var file = $scope.myFiles;
+            if (file.length > 0) {
+                for (var i = 0; i < file.length; i++) {
+                    console.log(file[i].name);
+                    var flag = true;
+
+                    if (mould.sellAttachs.length > 0) {
+                        for (var j = 0; j < mould.sellAttachs.length; j++) {
+                            if (mould.sellAttachs[j].name == file[i].name
+                                && mould.sellAttachs[j].size == file[i].size) {
+                                flag = false;
+                                break;
+                            }
+                        }
+                    }
+                    if (flag) {
+                        uploadAttach(mould, file[i]);
+                        $scope.canSave = true;
+                    }
+                }
+            }
+            document.getElementById("inquiryMould.sellAttachs").value = "";
+        };
+
+        $scope.removeFile = function(mould, file) {
+            $scope.inquiryMould = mould;
+            if ($scope.inquiryMould.sellAttachs != null && $scope.inquiryMould.sellAttachs.length > 0) {
+                for (var i = 0; i < $scope.inquiryMould.sellAttachs.length; i++) {
+                    if ($scope.inquiryMould.sellAttachs[i].name == file.name
+                        && $scope.inquiryMould.sellAttachs[i].size == file.size) {
+                        $scope.inquiryMould.sellAttachs.splice(i, 1);
+                    }
+                }
+            }
+        };
+
+        // 保存并确认报价
+        $scope.onReplyClick = function (mould, withSteps) {
+            $scope.loading = true;
+
+            if (withSteps) {
+                PurcInquiryMould.reply({id: mould.id}, mould, function () {
+                    $scope.loading = false;
+                    toaster.pop('info', '提示', '报价成功');
+                    $scope.tableParams.reload();
+                    $scope.canSave = false;
+                }, function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '报价失败', response.data);
+                });
+                PurcInquiryMould.saveHistory({id: mould.id}, mould, function () {
+
+                }, function (response) {
+
+                });
+            } else {
+                PurcInquiryMould.saveItem({id: mould.id}, mould, function () {
+                    $scope.loading = false;
+                    toaster.pop('info', '提示', '保存成功');
+                    $scope.tableParams.reload();
+                }, function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '保存失败', response.data);
+                });
+            }
+        };
+
+        // 搜索框回车
+        $scope.onSearch = function () {
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
+        };
+
+        $scope.openDatePicker = function ($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
+        };
+
+        $scope.openFilterDatePicker = function ($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
+            if ($scope.condition.dateFrom && $scope.condition.dateTo && !item[openParam]) {
+                $scope.tableParams.reload();
+            }
+        };
+
+        $scope.parseDate = function (dateStr) {
+            if (dateStr)
+                return Date.parse(dateStr, 'yyyy-MM-dd');
+            return new Date();
+        };
+
+        // 导出客户资料列表
+        $scope.exportXls = function () {
+            PurcInquiryMould.exportXls({}, {}, function (data) {
+                if (data.success){
+                    window.location.href = 'sale/mould/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                }
+            }, function (response) {
+                toaster.pop('error', '数据加载失败', response.data);
+            });
+        }
+    }]);
+});

+ 237 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/saleQuotationListCtrl.js

@@ -0,0 +1,237 @@
+/**
+ * B2B主动报价-列表
+ *
+ * @author hejq
+ * @date 2018-08-29 15:41
+ */
+define(['app/app'], function (app) {
+    "use strict";
+
+    /**
+     * 主动报价-列表
+     */
+    app.register.controller('saleQuotationListCtrl', ['$scope', '$filter', 'B2bQuotation', 'B2bPurcInquiry', 'ngTableParams', 'toaster', 'BaseService', '$rootScope', 'B2bQuotationInfo', 'B2bCurrentRole', function ($scope, $filter, Quotation, PurcInquiry, ngTableParams, toaster, BaseService, $rootScope, QuotationInfo, CurrentRole) {
+        BaseService.scrollBackToTop();
+
+        // 获取当前用户是否为普通用户
+        CurrentRole.isUser({}, {}, function (data) {
+            $scope.isUser = data.isUser;
+        });
+        $scope.storeType = 'quotation';
+        $rootScope.enteryStatus = false;
+        $scope.active = 'todo';
+        $scope.agreedText = '全部';
+        $scope.dateZoneText = '一个月内';
+        $scope.condition = {dateZone: 1};
+
+        /**
+         * 将日期转化为整数日期
+         */
+        var getDateTime = function (date) {
+            if (angular.isDate(date)) {
+                return date.getTime();
+            } else {
+                return null;
+            }
+        };
+
+        /**
+         * 页面状态按钮过滤
+         */
+        var getState = function (active) {
+            var fn = 'get';
+            switch (active) {
+                case 'done':
+                    fn = 'getDone';
+                    break;
+                case 'todo':
+                    fn = 'getTodo';
+                    break;
+                case 'end':
+                    fn = 'getEnd';
+                    break;
+                case 'waiting':
+                    fn = 'getWaiting';
+                    break;
+                case 'received':
+                    fn = 'getReceived';
+                    break;
+                case 'invalid':
+                    fn = 'getInvalid';
+                    break;
+                // 已采纳
+                case 'agreed':
+                    fn = 'getAgreed';
+                    break;
+                // 未采纳
+                case 'refused':
+                    fn = 'getRefused';
+                    break;
+                // 个人
+                case 'personal':
+                    fn = 'getPersonal';
+                    break;
+                // 集体
+                case 'teams':
+                    fn = 'getTeams';
+                    break;
+                // 非标准
+                case 'nonstandard':
+                    fn = 'getNonstandard';
+                    break;
+                // 标准
+                case 'standard':
+                    fn = 'getStandard';
+                    break;
+                // 变更单无需确认
+                case 'unread':
+                    fn = 'getUnread';
+                    break;
+            }
+            return fn;
+        };
+
+        var getDateCondition = function (zone, condition) {
+            var fromDate = new Date();
+            var toDate = new Date();
+            //去除时分秒限制,dateFrom设置成0时0分0秒,dateTo设置成23时59分59秒
+            fromDate.setHours(0, 0, 0, 0);
+            toDate.setHours(23, 59, 59, 999);
+            if (zone == -1) { // 自定义时间,什么都不做
+
+            } else if (zone == 1) {
+                fromDate.setMonth(fromDate.getMonth() - 1);
+                condition.dateFrom = fromDate;
+                condition.dateTo = toDate;
+            } else if (zone == 3) {
+                fromDate.setMonth(fromDate.getMonth() - 3);
+                condition.dateFrom = fromDate;
+                condition.dateTo = toDate;
+            } else if (zone == 6) {
+                fromDate.setMonth(fromDate.getMonth() - 6);
+                condition.dateFrom = fromDate;
+                condition.dateTo = toDate;
+            } else {
+                condition.dateFrom = null;
+                condition.dateTo = null;
+            }
+        };
+
+        /* 时间筛选初始化*/
+        var fromDate = new Date();
+        var toDate = new Date();
+        fromDate.setMonth(fromDate.getMonth() - 1);
+        fromDate.setHours(0, 0, 0, 0);
+        toDate.setHours(23, 59, 59, 999);
+        $scope.condition.dateFrom = fromDate;
+        $scope.condition.dateTo = toDate;
+
+        $scope.changeDateZone = function (zone) {
+            $scope.condition.dateZone = zone;
+            $scope.dateZoneText = zone == 1 ? '最近一个月' : (zone == 3 ? '最近三个月' : (zone == 6 ? '最近六个月' : '自定义'));
+            $scope.condition.$dateZoneOpen = false;
+            getDateCondition(zone, $scope.condition);
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
+        };
+        $scope.setActive = function (state) {
+            if ($scope.active != state) {
+                $scope.active = state;
+                if ($scope.tableParams.page() == 1)
+                    $scope.tableParams.reload();
+                else
+                    $scope.tableParams.page(1);
+            }
+        };
+
+        $scope.searchMethod = false;
+        var getService = function () {
+            return $scope.searchMethod ? Quotation : QuotationInfo;
+        };
+        $scope.tableParams = new ngTableParams({
+            page: 1,
+            count: 20,
+            sorting: {
+                'date': 'desc'
+            }
+        }, {
+            total: 0,
+            counts: [5, 10, 25, 50],
+            getData: function ($defer, params) {
+                $scope.loading = true;
+                var pageParams = params.url();
+                pageParams.searchFilter = {
+                    keyword: $scope.keyword,
+                    fromDate: getDateTime($scope.condition.dateFrom),
+                    endDate: getDateTime($scope.condition.dateTo)
+                };
+                getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
+                    $scope.loading = false;
+                    if (page) {
+                        params.total(page.totalElement);
+                        $defer.resolve(page.content);
+                        $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的关键词
+                    }
+                }, function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '数据加载失败', response.data);
+                });
+            }
+        });
+
+        $scope.openDatePicker = function ($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
+        };
+
+        $scope.openFilterDatePicker = function ($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
+            if ($scope.condition.dateFrom && $scope.condition.dateTo && !item[openParam]) {
+                $scope.tableParams.reload();
+            }
+        };
+
+        $scope.getHistory = function (item) {
+            if (!item.history) {
+                PurcInquiry.getHistory({itemId: item.id}, function (data) {
+                    item.history = data;
+                });
+            }
+        };
+
+        $scope.isValid = function (item, withSteps) {
+            var bool = item.leadtime && item.replies && item.replies[0].price > 0;
+            if (!withSteps || !bool)
+                return bool;
+            angular.forEach(item.replies, function (r, i) {
+                bool = (i > 0 ? r.lapQty : 1) && r.price;
+            });
+            return bool;
+        };
+
+        // 搜索框回车
+        $scope.onSearch = function (keyword) {
+            // 每次搜索重置获取数据方法
+            $scope.searchMethod = false;
+            if(keyword != null && keyword != '') {
+                $scope.searchMethod = true;
+            }
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
+        };
+
+        // 导出
+        $scope.exportXls = function () {
+            Quotation.exportXls({}, {}, function (data) {
+                if (data.success){
+                    window.location.href = 'sale/quotation/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                }
+            }, function (response) {
+                toaster.pop('error', '数据加载失败', response.data);
+            });
+        }
+    }]);
+});

+ 307 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/saleTenderCtrl.js

@@ -0,0 +1,307 @@
+/**
+ * B2B客户招标
+ *
+ * @author hejq
+ * @date 2018-08-29 15:41
+ */
+define(['app/app'], function (app) {
+    "use strict";
+
+    /**
+     * 客户招标-列表
+     */
+    app.register.controller('saleTenderCtrl', ['$scope', '$filter', 'B2bPurcTender', 'ngTableParams', 'toaster', 'BaseService', '$stateParams', '$modal', '$rootScope', 'B2bAccountEnterprise', 'B2bPurcTenderInfo',
+        function ($scope, $filter, PurcTender, ngTableParams, toaster, BaseService, $stateParams, $modal, $rootScope, AccountEnterprise, PurcTenderInfo) {
+            BaseService.scrollBackToTop();
+            if ($rootScope.active) {
+                $scope.active = $rootScope.active;
+                $rootScope.active = null;
+            } else {
+                $scope.active = 'todo';
+            }
+            $scope.searchStatus = false;
+
+            $scope.storeType = 'tender';
+            /**
+             * 将日期转化为整数日期
+             */
+            var getDateTime = function (date) {
+                if (angular.isDate(date)) {
+                    return date.getTime();
+                } else {
+                    return null;
+                }
+            };
+
+            /**
+             * 页面状态按钮过滤
+             */
+            var getState = function (active) {
+                var fn = 'get';
+                switch (active) {
+                    case 'done':
+                        fn = 'getDone';
+                        break;
+                    case 'todo':
+                        fn = 'getTodo';
+                        break;
+                    case 'end':
+                        fn = 'getEnd';
+                        break;
+                    case 'waiting':
+                        fn = 'getWaiting';
+                        break;
+                    case 'received':
+                        fn = 'getReceived';
+                        break;
+                    case 'invalid':
+                        fn = 'getInvalid';
+                        break;
+                    // 已采纳
+                    case 'agreed':
+                        fn = 'getAgreed';
+                        break;
+                    // 未采纳
+                    case 'refused':
+                        fn = 'getRefused';
+                        break;
+                    // 个人
+                    case 'personal':
+                        fn = 'getPersonal';
+                        break;
+                    // 集体
+                    case 'teams':
+                        fn = 'getTeams';
+                        break;
+                    // 非标准
+                    case 'nonstandard':
+                        fn = 'getNonstandard';
+                        break;
+                    // 标准
+                    case 'standard':
+                        fn = 'getStandard';
+                        break;
+                    // 变更单无需确认
+                    case 'unread':
+                        fn = 'getUnread';
+                        break;
+                }
+                return fn;
+            };
+
+            var getDateCondition = function (zone, condition) {
+                var fromDate = new Date();
+                var toDate = new Date();
+                //去除时分秒限制,dateFrom设置成0时0分0秒,dateTo设置成23时59分59秒
+                fromDate.setHours(0, 0, 0, 0);
+                toDate.setHours(23, 59, 59, 999);
+                if (zone == -1) { // 自定义时间,什么都不做
+
+                } else if (zone == 1) {
+                    fromDate.setMonth(fromDate.getMonth() - 1);
+                    condition.dateFrom = fromDate;
+                    condition.dateTo = toDate;
+                } else if (zone == 3) {
+                    fromDate.setMonth(fromDate.getMonth() - 3);
+                    condition.dateFrom = fromDate;
+                    condition.dateTo = toDate;
+                } else if (zone == 6) {
+                    fromDate.setMonth(fromDate.getMonth() - 6);
+                    condition.dateFrom = fromDate;
+                    condition.dateTo = toDate;
+                } else {
+                    condition.dateFrom = null;
+                    condition.dateTo = null;
+                }
+            };
+
+
+            /**
+             * 改变类型
+             */
+            var getTypeCondition = function (zone, condition) {
+                if (zone == -1) {
+                    condition.ifOpen = null;
+                } else if (zone == 1) {
+                    condition.ifOpen = 1;
+                } else {
+                    condition.ifOpen = 0;
+                }
+            };
+
+            $scope.dateZoneText = '不限';
+            $scope.typeText = '全部';
+            $scope.deliveryZoneText = '不限';
+            $scope.condition = {dateZone: 1, deliveryZone: -1, type: -1};
+
+            /* 时间筛选初始化*/
+            var fromDate = new Date();
+            var toDate = new Date();
+            fromDate.setMonth(fromDate.getMonth() - 1);
+            fromDate.setHours(0, 0, 0, 0);
+            toDate.setHours(23, 59, 59, 999);
+            $scope.condition.dateFrom = fromDate;
+            $scope.condition.dateTo = toDate;
+
+            $scope.changeDateZone = function (zone) {
+                $scope.condition.dateZone = zone;
+                $scope.dateZoneText = zone == 1 ? '最近一个月' : (zone == 3 ? '最近三个月' : (zone == 6 ? '最近六个月' : '自定义'));
+                $scope.condition.$dateZoneOpen = false;
+                getDateCondition(zone, $scope.condition);
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+            };
+            $scope.changeDeliveryZone = function (zone) {
+                $scope.condition.deliveryZoneText = zone;
+                $scope.deliveryZoneText = typeof zone == 'undefined' ? '不限' : (zone == -1 ? '不限' : (zone == 1 ? '一个月内' : '两个月内'));
+                $scope.condition.$delievryZoneOpen = false;
+                getDelveryCondition(zone, $scope.condition);
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+            };
+
+            $scope.changeType = function (type) {
+                $scope.condition.type = type;
+                $scope.typeText = typeof type == 'undefined' ? '全部' : (type == -1 ? '全部' : (type == 1 ? '公开' : '指定'));
+                getTypeCondition(type, $scope.condition);
+                $scope.tableParams.reload();
+            };
+
+            $scope.setActive = function (state) {
+                if ($scope.active != state) {
+                    $scope.active = state;
+                    if ($scope.tableParams.page() == 1)
+                        $scope.tableParams.reload();
+                    else
+                        $scope.tableParams.page(1);
+                }
+            };
+
+            var getService = function () {
+                if ($scope.searchStatus) {
+                    return PurcTender;
+                }
+                return PurcTenderInfo;
+            };
+
+            $scope.tableParams = new ngTableParams({
+                page: 1,
+                count: 20,
+                sorting: {
+                    'id': 'desc'
+                }
+            }, {
+                total: 0,
+                counts: [5, 10, 25, 50],
+                getData: function ($defer, params) {
+                    $scope.loading = true;
+                    var pageParams = params.url();
+                    var realActive = {};
+                    pageParams.searchFilter = { // 筛选条件
+                        keyword: $scope.keyword,
+                        pt_ifopen: $scope.condition.ifOpen,
+                        fromDate: getDateTime($scope.condition.dateFrom),
+                        endDate: getDateTime($scope.condition.dateTo)
+                    };
+                    AccountEnterprise.get({}, function (data) {
+                        $scope.currentEn = data;
+                    });
+                    getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
+                        $scope.loading = false;
+                        if (page) {
+                            params.total(page.totalElement);
+                            $defer.resolve(page.content);
+                            // $scope.keywordXls = angular.copy($scope.keyword); // 保存当前取值的关键词  做导出时需要的字段
+                            angular.forEach(page.content, function (purcTender) {
+                                purcTender.vendorHasBid = false;
+                                angular.forEach(purcTender.purchaseTenderProds, function (tenderProd) {
+                                    angular.forEach(tenderProd.saleTenderItems, function (saleTenderItem) {
+                                        if ($scope.currentEn.uu === saleTenderItem.saleTender.vendUU) {
+                                            tenderProd.currentItem = saleTenderItem;
+                                            if (saleTenderItem.price && saleTenderItem.saleTender.auditStatus != 0) { //TODO 如果存在当前企业的投标明细已投标且不在已提交状态,即判断为已投标
+                                                purcTender.vendorHasBid = true;
+                                            }
+                                        }
+                                    });
+                                });
+                            });
+                        }
+                    }, function (response) {
+                        $scope.loading = false;
+                        toaster.pop('error', '数据加载失败', response.data);
+                    });
+                }
+            });
+
+            //获得各分类未阅读数量
+            var getUnreadCount = function () {
+                PurcTender.getUnreadCount(null, function (data) {
+                    $scope.unread = data;
+                });
+            };
+            getUnreadCount();
+
+            //设置单据已读
+            $scope.setOrdersRead = function (id) {
+                // 如果单据本身已读,则不发送请求修改数据
+                if (!$scope.isUnread(id)){
+                    return;
+                }
+                var sourceId = [];
+                sourceId.push(id);
+                PurcTender.setRead({}, sourceId, function (message) {
+                    // $scope.getUnreadIds();
+                    getUnreadCount();
+                });
+            };
+
+            var getUnreadIds = function () {
+                PurcTender.getUnreadIds({}, "", function (message) {
+                    $scope.unreadCode = message.content;
+                });
+            };
+            getUnreadIds();
+            $scope.isUnread = function (id) {
+                for (var i in $scope.unreadCode) {
+                    if (id == $scope.unreadCode[i]) {
+                        return true;
+                    }
+                }
+            };
+
+            $scope.openDatePicker = function ($event, item, openParam) {
+                $event.preventDefault();
+                $event.stopPropagation();
+                item[openParam] = !item[openParam];
+            };
+
+            $scope.openFilterDatePicker = function ($event, item, openParam) {
+                $event.preventDefault();
+                $event.stopPropagation();
+                item[openParam] = !item[openParam];
+                if ($scope.condition.dateFrom && $scope.condition.dateTo && !item[openParam]) {
+                    $scope.tableParams.reload();
+                }
+            };
+
+            $scope.parseDate = function (dateStr) {
+                if (dateStr)
+                    return Date.parse(dateStr, 'yyyy-MM-dd');
+                return new Date();
+            };
+
+            // 选择查找日期
+            $scope.onDateCondition = function () {
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+            };
+
+            // 搜索框回车
+            $scope.onSearch = function () {
+                $scope.searchStatus = true;
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+            };
+
+        }]);
+});

+ 30 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/saleTenderQuestionDetailCtrl.js

@@ -0,0 +1,30 @@
+/**
+ * B2B 投标单提问单详情
+ *
+ * @author hejq
+ * @date 2018-08-29 15:41
+ */
+define(['app/app'], function (app) {
+    "use strict";
+
+    /**
+     *  投标单提问单详情
+     */
+    app.register.controller('saleTenderQuestionDetailCtrl', ['$scope', 'toaster', 'BaseService', 'B2bSaleTenderQuestion', '$stateParams'
+        , function($scope, toaster, BaseService, SaleTenderQuestion, $stateParams){
+            BaseService.scrollBackToTop();
+
+            $scope.loading = true;
+            var loadData = function () {
+                SaleTenderQuestion.getDetail({id: $stateParams.id}, function(data){
+                    $scope.loading = false;
+                    $scope.question = data;
+                } , function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '数据加载失败');
+                });
+            };
+            loadData();
+
+        }]);
+});

+ 262 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/saleTenderQuestionListCtrl.js

@@ -0,0 +1,262 @@
+/**
+ * B2B招标提问列表
+ *
+ * @author hejq
+ * @date 2018-08-29 15:41
+ */
+define(['app/app'], function (app) {
+    "use strict";
+
+    /**
+     * 招标提问列表
+     */
+    app.register.controller('saleTenderQuestionListCtrl', ['$scope', '$filter', 'B2bSaleTenderQuestion', 'ngTableParams', 'toaster', 'BaseService', '$stateParams', '$modal', '$rootScope', 'B2bAccountEnterprise',
+        function ($scope, $filter, SaleTenderQuestion, ngTableParams, toaster, BaseService, $stateParams, $modal, $rootScope, AccountEnterprise) {
+            BaseService.scrollBackToTop();
+            if ($rootScope.active) {
+                $scope.active = $rootScope.active;
+                $rootScope.active = null;
+            } else {
+                $scope.active = 'todo';
+            }
+            $scope.searchStatus = false;
+
+            /**
+             * 将日期转化为整数日期
+             */
+            var getDateTime = function (date) {
+                if (angular.isDate(date)) {
+                    return date.getTime();
+                } else {
+                    return null;
+                }
+            };
+
+            /**
+             * 页面状态按钮过滤
+             */
+            var getState = function (active) {
+                var fn = 'get';
+                switch (active) {
+                    case 'done':
+                        fn = 'getDone';
+                        break;
+                    case 'todo':
+                        fn = 'getTodo';
+                        break;
+                    case 'end':
+                        fn = 'getEnd';
+                        break;
+                    case 'waiting':
+                        fn = 'getWaiting';
+                        break;
+                    case 'received':
+                        fn = 'getReceived';
+                        break;
+                    case 'invalid':
+                        fn = 'getInvalid';
+                        break;
+                    // 已采纳
+                    case 'agreed':
+                        fn = 'getAgreed';
+                        break;
+                    // 未采纳
+                    case 'refused':
+                        fn = 'getRefused';
+                        break;
+                    // 个人
+                    case 'personal':
+                        fn = 'getPersonal';
+                        break;
+                    // 集体
+                    case 'teams':
+                        fn = 'getTeams';
+                        break;
+                    // 非标准
+                    case 'nonstandard':
+                        fn = 'getNonstandard';
+                        break;
+                    // 标准
+                    case 'standard':
+                        fn = 'getStandard';
+                        break;
+                    // 变更单无需确认
+                    case 'unread':
+                        fn = 'getUnread';
+                        break;
+                }
+                return fn;
+            };
+
+            var getDateCondition = function (zone, condition) {
+                var fromDate = new Date();
+                var toDate = new Date();
+                //去除时分秒限制,dateFrom设置成0时0分0秒,dateTo设置成23时59分59秒
+                fromDate.setHours(0, 0, 0, 0);
+                toDate.setHours(23, 59, 59, 999);
+                if (zone == -1) { // 自定义时间,什么都不做
+
+                } else if (zone == 1) {
+                    fromDate.setMonth(fromDate.getMonth() - 1);
+                    condition.dateFrom = fromDate;
+                    condition.dateTo = toDate;
+                } else if (zone == 3) {
+                    fromDate.setMonth(fromDate.getMonth() - 3);
+                    condition.dateFrom = fromDate;
+                    condition.dateTo = toDate;
+                } else if (zone == 6) {
+                    fromDate.setMonth(fromDate.getMonth() - 6);
+                    condition.dateFrom = fromDate;
+                    condition.dateTo = toDate;
+                } else {
+                    condition.dateFrom = null;
+                    condition.dateTo = null;
+                }
+            };
+
+            /**
+             * 改变类型
+             */
+            var getTypeCondition = function (zone, condition) {
+                if (zone == -1) {
+                    condition.ifOpen = null;
+                } else if (zone == 1) {
+                    condition.ifOpen = 1;
+                } else {
+                    condition.ifOpen = 0;
+                }
+            };
+
+            $scope.dateZoneText = '不限';
+            $scope.typeText = '全部';
+            $scope.deliveryZoneText = '不限';
+            $scope.condition = {dateZone: 1, deliveryZone: -1, type: -1};
+
+            /* 时间筛选初始化*/
+            var fromDate = new Date();
+            var toDate = new Date();
+            fromDate.setMonth(fromDate.getMonth() - 1);
+            fromDate.setHours(0, 0, 0, 0);
+            toDate.setHours(23, 59, 59, 999);
+            $scope.condition.dateFrom = fromDate;
+            $scope.condition.dateTo = toDate;
+
+            $scope.changeDateZone = function (zone) {
+                $scope.condition.dateZone = zone;
+                $scope.dateZoneText = zone == 1 ? '最近一个月' : (zone == 3 ? '最近三个月' : (zone == 6 ? '最近六个月' : '自定义'));
+                $scope.condition.$dateZoneOpen = false;
+                getDateCondition(zone, $scope.condition);
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+            };
+            $scope.changeDeliveryZone = function (zone) {
+                $scope.condition.deliveryZoneText = zone;
+                $scope.deliveryZoneText = typeof zone == 'undefined' ? '不限' : (zone == -1 ? '不限' : (zone == 1 ? '一个月内' : '两个月内'));
+                $scope.condition.$delievryZoneOpen = false;
+                getDelveryCondition(zone, $scope.condition);
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+            };
+
+            $scope.changeType = function (type) {
+                $scope.condition.type = type;
+                $scope.typeText = typeof type == 'undefined' ? '全部' : (type == -1 ? '全部' : (type == 1 ? '公开' : '指定'));
+                getTypeCondition(type, $scope.condition);
+                $scope.tableParams.reload();
+            };
+
+            $scope.setActive = function (state) {
+                if ($scope.active != state) {
+                    $scope.active = state;
+                    if ($scope.tableParams.page() == 1)
+                        $scope.tableParams.reload();
+                    else
+                        $scope.tableParams.page(1);
+                }
+            };
+
+            //TODO 增加直接从数据库取方法之后修改
+            var getService = function () {
+                if ($scope.searchStatus) {
+                    return SaleTenderQuestion;
+                }
+                return SaleTenderQuestion;
+            };
+
+            $scope.tableParams = new ngTableParams({
+                page: 1,
+                count: 20,
+                sorting: {
+                    'id': 'desc'
+                }
+            }, {
+                total: 0,
+                counts: [5, 10, 25, 50],
+                getData: function ($defer, params) {
+                    $scope.loading = true;
+                    var pageParams = params.url();
+                    var realActive = {};
+                    pageParams.searchFilter = { // 筛选条件
+                        keyword: $scope.keyword,
+                        fromDate: getDateTime($scope.condition.dateFrom),
+                        endDate: getDateTime($scope.condition.dateTo)
+                    };
+                    AccountEnterprise.get({}, function (data) {
+                        $scope.currentEn = data;
+                    });
+                    getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
+                        $scope.loading = false;
+                        params.total(page.totalElement);
+                        $defer.resolve(page.content);
+                        // $scope.keywordXls = angular.copy($scope.keyword); // 保存当前取值的关键词  做导出时需要的字段
+                    }, function (response) {
+                        $scope.loading = false;
+                        toaster.pop('error', '数据加载失败', response.data);
+                    });
+                }
+            });
+
+            //TODO 获得各分类未阅读数量
+
+            //TODO 设置单据已读
+
+            $scope.openDatePicker = function ($event, item, openParam) {
+                $event.preventDefault();
+                $event.stopPropagation();
+                item[openParam] = !item[openParam];
+            };
+
+            $scope.openFilterDatePicker = function ($event, item, openParam) {
+                $event.preventDefault();
+                $event.stopPropagation();
+                item[openParam] = !item[openParam];
+                if ($scope.condition.dateFrom && $scope.condition.dateTo && !item[openParam]) {
+                    $scope.tableParams.reload();
+                }
+            };
+
+            $scope.parseDate = function (dateStr) {
+                if (dateStr)
+                    return Date.parse(dateStr, 'yyyy-MM-dd');
+                return new Date();
+            };
+
+            // 选择查找日期
+            $scope.onDateCondition = function () {
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+            };
+
+            // 搜索框回车
+            $scope.onSearch = function (keyword) {
+                // 每次搜索重置获取数据方法
+                $scope.searchMethod = false;
+                if(keyword != null && keyword != '') {
+                    $scope.searchMethod = true;
+                }
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+            };
+
+        }]);
+});

+ 1 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/purchasAttendtion_ctrl.js

@@ -5,6 +5,7 @@ define(['app/app'], function (app) {
         function ($scope, $location, $rootScope, $stateParams, $state, toaster,
            $modal, $http, Attendtion, ngTableParams, BaseService, toaster) {
           document.title = '商机关注-优软商城';
+          $scope.storeType = 'attend';
           $rootScope.active = 'vendor_seek_purchase';
           $scope.keyWord = ''
           $scope.isSearch = false

+ 511 - 0
src/main/webapp/resources/view/vendor/b2b/change/sale_inquiry_details.html

@@ -0,0 +1,511 @@
+<style>
+  #order-detail-list .table-default tbody tr td{
+    vertical-align: top;
+  }
+  .pub-com_head span.fr {
+    margin-right: 20px;
+    color: #fff;
+    float: right;
+  }
+  .pub-com_head span.fr em {
+    margin-right: 50px;
+    font-size: 14px;
+    font-style: inherit;
+    color:#fff;
+  }
+  #order-detail-list {
+    font-size: 14px;
+    width: 1026px;
+  }
+  .pub-com_head, .com_head {
+    width: 100%;
+    height: 35px;
+    line-height: 35px;
+    background: #5078cb;
+    border-radius: 5px 5px 0 0;
+    /* background: url(../img/approvalFlow/comm_bg01.png) no-repeat left; */
+    /* background-color: #f5f5f5; */
+    /* background-size: 100% 100%; */
+  }
+  .pub-com_head span, .com_head span {
+    margin-left: 10px;
+    color: #fff;
+    font-size: 14px;
+    font-weight: bold;
+  }
+  .pub-com_head .p-right {
+    float: right;
+  }
+  .pane .pane-body {
+    /*padding: 15px!important;*/
+  }
+  com_title01, .title-div {
+    /*border-bottom: 1px dashed #3f84f6 !important;*/
+  }
+  .title-div {
+    padding-left: 20px;
+    color: #5078cb;
+    font-size: 14px;
+    font-weight: 600;
+    /*padding-left: 20px !important;*/
+    height: 50px;
+    padding-top: 11px;
+    position: relative;
+  }
+  .f14 {
+    font-size: 14px !important;
+  }
+  #order-detail-list .row {
+    width: 96%;
+    margin: 0 auto;
+    line-height: 30px;
+  }
+  .base-info .item {
+    line-height: 26px;
+    /* border-bottom: 1px dotted #e8e8e8; */
+    padding: 5px 0;
+  }
+  #order-detail-list .title {
+    font-weight: inherit;
+  }
+  .base-info .title {
+    float: left;
+    width: 92px;
+    color: #333;
+    font-weight: bold;
+  }
+  #order-detail-list .content {
+    color: #666;
+  }
+  .base-info .content {
+    float: left;
+    white-space: nowrap;
+  }
+  .title-div .end {
+    position: absolute;
+    top: 10px;
+    right: 0;
+    line-height: 24px;
+    padding-left: 15px;
+    background: #fff;
+    z-index: 2;
+  }
+  .block {
+    background-color: #fff;
+    border-radius: 5px;
+    width: 100%;
+    position: relative;
+    margin-bottom: 0px;
+  }
+  #order-detail-list .table-default .header {
+    box-shadow: none;
+    border: none;
+    background: none;
+    background: #f9f9f9;
+  }
+  #order-detail-list .table-default .header th {
+    border-bottom: none;
+    font-weight: normal;
+    color: #999;
+    padding: 8px 0;
+    text-align: center;
+  }
+  #order-detail-list .table-default th, #order-detail-list .table-default td {
+    /*border-top: #ddd 1px dotted;*/
+  }
+  #order-detail-list .table-default tbody tr {
+    background: none;
+    position: relative;
+  }
+  #order-detail-list table.table-default.pms tbody tr td {
+    vertical-align: middle;
+    color: #323232;
+    min-height: 140px;
+    position: relative;
+    padding: 15px 0;
+    font-size: 14px;
+  }
+  [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {
+    display: none !important;
+  }
+  .text-bold {
+    font-weight: 700;
+  }
+
+  .text-num {
+    font-style: normal;
+    word-break: break-all;
+    font-size: 14px;
+  }
+  .text-muted {
+    color: #333;
+    font-size: 14px;
+  }
+  .bottomB {
+    border-bottom: 2px solid #f5f5f5;
+    padding: 15px 30px 15px 15px;
+  }
+
+  .title-div .f14{
+    border-left: 5px solid #5078cb;padding-left: 10px;
+  }
+
+  .order-number {
+    position: absolute;
+    top: -1px;
+    left: -1px;
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    text-align: center;
+    background: #f9f9f9;
+    font-weight: 500;
+    border: solid 1px #d5d5d5;
+    border-radius: 0 0 10px 0;
+  }
+  #order-detail-list .table-default.pms tbody tr td.product {
+    padding-left: 30px;
+  }
+  #order-detail-list .table-default tbody tr td{
+    border-right: 1px solid #e8e8e8;
+  }
+  .text-trans {
+    top: -4px;
+    right: 20px;
+  }
+  .f14{
+    font-size: 14px;
+  }
+  .base-info{
+    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    -o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    border-radius: 5px;
+    /* min-height: 1066px; */
+    background: #fff;
+    width: 1026px;
+  }
+</style>
+<div class="pane base-info fr" id="order-detail-list">
+  <div class="pub-com_head">
+    <span>客户询价单</span>
+    <span class="fr"><em>制单人:{{inquiry.recorder}}</em><time>制单日期:{{inquiry.date | date:'yyyy-MM-dd'}}</time></span>
+  </div>
+  <div class="pane-body">
+    <div class="title-div">
+      <span class="f14">单据信息</span>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-3">
+        <span class="title">流水号:</span>
+        <div class="content" ng-bind="::inquiry.code"></div>
+      </div>
+      <div class="col-xs-6">
+        <span class="title">客户:</span>
+        <div class="content" ng-bind="::inquiry.enterprise.enName"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">截止报价:</span>
+        <div class="content" ng-bind="::inquiry.endDate | date:'yyyy-MM-dd'"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-12">
+        <div class="title">收货地址:</div>
+        <div class="unchanged-info">{{inquiry.ship}}</div>
+      </div>
+    </div>
+    <!--<div class="row row-sm item">
+        <div class="col-xs-3">
+            <span class="title">审核人:</span>
+            <div class="content" ng-bind="::inquiry.auditor"></div>
+        </div>
+        <div class="col-xs-3">
+            <span class="title">环保要求:</span>
+            <div class="content" ng-bind="::inquiry.environment"></div>
+        </div>
+        <div class="col-xs-6">
+            <span class="title">价格种类:</span>
+            <div class="content" ng-bind="::inquiry.priceType"></div>
+        </div>
+    </div>-->
+    <div class="row row-sm item">
+      <div class="col-xs-6">
+        <div class="title">发票类型:</div>
+        <div class="unchanged-info" ng-if="inquiry.invoice == 2">增值税专用发票</div>
+        <div class="unchanged-info" ng-if="inquiry.invoice == 1">增值税普通发票</div>
+        <div class="unchanged-info" ng-if="inquiry.invoice == 0">不需要发票</div>
+      </div>
+      <div class="col-xs-6">
+        <span class="title">询价类型:</span>
+        <div class="content" ng-bind="::inquiry.inquirytype"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-6">
+        <span class="title">备注:</span>
+        <div class="content" ng-bind="::inquiry.remark"></div>
+      </div>
+    </div>
+    <div class="headerline" ng-if="inquiry.attachs.length">
+      <span class="content">附件</span>
+    </div>
+    <div class="row row-sm attach" ng-if="inquiry.attachs.length">
+      <div class="col-xs-3 item" ng-repeat="file in inquiry.attachs">
+        <div class="bg">
+          <div class="global_icon larger icon_undefined_l"
+               ng-class="{'icon_pdf_l': file.type == 'pdf','icon_xls_l': file.type == 'xls' || file.type == 'xlsx' || file.type == 'et', 'icon_doc_l': file.type == 'doc' || file.type == 'docx', 'icon_txt_l': file.type == 'txt', 'icon_zip_l': file.type == 'zip' || file.type == 'rar', 'icon_image_l': file.type == 'png' || file.type == 'jpg' || file.type == 'jpeg' || file.type == 'bmp'|| file.type == 'gif'}"></div>
+        </div>
+        <div class="title" ng-bind="::file.name"></div>
+        <div class="download">
+          <a href="file/{{file.id}}">下载</a>
+        </div>
+      </div>
+    </div>
+    <div class="title-div">
+      <span class="f14">产品价格详情</span>&nbsp;
+    </div>
+    <div class="block">
+      <table class="block table table-default table-striped" style=" margin-bottom: 0">
+        <thead>
+        <tr class="header">
+          <th width="50">序号</th>
+          <th width="230">产品</th>
+          <th width="45">单位</th>
+          <th width="95"><span class="text-default">≥</span>分段数</th>
+          <th width="100">价格</th>
+          <th width="35">币别</th>
+          <th width="55">税率</th>
+          <th width="65">最小订购</th>
+          <th width="75">最小包装</th>
+          <th width="85">有效期</th>
+          <th width="115">操作</th>
+        </tr>
+        </thead>
+        <tbody ng-repeat="inquiryItem in newinquiryItems | orderBy:'number'" ng-class="{'scoroll':order.orderItems.length>10}">
+        <tr>
+          <td>
+            <!-- <div ng-bind="::inquiryItem.number">
+            </div> -->
+            {{$index + 1}}
+          </td>
+          <td>
+            <div class="text-num text-bold"
+                 ng-bind="::inquiryItem.product.code"></div>
+            <div ng-bind="::inquiryItem.product.title"></div>
+            <div class="text-muted" ng-bind="::inquiryItem.product.spec"></div>
+            <div ng-if="::inquiryItem.needquantity" class="text-num text-bold">
+              需求数量:<span ng-bind="::inquiryItem.needquantity"></span>
+            </div>
+            <div ng-show="inquiryItem.remark">
+              备注:{{::inquiryItem.remark}}
+            </div>
+            <div ng-if="inquiryItem.attaches.length" class="text-muted">
+              <i class="fa fa-paperclip fa-fw" style="color: #ffa340; font-size: 18px;"></i>报价附件:
+              <div ng-repeat="attach in inquiryItem.attaches">
+                <a class="file" href="file/{{attach.id}}">{{::attach.name}}&nbsp;</a>
+                <a ng-show="inquiryItem.$editing" ng-click="deleteAttach(inquiryItem.attaches, $index)" title="删除附件"><i class="fa fa-trash-o fa-lg"></i></a>
+              </div>
+            </div>
+            <div class="form-group" ng-if="inquiryItem.$editing"
+                 style="width: 150px;">
+              <input type="text" class="form-control input-xs"
+                     ng-model="inquiryItem.brand" placeholder="物料品牌">
+            </div>
+            <div class="form-group" ng-if="inquiryItem.$editing"
+                 style="width: 150px;">
+              <input type="text" class="form-control input-xs"
+                     ng-model="inquiryItem.vendorprodcode" placeholder="供应商物料编号">
+            </div>
+            <div class="form-group" ng-if="inquiryItem.$editing" style="width: 150px;">
+              <input type="text" class="form-control input-xs" ng-change="verify(inquiryItem.leadtime,'leadtime')" ng-pattern="/^\+?[1-9]\d*$/"
+                     ng-model="inquiryItem.leadtime" placeholder="交货周期(确切天数)" style="display: inline-block;width: 150px;">
+              <span ng-if="!inquiryItem.leadtime" class="text-inverse"> 必填*</span>
+              <div style="margin-left: 50px;" class="text-bold text-inverse" ng-show="!leadtimeVerify">请填数字!</div>
+            </div>
+            <div class="input-group form-group" ng-if="inquiryItem.$editing" style="width: 100%;
+    margin-bottom: 0;position: relative;top: -14px;">
+              <div class="input-group-addon">上传附件:</div>
+              <input type="file" ng-model="inquiryItem.myFiles" ng-file-select
+                     ng-multiple="false" class="form-control input-sm input-group" name="file" style="width: 200px;    line-height: 29px;">
+            </div>
+          </td>
+          <td class="text-center">
+            <span ng-bind="::inquiryItem.product.unit"></span>
+          </td>
+          <td class="text-center">
+            <div ng-show="!inquiryItem.$editing">
+              <div ng-repeat="reply in inquiryItem.replies">
+                <span ng-bind="reply.lapQty"></span>
+              </div>
+            </div>
+            <div style="margin: 0 auto;" ng-if="inquiryItem.$editing">
+              <div ng-repeat="reply in inquiryItem.replies">
+                <div class="form-group input-group input-group-xs">
+                  <input type="text" class="form-control input-xs" ng-change="verifylapQty(reply.lapQty,$index, inquiryItem)"
+                         ng-model="reply.lapQty" min="{{$index == 0 ? 0 :(inquiryItem.replies[$index - 1].lapQty + 1)}}"
+                         ng-Readonly="$index == 0"  placeholder="数量" />
+                  <span class="input-group-btn" ng-show="$index != 0">
+											<button class="btn btn-default" type="button"
+                                                    ng-click="removeStep(inquiryItem, $index)">
+												<i class="fa fa-trash-o"></i>
+											</button>
+										</span>
+                </div>
+                <div class="text-bold text-inverse" style="margin-top:-15px" ng-show="!replylapQtys[$index]">分段数递增!</div>
+              </div>
+              <a ng-click="addStep(inquiryItem)" class="btn btn-default btn-xs"
+                 ng-show="!inquiryItem.custLap">添加分段</a>
+            </div>
+          </td>
+          <td class="text-center br-l">
+            <div ng-show="!inquiryItem.$editing">
+              <div ng-repeat="reply in inquiryItem.replies">
+                <span ng-if="!isUser" ng-bind="reply.price | number:6"></span> <span
+                      ng-show="reply.price == null || isUser" class="text-muted">-</span>
+              </div>
+              <div class="dropdown">
+                <a href="javascript:void(0);" class="dropdown-toggle text-default"
+                   ng-mouseover="getHistory(inquiryItem)">历史报价<i
+                        class="fa fa-fw fa-angle-down"></i></a>
+                <div class="dropdown-menu pane" style="width: 270px;">
+                  <div class="pane-body">
+                    <ul class="list-unstyled list-menu">
+                      <li ng-repeat="historyItem in ::inquiryItem.history">
+                        <div ng-class="{'text-inverse': $index==0}">
+                          <div class="row row-sm"
+                               ng-repeat="historyReply in historyItem.replies">
+                            <div class="col-xs-5">≥{{historyReply.lapQty}}</div>
+                            <div class="col-xs-5">价格{{historyReply.price | number:6}}</div>
+                          </div>
+                        </div>
+                        <div class="text-muted">{{historyItem.inquiry.date |
+                          date:'yyyy-MM-dd'}}{{historyItem.inquiry.enterprise.enName}}
+                        </div>
+                      </li>
+                    </ul>
+                    <div ng-show="!inquiryItem.history || inquiryItem.history.length == 0"
+                         class="text-center text-muted">暂无历史报价</div>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div style="margin: 0 auto;" ng-if="inquiryItem.$editing">
+              <div ng-repeat="reply in inquiryItem.replies">
+                <div class="form-group">
+                  <input type="text" class="form-control input-xs " ng-class="{'input-error': !replyPrices[$index]}" ng-model="reply.price"
+                         ng-change="verify(reply.price,$index)" placeholder="单价(必填)" ng-init="reply.price = isUser?'-':reply.price"  />
+                  <div class="text-bold text-inverse" style="margin-bottom:-15px" ng-show="!replyPrices[$index]">请填数字!</div>
+                </div>
+              </div>
+            </div>
+          </td>
+          <td class="text-center" ng-bind="::inquiryItem.currency"></td>
+          <td class="text-center">
+            <input type="text" ng-pattern="/^\+?[1-9]\d*$/" ng-model="inquiryItem.taxrate" style="width: 25px" ng-readonly="!inquiryItem.$editing">%</td>
+          <td class="text-center">
+            <div ng-show="!inquiryItem.$editing">
+              <span ng-bind="inquiryItem.minOrderQty"></span> <span
+                    ng-show="inquiryItem.minOrderQty == null" class="text-muted">-</span>
+            </div>
+            <div ng-if="inquiryItem.$editing">
+              <input type="text" class="form-control input-xs" ng-change="verify(inquiryItem.minOrderQty,'minOrderQty')"
+                     ng-model="inquiryItem.minOrderQty" placeholder="最小订购">
+            </div>
+          </td>
+          <td class="text-center">
+            <div ng-show="!inquiryItem.$editing">
+              <span ng-bind="inquiryItem.minPackQty"></span> <span
+                    ng-show="inquiryItem.minPackQty == null" class="text-muted">-</span>
+            </div>
+            <div ng-if="inquiryItem.$editing">
+              <input type="text" class="form-control input-xs" ng-change="verify(inquiryItem.minPackQty,'minPackQty')"
+                     ng-model="inquiryItem.minPackQty" placeholder="最小包装">
+            </div>
+          </td>
+          <td class="text-center">
+            <div ng-init="parseDate(inquiryItem)">
+              <div ng-show="inquiryItem.toDate">
+                <span class="text-muted">从 </span><span
+                      ng-bind="inquiryItem.fromDate | date:'yyyy-MM-dd'"></span> <span
+                      class="text-muted">到 </span><span
+                      ng-bind="inquiryItem.toDate | date:'yyyy-MM-dd'"></span>
+              </div>
+              <div ng-show="!inquiryItem.toDate">
+                <span class="text-muted">-</span>
+              </div>
+            </div>
+          </td>
+          <td class="text-center">
+            <div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == null && inquiryItem.invalid != 1" class="block">
+              <span class="text-trans warning">已报价</span>
+              <div ng-if="inquiryItem.inquiry.overdue == 0 && inquiryItem.inquiry.check != 1" style="padding-top: 50px;">
+                <div ng-show="!inquiryItem.$editing && inquiryItem.replyable">
+                  <a ng-click="inquiryItem.$editing=!inquiryItem.$editing;getToken()">修改报价</a>
+                </div>
+                <div ng-show="inquiryItem.$editing">
+                  <div>
+                    <a ng-click="inquiryItem.$editing=!inquiryItem.$editing; cancel()">取消</a>
+                  </div>
+                  <div>
+                    <button ng-click="onReplyClick(inquiryItem, true)"
+                            ng-disabled="!isValid(inquiryItem, true)"
+                            class="btn btn-link btn-xs text-inverse">
+                      保存并<br>确认报价
+                    </button>
+                  </div>
+                </div>
+              </div>
+              <div ng-if="inquiryItem.inquiry.check == 1" class="text-muted" style="padding-top: 50px;">客户正在<br>审批...</div>
+            </div>
+            <div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == 1 && inquiryItem.invalid != 1" class="block">
+              <span class="text-trans success">已采纳</span>
+            </div>
+            <div ng-if="inquiryItem.status == 201 && inquiryItem.invalid == 1" class="block">
+              <span class="text-trans text-light">已失效</span>
+            </div>
+            <div ng-if="inquiryItem.status == 314" class="block">
+              <span class="text-trans text-light">已作废</span>
+            </div>
+            <div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == 0" class="block">
+              <span class="text-trans error">未采纳</span>
+            </div>
+            <div ng-if="inquiryItem.status == 200">
+              <div ng-if="inquiryItem.inquiry.overdue == 0 && inquiryItem.inquiry.check != 1">
+                <div ng-show="!inquiryItem.$editing">
+                  <a ng-click="inquiryItem.$editing=!inquiryItem.$editing;getToken()">报 价</a>
+                </div>
+                <div ng-show="inquiryItem.$editing">
+                  <div>
+                    <a ng-click="inquiryItem.$editing=!inquiryItem.$editing; cancel()">取消</a>
+                  </div>
+                  <div>
+                    <button ng-click="onReplyClick(inquiryItem)"
+                            ng-disabled="!isValid(inquiryItem)"
+                            class="btn btn-link btn-xs text-default">保存</button>
+                  </div>
+                  <div>
+                    <button ng-click="onReplyClick(inquiryItem, true)"
+                            ng-disabled="!isValid(inquiryItem, true)"
+                            class="btn btn-link btn-xs text-inverse">
+                      保存并<br>确认报价
+                    </button>
+                  </div>
+                </div>
+              </div>
+              <div ng-if="inquiryItem.inquiry.overdue == 0 && inquiryItem.inquiry.check == 1">
+                <span class="text-trans half">未报价</span>
+                <div class="text-muted" style="padding-top: 50px;">询价单已<br>被提交...</div>
+              </div>
+              <div ng-if="inquiryItem.inquiry.overdue == 1" class="block">
+                <span class="text-trans error">已过期</span>
+              </div>
+            </div>
+          </td>
+        </tr>
+        </tbody>
+      </table>
+    </div>
+  </div>
+</div>

+ 400 - 0
src/main/webapp/resources/view/vendor/b2b/change/sale_inquiry_mould_detail.html

@@ -0,0 +1,400 @@
+<style>
+  tbody td .input-price {
+    margin: 2px;
+    height: 26px;
+    border: 1px solid #d1d1d1;
+  }
+
+  tbody td div .text-ps,.text-prod {
+    height: auto;
+  }
+
+  tbody td div.text-mould {
+    border-bottom: 1px solid #e0e2e3;
+  }
+
+  div>div .btn-items {
+    margin: 10px;
+  }
+
+  tbody td .text-waiting {
+    position: absolute;
+    top: 5px;
+    background-color: #fff;
+    border: 1px solid;
+    padding: 3px 14px;
+    font-size: 16px;
+    font-family: "LiShu";
+    border-radius: 10px;
+    -moz-transform: rotate(-10deg);
+    -webkit-transform: rotate(-10deg);
+    -o-transform: rotate(-10deg);
+    transform: rotate(-10deg);
+    border-radius: 10px;
+    opacity: 0.7;
+    white-space: nowrap;
+    color: #56a022;
+    border-color: #56a022;
+  }
+  .table td input.uploadFile{
+    position: absolute;
+    width: 100px;
+    left: 100px;
+    height: 30px;
+    top: 0;
+    opacity: 0;
+  }
+  a:hover{
+    cursor: pointer;
+  }
+  #order-detail-list .table-default .header {
+    box-shadow: none;
+    border: none;
+    background: none;
+    background: #f9f9f9;
+  }
+  #order-detail-list .table-default .header th {
+    border-bottom: none;
+    font-weight: normal;
+    color: #999;
+    padding: 8px 0;
+    text-align: center;
+  }
+  #order-detail-list .table-default tbody tr {
+    background: none;
+    position: relative;
+  }
+  #order-detail-list table.table-default.pms tbody tr td {
+    vertical-align: middle;
+    color: #323232;
+    min-height: 140px;
+    position: relative;
+    padding: 15px 0;
+    font-size: 14px;
+  }
+  [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {
+    display: none !important;
+  }
+  .text-bold {
+    font-weight: 700;
+  }
+
+  .text-num {
+    font-style: normal;
+    word-break: break-all;
+    font-size: 14px;
+  }
+  .text-muted {
+    color: #333;
+    font-size: 14px;
+  }
+  .title-div {
+    margin: 15px 30px 15px 15px;
+    color: #5078cb;
+    font-size: 14px;
+    font-weight: 600;
+    height: 50px;
+    padding-top: 11px;
+    position: relative;
+  }
+  .title-div .f14{
+    border-left: 5px solid #5078cb;padding-left: 10px;
+  }
+  #order-detail-list .table-default.pms tbody tr td.product {
+    padding-left: 30px;
+  }
+  #order-detail-list .table-default tbody tr td{
+    padding-left: 30px;
+    border-right: 1px solid #e8e8e8;
+    border-top: none;
+  }
+  .text-trans {
+    top: -4px;
+    right: 20px;
+  }
+  .f14{
+    font-size: 14px;
+  }
+  .base-info{
+    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    -o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    border-radius: 5px;
+    background: #fff;
+    width: 1026px;
+  }
+  .pub-com_head, .com_head {
+    width: 100%;
+    height: 35px;
+    line-height: 35px;
+    background: #5078cb;
+    border-radius: 5px 5px 0 0;
+  }
+  .pub-com_head span, .com_head span {
+    margin-left: 10px;
+    color: #fff;
+    font-size: 14px;
+    font-weight: bold;
+  }
+  .pub-com_head .p-right {
+    float: right;
+  }
+  #order-detail-list .row {
+    width: 96%;
+    margin: 0 auto;
+    line-height: 30px;
+    padding: 5px 0;
+  }
+  #order-detail-list .content {
+    color: #666;
+  }
+  #order-detail-list .title {
+    font-weight: inherit;
+  }
+  .base-info .title {
+    float: left;
+    width: 92px;
+    font-size: 14px;
+    color: #333;
+    font-weight: bold;
+  }
+  .base-info .content {
+    float: left;
+    font-size: 14px;
+    white-space: nowrap;
+  }
+  .headerline {
+    width: 93%;
+    margin: 0 auto;
+    line-height: 30px;
+    padding: 5px 0;
+  }
+</style>
+<div class="pane base-info fr" id="order-detail-list">
+  <div class="pub-com_head">
+    <span>客户模具询价单</span>
+    <div class="p-right">
+      <!-- <a href="#" class="pull-right text-simple"><i
+          class="fa fa-print fa-fw"></i>打印</a> -->
+    </div>
+  </div>
+  <div class="pane-body">
+    <div class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+      <span class="f14">单据信息</span>&nbsp;
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-3">
+        <span class="title">流水号</span>
+        <div class="content" ng-bind="::inquiryMould.code"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">日期</span>
+        <div class="content" ng-bind="::inquiryMould.date | date:'yyyy-MM-dd'"></div>
+      </div>
+      <div class="col-xs-6">
+        <span class="title">客户</span>
+        <div class="content" ng-bind="::inquiryMould.enterprise.enName"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-3">
+        <span class="title">录单人</span>
+        <div class="content" ng-bind="::inquiryMould.recorder"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">审核人</span>
+        <div class="content" ng-bind="::inquiryMould.auditor"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">截止报价</span>
+        <div class="content" ng-bind="::inquiryMould.endDate | date:'yyyy-MM-dd'"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-12">
+        <span class="title">备注</span>
+        <div class="content" ng-bind="::inquiryMould.remark"></div>
+      </div>
+    </div>
+    <div class="headerline" ng-if="inquiryMould.attachs.length">
+      <span class="content">附件</span>
+    </div>
+    <div class="row row-sm attach" ng-if="inquiryMould.attachs.length">
+      <div class="col-xs-3 item" ng-repeat="file in inquiryMould.attachs">
+        <div class="bg">
+          <div class="global_icon larger icon_undefined_l"
+               ng-class="{'icon_pdf_l': file.type == 'pdf','icon_xls_l': file.type == 'xls' || file.type == 'xlsx' || file.type == 'et', 'icon_doc_l': file.type == 'doc' || file.type == 'docx', 'icon_txt_l': file.type == 'txt', 'icon_zip_l': file.type == 'zip' || file.type == 'rar', 'icon_image_l': file.type == 'png' || file.type == 'jpg' || file.type == 'jpeg' || file.type == 'bmp'|| file.type == 'gif'}"></div>
+        </div>
+        <div class="title" ng-bind="::file.name"></div>
+        <div class="download">
+          <a target="_blank" href="file/{{file.id}}">下载</a>
+        </div>
+      </div>
+    </div>
+    <div class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+      <span class="f14">商品价格详情</span>&nbsp;
+    </div>
+    <div class="block">
+      <table class="block table table-default table-striped" style="margin-bottom: 0;">
+        <thead>
+        <tr class="header">
+          <th width="380">模具资料</th>
+          <th width="300">币别:<span ng-bind="inquiryMould.currency"></span>&nbsp;&nbsp;&nbsp;价格&nbsp;&nbsp;&nbsp;<span>税率:</span><input class="taxrate-input" ng-model="inquiryMould.taxrate" ng-pattern="/^[0-9][0-9]{0,1}$/" style="width: 30px;" ng-disabled="!inquiryMould.$editing">%</th>
+          <!--<th width="150">附件</th>-->
+          <th width="100"></th>
+        </tr>
+        </thead>
+        <tbody>
+        <tr>
+          <td class="product" width="380">
+            <div class="text-mould" ng-repeat="items in inquiryMould.inquiryMouldItems">
+              <div class="text-num text-bold text-ps" >
+                {{items.psCode}}-{{items.psName}}
+              </div>
+              <div class="text-muted text-prod" ng-repeat="prod in items.inquiryMouldDetails">
+                <div>{{prod.prodCode}}-{{prod.prodTitle}}-{{prod.prodSpec}}</div>
+              </div>
+            </div>
+          </td>
+          <td class="text-center" width="300">
+            <div ng-repeat="items in inquiryMould.inquiryMouldItems">
+              <input type="text" class="text-right input-price input-xs" ng-model="items.price" placeholder="单价(请填数字)" ng-blur="blurPrice(items.price)"
+                     ng-change="verifyItems(items.price,$index);notZero(inquiryMould)" ng-disabled="!inquiryMould.$editing" ng-init="items.price = isUser?'-':items.price"/>
+              <!-- <span ng-show="canSave">{{inquiryMould_copy.inquiryMouldItems[$index].price}}</span> -->
+              <div ng-repeat="prod in items.inquiryMouldDetails">
+                <input type="text" class="text-right input-price input-xs" ng-model="prod.price" placeholder="单价(请填数字)" ng-blur="blurPrice(prod.price)"
+                       ng-change="verifyProds(prod.price,$index,$parent.$index);notZero(inquiryMould)" ng-disabled="!inquiryMould.$editing" ng-init="prod.price = isUser?'-':prod.price"/>
+              </div>
+            </div>
+            <div class="dropdown">
+              <a href="javascript:void(0);"
+                 class="dropdown-toggle text-default"
+                 ng-mouseover="getHistory(inquiryMould)">历史报价<i
+                      class="fa fa-fw fa-angle-down"></i></a>
+              <div class="dropdown-menu pane" style="width: 270px;">
+                <div class="pane-body">
+                  <ul ng-show="inquiryMould.replyDate" class="list-unstyled list-menu">
+                    <li class="col-xs-12" ng-repeat="item in ::inquiryMould.history.inquiryMouldItems">
+                      <div ng-repeat="itemReply in item.replies" ng-class="{'text-inverse': $index==0}">
+                        <span class="col-xs-3">{{itemReply.reply | number:6}}</span>
+                        <div ng-repeat="prodReply in itemReply.prodReplies">
+                          <span class="col-xs-3">{{prodReply.reply | number:6}}</span>
+                        </div>
+                        <span class="col-xs-12">{{itemReply.replyDate | date:"yyyy-MM-dd HH:mm:ss"}}</span>
+                        <div class="text-muted col-xs-12">
+                          {{inquiryMould.enterprise.enName}}
+                        </div>
+                      </div>
+                    </li>
+
+                  </ul>
+                  <div ng-if="historyShow">
+                    <div ng-show="!inquiryMould.replyDate" class="text-center text-muted">暂无历史报价</div></div>
+                  <div ng-if="!historyShow">
+                    <div  class="text-center text-muted">无法访问,没有客户模具询价-查看历史报价权限!</div></div>
+
+                </div>
+              </div>
+            </div>
+          </td>
+          <td class="text-center" width="100">
+            <div ng-if="inquiryMould.status == 200 && inquiryMould.overdue == 0 && inquiryMould.valid != 0 && inquiryMould.adoptStatus == null" class="block">
+              <span class="text-waiting">待报价</span>
+            </div>
+            <!-- 已报价 -->
+            <div ng-if="inquiryMould.status == 201 && inquiryMould.adoptStatus == null && inquiryMould.valid != 0" class="block">
+              <span class="text-trans warning">已报价</span>
+              <div ng-if="inquiryMould.check == 1" class="text-muted"
+                   style="padding-top: 50px;">
+                客户正在<br>审批...
+              </div>
+            </div>
+            <div ng-if="inquiryMould.status == 201 && inquiryMould.adoptStatus == 1 && inquiryMould.valid != 0"
+                 class="block">
+              <span class="text-trans success">已采纳</span>
+            </div>
+            <div ng-if="inquiryMould.status == 201 && inquiryMould.adoptStatus == 0 && inquiryMould.valid != 0"
+                 class="block">
+              <span class="text-trans error">未采纳</span>
+            </div>
+            <div ng-if="inquiryMould.overdue == 1 && inquiryMould.status == 200 && inquiryMould.valid != 0" class="block">
+              <span class="text-trans text-muted">已过期</span>
+            </div>
+            <div ng-if="inquiryMould.valid == 0" class="block">
+              <span class="text-trans text-light">已作废</span>
+            </div>
+          </td>
+        </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+      <span class="f14">供应商附件</span>&nbsp;
+    </div>
+    <div class="block">
+      <table class="block table table-default table-striped" style="margin-bottom: 0;">
+        <td width="150" style="vertical-align: top" class="text-center">
+          <div class="input-group form-group" style="width: 300px; position: relative;">
+            <div ng-if="inquiryMould.$editing">
+              <a style="color: #3f84f6">上传附件</a>
+              <input type="file" ng-model="myFiles" ng-file-select multiple="multiple"
+                     ng-multiple="false" class="form-control input-sm input-group uploadFile" name="file"
+                     ng-change="pushFile(myFiles);notZero(inquiryMould)">
+              <div ng-repeat="file in inquiryMould.sellAttachs track by $index">
+                <p class="text-left">
+                  <a style="color: #0000cc" target="_blank" href="file/{{file.id}}">{{file.name}}</a>&nbsp;&nbsp;&nbsp;
+                  <a style="color: #ff2222" ng-click="removeFile(file)">删除</a>
+                </p>
+              </div>
+            </div>
+            <div ng-if="!inquiryMould.$editing">
+              <div ng-repeat="file in inquiryMould.sellAttachs track by $index">
+                <p class="text-left">
+                  <a style="color: #0000cc" target="_blank" href="file/{{file.id}}">{{file.name}}</a>&nbsp;&nbsp;&nbsp;
+                </p>
+              </div>
+            </div>
+          </div>
+        </td>
+      </table>
+    </div>
+  </div>
+</div>
+<div ng-if="inquiryMould.status == 200 && inquiryMould.overdue != 1 && inquiryMould.adoptStatus == null && inquiryMould.valid != 0">
+  <div class="text-center btn-items" ng-show="!inquiryMould.$editing">
+    <button class="btn btn-success btn-items"
+            ng-click="inquiryMould.$editing=!inquiryMould.$editing">
+      报价
+    </button>
+  </div>
+  <div class="text-center btn-items" ng-show="inquiryMould.$editing">
+    <button ng-click="onReplyClick(inquiryMould, true)"
+            class="btn btn-danger btn-items">
+      保存并确认报价
+    </button>
+    <button ng-click="onReplyClick(inquiryMould)"
+            ng-disabled="!canSave"
+            class="btn btn-success btn-items">保存</button>
+    <button class="btn btn-items"
+            ng-click="inquiryMould.$editing=!inquiryMould.$editing;reload()">取消</button>
+  </div>
+</div>
+<div ng-if="inquiryMould.replyable && inquiryMould.status == 201 && inquiryMould.adoptStatus == null && inquiryMould.checked != 1  && inquiryMould.valid != 0" style="padding-top: 20px;">
+  <div class="text-center btn-items" ng-show="!inquiryMould.$editing">
+    <button class="btn btn-success" ng-click="inquiryMould.$editing=!inquiryMould.$editing;  getToken()">修改报价</button>
+  </div>
+  <div class="text-center" ng-show="inquiryMould.$editing">
+    <button ng-click="onReplyClick(inquiryMould, true)"
+            ng-disabled="!canSave"
+            class="btn btn-danger btn-items">
+      保存并确认报价
+    </button>
+    <botton class="btn btn-success btn-items" ng-disabled="!canSave"
+            ng-click="onReplyClick(inquiryMould)">
+      保存
+    </botton>
+    <button class="btn btn-items"
+            ng-click="inquiryMould.$editing=!inquiryMould.$editing;reload()">取消</button>
+  </div>
+</div>

+ 21 - 0
src/main/webapp/resources/view/vendor/b2b/sale/quotation_new.html

@@ -245,6 +245,27 @@
 	.btn-group-justified .btn:active{
 		background: none;
 	}
+	.user_content .user_right{
+		box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		-o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		border-radius: 5px;
+		/* min-height: 1066px; */
+		background: #fff;
+		width: 1026px;
+	}
+	.pub-com_head{
+		background: #5078cb;
+		color: #f5f5f5;
+		height: 30px;
+		line-height: 30px;
+		font-size: 14px;
+		width: 1026px;
+	}
+	.pub-com_head .b2b-com-head{
+		float: left;
+	}
 	.pub-com_head  .p-right a.btn-info{
 		background: none;
 		color: #999;

+ 606 - 0
src/main/webapp/resources/view/vendor/b2b/sale/sale_tender_detail.html

@@ -0,0 +1,606 @@
+<!-- 投标单 -->
+<style>
+
+  /* 标题 */
+  .bid-label {
+    height: 30px;
+    margin-left: 10px;
+    margin-right: 10px;
+    background-color: #e8e8e8;
+    box-shadow: 0 0 5px #6f6f6f;
+    border-top-right-radius: 20px;
+  }
+  /* 主体 */
+  .purc-bid {
+    line-height: 2;
+    font-size: 14px;
+    width: 1026px;
+  }
+  .purc-bid .row {
+    margin-left: 0px;
+    margin-right: 0px;
+    padding-left: 15px;
+    padding-right: 15px;
+  }
+  .bid-content {
+    background-color: #fff;
+  }
+
+  .bid-content>div>div {
+    line-height: 36px;
+  }
+
+  /* 读取显示无法修改的数据 */
+  .unchanged-info {
+    color: #333;
+    overflow: hidden;
+  }
+  /* 二级标题栏 */
+  .title-div {
+    font-size: 14px;
+    font-weight: 600;
+    padding-left: 20px;
+    height: 50px;
+    padding-top: 11px;
+  }
+
+  /* 输入框前描述 */
+  .bid-desc {
+    width: 100px;
+    float: left;
+    color: #999;
+  }
+  .bid-content>div>div.col-xs-4{
+    padding-left: 5px;
+  }
+
+  .bid-content>div>div.col-xs-8{
+    padding-left: 5px;
+  }
+
+  .bid-content>div>div.col-xs-12{
+    padding-left: 5px;
+  }
+  /* 输入框 */
+  .bid-input {
+    border: none;
+    border-bottom: 1px solid #bfbfbf;
+    text-align: center;
+    height: 34px;
+  }
+  .bid-input:focus{
+    outline:none;
+    border-bottom: 1px solid #5078cb;
+  }
+  .row.prod-info{
+    line-height: 34px;
+  }
+
+  /* 基本信息 */
+  .base-info {
+    border-bottom: 1px solid #e8e8e8;
+    padding-bottom: 30px;
+    margin-bottom: 0; /* 去除index中公共样式影响 */
+  }
+
+  .prod-info {
+    border-bottom: 1px solid #e8e8e8;
+    padding-bottom: 30px;
+    padding-top: 20px;
+  }
+
+  /* 附件上传 */
+  .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{
+    width: 100px;
+    height:100px;
+    background-image: url('static/img/tender/upload.png');
+    position:relative;
+    margin-left: 100px;
+    margin-top: 20px;
+  }
+  .fileInput{
+    height:100px;
+    width: 100px;
+    margin-top: 20px;
+    font-size: 100px;
+    position:absolute;
+    margin-left: 100px;
+    right:0;
+    top:0;
+    opacity: 0;
+    filter:alpha(opacity=0);
+    cursor:pointer;
+    overflow: hidden;
+  }
+
+  .attach-file {
+    margin-left: 130px;
+    width: 400px;
+  }
+  .bid-content>div.wrap{
+    width: 1026px;
+  }
+  /* 右下角按钮 */
+  .bid-content>div {
+    background-color: #fff;
+  }
+  .bid-content>div>div>button {
+    width: 94px;
+    height: 36px;
+    font-size: 14px;
+    color: #fff;
+    border-radius: 0;
+  }
+  .bid-content>div>div.btn-bid>button {
+    background-color: #3f84f6;
+  }
+
+  /* 日期选择器 */
+  .purc-bid .date-picker input {
+    border-radius: 0;
+    border: 1px solid #5078cb;
+    border-right: none;
+    font-size: 12px;
+  }
+  .purc-bid .date-picker span .btn-open {
+    color: #fff;
+    background-color: #5078cb;
+    border-radius: 0;
+    border: 1px solid #5078cb;
+    border-left: none;
+  }
+
+  /* 修改本页内btn的样式 及datepicker中的btn-success的样式 */
+  .purc-bid .date-picker .btn {
+    border-radius: 0;
+  }
+
+  .purc-bid .date-picker .btn-success {
+    background-color: #3f84f6;
+  }
+  .purc-bid .date-picker ul {
+    border-radius: 0;
+  }
+  .purc-bid .date-picker ul div:focus {
+    outline: none;
+    border-radius: 0;
+    border: none;
+  }
+
+  .com_head a{color:#fff;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:#3f84f6;}
+
+
+  .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-list,.tender-list02{width:100%;margin: 0 auto;background: #fff;}
+  .tender-list dl{width: 100%;margin:0 auto;}
+  .tender-list dl dt{width: 100%;margin:0 auto;height: 40px;}
+  .tender-list dl dt span{height: 40px;line-height: 48px;display: inline-block;color: #333;}
+  .tender-list dl dd{width: 100%;margin:0 auto;min-height: 100px;border-bottom: #ccc 1px dashed;overflow: hidden;}
+  .tender-list dl dd:hover{border: #5078cb 2px solid;}
+  .tender-list dl dd span{min-height: 100px;line-height: 50px;display: inline-block;}
+  .tender-list dl span{width:10.2%;font-size: 14px;float: left;text-align: center;}
+  .tender-list dl span.result{width:8.8%;font-size: 14px;float: left;text-align: center;}
+  .tender-list dl span.result-index{width:6.8%;font-size: 14px;float: left;text-align: center;}
+  .tender-list dl span.wid01{width:25%;}
+  .tender-list dl span.wid-all{width:35%;}
+  .tender-list dl span.wid-all p{font-size: 14px;line-height: 22px;text-align: left;margin: 0;}
+  .tender-list dl dd span.wid-all{margin-top: 15px;}
+  .tender-list dl span.wid01-result{width:20%; text-align: left;}
+  .tender-list dl span.wid01 p{font-size: 14px;line-height: 22px;text-align: left;margin: 0;}
+  .tender-list dl span.wid01-result p{font-size: 14px;line-height: 22px;text-align: left;margin: 0;}
+  .tender-list dl dd span.wid01{margin-top: 15px;}
+  .tender-list dl dd span.wid01-result{margin-top: 15px;}
+  .tender-list .com_title01 em,.tender-list02 .com_title01 em{margin-left: 5px;font-size: 16px;color: #f00;position: relative;top: 3px;}
+
+  /* 点击变输入框 */
+  .editAble{ width: 100%; height: 34px; border: none; font-size: 14px; text-align:center;line-height:34px;}
+
+  /* 覆盖index属性,会导致布局变形 */
+  input.ng-invalid.ng-dirty,textarea.ng-invalid.ng-dirty {
+    box-shadow: 0 0 2px #f00;
+    border: 0;
+  }
+
+  /*
+   单据状态样式
+   */
+  .img-status {
+    float: right;
+    margin-right: 50px;
+    margin-top: -5px;
+  }
+  .base-info{
+    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    -o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    border-radius: 5px;
+    background: #fff;
+    width: 1026px;
+  }
+  .pub-com_head, .com_head {
+    width: 100%;
+    height: 35px;
+    line-height: 35px;
+    background: #5078cb;
+    border-radius: 5px 5px 0 0;
+  }
+  .pub-com_head span, .com_head span {
+    margin-left: 10px;
+    color: #fff;
+    font-size: 14px;
+    font-weight: bold;
+  }
+  pub-com_head .p-right {
+    float: right;
+  }
+</style>
+<div class="ng-scope pane base-info fr" id="order-detail-list">
+  <form name="bidForm">
+    <div class="purc-bid">
+      <div class="list-unstyled">
+        <div class="com_head">
+          <span>投标单</span>
+          <!--<span class="p-right">-->
+          <!--<a ng-click="showQuestionHistory()" class="text-simple" title="查看当前单据提问记录">提问记录</a>-->
+          <!--</span>-->
+          <span class="p-right">
+                        <a ng-click="sendQuestion()" ng-show="saleTender.questionEnd != 1" class="text-simple" title="向招标方提问">提问</a>
+                    </span>
+        </div>
+      </div>
+      <div class="bid-content ng-scope">
+        <div class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+          <span>基本信息</span>&nbsp;
+          <!-- 投标单状态 -->
+          <div class="img-status" ng-if="saleTender.status == '待投标' && tender.overdue != 1">
+            <img src="static/img/tender/daitoubiao.png">
+          </div>
+          <div class="img-status" ng-if="saleTender.status == '已投标' && tender.overdue != 1">
+            <img src="static/img/tender/yitoubiao.png">
+          </div>
+          <div class="img-status" ng-if="saleTender.status == '已投标' && tender.result != 1 && tender.overdue == 1">
+            <img src="static/img/tender/daipingbiao.png">
+          </div>
+          <div class="img-status" ng-if="tender.status == '已结标' && tender.result == 1">
+            <img src="static/img/tender/yijiebiao.png">
+          </div>
+          <div class="img-status" ng-if="tender.status == '流标' && tender.result == 1">
+            <img src="static/img/tender/liubiao.png">
+          </div>
+        </div>
+        <div class="row base-info">
+          <div class = "col-xs-4">
+            <div class="bid-desc">招标编号:</div>
+            <div class="unchanged-info">{{tender.code}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">招标项目:</div>
+            <div class="unchanged-info">{{tender.title}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">招标企业:</div>
+            <div class="unchanged-info">{{tender.enterprise.enName}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">联系人:</div>
+            <div class="unchanged-info">{{tender.user}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">联系电话:</div>
+            <div class="unchanged-info">{{tender.userTel}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">投标截止时间:</div>
+            <div class="unchanged-info">{{tender.endDate | date:'yyyy-MM-dd'}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">公布结果时间:</div>
+            <div class="unchanged-info">{{tender.publishDate | date:'yyyy-MM-dd'}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">交易币别:</div>
+            <div class="unchanged-info">{{tender.currency}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">是否含税:</div>
+            <div class="unchanged-info" ng-bind="tender.ifTax == 1 ? '是': '否'"></div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">付款方式:</div>
+            <div class="unchanged-info">{{tender.payment}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">是否开放报名:</div>
+            <div class="unchanged-info" ng-bind="tender.ifOpen == 1 ? '是': '否'"></div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">发票要求:</div>
+            <div class="unchanged-info" ng-if="tender.invoiceType == 2">增值税专用发票</div>
+            <div class="unchanged-info" ng-if="tender.invoiceType == 1">增值税普通发票</div>
+            <div class="unchanged-info" ng-if="tender.invoiceType == 0">不需要发票</div>
+          </div>
+          <div class = "col-xs-12">
+            <div class="bid-desc">交货地址:</div>
+            <div class="unchanged-info">{{tender.shipAddress}}</div>
+          </div>
+          <div class = "col-xs-12">
+            <div class="bid-desc">证照要求:</div>
+            <div class="unchanged-info">{{tender.certificate}}</div>
+          </div>
+          <div ng-if="tender.tenderAttaches.length" class="col-xs-12" ng-repeat="attach in tender.tenderAttaches">
+            <span ng-show="$index == 0" class="bid-desc">招标附件:</span>
+            <span ng-show="$index != 0" class="bid-desc">&nbsp;</span>
+            <a class="" style="padding-left: 0; color: #5078cb;" href="{{b2bUrl}}/file/{{attach.id}}">{{::attach.name}}</a>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">招标类型:</div>
+            <div class="unchanged-info" ng-if="tender.ifAll == 1">全包</div>
+            <div class="unchanged-info" ng-if="tender.ifAll == 0">甲供料</div>
+            <div class="unchanged-info" ng-if="tender.ifAll == null">无</div>
+          </div>
+          <div class = "col-xs-4" ng-if="tender.ifAll == 1">
+            <div class="bid-desc">项目周期<span style="color: #d2272d;">*</span>:</div>
+            <div class="unchanged-info" ng-if="tender.overdue == 1">{{saleTender.cycle || '未填'}}</div>
+            <input ng-if="tender.overdue != 1" class="bid-input" title="请输入项目周期(天)" ng-model="saleTender.cycle" ng-change="validateProds(saleTender)" ng-pattern="/^\+?[1-9][0-9]*$/"/>
+          </div>
+          <div class = "col-xs-4" ng-if="tender.ifAll == 1">
+            <div class="bid-desc">税率<span style="color: #d2272d;">*</span>:</div>
+            <div class="unchanged-info" ng-if="tender.overdue == 1">{{saleTender.taxrate || '未填'}}</div>
+            <input ng-if="tender.overdue != 1"  class="bid-input" title="请输入税率" ng-model="saleTender.taxrate" ng-change="validateProds(saleTender)" ng-pattern="/^(\d|[1-9]\d)$/"/>
+          </div>
+          <div class = "col-xs-4" ng-if="tender.ifAll == 1 && tender.result == 1">
+            <div class="bid-desc">定标结果:</div>
+            <div ng-if="saleTender.saleTenderItems[0].applyStatus == '1'">
+              <img src="static/img/tender/zhongbiao.png">
+            </div>
+            <div ng-if="saleTender.saleTenderItems[0].applyStatus != '1'">
+              <img src="static/img/tender/weizhongbiao.png">
+            </div>
+          </div>
+          <div class = "col-xs-8" ng-if="tender.ifAll == 1 && tender.result == 1">
+            <div class="bid-desc">定标说明:</div>
+            <div class="unchanged-info">{{saleTender.saleTenderItems[0].description}}</div>
+          </div>
+        </div>
+        <div class="wrap">
+          <div class="content">
+            <!-- 非全包产品信息展示 -->
+            <div class="tender-list" ng-if="tender.ifAll != 1">
+              <!--产品信息-->
+              <div class="com_title01"><span>产品信息</span><em>*</em></div>
+              <dl ng-show = "tender.result != 1 || tender.auditStatus == 0" >
+                <dt>
+                  <span>序号</span>
+                  <span class="wid01">产品</span>
+                  <span>单位</span>
+                  <span>采购数量</span>
+                  <span>采购周期</span>
+                  <span>税率(%)</span>
+                  <span>单价</span>
+                  <span>含税金额</span>
+                </dt>
+                <dd ng-repeat="item in saleTender.saleTenderItems | orderBy: 'tenderProd.index'">
+                  <span>{{$index + 1}}</span>
+                  <span class="wid01">
+                                        <p>产品型号:{{item.tenderProd.prodCode}}</p>
+                                        <p>产品名称:{{item.tenderProd.prodTitle}}</p>
+                                        <p ng-show="item.tenderProd.brand">品牌:<i ng-bind="item.tenderProd.brand" style="font-style: inherit"></i></p>
+                                    </span>
+                  <span ng-bind="item.tenderProd.unit"></span>
+                  <span ng-bind="item.tenderProd.qty"></span>
+                  <span><input type="text" class="editAble" ng-model="item.cycle" ng-pattern="/^\+?[1-9][0-9]*$/"
+                               ng-change="validateProds(saleTender);validateThis(item.cycle, 'cycle')"
+                               ng-blur="validateProds(saleTender);"
+                               ng-focus="validateProds(saleTender);" placeholder="请输入周期"/></span>
+                  <span><input type="text" class="editAble" ng-model="item.taxrate" ng-pattern="/^\+?[0-9][0-9]{0,1}$/"
+                               ng-change="validateProds(saleTender);validateThis(item.taxrate, 'taxrate')"
+                               ng-focus="validateProds(saleTender);"
+                               ng-blur="validateProds(saleTender);" placeholder="请输入税率"/></span>
+                  <span><input type="text" class="editAble" ng-model="item.price" ng-pattern="/^(0|[0-9][0-9]{0,9})(\.[0-9]{1,6})?$/"
+                               ng-change="validateProds(saleTender);" ng-blur="validateProds(saleTender);validateThis(item.price, 'price')"
+                               ng-focus="validateProds(saleTender);" placeholder="请输入单价" ng-init="item.price = isUser?'-':item.price"/></span>
+                  <span ng-bind="item.price * item.tenderProd.qty || '' | number:2"></span>
+                </dd>
+              </dl>
+              <!-- 已结标 -->
+              <dl ng-show = "tender.result == 1 && tender.auditStatus != 0">
+                <dt>
+                  <span class="result-index">序号</span>
+                  <span class="wid01-result">产品信息</span>
+                  <span class="result">单位</span>
+                  <span class="result">采购数量</span>
+                  <span class="result">采购周期</span>
+                  <span class="result">税率(%)</span>
+                  <span class="result">单价</span>
+                  <span class="result">含税金额</span>
+                  <span class="result">评标结果</span>
+                  <span class="result">评标说明</span>
+                </dt>
+                <dd ng-repeat="item in saleTender.saleTenderItems | orderBy: 'tenderProd.index'">
+                  <span class="result-index">{{$index + 1}}</span>
+                  <span class="wid01-result">
+                                        <p>产品型号:{{item.tenderProd.prodCode}}</p>
+                                        <p>产品名称:{{item.tenderProd.prodTitle}}</p>
+                                        <p ng-show="item.tenderProd.brand">品牌:<i ng-bind="item.tenderProd.brand" style="font-style: inherit"></i></p>
+                                    </span>
+                  <span class="result" ng-bind="item.tenderProd.unit"></span>
+                  <span class="result" ng-bind="item.tenderProd.qty"></span>
+                  <span class="result" ng-bind="item.cycle"></span>
+                  <span class="result" ng-bind="item.taxrate"></span>
+                  <span class="result" ng-bind="isUser?'-':item.price"></span>
+                  <span class="result" ng-bind="isUser?'-':(item.price * item.tenderProd.qty || '' | number:2)"></span>
+                  <span class="result" ng-bind="tender.auditStatus != 0 ? (item.applyStatus == 1 ? '中标' : '未中标') : '未中标';"></span>
+                  <span class="result" ng-bind="tender.auditStatus != 0 ? item.description: '';"></span>
+                </dd>
+              </dl>
+            </div>
+            <!-- 全包产品信息展示 -->
+            <div class="tender-list" ng-if="tender.ifAll == 1">
+              <!--产品信息-->
+              <div class="com_title01"><span>产品信息</span><em>*</em></div>
+              <dl>
+                <dt>
+                  <span>序号</span>
+                  <span class="wid-all">产品</span>
+                  <span>单位</span>
+                  <span>采购数量</span>
+                  <span>采购周期</span>
+                  <span>单价</span>
+                  <span>含税金额</span>
+                </dt>
+                <dd ng-repeat="item in saleTender.saleTenderItems | orderBy: 'tenderProd.index'">
+                  <span>{{$index + 1}}</span>
+                  <span class="wid-all">
+                                        <p>产品型号:{{item.tenderProd.prodCode}}</p>
+                                        <p>产品名称:{{item.tenderProd.prodTitle}}</p>
+                                        <p ng-show="item.tenderProd.brand">品牌:<i ng-bind="item.tenderProd.brand" style="font-style: inherit"></i></p>
+                                    </span>
+                  <span ng-bind="item.tenderProd.unit"></span>
+                  <span ng-bind="item.tenderProd.qty"></span>
+                  <span><input type="text" class="editAble" ng-model="item.cycle" ng-pattern="/^\+?[1-9][0-9]*$/"
+                               ng-change="validateProds(saleTender);validateThis(item.cycle, 'cycle')"
+                               ng-blur="validateProds(saleTender);"
+                               ng-focus="validateProds(saleTender);" placeholder="请输入周期"/></span>
+                  <span><input type="text" class="editAble" ng-model="item.price" ng-pattern="/^(0|[0-9][0-9]{0,9})(\.[0-9]{1,6})?$/"
+                               ng-change="validateProds(saleTender);" ng-blur="validateProds(saleTender);validateThis(item.price, 'price')"
+                               ng-focus="validateProds(saleTender);" placeholder="请输入单价"/></span>
+                  <span ng-bind="item.price * item.tenderProd.qty || '' | number:2"></span>
+                </dd>
+              </dl>
+            </div>
+          </div>
+        </div>
+        <div style="min-height: 150px;" ng-hide="tender.overdue == 1">
+          <div class="bid-desc" style="margin-left: 20px;">投标附件:</div>
+          <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">
+              <a style="color: #5078cb;" href="file/{{attach.id}}">{{::attach.name}}</a>&nbsp;&nbsp;
+              <a ng-click="removeAttach(attach.id, $index, tender.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>
+        <div style="min-height: 50px;" ng-show="tender.overdue == 1 && attaches.length > 0">
+          <div class="bid-desc" style="margin-left: 20px;">投标附件:</div>
+          <div class="">
+            <div ng-repeat="attach in attaches">
+              <a class="attach-file" style="color: #5078cb;" href="file/{{attach.id}}">{{::attach.name}}</a>
+            </div>
+          </div>
+        </div>
+        <div  class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+          <span>投标企业基本信息</span>
+          <span style="color: rgb(211,37,38);">*</span>
+        </div>
+        <div class="row prod-info">
+          <div class = "col-xs-4">
+            <div class="bid-desc">企业名称:</div>
+            <div class="unchanged-info">{{saleTender.enterpriseBaseInfo.enName}}</div>
+          </div>
+          <div class = "col-xs-8">
+            <div class="bid-desc">注册地址:</div>
+            <div class="unchanged-info">{{saleTender.enterpriseBaseInfo.enAddress}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">企业UU号:</div>
+            <div class="unchanged-info">{{saleTender.enterpriseBaseInfo.uu}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">营业执照号:</div>
+            <div class="unchanged-info">{{saleTender.enterpriseBaseInfo.enBusinessCode}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">成立时间:</div>
+            <div class="bid-desc" ng-show="saleTender.enterpriseBaseInfo.enEstablishDate">{{saleTender.enterpriseBaseInfo.enEstablishDate | date:'yyyy-MM-dd'}}</div>
+            <div class="input-group input-trigger date-picker" ng-show="saleTender.enterpriseBaseInfo.enEstablishDate == null">
+              <input type="text" ng-model="item.enterpriseBaseInfo.enEstablishDate"
+                     class="form-control" placeholder="点击选择日期" readonly="readonly"
+                     datepicker-popup="yyyy-MM-dd" is-open="condition.$fromOpened"
+                     ng-required="true" max-date="getMaxDate()" current-text="今天"
+                     clear-text="清除" close-text="关闭"
+                     datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                     ng-click="openDatePicker($event, condition, '$fromOpened')"
+                     ng-change="onDateCondition()"> <span
+                    class="input-group-btn">
+							<button type="button" class="btn btn-default btn-open"
+                                    ng-click="openDatePicker($event, condition, '$fromOpened')">
+								<i class="fa fa-calendar"></i>
+							</button>
+						</span>
+            </div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">员工人数:</div>
+            <input class="bid-input" ng-model="saleTender.enterpriseBaseInfo.emNum" ng-readonly="tender.overdue == 1" type="text" ng-change="validateThis(currentEnBaseInfo.emNum, 'emNum')" ng-focus="validateThis(currentEnBaseInfo.emNum, 'emNum')" ng-blur="validateThis(currentEnBaseInfo.emNum, 'emNum')" ng-pattern="/^\+?[1-9][0-9]*$/" />
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">企业电话:</div>
+            <input class="bid-input" ng-model="saleTender.enterpriseBaseInfo.enTel" ng-readonly="tender.overdue == 1" type="text" />
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">企业传真:</div>
+            <input class="bid-input" ng-model="saleTender.enterpriseBaseInfo.enFax" ng-readonly="tender.overdue == 1" type="text" />
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">管理员:</div>
+            <input class="bid-input" ng-model="saleTender.enterpriseBaseInfo.enUser" ng-readonly="tender.overdue == 1" type="text" />
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">联系电话:</div>
+            <input class="bid-input" ng-model="saleTender.enterpriseBaseInfo.userTel" ng-readonly="tender.overdue == 1" type="text" />
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">开户银行:</div>
+            <input class="bid-input" ng-model="saleTender.enterpriseBaseInfo.bank" ng-readonly="tender.overdue == 1" type="text" />
+          </div>
+          <div class = "col-xs-12">
+            <div class="bid-desc">经营范围:</div>
+            <input class="bid-input" style="width: 80%; text-align: left;" ng-model="saleTender.enterpriseBaseInfo.scope" ng-readonly="tender.overdue == 1" type="text" />
+          </div>
+          <div class = "col-xs-12">
+            <div class="bid-desc">备注:</div>
+            <input class="bid-input" style="width: 80%; text-align: left;" ng-model="saleTender.enterpriseBaseInfo.remark" ng-readonly="tender.overdue == 1" type="text" />
+          </div>
+        </div>
+        <div class="col-xs-12" style="padding: 30px;">
+          <div class="col-xs-2 pull-right btn-bid">
+            <button class="btn" ng-disabled="tender.overdue == 1 || !canSave || !emNumYes" ng-click="bidIt(saleTender)">投标</button>
+          </div>
+        </div>
+      </div>
+    </div>
+  </form>
+</div>

+ 126 - 0
src/main/webapp/resources/view/vendor/b2b/sale/sale_tender_question.html

@@ -0,0 +1,126 @@
+<style>
+  .saleTender label{
+    font-weight: inherit;
+  }
+  .modal-body .row{
+    line-height: 34px;
+  }
+  .modal-header {
+    width: 1020px;
+    height: 30px;
+    line-height: 30px;
+    background-color: #5078cb;
+    border-radius: 5px 5px 0px 0px;
+  }
+  .modal-header .modal-title {
+    line-height: 2px;
+    font-size: 14px;
+    color: #fff;
+  }
+  .modal-content{
+    width: 1020px;
+    margin-top: 50px;
+  }
+  .saleTender .modal-body .row{
+    margin: 0;
+    line-height: 34px;
+    margin-bottom: 10px;
+  }
+  .saleTender .modal-body .row .form-control{
+    height: 34px;
+    border: #bfbfbf 1px solid;
+    font-size: 14px;
+  }
+  .input-group-addon{
+    width: 60px;
+    padding: 0;
+    font-size: 12px;
+    background: #fff;
+  }
+  .input-group[class*="col-"]{
+    float: left;
+  }
+  .modal-footer{
+    border-top: none;
+    margin-right: 18px;
+    text-align: center;
+    padding: 0 15px 15px;
+  }
+  .saleTender .col {
+    padding-left: 5px;
+    padding-right: 5px;
+    line-height: 30px;
+  }
+
+  /* 读取显示无法修改的数据 */
+  .unchanged-info {
+    color: #969595;
+    overflow: hidden;
+  }
+  .btn-warning{
+    width: 70px;
+    height: 32px;
+    background-color: #c8c6c6;
+    border-radius: 2px;
+    color: #fff;
+    border: none;
+  }
+.btn-primary.btn{
+  width: 80px;
+  height: 32px;
+  text-align: center;
+  background-color: #5078cb;
+  border-radius: 2px;
+  color: #fff;
+}
+</style>
+<div class="modal-header">
+  <h3 class="modal-title">投标提问单</h3>
+</div>
+<form class="saleTender" name="saleTenderForm" ng-submit="ok(saleTenderForm)" novalidate>
+  <div class="modal-body" style="min-height: 500px;padding: 25px 25px 10px 25px;">
+    <div class="row">
+      <label class="col-md-1 col-sm-1 col">招标企业:</label>
+      <div class="col-md-3 col-sm-3 col unchanged-info" title="{{saleTender.enterprise.enName}}">{{saleTender.enterprise.enName}}</div>
+      <label class="col-md-1 col-sm-1 col">招标编号:</label>
+      <div class="col-md-3 col-sm-3 col unchanged-info" title="{{saleTender.code}}">{{saleTender.code}}</div>
+      <label class="col-md-1 col-sm-1 col">招标标题:</label>
+      <div class="col-md-3 col-sm-3 col unchanged-info" title="{{saleTender.title}}">{{saleTender.title}}</div>
+    </div>
+    <div class="row">
+      <label class="col-md-1 col-sm-1 col">答疑截止:</label>
+      <div class="col-md-3 col-sm-3 col unchanged-info" title="{{saleTender.questionEndDate | date:'yyyy-MM-dd'}}">{{saleTender.questionEndDate | date:'yyyy-MM-dd'}}</div>
+      <label class="col-md-1 col-sm-1 col">提问时间:</label>
+      <div class="col-md-3 col-sm-3 col unchanged-info" title="{{question.inDate | date:'yyyy-MM-dd'}}" ng-if="question.inDate">{{question.inDate | date:'yyyy-MM-dd'}}</div>
+      <div class="col-md-3 col-sm-3 col unchanged-info" title="{{currentDay | date:'yyyy-MM-dd'}}" ng-if="!question.inDate">{{currentDay | date:'yyyy-MM-dd'}}</div>
+      <label class="col-md-1 col-sm-1 col">回复时间:</label>
+      <div class="col-md-3 col-sm-3 col unchanged-info" title="{{question.replyDate | date:'yyyy-MM-dd'}}">{{question.replyDate | date:'yyyy-MM-dd'}}</div>
+    </div>
+    <div class="row">
+      <label class="col-md-1 col-sm-1 col">答疑主题:</label>
+      <div class="col-md-7 col-sm-5 col">
+        <input ng-model="question.topic" class="form-control input-sm" type="text" required>
+      </div>
+      <label class="col-md-1 col-sm-1 col">处理状态:</label>
+      <div class="col-md-3 col-sm-3 col unchanged-info" ng-if="question.status" title="{{question.status == '201' ? '已处理' : '待回复'}}">{{question.status == '201' ? '已处理' : '待回复'}}</div>
+    </div>
+    <div class="row">
+      <label class="col-md-1 col-sm-1 col">咨询内容:</label>
+      <div class="col-md-11 col-sm-11 col">
+        <textarea style="min-height: 20px; max-height: 400px; height: 100px;" ng-model="question.content" class="form-control input-sm" required placeholder="请输入咨询内容"></textarea>
+      </div>
+    </div>
+    <div class="row">
+      <label class="col-md-1 col-sm-1 col">咨询文件:</label>
+      <div class="col-md-11 col-sm-11 col">
+        <input type="file" ng-model="attachFile" ng-file-select required
+               ng-multiple="false" class="form-control input-sm" name="attachFile"
+               id="attachFile">
+      </div>
+    </div>
+  </div>
+  <div class="modal-footer">
+    <button class="btn btn-primary" type="submit" ng-disabled="saleTenderForm.$invalid">提交问题</button>
+    <button class="btn btn-warning" ng-click="cancel()" type="button">取消</button>
+  </div>
+</form>

+ 323 - 0
src/main/webapp/resources/view/vendor/b2b/sale/sale_tender_question_detail.html

@@ -0,0 +1,323 @@
+<!-- 提问单详情 -->
+<style>
+
+  /* 标题 */
+  .bid-label {
+    height: 30px;
+    margin-left: 10px;
+    margin-right: 10px;
+    background-color: #e8e8e8;
+    box-shadow: 0 0 5px #6f6f6f;
+    border-top-right-radius: 20px;
+  }
+  /* 主体 */
+  .purc-bid {
+    line-height: 2;
+    font-size: 14px;
+  }
+  .purc-bid .row {
+    margin-left: 0px;
+    margin-right: 0px;
+    padding-left: 15px;
+    padding-right: 15px;
+  }
+  .bid-content {
+    background-color: #fff;
+  }
+
+  .bid-content>div>div {
+    margin-top: 3px;
+    margin-bottom: 3px;
+  }
+
+  /* 读取显示无法修改的数据 */
+  .unchanged-info {
+    color: #969595;
+    overflow: hidden;
+  }
+  /* 二级标题栏 */
+  .title-div {
+    font-size: 14px;
+    font-weight: 600;
+    padding-left: 30px;
+    height: 50px;
+    padding-top: 11px;
+  }
+
+  /* 输入框前描述 */
+  .bid-desc {
+    width: 100px;
+    float: left;
+  }
+  /* 输入框 */
+  .bid-input {
+    border: none;
+    border-bottom: 1px solid #323232;
+    text-align: center;
+  }
+  .bid-input:focus{
+    outline:none;
+    border-bottom: 1px solid #5078cb;
+  }
+
+
+  /* 基本信息 */
+  .base-info {
+    border-bottom: 1px solid #e8e8e8;
+    padding-bottom: 30px;
+    padding-top: 20px;
+    margin-bottom: 0; /* 去除index中公共样式影响 */
+  }
+
+  .prod-info {
+    border-bottom: 1px solid #e8e8e8;
+    padding-bottom: 30px;
+    padding-top: 20px;
+  }
+
+  /* 附件上传 */
+  .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('static/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;
+  }
+
+  .attach-file {
+    margin-left: 130px;
+    width: 400px;
+  }
+
+  /* 右下角按钮 */
+  /*.bid-content>div {
+      background-color: #fff;
+  }
+  .bid-content>div>div>button,a {
+      width: 94px;
+      height: 36px;
+      font-size: 14px;
+      font-family: "Microsoft Yahei Regular";
+      color: #fff;
+      border-radius: 0;
+  }
+  .bid-content>div>div.btn-bid>button,a {
+      background-color: #3f84f6;
+  }*/
+
+  /* 日期选择器 */
+  .purc-bid .date-picker input {
+    border-radius: 0;
+    border: 1px solid #5078cb;
+    border-right: none;
+    font-size: 12px;
+  }
+  .purc-bid .date-picker span .btn-open {
+    color: #fff;
+    background-color: #5078cb;
+    border-radius: 0;
+    border: 1px solid #5078cb;
+    border-left: none;
+  }
+
+  /* 修改本页内btn的样式 及datepicker中的btn-success的样式 */
+  .purc-bid .date-picker .btn {
+    border-radius: 0;
+  }
+
+  .purc-bid .date-picker .btn-success {
+    background-color: #3f84f6;
+  }
+  .purc-bid .date-picker ul {
+    border-radius: 0;
+  }
+  .purc-bid .date-picker ul div:focus {
+    outline: none;
+    border-radius: 0;
+    border: none;
+  }
+
+  .com_head a{color:#fff;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:#3f84f6;}
+
+
+  .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-list,.tender-list02{width:100%;margin: 0 auto;background: #fff;}
+  .tender-list dl{width: 100%;margin:0 auto;}
+  .tender-list dl dt{width: 100%;margin:0 auto;height: 40px;}
+  .tender-list dl dt span{height: 40px;line-height: 48px;display: inline-block;color: #999;}
+  .tender-list dl dd{width: 100%;margin:0 auto;height: 100px;border-bottom: #ccc 1px dashed;overflow: hidden;}
+  .tender-list dl dd:hover{border: #d32526 1px solid;}
+  .tender-list dl dd span{height: 100px;line-height: 50px;display: inline-block;}
+  .tender-list dl span{width:10.6%;font-size: 14px;float: left;text-align: center;}
+  .tender-list dl span.wid01{width:25%;}
+  .tender-list dl span.wid01 p{font-size: 14px;line-height: 22px;text-align: left;margin: 0;}
+  .tender-list dl dd span.wid01{margin-top: 15px;}
+  .tender-list .com_title01 em,.tender-list02 .com_title01 em{margin-left: 5px;font-size: 16px;color: #f00;position: relative;top: 3px;}
+
+  /* 点击变输入框 */
+  .editAble{ width: 100%; height: 34px; border: none; font-size: 14px; text-align:center;line-height:34px;}
+
+  .not-answer {
+    text-align: center;
+    color: #969595;
+    margin-top: 20px;
+    font-size: large;
+  }
+  .pub-com_head, .com_head {
+    width: 100%;
+    height: 35px;
+    line-height: 35px;
+    background: #5078cb;
+    border-radius: 5px 5px 0 0;
+  }
+  .pub-com_head span, .com_head span {
+    margin-left: 10px;
+    color: #fff;
+    font-size: 14px;
+    font-weight: bold;
+  }
+  #public .screen .sreach .sreach-input >.form-control {
+    width: 216px!important;
+  }
+  #public .pro-line-sty01 td div {
+    color: #333 !important;
+  }
+</style>
+<link rel="stylesheet" href="static/css/b2bPublic.css">
+<div id="public" class="ng-scope block user_right fr">
+  <form name="bidForm">
+    <div class="purc-bid">
+      <div class="list-unstyled">
+        <div class="com_head">
+          <span>投标提问单</span>
+        </div>
+      </div>
+      <div class="bid-content ng-scope">
+        <div class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+          <span class="col-xs-11">基本信息</span>&nbsp;
+          <span ng-if="question.saleTenderAnswer.status == 201" class="block">
+                        <span class="text-trans success">已回复</span>
+                    </span>
+          <span ng-if="question.saleTenderAnswer.status == 200" class="block">
+                        <span class="text-trans todo">待回复</span>
+                    </span>
+        </div>
+        <div class="row base-info">
+          <div class = "col-xs-4">
+            <div class="bid-desc">招标编号:</div>
+            <div class="unchanged-info">{{question.saleTenderAnswer.tenderCode}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">招标项目:</div>
+            <div class="unchanged-info">{{question.saleTenderAnswer.tenderTitle}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">招标企业:</div>
+            <div class="unchanged-info">{{question.saleTenderAnswer.enterprise.enName}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">提问单号:</div>
+            <div class="unchanged-info">{{question.code}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">录入时间:</div>
+            <div class="unchanged-info">{{question.inDate | date:'yyyy-MM-dd'}}</div>
+          </div>
+          <div class = "col-xs-12">
+            <div class="bid-desc">提问主题:</div>
+            <div class="unchanged-info">{{question.topic}}</div>
+          </div>
+          <div class = "col-xs-12">
+            <div class="bid-desc">提问内容:</div>
+            <div class="unchanged-info">{{question.content}}</div>
+          </div>
+          <div ng-if="question.questionAttaches.length" class="col-xs-12">
+            <span class="bid-desc">提问附件:</span>
+            <a ng-repeat="attach in question.questionAttaches" class="" style="padding-left: 0; color: #5078cb;" href="file/{{attach.id}}">
+              {{::attach.name}}
+            </a>
+          </div>
+        </div>
+        <div  class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+          <span>回答信息</span>
+          <span style="color: rgb(211,37,38);">*</span>
+        </div>
+        <div class="not-answer" ng-show="question.saleTenderAnswer.auditDate == null">
+          招标方暂未回答,请耐心等待!
+        </div>
+        <div class="row prod-info" ng-show="question.saleTenderAnswer.auditDate != null">
+          <div class = "col-xs-4">
+            <div class="bid-desc">回复单号:</div>
+            <div class="unchanged-info">{{question.saleTenderAnswer.code}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">回复时间:</div>
+            <div class="unchanged-info">{{question.saleTenderAnswer.replyDate | date:'yyyy-MM-dd'}}</div>
+          </div>
+          <div class = "col-xs-4">
+            <div class="bid-desc">回复人:</div>
+            <div class="unchanged-info">{{question.saleTenderAnswer.recorder}}</div>
+          </div>
+          <div class = "col-xs-12">
+            <div class="bid-desc">备注:</div>
+            <div class="unchanged-info">{{question.saleTenderAnswer.remark}}</div>
+          </div>
+          <div class = "col-xs-12">
+            <div class="bid-desc">附件:</div>
+            <a ng-repeat="attach in question.saleTenderAnswer.answerAttaches" class="" style="padding-left: 0; color: #5078cb;" href="file/{{attach.id}}">
+              {{::attach.name}}
+            </a>
+          </div>
+        </div>
+        <!--<div class="col-xs-12" style="padding: 30px;">-->
+        <!--<div class="col-xs-2 pull-right btn-bid">-->
+        <!--<a class="btn" ui-sref="purc.evaluation({id:bid.id})" ng-click="javascript:history.go(-1);">返回</a>-->
+        <!--</div>-->
+        <!--</div>-->
+      </div>
+    </div>
+  </form>
+</div>

+ 684 - 0
src/main/webapp/resources/view/vendor/b2b/sale_inquiry.html

@@ -0,0 +1,684 @@
+<style>
+	.order-table .header>th {
+		height: 38px;
+		text-align: center;
+		background: #f5f5f5;
+		border-top: 1px solid #e8e8e8;
+		border-bottom: 1px solid #e8e8e8;
+	}
+
+	.order-table .sep-row {
+		height: 10px;
+	}
+
+	.order-table .selector {
+		vertical-align: middle;
+		margin: 0 0 2px 0;
+	}
+
+	.toolbar label {
+		margin-right: 10px;
+		margin-bottom: 0;
+	}
+
+	.toolbar .select_all {
+		margin: 0 6px 0 10px;
+		line-height: 20px;
+	}
+
+	.toolbar .btn {
+		-moz-border-radius: 2px;
+		margin-right: 5px;
+		border: 1px solid #dcdcdc;
+		border-radius: 2px;
+		-webkit-border-radius: 2px;
+	}
+
+	.order-table .order-hd {
+		background: #f5f5f5;
+		height: 40px;
+		line-height: 40px;
+	}
+
+	.order-table .order-hd td.first {
+		padding-left: 20px;
+		position: relative;
+	}
+
+	.order-table .order-hd .order-main span {
+		margin-right: 8px;
+		font-size: 14px;
+		color: #333;
+		font-weight: normal;
+	}
+	.order-table .order-hd .order-main span.text-num{
+		margin-left: 20px;
+	}
+	.order-table .order-hd .order-main span img{
+		margin: 0px 5px 0 11px;
+		vertical-align: sub;
+	}
+	.order-table .order-hd .order-main span a.text-num {
+		color: #3f84f6;
+	}
+	.dropdown>.dropdown-toggle.text-default {
+		color: #333333;
+	}
+	.dropdown>.dropdown-toggle:hover{
+		display: inline-block;
+		width: 78px;
+		height: 21px;
+		line-height: 21px;
+		color: #ff0101;
+		font-size: 13px;
+		background-color: #e8e8e8;
+	}
+	.order-table .order-hd .order-code {
+		font-style: normal;
+		font-family: verdana;
+	}
+
+	.order-table .order-hd .order-sum {
+		padding: 0 5px;
+	}
+
+	.order-table>tbody {
+		border: 1px solid transparent;
+	}
+
+	.order-table>tbody:hover {
+		border-color: #3c7cf5;
+		border-width: 2px;
+	}
+
+	.order-table .operates {
+		display: none;
+	}
+
+	.order-table>tbody:hover .operates {
+		display: block;
+	}
+
+	.order-table .order-bd {
+		border-bottom: 1px solid #e6e6e6;
+	}
+
+	.order-table .order-bd>td {
+		padding: 10px 5px;
+		vertical-align: top;
+		position: relative;
+	}
+
+	.order-table .order-bd .product {
+		padding-left: 20px;
+	}
+
+	.input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
+	{
+		height: 26px;
+		padding: 0 5px;
+		font-size: 12px;
+		line-height: 1.5;
+		border-radius: 3px;
+	}
+
+	.input-group-xs .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn {
+		border-top-left-radius: 0;
+		border-bottom-left-radius: 0;
+	}
+
+	@media ( min-width : 768px) {
+		.form-horizontal .form-group-xs .control-label {
+			padding-top: 5px;
+		}
+	}
+
+	.info-container .info:hover {
+		color: #CC3333;
+	}
+	.input-error{
+		background-color: #fff8ee;
+		border-color: #CC0033;
+	}
+	input.input-error:focus {
+		background-color: #fff8ee;
+		border-color: #CC0033;
+	}
+	.block{
+		/*background: #f5f5f5;*/
+	}
+	.order-table{
+		background: #fff;
+	}
+	.menu .new-dot{
+		width: 20px;
+		height: 20px;
+		line-height: 20px;
+		font-size: 12px;
+		color: #fff;
+		font-weight: inherit;
+		top: -2px;
+	}
+    #public .menu .btn-group-justified{
+        width: 100%;
+        margin: 0 auto;
+        height: 40px;
+        line-height: 40px;
+        background: #fff;
+        border-bottom: 1px solid #f15601;
+    }
+    #public .menu .btn-group-justified .btn-group {
+        min-width: 100px;
+        height: 40px;
+        text-align: center;
+        float: left;
+        margin-left: 25px;
+    }
+    #public .menu .btn-group-justified .btn-group button {
+        height: 40px;
+        font-size: 13px;
+        font-weight: bold;
+        border-top: 3px solid #fff;
+        min-width: 110px;
+        outline: none;
+    }
+    #public .menu .btn-group-justified .btn-group button.btn-info{
+		border-top: 3px solid #f15601;
+		border-left: 1px solid #f15601;
+		border-right: 1px solid #f15601;
+		border-bottom: 1px solid #fff !important;
+		color: #f15601;
+		height: 42px;
+		line-height: 29px;
+    }
+    #public .form-group-sm .form-control {
+        width: 215px;
+        border: #5078cb 1px solid;
+        height: 32px;
+        box-shadow: none;
+    }
+	#public .screen .sreach a.input-group-addon {
+		width: 58px;
+		height: 32px;
+		background: #5078cb;
+		color: #fff;
+		line-height: 18px;
+		float: none;
+		broder-radius: 2px;
+		vertical-align: unset;
+	}
+	#public .screen .sreach .sreach-input >.form-control{
+		width: 220px;
+	}
+	#public .order-table, #public .inquiry-table {
+		width: 1026px;
+	}
+	#public .ng-table-pager{
+		margin-top: 20px;
+	}
+	.order-table .order-hd .order-main span.icon{
+		position: absolute;
+		top: 0;
+		left: 0;
+	}
+	.no-circle-icon {
+		display: inline-block;
+		padding: 0 5px;
+		line-height: 20px;
+		height: 20px;
+		color: #fff !important;
+		background: #ea5a60;
+		cursor: pointer;
+	}
+	.circle-icon {
+		display: inline-block;
+		padding: 0 5px;
+		line-height: 20px;
+		height: 20px;
+		color: #fff !important ;
+		background: #15b262;
+		cursor: pointer;
+	}
+	.tab_top ul li.down-purchase{
+		float: right;
+		margin-right: 24px;
+		font-size: 14px;
+		color: #5078cb;
+	}
+</style>
+<link rel="stylesheet" href="static/css/b2bPublic.css">
+<div class="block user_right fr" id="public">
+	<!--<div class="pub-com_head">-->
+		<!--<span>客户采购询价</span>-->
+		<!--<div class="p-right">-->
+			<!--<a ng-click="exportXls()" target="_self" class="text-simple" title="导出Excel表格"><i class="fa fa-file-text fa-fw"></i>导出</a>-->
+		<!--</div>-->
+	<!--</div>-->
+	<div class="tab_top" style="margin-bottom: 10px">
+		<ul class="fl" style="width: 100%">
+			<li ng-class="{'active': storeType=='seekPurchase'}"><a ui-sref="vendorSeekPurchase">公共询价</a></li>
+			<li ng-class="{'active': storeType=='purchase'}"><a ui-sref="saleInquiry">客户采购询价</a></li>
+			<li ng-class="{'active': storeType=='mould'}"><a ui-sref="saleInquiryMould">客户模具询价</a></li>
+			<li ng-class="{'active': storeType=='quotation'}"><a ui-sref="saleQuotationList">主动报价</a></li>
+			<li ng-class="{'active': storeType=='tender'}"><a ui-sref="saleTenderList">客户招标</a></li>
+			<li ng-class="{'active': storeType=='attend'}"><a ui-sref="purchasAttendtion">商机关注</a></li>
+			<li class="down-purchase">
+                    <span ng-click="exportXls()">
+                        <i class="fa fa-file-excel-o fa-fw"></i>导出Excel
+                    </span>
+				<form style="display: none;" id="down-load-purchase" method="get">
+					<input type="hidden" name="ids" ng-value="localInfo.ids">
+				</form>
+			</li>
+		</ul>
+	</div>
+	<div class="menu condition block">
+        <div class="btn-group btn-group-sm btn-group-justified">
+            <div class="btn-group btn-group-sm">
+                <button type="button" class="btn btn-default btn-line"
+                        ng-class="{'btn-info':active=='all'}" ng-click="setActive('all')">全部<b class="new-dot" ng-if="unread.all>0">({{unread.all>99?'99+':unread.all}})</b></button>
+            </div>
+            <div class="btn-group btn-group-sm">
+                <button type="button" class="btn btn-default btn-line"
+                        ng-class="{'btn-info':active=='done'}" ng-click="setActive('done');setOrdersReadByState()">已报价<b class="new-dot" ng-if="unread.replied>0">({{unread.replied>99?'99+':unread.replied}})</b></button>
+            </div>
+            <div class="btn-group btn-group-sm">
+                <button type="button" class="btn btn-default btn-line"
+                        ng-class="{'btn-info':active=='todo'}" ng-click="setActive('todo')">待报价<b class="new-dot" ng-if="unread.notReply>0">({{unread.notReply>99?'99+':unread.notReply}})</b></button>
+            </div>
+            <div class="btn-group btn-group-sm">
+                <button type="button" class="btn btn-default btn-line"
+                        ng-class="{'btn-info':active=='agreed'}" ng-click="setActive('agreed')">已采纳</button>
+            </div>
+            <div class="btn-group btn-group-sm">
+                <button type="button" class="btn btn-default btn-line"
+                        ng-class="{'btn-info':active=='refused'}" ng-click="setActive('refused')">未采纳</button>
+            </div>
+            <div class="btn-group btn-group-sm">
+                <button type="button" class="btn btn-default btn-line"
+                        ng-class="{'btn-info':active=='invalid'}" ng-click="setActive('invalid')">已失效</button>
+            </div>
+        </div>
+	</div>
+	<div class="condition block">
+        <!--搜索时间筛选-->
+        <div class="screen check-filter">
+            <div class="radio-block date-radio">
+                时间筛选:
+                <label class="com-check-radio">
+                    <input type="radio" id="oneMonth" name="date" ng-click="autoMonth = false;changeDateZone(1);condition.$open=false" checked>
+                    <label for="oneMonth"></label>
+                    30天
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="threeMonth" name="date" ng-click="autoMonth = false;changeDateZone(3);condition.$open=false">
+                    <label for="threeMonth"></label>
+                    90天
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="sixMonth" name="date" ng-click="autoMonth = false;changeDateZone(6);condition.$open=false">
+                    <label for="sixMonth"></label>
+                    180天
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="autoMonth" name="date" ng-click="autoMonth = true;condition.$open=!condition.$open;changeDateZone(-1)">
+                    <label for="autoMonth"></label>
+                    自定义
+                </label>
+            </div>
+            <div class="sreach fr">
+                <div ng-show="autoMonth" class="date fl">
+                    <div class="data-input">
+                        <input type="text" ng-model="condition.dateFrom"
+                               class="form-control select-adder" placeholder="起始时间"
+                               datepicker-popup="yyyy-MM-dd"
+                               is-open="condition.$fromOpened"
+                               max-date="condition.dateTo" current-text="今天" clear-text="清除" close-text="关闭"
+                               ng-click="openFilterDatePicker($event, condition, '$fromOpened')"
+                               ng-focus="openFilterDatePicker($event, condition, '$fromOpened')"
+                               datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                        />
+                        <button class="open" ng-click="openFilterDatePicker($event, condition, '$fromOpened')"></button>
+                    </div>
+
+                    <em>–</em>
+                    <div class="data-input">
+                        <input type="text" ng-model="condition.dateTo"
+                               class="form-control select-adder" placeholder="结束时间"
+                               datepicker-popup="yyyy-MM-dd"
+                               is-open="condition.$toOpened"
+                               min-date="condition.dateFrom" current-text="今天" clear-text="清除" close-text="关闭"
+                               ng-click="openFilterDatePicker($event, condition, '$toOpened')"
+                               ng-focus="openFilterDatePicker($event, condition, '$toOpened')"
+                               datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                        />
+                        <button class="open" ng-click="openFilterDatePicker($event, condition, '$toOpened')"></button>
+                    </div>
+                </div>
+                <div class="sreach-input fr">
+					<input type="search" class="form-control input-sm" ng-model="keyword"
+						   ng-search="onSearch(keyword)" placeholder="输入单据编号、客户名称、物料名称搜索"/>
+					<a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
+                </div>
+            </div>
+        </div>
+	</div>
+	<table class="order-table block" ng-table="tableParams">
+		<thead>
+		<tr class="header">
+			<th>产品</th>
+			<th width="60">单位</th>
+			<th width="110"><span class="text-default">≥</span>分段数</th>
+			<th width="90">价格</th>
+			<th width="80">最小订购</th>
+			<th width="80">最小包装</th>
+			<th width="120">有效期</th>
+			<th width="75">操作</th>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="8"></td>
+		</tr>
+		</thead>
+		<tbody ng-if="tableParams.total() == 0">
+		<tr>
+			<td colspan="8">
+				<div id="empty">
+					<div class="left_img">
+						<a href="http://www.ubtob.com/" target="_blank" title="优软云首页"><img src="static/img/empty/uas_empty.png"></a>
+						<a href="#/index" title="B2B商务首页">B2B 商务</a>
+					</div>
+					<div class="right_link">
+						<p>暂无对应的采购询价信息</p>
+					</div>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<td colspan="8">
+				<div id="empty_info">
+					<div class="f16 text-center empty_title">
+						<p>为什么我没有接收到客户的询价单?</p>
+					</div>
+					<div class="f14 empty_explain">
+						<div class="info">
+							<p>1、您的客户还没有提交审核询价单<br>
+								解决:与您的客户沟通确认单据是否已经审核(只有客户ERP中已经审核的单据才能接收到)</p>
+						</div>
+						<div class="info">
+							<p>2、客户ERP中供应商信息有误<br>
+								解决:与您的客户沟通确认您的信息在客户的供应商资料中是否维护正确,尤其是企业UU号</p>
+						</div>
+						<div class="info">
+							<p>3、您的客户正在使用旧版本的UAS商务平台<br>
+								解决:我们仍有部分用户在使用旧版本UAS商务平台系统,你可以用您的企业UU号和管理员个人UU号 <a href="http://www.usoftchina.com" class="text-bold text-link" title="http://www.usoftchina.com" target="_blank">登陆旧版本UAS商务平台</a></p>
+						</div>
+					</div>
+				</div>
+			</td>
+		</tr>
+		</tbody>
+		<tbody ng-repeat="inquiryItem in $data track by inquiryItem.id">
+		<tr class="order-hd">
+			<td class="first" colspan="4">
+				<div class="order-main">
+					<span class="no-circle-icon icon" ng-if="isUnread(inquiryItem.id)" title="标记为未查看">未读</span>
+					<span class="circle-icon icon" ng-if="!isUnread(inquiryItem.id)" title="标记为已查看">已读</span>
+					&nbsp;&nbsp;<span class="text-num text-bold" title="{{inquiryItem.inquiry.date}}"
+									  ng-bind="::inquiryItem.inquiry.date | date:'yyyy-MM-dd'"></span>
+					<span><img src="static/img/user/images/shop_home.png"><span ng-bind="::inquiryItem.inquiry.enterprise.enName"></span></span>
+					<span>流水号:<a title="查看详情"
+								 class="text-num order-detail" ng-bind="::inquiryItem.inquiry.code" ui-sref="sale_inquiry_detail({id:inquiryItem.inquiry.id})" target="_self"
+								 ng-click="setOrdersRead(inquiryItem.id)"></a>
+					</span>
+				</div>
+			</td>
+			<td>
+				币别:<span ng-bind="::(isUser?'-':inquiryItem.currency)"></span>
+			</td>
+			<td>
+				税率:<input  type="text" ng-pattern="/^\+?[1-9]\d*$/" ng-model="inquiryItem.taxrate" style="width: 25px" ng-readonly="!inquiryItem.$editing">%
+			</td>
+			<td class="text-right" colspan="1" class="order-sum">
+				<div ng-if="inquiryItem.replyable">
+					<span class="text-inverse text-bold" ng-bind-html="inquiryItem.inquiry.endDate | date:'yyyy-MM-dd'"></span>
+				</div>
+			</td>
+			<td class="text-center">
+				<div class="">
+					类型: <span ng-bind="::inquiryItem.inquiry.inquirytype || '无'"></span>
+				</div>
+			</td>
+		</tr>
+		<tr class="order-bd">
+			<td class="product">
+				<div class="text-num text-bold" ng-bind="::inquiryItem.product.code"></div>
+				<div ng-bind="::inquiryItem.product.title"></div>
+				<div class="text-muted" ng-bind="::inquiryItem.product.spec"></div>
+				<div ng-if="::inquiryItem.brand && !inquiryItem.$editing" class="text-muted">
+					品牌:<span ng-bind="::inquiryItem.brand"></span>
+				</div>
+				<div ng-if="::inquiryItem.vendorprodcode && !inquiryItem.$editing" class="text-muted">
+					供应商物料编号:<span ng-bind="::inquiryItem.vendorprodcode"></span>
+				</div>
+				<div ng-if="::inquiryItem.needquantity" class="text-num text-bold">
+					需求数量:<span ng-bind="::inquiryItem.needquantity"></span>
+				</div>
+				<div ng-show="inquiryItem.remark">
+					备注:{{::inquiryItem.remark}}
+				</div>
+				<div ng-if="inquiryItem.inquiry.attachs.length" class="text-muted">
+					<i class="fa fa-paperclip fa-fw" style="color: #ffa340; font-size: 18px;"></i>附件:<a class="file" ng-repeat="attach in inquiryItem.inquiry.attachs" href="file/{{attach.id}}">{{::attach.name}}</a>
+				</div>
+				<div ng-if="inquiryItem.attaches.length" class="text-muted">
+					<i class="fa fa-paperclip fa-fw" style="color: #ffa340; font-size: 18px;"></i>报价附件:
+					<div ng-repeat="attach in inquiryItem.attaches">
+						<a class="file" href="file/{{attach.id}}">{{::attach.name}}&nbsp;</a>
+						<a ng-show="inquiryItem.$editing" ng-click="deleteAttach(inquiryItem.attaches, $index)" title="删除附件"><i class="fa fa-trash-o fa-lg"></i></a>
+					</div>
+				</div>
+				<div class="form-group" ng-if="inquiryItem.$editing" style="width: 180px;">
+					<input type="text" class="form-control input-xs"
+						   ng-model="inquiryItem.brand" placeholder="物料品牌">
+				</div>
+				<div class="form-group" ng-if="inquiryItem.$editing" style="width: 180px;">
+					<input type="text" class="form-control input-xs"
+						   ng-model="inquiryItem.vendorprodcode" placeholder="供应商物料编号">
+				</div>
+				<div class="form-group" ng-if="inquiryItem.$editing" style="width: 220px;">
+					<input type="text" class="form-control input-xs" ng-change="verify(inquiryItem.leadtime,'leadtime')" ng-pattern="/^\+?[1-9]\d*$/"
+						   ng-model="inquiryItem.leadtime" placeholder="交货周期(确切天数)" style="display: inline-block;width: 180px;">
+					<span ng-if="!inquiryItem.leadtime" class="text-inverse"> 必填*</span>
+					<div style="margin-left: 50px;"class="text-bold text-inverse" ng-show="!leadtimeVerify">请填数字!</div>
+				</div>
+				<div class="input-group form-group" ng-if="inquiryItem.$editing" style="width: 300px;">
+					<div class="input-group-addon">上传附件:</div>
+					<input type="file" ng-model="inquiryItem.myFiles" ng-file-select
+						   ng-multiple="false" class="form-control input-sm input-group" name="file">
+				</div>
+			</td>
+			<td class="text-center">
+				<span ng-bind="::inquiryItem.product.unit"></span>
+			</td>
+			<td class="text-center">
+				<div ng-show="!inquiryItem.$editing">
+					<div ng-repeat="reply in inquiryItem.replies">
+						<span ng-bind="reply.lapQty"></span>
+					</div>
+				</div>
+				<div style="margin: 0 auto;" ng-if="inquiryItem.$editing">
+					<div ng-repeat="reply in inquiryItem.replies">
+						<div class="form-group input-group input-group-xs">
+							<input type="text" class="form-control input-xs" ng-class="{'input-error': !replylapQtys[$index]}"  ng-change="verifylapQty(reply.lapQty,$index, inquiryItem)"
+								   ng-model="reply.lapQty" min="{{$index == 0 ? 0 :(inquiryItem.replies[$index - 1].lapQty + 1)}}" ng-pattern="/^\+?[1-9]\d*$/"
+								   ng-Readonly="$index == 0"  placeholder="数量" />
+							<span class="input-group-btn" ng-show="$index != 0">
+									<button class="btn btn-default" type="button"
+											ng-click="removeStep(inquiryItem, $index)">
+										<i class="fa fa-trash-o"></i>
+									</button>
+								</span>
+						</div>
+						<div class="text-bold text-inverse" style="margin-top:-15px" ng-show="!replylapQtys[$index]">分段数量递增!</div>
+					</div>
+					<a ng-click="addStep(inquiryItem)" class="btn btn-default btn-xs"
+					   ng-show="!inquiryItem.custLap">添加分段</a>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!inquiryItem.$editing">
+					<div ng-repeat="reply in inquiryItem.replies">
+						<span ng-bind="isUser?'':(reply.price | number:6)"></span> <span
+							ng-show="reply.price == null || isUser" class="text-muted">-</span>
+					</div>
+					<div class="dropdown">
+						<a href="javascript:void(0);" class="dropdown-toggle text-default"
+						   ng-mouseover="getHistory(inquiryItem)">历史报价<i
+								class="fa fa-fw fa-angle-down"></i></a>
+						<div class="dropdown-menu pane" style="width: 270px;">
+							<div class="pane-body">
+								<ul class="list-unstyled list-menu">
+									<li ng-repeat="historyItem in ::inquiryItem.history">
+										<div ng-class="{'text-inverse': $index==0}">
+											<div class="row row-sm"
+												 ng-repeat="historyReply in historyItem.replies">
+												<div class="col-xs-5">≥{{historyReply.lapQty}}</div>
+												<div class="col-xs-5">价格{{historyReply.price | number:6}}</div>
+											</div>
+										</div>
+										<div class="text-muted">{{historyItem.inquiry.date |
+											date:'yyyy-MM-dd'}}{{historyItem.inquiry.enterprise.enName}}
+										</div>
+									</li>
+								</ul>
+								<div ng-if="historyShow">
+									<div ng-show="!inquiryItem.history || inquiryItem.history.length == 0"
+										 class="text-center text-muted">暂无历史报价</div></div>
+								<div ng-if="!historyShow">
+									<div  class="text-center text-muted">无法访问,没有客户询价-查看历史报价权限!</div></div>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div style="margin: 0 auto;" ng-if="inquiryItem.$editing">
+					<div ng-repeat="reply in inquiryItem.replies">
+						<div class="form-group">
+							<input type="text" class="form-control input-xs " ng-class="{'input-error': !replyPrices[$index]}" ng-model="reply.price"
+								   ng-change="verify(reply.price,$index)" placeholder="单价(必填)" ng-init="reply.price = isUser?'-':reply.price"/>
+							<div class="text-bold text-inverse" style="margin-bottom:-15px" ng-show="!replyPrices[$index]">请填数字!</div>
+						</div>
+					</div>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!inquiryItem.$editing">
+					<span ng-bind="inquiryItem.minOrderQty"></span> <span
+						ng-show="inquiryItem.minOrderQty == null" class="text-muted">-</span>
+				</div>
+				<div ng-if="inquiryItem.$editing">
+					<input type="text" class="form-control input-xs" ng-change="verify(inquiryItem.minOrderQty,'minOrderQty')"
+						   ng-class="{'input-error': !minOrderQtyVerify}" ng-model="inquiryItem.minOrderQty" placeholder="最小订购" >
+					<div class="text-bold text-inverse" ng-show="!minOrderQtyVerify">请填数字!</div>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!inquiryItem.$editing">
+					<span ng-bind="inquiryItem.minPackQty"></span> <span
+						ng-show="inquiryItem.minPackQty == null" class="text-muted">-</span>
+				</div>
+				<div ng-if="inquiryItem.$editing">
+					<input type="text" class="form-control input-xs"
+						   ng-model="inquiryItem.minPackQty" placeholder="最小包装"
+						   ng-change="verify(inquiryItem.minPackQty,'minPackQty')" ng-class="{'input-error': !minPackQtyVerify}" >
+					<div class="text-bold text-inverse" ng-show="!minPackQtyVerify">请填数字!</div>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-init="parseDate(inquiryItem)">
+					<div ng-show="inquiryItem.toDate">
+						<span class="text-muted">从 </span><span
+							ng-bind="inquiryItem.fromDate | date:'yyyy-MM-dd'"></span> <span
+							class="text-muted">到 </span><span
+							ng-bind="inquiryItem.toDate | date:'yyyy-MM-dd'"></span>
+					</div>
+					<div ng-show="!inquiryItem.toDate">
+						<span class="text-muted">-</span>
+					</div>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == null && inquiryItem.invalid != 1" class="block">
+					<span class="text-trans warning">已报价</span>
+					<div ng-if="inquiryItem.inquiry.overdue == 0 && inquiryItem.inquiry.check != 1" style="padding-top: 50px;">
+						<div ng-show="!inquiryItem.$editing && inquiryItem.replyable">
+							<a ng-click="inquiryItem.$editing=!inquiryItem.$editing;  getToken();">修改报价</a>
+						</div>
+						<div ng-show="inquiryItem.$editing">
+							<div>
+								<a ng-click="inquiryItem.$editing=!inquiryItem.$editing; cancel()">取消</a>
+							</div>
+							<div>
+								<button ng-click="onReplyClick(inquiryItem, true);setOrdersRead(inquiryItem.id)"
+										ng-disabled="!isValid(inquiryItem, true)"
+										class="btn btn-link btn-xs text-inverse">
+									保存并<br>确认报价
+								</button>
+							</div>
+						</div>
+					</div>
+					<div ng-if="inquiryItem.inquiry.check == 1" class="text-muted" style="padding-top: 50px;">客户正在<br>审批...</div>
+				</div>
+				<div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == 1 && inquiryItem.invalid != 1" class="block">
+					<span class="text-trans success">已采纳</span>
+				</div>
+				<div ng-if="inquiryItem.status == 201 && inquiryItem.invalid == 1" class="block">
+					<span class="text-trans text-light">已失效</span>
+				</div>
+				<div ng-if="inquiryItem.status == 314" class="block">
+					<span class="text-trans text-light">已作废</span>
+				</div>
+				<div ng-if="inquiryItem.status == 201 && inquiryItem.agreed == 0" class="block">
+					<span class="text-trans error">未采纳</span>
+				</div>
+				<div ng-if="inquiryItem.status == 200">
+					<div ng-if="inquiryItem.overdue == 0 && inquiryItem.inquiry.check != 1 && inquiryItem.invalid == 0">
+						<div ng-show="!inquiryItem.$editing">
+							<a ng-click="inquiryItem.$editing=!inquiryItem.$editing; getToken()">报 价</a>
+						</div>
+						<div ng-show="inquiryItem.$editing">
+							<div>
+								<a ng-click="inquiryItem.$editing=!inquiryItem.$editing; cancel()">取消</a>
+							</div>
+							<div>
+								<button ng-click="onReplyClick(inquiryItem);setOrdersRead(inquiryItem.id)"
+										ng-disabled="!isValid(inquiryItem)"
+										class="btn btn-link btn-xs text-default">保存</button>
+							</div>
+							<div>
+								<button ng-click="onReplyClick(inquiryItem, true);setOrdersRead(inquiryItem.id)"
+										ng-disabled="!isValid(inquiryItem, true)"
+										class="btn btn-link btn-xs text-inverse">
+									保存并<br>确认报价
+								</button>
+							</div>
+						</div>
+					</div>
+					<div ng-if="inquiryItem.inquiry.overdue == 0 && inquiryItem.inquiry.check == 1 && inquiryItem.invalid != 1">
+						<span class="text-trans half">未报价</span>
+						<div class="text-muted" style="padding-top: 50px;">询价单已<br>被提交...</div>
+					</div>
+					<div ng-if="inquiryItem.overdue == 1 && inquiryItem.invalid != 1" class="block">
+						<span class="text-trans error">已过期</span>
+					</div>
+					<div ng-if="inquiryItem.invalid == 1" class="block">
+						<span class="text-trans text-light">已失效</span>
+					</div>
+				</div>
+				<div ng-if="(inquiryItem.status == 201 && (inquiryItem.agreed != null) || inquiryItem.overdue == 1) && inquiryItem.inquiry.check != 1">
+					<br><br>
+					<a ui-sref="sale_quotation_new({inquiryItem:inquiryItem})">主动报价</a>
+				</div>
+			</td>
+		</tr>
+		</tbody>
+	</table>
+</div>

+ 531 - 0
src/main/webapp/resources/view/vendor/b2b/sale_inquiryMould.html

@@ -0,0 +1,531 @@
+<style>
+	.order-table .header>th {
+		height: 38px;
+		text-align: center;
+		background: #f5f5f5;
+		border-top: 1px solid #e8e8e8;
+		border-bottom: 1px solid #e8e8e8;
+	}
+
+	.order-table .sep-row {
+		height: 10px;
+	}
+
+	.order-table .selector {
+		vertical-align: middle;
+		margin: 0 0 2px 0;
+	}
+
+	.toolbar label {
+		margin-right: 10px;
+		margin-bottom: 0;
+	}
+
+	.toolbar .select_all {
+		margin: 0 6px 0 10px;
+		line-height: 20px;
+	}
+
+	.toolbar .btn {
+		-moz-border-radius: 2px;
+		margin-right: 5px;
+		border: 1px solid #dcdcdc;
+		border-radius: 2px;
+		-webkit-border-radius: 2px;
+	}
+
+	.order-table .order-hd {
+		background: #f5f5f5;
+		height: 40px;
+		line-height: 40px;
+	}
+
+	.order-table .order-hd td.first {
+		padding-left: 20px;
+	}
+
+	.order-table .order-hd .order-main span {
+		margin-right: 8px;
+	}
+
+	.order-table .order-hd .order-code {
+		font-style: normal;
+		font-family: verdana;
+	}
+
+	.order-table .order-hd .order-sum {
+		padding: 0 5px;
+	}
+
+	.order-table>tbody {
+		border: 1px solid transparent;
+	}
+
+	.order-table>tbody:hover {
+		border-color: #d32526;
+		border-width: 2px;
+	}
+
+	.order-table .order-bd {
+		border-bottom: 1px solid #e6e6e6;
+	}
+
+	.order-table .order-bd>td {
+		padding: 10px 0px;
+		vertical-align: top;
+		position: relative;
+	}
+
+	.order-table .order-bd .product {
+		padding-left: 20px;
+	}
+
+	.input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
+	{
+		height: 26px;
+		padding: 0 5px;
+		font-size: 12px;
+		line-height: 1.5;
+		border-radius: 3px;
+	}
+
+	.input-group-xs .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn {
+		border-top-left-radius: 0;
+		border-bottom-left-radius: 0;
+	}
+
+	@media ( min-width : 768px) {
+		.form-horizontal .form-group-xs .control-label {
+			padding-top: 5px;
+		}
+	}
+
+	.info-container .info:hover {
+		color: #CC3333;
+	}
+	.input-error{
+		background-color: #fff8ee;
+		border-color: #CC0033;
+	}
+	input.input-error:focus {
+		background-color: #fff8ee;
+		border-color: #CC0033;
+	}
+
+	tbody td.enddate {
+		color: red;
+	}
+
+	tbody td .text-waiting {
+		position: absolute;
+		top: 5px;
+		background-color: #fff;
+		border: 1px solid;
+		padding: 3px 14px;
+		font-size: 16px;
+		font-family: "LiShu";
+		border-radius: 10px;
+		-moz-transform: rotate(-10deg);
+		-webkit-transform: rotate(-10deg);
+		-o-transform: rotate(-10deg);
+		transform: rotate(-10deg);
+		border-radius: 10px;
+		opacity: 0.7;
+		white-space: nowrap;
+		color: #56a022;
+		border-color: #56a022;
+	}
+
+	tbody td .text-trans {
+		right:20px;
+	}
+
+	tbody td .input-price {
+		margin: 2px;
+		height: 26px;
+		border: 1px solid #d1d1d1;
+	}
+
+	tbody td div .text-ps,.text-prod {
+		height: 30px;
+	}
+
+	tbody td div.text-mould {
+		border-bottom: 1px solid #e0e2e3;
+	}
+
+	.dropdown-menu .pane-body ul>li{
+
+	}
+	.block{
+		/*background: #f5f5f5;*/
+	}
+	.order-table{
+		background: #fff;
+	}
+	.menu .new-dot{
+		width: 20px;
+		height: 20px;
+		line-height: 20px;
+		font-size: 12px;
+		color: #fff;
+		font-weight: inherit;
+		top: -2px;
+	}
+	.color-black {
+		color: #000;
+	}
+	/* 清楚ie下的输入框X */
+	::-ms-clear, ::-ms-reveal{display: none;}
+
+	.taxrate-input {
+		width: 30px;
+	}
+</style>
+<link rel="stylesheet" href="static/css/b2bPublic.css">
+<div class="block user_right fr"  id="public">
+	<!--<div class="pub-com_head">-->
+		<!--<span>客户模具询价</span>-->
+		<!--<div class="p-right">-->
+			<!--<a href="#" ng-click="exportXls()" target="_self" class="text-simple" title="导出Excel表格"><i class="fa fa-file-text fa-fw"></i>导出</a>-->
+		<!--</div>-->
+	<!--</div>-->
+	<div class="tab_top" style="margin-bottom: 10px">
+		<ul class="fl" style="width: 100%">
+			<li ng-class="{'active': storeType=='seekPurchase'}"><a ui-sref="vendorSeekPurchase">公共询价</a></li>
+			<li ng-class="{'active': storeType=='purchase'}"><a ui-sref="saleInquiry">客户采购询价</a></li>
+			<li ng-class="{'active': storeType=='mould'}"><a ui-sref="saleInquiryMould">客户模具询价</a></li>
+			<li ng-class="{'active': storeType=='quotation'}"><a ui-sref="saleQuotationList">主动报价</a></li>
+			<li ng-class="{'active': storeType=='tender'}"><a ui-sref="saleTenderList">客户招标</a></li>
+			<li ng-class="{'active': storeType=='attend'}"><a ui-sref="purchasAttendtion">商机关注</a></li>
+			<li class="down-purchase">
+                    <span ng-click="exportXls()">
+                        <i class="fa fa-file-excel-o fa-fw"></i>导出Excel
+                    </span>
+				<form style="display: none;" id="down-load-purchase" method="get">
+					<input type="hidden" name="ids" ng-value="localInfo.ids">
+				</form>
+			</li>
+		</ul>
+	</div>
+	<div class="menu condition block">
+		<div class="btn-group btn-group-sm btn-group-justified">
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='all'}" ng-click="setActive('all')">全部
+					<b class="new-dot" ng-if="unread.all > 0">({{unread.all>99?'99+':unread.all}})</b>
+				</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='done'}" ng-click="setActive('done');setOrdersReadByState()">已报价
+					<b class="new-dot" ng-if="unread.replied > 0">({{unread.replied>99?'99+':unread.replied}})</b>
+				</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='todo'}" ng-click="setActive('todo')">待报价
+					<b class="new-dot" ng-if="unread.notReply > 0">({{unread.notReply>99?'99+':unread.notReply}})</b>
+				</button>
+			</div>
+			<!--<div class="btn-group btn-group-sm">-->
+			<!--<button type="button" class="btn btn-default btn-line"-->
+			<!--ng-class="{'btn-info':active=='end'}" ng-click="setActive('end')">已过期</button>-->
+			<!--</div>-->
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='invalid'}" ng-click="setActive('invalid')">已失效</button>
+			</div>
+		</div>
+	</div>
+	<!--<div class="height10">&nbsp;</div>-->
+	<div class="condition block">
+		<!--搜索时间筛选-->
+		<div class="screen check-filter">
+			<div class="radio-block date-radio">
+				时间筛选:
+				<label class="com-check-radio">
+					<input type="radio" id="oneMonth" name="date" ng-click="autoMonth = false;changeDateZone(1);condition.$open=false" checked>
+					<label for="oneMonth"></label>
+					30天
+				</label>
+				<label class="com-check-radio">
+					<input type="radio" id="threeMonth" name="date" ng-click="autoMonth = false;changeDateZone(3);condition.$open=false">
+					<label for="threeMonth"></label>
+					90天
+				</label>
+				<label class="com-check-radio">
+					<input type="radio" id="sixMonth" name="date" ng-click="autoMonth = false;changeDateZone(6);condition.$open=false">
+					<label for="sixMonth"></label>
+					180天
+				</label>
+				<label class="com-check-radio">
+					<input type="radio" id="autoMonth" name="date" ng-click="autoMonth = true;condition.$open=!condition.$open;changeDateZone(-1)">
+					<label for="autoMonth"></label>
+					自定义
+				</label>
+			</div>
+			<div class="sreach fr">
+				<div ng-show="autoMonth" class="date fl">
+					<div class="data-input">
+						<input type="text" ng-model="condition.dateFrom"
+							   class="form-control select-adder" placeholder="起始时间"
+							   datepicker-popup="yyyy-MM-dd"
+							   is-open="condition.$fromOpened"
+							   max-date="condition.dateTo" current-text="今天" clear-text="清除" close-text="关闭"
+							   ng-click="openFilterDatePicker($event, condition, '$fromOpened')"
+							   ng-focus="openFilterDatePicker($event, condition, '$fromOpened')"
+							   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+						/>
+						<button class="open" ng-click="openFilterDatePicker($event, condition, '$fromOpened')"></button>
+					</div>
+
+					<em>–</em>
+					<div class="data-input">
+						<input type="text" ng-model="condition.dateTo"
+							   class="form-control select-adder" placeholder="结束时间"
+							   datepicker-popup="yyyy-MM-dd"
+							   is-open="condition.$toOpened"
+							   min-date="condition.dateFrom" current-text="今天" clear-text="清除" close-text="关闭"
+							   ng-click="openFilterDatePicker($event, condition, '$toOpened')"
+							   ng-focus="openFilterDatePicker($event, condition, '$toOpened')"
+							   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+						/>
+						<button class="open" ng-click="openFilterDatePicker($event, condition, '$toOpened')"></button>
+					</div>
+				</div>
+				<div class="sreach-input fr">
+					<input type="search" class="form-control input-sm" ng-model="keyword"
+						   ng-search="onSearch()" placeholder="输入单据编号、客户名称、物料名称搜索"/>
+					<a class="btn input-group-addon" ng-click="onSearch()">搜索</a>
+				</div>
+			</div>
+		</div>
+	</div>
+	<table class="order-table block" ng-table="tableParams">
+		<thead>
+		<tr class="header">
+			<th>模具信息</th>
+			<th></th>
+			<th width="180">价格</th>
+			<th width=""></th>
+			<th width="80">有效日期</th>
+			<th width="0"></th>
+			<th width="180">操作</th>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="7"></td>
+		</tr>
+		</thead>
+		<tbody ng-if="tableParams.total() == 0">
+		<tr>
+			<td colspan="7">
+				<div id="empty">
+					<div class="left_img">
+						<a href="http://www.ubtob.com/" target="_blank" title="优软云首页"><img src="static/img/empty/uas_empty.png"></a>
+						<a href="#/index" title="B2B商务首页">B2B 商务</a>
+					</div>
+					<div class="right_link">
+						<p>当前没有对应的客户询价单!</p>
+					</div>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<td colspan="7">
+				<div id="empty_info">
+					<div class="f16 text-center empty_title">
+						<p>为什么我没有接收到客户的询价单?</p>
+					</div>
+					<div class="f14 empty_explain">
+						<div class="info">
+							<p>1、您的客户还没有提交审核询价单<br>
+								解决:与您的客户沟通确认单据是否已经审核(只有客户ERP中已经审核的单据才能接收到)</p>
+						</div>
+						<div class="info">
+							<p>2、客户ERP中供应商信息有误<br>
+								解决:与您的客户沟通确认您的信息在客户的供应商资料中是否维护正确,尤其是企业UU号</p>
+						</div>
+						<div class="info">
+							<p>3、您的客户正在使用旧版本的UAS商务平台<br>
+								解决:我们仍有部分用户在使用旧版本UAS商务平台系统,你可以用您的企业UU号和管理员个人UU号 <a href="http://www.usoftchina.com" class="text-bold text-link" title="http://www.usoftchina.com" target="_blank">登陆旧版本UAS商务平台</a></p>
+						</div>
+					</div>
+				</div>
+			</td>
+		</tr>
+		</tbody>
+		<tbody ng-repeat="inquiryMould in $data track by inquiryMould.id">
+		<tr class="order-hd">
+			<td class="first" colspan="3">
+				<div class="order-main">
+					<span class="no-circle-icon icon" ng-if="isUnread(inquiryMould.id)" title="标记为未查看">未读</span>
+					<span class="circle-icon icon" ng-if="!isUnread(inquiryMould.id)" title="标记为已查看">已读</span>
+					 <span class="text-num text-bold" title="{{inquiryMould.date}}" ng-bind="::inquiryMould.date | date:'yyyy-MM-dd'"></span>
+					<span><img src="static/img/user/images/shop_home.png"><span ng-bind="::inquiryMould.enterprise.enName"></span></span>
+					<span>流水号:<a class="text-num order-detail" ng-bind="::inquiryMould.code" ui-sref="saleInquiryMouldDetail({id:inquiryMould.id})" target="_self"
+								 ng-click="setOrdersRead(inquiryMould.id)" title="查看详情"></a>
+						</span>
+					币别:<span ng-bind="inquiryMould.currency"></span>
+					<span>税率:</span><input class="taxrate-input" ng-model="inquiryMould.taxrate" ng-pattern="/^[0-9][0-9]{0,1}$/" ng-disabled="!inquiryMould.$editing">%
+				</div>
+			</td>
+			<td>
+			</td>
+			<td class = "text-center enddate">
+				<span ng-bind="::inquiryMould.endDate | date:'yyyy-MM-dd'"></span>
+			</td>
+			<td>
+			</td>
+			<td class="text-center">
+				<div>
+					<!-- <a ng-click="print(inquiryMould)" class="text-muted" title="打印"><i
+                        class="fa fa-print fa-lg"></i></a> -->
+					<!-- 待报价 -->
+					<div ng-if="inquiryMould.status == 200 && inquiryMould.overdue != 1 && inquiryMould.adoptStatus == null && inquiryMould.valid != 0">
+						<div ng-if="inquiryMould.overdue == 0">
+								<span ng-show="!inquiryMould.$editing">
+									<a ng-click="inquiryMould.$editing=!inquiryMould.$editing">报价</a>
+								</span>
+							<span ng-show="inquiryMould.$editing">
+										<a ng-click="inquiryMould.$editing=!inquiryMould.$editing;reload()"
+										   class="btn btn-xs btn-link text-error">取消</a>&nbsp;
+										<a ng-click="onReplyClick(inquiryMould)"
+										   ng-disabled="!canSave"
+										   class="btn btn-link btn-xs text-success">保存</a>&nbsp;
+										<a ng-click="onReplyClick(inquiryMould, true);setOrdersRead(inquiryMould.id)"
+										   class="btn btn-link btn-xs text-inverse">
+											保存并确认报价
+										</a>
+								<!-- <a ng-click="" class="btn-xs">上传附件</a> -->
+								</span>
+						</div>
+					</div>
+					<!-- 已报价 -->
+					<div ng-if="inquiryMould.replyable && inquiryMould.status == 201 && inquiryMould.adoptstatus == null && inquiryMould.checked != 1 && inquiryMould.valid != 0">
+							<span ng-show="!inquiryMould.$editing">
+								<a ng-click="inquiryMould.$editing=!inquiryMould.$editing;setOrdersRead(inquiryMould.id)">修改报价</a>
+							</span>
+						<span ng-show="inquiryMould.$editing">
+								<a ng-click="inquiryMould.$editing=!inquiryMould.$editing;reload()"
+								   class="btn btn-xs btn-link text-error">取消</a>&nbsp;
+								<a ng-click="onReplyClick(inquiryMould, true);setOrdersRead(inquiryMould.id)"
+								   class="btn btn-link btn-xs text-inverse">
+									保存并确认报价
+								</a>
+							<!-- <a ng-click="" class="btn-xs">上传附件</a> -->
+							</span>
+					</div>
+				</div>
+			</td>
+		</tr>
+		<tr class="order-bd">
+			<td class="product">
+				<div class="text-mould" ng-repeat="items in inquiryMould.inquiryMouldItems">
+					<div class="text-num text-bold text-ps" >
+						<span>模具:</span>{{items.psCode}}-{{items.psName}}
+					</div>
+					<div class="text-muted" ng-repeat="prod in items.inquiryMouldDetails">
+						<div><span class="text-bold color-black">物料:</span>{{prod.prodCode}}-{{prod.prodTitle}}-{{prod.prodSpec}}</div>
+					</div>
+				</div>
+				<div ng-if="inquiryMould.attachs.length" class="text-muted">
+					附件:<a class="file" ng-repeat="attach in inquiryMould.attachs" href="file/{{attach.id}}">{{::attach.name}}</a>
+				</div>
+				<div ng-if="inquiryMould.sellAttachs.length" class="text-muted">
+					供应商附件:
+					<div ng-repeat="attach in inquiryMould.sellAttachs track by $index">
+						<a class="file"  href="file/{{attach.id}}">{{::attach.name}}</a>
+						<a style="color: #ff2222" ng-click="removeFile(inquiryMould, attach)">删除</a>
+					</div>
+				</div>
+				<!-- 	<div ng-if="inquiryMould.$editing && inquiryMould.attachs.length" class="text-muted">
+						附件:<a class="file" ng-repeat="attach in inquiryMould.attachs" href="" title="编辑报价时无法获取附件">{{::attach.name}}</a>
+					</div>-->
+				<div ng-if="inquiryMould.$editing"
+					 class="input-group input-group-sm col-sm-10" style="padding-top: 5px;">
+					<span class="input-group-addon">上传附件:</span>
+					<input type="file" ng-model="myFiles" ng-file-select
+						   ng-multiple="true" class="form-control input-sm" name="inquiryMould.sellAttachs"
+						   id="inquiryMould.sellAttachs">
+					<span class="input-group-btn">
+							<button ng-click="pushFile(inquiryMould, myFiles);notZero(inquiryMould)"
+									ng-disabled="!myFiles"
+									class="btn btn-success" type="button" >确认上传</button>
+						</span>
+				</div>
+			</td>
+			<td class="text-center">
+			</td>
+			<td class="text-center">
+				<div ng-repeat="items in inquiryMould.inquiryMouldItems">
+					<input type="text" class="text-right input-price input-xs" ng-model="items.price" placeholder="单价(请填数字)" ng-blur="blurPrice(items.price)"
+						   ng-change="verifyItems(items.price,items.reply);notZero(inquiryMould)" ng-disabled="!inquiryMould.$editing" ng-init="items.price = isUser?'-':items.price"/>
+					<span ng-if="inquiryMould.$editing" class="text-inverse">*</span>
+					<div ng-repeat="prod in items.inquiryMouldDetails">
+						<input type="text" class="text-right input-price input-xs" ng-model="prod.price" placeholder="单价(请填数字)" ng-blur="blurPrice(prod.price)"
+							   ng-change="verifyProds(prod.price,prod.reply);notZero(inquiryMould)" ng-disabled="!inquiryMould.$editing" ng-init="prod.price = isUser?'-':prod.price"/>
+						<span ng-if="inquiryMould.$editing" class="text-inverse">*</span>
+					</div>
+				</div>
+				<div class="dropdown">
+					<a href="javascript:void(0);"
+					   class="dropdown-toggle text-default"
+					   ng-mouseover="getHistory(inquiryMould)">历史报价<i
+							class="fa fa-fw fa-angle-down"></i></a>
+					<div class="dropdown-menu pane" style="width: 270px;">
+						<div class="pane-body">
+							<ul ng-show="inquiryMould.replyDate" class="list-unstyled list-menu">
+								<li class="col-xs-12" ng-repeat="item in ::inquiryMould.history.inquiryMouldItems">
+									<div ng-repeat="itemReply in item.replies" ng-class="{'text-inverse': $index==0}">
+										<span class="col-xs-3">{{itemReply.reply | number:6}}</span>
+										<div ng-repeat="prodReply in itemReply.prodReplies">
+											<span class="col-xs-3">{{prodReply.reply | number:6}}</span>
+										</div>
+										<span class="col-xs-12">{{itemReply.replyDate | date:"yyyy-MM-dd HH:mm:ss"}}</span>
+										<div class="text-muted col-xs-12">
+											{{inquiryMould.enterprise.enName}}
+										</div>
+									</div>
+								</li>
+
+							</ul>
+							<div ng-if="historyShow">
+								<div ng-show="!inquiryMould.replyDate"
+									 class="text-center text-muted">暂无历史报价</div></div>
+							<div ng-if="!historyShow">
+								<div class="text-center text-muted">无法访问,没有客户模具询价-查看历史报价权限!</div></div>
+						</div>
+					</div>
+				</div>
+			</td>
+			<td></td>
+			<td>
+			</td>
+			<td>
+			</td>
+			<td class="text-center">
+				<div ng-if="inquiryMould.status == 200 && inquiryMould.overdue == 0 && inquiryMould.valid != 0 && inquiryMould.adoptStatus == null" class="block">
+					<span class="text-waiting">待报价</span>
+				</div>
+				<div ng-if="inquiryMould.status == 201 && inquiryMould.adoptStatus == null && inquiryMould.valid != 0" class="block">
+					<span class="text-trans warning">已报价</span>
+					<div ng-if="inquiryMould.check == 1" class="text-muted" style="padding-top: 50px;">客户正在<br>审批...</div>
+				</div>
+				<div ng-if="inquiryMould.status == 201 && inquiryMould.adoptStatus == 1 && inquiryMould.valid != 0" class="block">
+					<span class="text-trans success">已采纳</span>
+				</div>
+				<div ng-if="inquiryMould.status == 201 && inquiryMould.adoptStatus == 0 && inquiryMould.valid != 0" class="block">
+					<span class="text-trans error">未采纳</span>
+				</div>
+				<div ng-if="inquiryMould.overdue == 1 && inquiryMould.status == 200 && inquiryMould.valid != 0" class="block">
+					<span class="text-trans text-muted">已过期</span>
+				</div>
+				<div ng-if="inquiryMould.valid == 0" class="block">
+					<span class="text-trans text-light">已作废</span>
+				</div>
+			</td>
+		</tr>
+		</tbody>
+	</table>
+</div>

+ 488 - 0
src/main/webapp/resources/view/vendor/b2b/sale_quotationList.html

@@ -0,0 +1,488 @@
+<style>
+	.order-table{
+		background: #fff;
+	}
+
+	.inquiry-cz{
+		font-size: 14px;
+		padding: 0;
+		margin-left: 55px;
+	}
+	.inquiry-cz a{
+		color: #5078cb;
+		float: left;
+		margin-left: 62px;
+	}
+	.inquiry-cz a img{
+		margin-right: 3px;
+	}
+
+	/*sssssssssssssssssssssssssssssssss*/
+	.order-table .header>th {
+		height: 38px;
+		text-align: center;
+		background: #f5f5f5;
+		border-top: 1px solid #e8e8e8;
+		border-bottom: 1px solid #e8e8e8;
+	}
+
+	.order-table .sep-row {
+		height: 10px;
+	}
+
+	.order-table .selector {
+		vertical-align: middle;
+		margin: 0 0 2px 0;
+	}
+
+	.toolbar label {
+		margin-right: 10px;
+		margin-bottom: 0;
+	}
+
+	.toolbar .select_all {
+		margin: 0 6px 0 10px;
+		line-height: 20px;
+	}
+
+	.toolbar .btn {
+		-moz-border-radius: 2px;
+		margin-right: 5px;
+		border: 1px solid #dcdcdc;
+		border-radius: 2px;
+		-webkit-border-radius: 2px;
+	}
+
+	.order-table .order-hd {
+		background: #f5f5f5;
+		height: 40px;
+		line-height: 40px;
+	}
+
+	.order-table .order-hd td.first {
+		padding-left: 20px;
+	}
+
+	.order-table .order-hd .order-main span {
+		margin-right: 8px;
+	}
+
+	.order-table .order-hd .order-code {
+		font-style: normal;
+		font-family: verdana;
+	}
+
+	.order-table .order-hd .order-sum {
+		padding: 0 5px;
+	}
+
+	.order-table>tbody {
+		border: 1px solid transparent;
+	}
+
+	.order-table>tbody:hover {
+		border-color: #56a022;
+		border-width: 2px;
+	}
+
+	.order-table .operates {
+		display: none;
+	}
+
+	.order-table>tbody:hover .operates {
+		display: block;
+	}
+
+	.order-table .order-bd {
+		border-bottom: 1px solid #e6e6e6;
+	}
+
+	.order-table .order-bd>td {
+		padding: 10px 5px;
+		vertical-align: top;
+		position: relative;
+	}
+
+	.order-table .order-bd .product {
+		padding-left: 20px;
+	}
+
+	.input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
+	{
+		height: 26px;
+		padding: 0 5px;
+		font-size: 12px;
+		line-height: 1.5;
+		border-radius: 3px;
+	}
+
+	.input-group-xs .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn {
+		border-top-left-radius: 0;
+		border-bottom-left-radius: 0;
+	}
+
+	.input-dbfind {
+		cursor: pointer;
+	}
+
+	@media ( min-width : 768px) {
+		.form-horizontal .form-group-xs .control-label {
+			padding-top: 5px;
+		}
+	}
+
+	.inline-show {
+		display: inline-block;
+	}
+
+	.inline-hide {
+		display: none;
+	}
+	.btn-group-justified .btn{
+		border: none;
+		font-size: 14px;
+		outline: none;
+	}
+	.btn-group-justified .btn-info{
+		background: none;
+		color: #3a89d1;
+	}
+	.btn-group-justified .btn:hover{
+		background: none;
+		color: #3a89d1;
+	}
+	.btn-group-justified .btn:active{
+		background: none;
+	}
+	.pub-com_head  .p-right a.btn-info{
+		background: none;
+		color: #999;
+		cursor: default;
+	}
+	.pub-com_head  .p-right a.btn-info:hover{
+		text-decoration: none;
+		color: #999;
+	}
+	.pub-com_head  .time-per{
+		margin-right: 20px;
+		color: #fff !important;
+		float: right;
+	}
+	.pub-com_head  .time-per em,.pub-com_head  .time-per time{
+		font-style : normal;
+		font-size: 14px;
+		color:#fff;
+		margin-right: 20px;
+	}
+	.pub-com_head span.fr em {
+		margin-right: 50px;
+		font-size: 14px;
+		color:#fff;
+	}
+
+	#public .order-table .order-hd td i.fa-user{
+		font-size: 16px;
+		color: #339999!important;
+	}
+</style>
+<link rel="stylesheet" href="static/css/b2bPublic.css">
+<div class="block">
+	<!--<div class="pub-com_head">-->
+		<!--<span>主动报价</span>-->
+		<!--<div class="p-right">-->
+			<!--<a ui-sref="sale_quotation_new" title="新增主动报价单"><i class="fa fa-plus-square fa-fw"></i>新增</a>-->
+			<!--<a href="#" ng-click="exportXls()" target="_self" class="text-simple" title="导出Excel表格"><i class="fa fa-file-text fa-fw"></i>导出</a>-->
+		<!--</div>-->
+	<!--</div>-->
+</div>
+<div id="public" class="block user_right fr">
+	<div class="tab_top" style="margin-bottom: 10px">
+		<ul class="fl" style="width: 100%">
+			<li ng-class="{'active': storeType=='seekPurchase'}"><a ui-sref="vendorSeekPurchase">公共询价</a></li>
+			<li ng-class="{'active': storeType=='purchase'}"><a ui-sref="saleInquiry">客户采购询价</a></li>
+			<li ng-class="{'active': storeType=='mould'}"><a ui-sref="saleInquiryMould">客户模具询价</a></li>
+			<li ng-class="{'active': storeType=='quotation'}"><a ui-sref="saleQuotationList">主动报价</a></li>
+			<li ng-class="{'active': storeType=='tender'}"><a ui-sref="saleTenderList">客户招标</a></li>
+			<li ng-class="{'active': storeType=='attend'}"><a ui-sref="purchasAttendtion">商机关注</a></li>
+			<li class="down-purchase" style=" float: left;margin-left: 98px;">
+				<a ui-sref="sale_quotation_new" title="新增主动报价单" style="color: #5078cb;"><i class="fa fa-plus-square fa-fw"></i>新增</a>
+			</li>
+			<li class="down-purchase">
+                    <span ng-click="exportXls()">
+                        <i class="fa fa-file-excel-o fa-fw"></i>导出Excel
+                    </span>
+				<form style="display: none;" id="down-load-purchase" method="get">
+					<input type="hidden" name="ids" ng-value="localInfo.ids">
+				</form>
+			</li>
+		</ul>
+	</div>
+	<div class="menu condition block list">
+		<div class="btn-group btn-group-sm btn-group-justified">
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='all'}" ng-click="setActive('all')">全部</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='done'}"
+						ng-click="setActive('done')">已报价</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='agreed'}"
+						ng-click="setActive('agreed')">已采纳</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='refused'}"
+						ng-click="setActive('refused')">未采纳</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='todo'}"
+						ng-click="setActive('todo')">未提交</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='invalid'}"
+						ng-click="setActive('invalid')">已失效</button>
+			</div>
+		</div>
+	</div>
+	<!--<div class="height10">&nbsp;</div>-->
+	<div class="condition block">
+		<!--搜索时间筛选-->
+		<div class="screen check-filter">
+			<div class="radio-block date-radio">
+				时间筛选:
+				<label class="com-check-radio">
+					<input type="radio" id="oneMonth" name="date" ng-click="autoMonth = false;changeDateZone(1);condition.$open=false" checked>
+					<label for="oneMonth"></label>
+					30天
+				</label>
+				<label class="com-check-radio">
+					<input type="radio" id="threeMonth" name="date" ng-click="autoMonth = false;changeDateZone(3);condition.$open=false">
+					<label for="threeMonth"></label>
+					90天
+				</label>
+				<label class="com-check-radio">
+					<input type="radio" id="sixMonth" name="date" ng-click="autoMonth = false;changeDateZone(6);condition.$open=false">
+					<label for="sixMonth"></label>
+					180天
+				</label>
+				<label class="com-check-radio">
+					<input type="radio" id="autoMonth" name="date" ng-click="autoMonth = true;condition.$open=!condition.$open;changeDateZone(-1)">
+					<label for="autoMonth"></label>
+					自定义
+				</label>
+			</div>
+			<div class="sreach fr">
+				<div ng-show="autoMonth" class="date fl">
+					<div class="data-input">
+						<input type="text" ng-model="condition.dateFrom"
+							   class="form-control select-adder" placeholder="起始时间"
+							   datepicker-popup="yyyy-MM-dd"
+							   is-open="condition.$fromOpened"
+							   max-date="condition.dateTo" current-text="今天" clear-text="清除" close-text="关闭"
+							   ng-click="openFilterDatePicker($event, condition, '$fromOpened')"
+							   ng-focus="openFilterDatePicker($event, condition, '$fromOpened')"
+							   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+						/>
+						<button class="open" ng-click="openFilterDatePicker($event, condition, '$fromOpened')"></button>
+					</div>
+
+					<em>–</em>
+					<div class="data-input">
+						<input type="text" ng-model="condition.dateTo"
+							   class="form-control select-adder" placeholder="结束时间"
+							   datepicker-popup="yyyy-MM-dd"
+							   is-open="condition.$toOpened"
+							   min-date="condition.dateFrom" current-text="今天" clear-text="清除" close-text="关闭"
+							   ng-click="openFilterDatePicker($event, condition, '$toOpened')"
+							   ng-focus="openFilterDatePicker($event, condition, '$toOpened')"
+							   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+						/>
+						<button class="open" ng-click="openFilterDatePicker($event, condition, '$toOpened')"></button>
+					</div>
+				</div>
+				<div class="sreach-input fr">
+					<input type="search" class="form-control input-sm" ng-model="keyword"
+						   ng-search="onSearch(keyword)" placeholder="输入单据编号、客户名称、物料名称搜索"/>
+					<a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
+				</div>
+			</div>
+		</div>
+	</div>
+	<table class="order-table block" ng-table="tableParams" >
+		<thead>
+		<tr class="header">
+			<th width="400px">产品</th>
+			<th width="90"><span class="text-default">≥</span>分段数</th>
+			<th width="90">价格</th>
+			<th width="80">最小订购</th>
+			<th width="80">最小包装</th>
+			<th width="120">有效期</th>
+			<th width="75">操作</th>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="7"></td>
+		</tr>
+		</thead>
+		<tbody ng-if="tableParams.total() == 0">
+		<tr>
+			<td colspan="7">
+				<div id="empty">
+					<div class="left_img">
+						<a href="http://www.ubtob.com/" target="_blank" title="优软云首页"><img src="static/img/empty/uas_empty.png"></a>
+						<a href="#/index" title="B2B商务首页">B2B 商务</a>
+					</div>
+					<div class="right_link">
+						<p>暂无对应的单据</p>
+						<a ui-sref="sale.quotation.new"><i class="way_icon"></i>立即向客户主动报价</a>
+					</div>
+				</div>
+			</td>
+		</tr>
+		</tbody>
+		<tbody ng-repeat="quotationItem in $data track by quotationItem.id">
+		<tr class="order-hd">
+			<td class="first" colspan="3">
+				<div class="order-main">
+					<!--<span> <input type="checkbox" class="selector" ng-model="quotationItem.$selected"></span>-->
+					<span class="text-num text-bold" title="{{quotationItem.date}}" ng-bind="::quotationItem.date | date:'yyyy-MM-dd'"></span>
+					<span><img src="static/img/user/images/shop_home.png"><span ng-bind="::quotationItem.cust.enName"></span></span>
+					<span>流水号:<a class="text-num order-detail" ng-bind="::quotationItem.code" ui-sref="sale_quotation_item({id:quotationItem.id})" title="查看详情" target="_self"></a></span>
+				</div>
+			</td>
+			<td ng-if="!isUser">
+				币别:<span ng-bind="::quotationItem.currency"></span>
+			</td>
+			<td ng-if="isUser"></td>
+			<td>
+				税率:<span ng-bind="::quotationItem.taxrate || 0"></span>%
+			</td>
+			<td class="text-left" colspan="1" title="录入人">
+				<i class="fa fa-user text-muted"></i>  {{::quotationItem.user.userName}}
+			</td>
+			<td class="text-center">
+				<div class="operates">
+					<!-- <a ng-click="print(quotationItem)" class="text-muted" title="打印"><i
+						class="fa fa-print fa-lg"></i></a> -->
+				</div>
+			</td>
+		</tr>
+		<tr class="order-bd">
+			<td class="product" ng-repeat="pro in quotationItem.quotationItems">
+				<div class="text-num text-bold" ng-bind="::pro.product.code"></div>
+				<div ng-bind="::pro.product.title"></div>
+				<div class="text-muted" ng-bind="::pro.product.spec"></div>
+				<div ng-if="::pro.brand && !pro.$editing" class="text-muted">
+					品牌:<span ng-bind="::pro.brand"></span>
+				</div>
+				<div ng-if="::pro.vendorprodcode && !pro.$editing" class="text-muted">
+					供应商物料编号:<span ng-bind="::pro.vendorprodcode"></span>
+				</div>
+				<div ng-if="::pro.leadtime && !pro.$editing" class="text-muted">
+					交货周期:<span ng-bind="::pro.leadtime"></span> 天
+				</div>
+			</td>
+			<td class="text-center">
+				<div ng-show="!quotationItem.$editing">
+					<div ng-repeat="price in quotationItem.quotationItems">
+						<div ng-repeat="pricedetail in price.prices">
+							<span ng-bind="::pricedetail.lapQty"></span>
+						</div>
+					</div>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!quotationItem.$editing">
+					<div ng-repeat="price in quotationItem.quotationItems">
+						<div ng-repeat="pricedetail in price.prices">
+							<span ng-if="!isUser" ng-bind="pricedetail.price | number:6"></span> <span
+								ng-show="pricedetail.price == null || isUser" class="text-muted">-</span>
+						</div>
+					</div>
+					<div class="dropdown">
+						<a href="javascript:void(0);" class="dropdown-toggle text-default"
+						   ng-mouseover="getHistory(quotationItem)">历史报价<i
+								class="fa fa-fw fa-angle-down"></i></a>
+						<div class="dropdown-menu pane" style="width: 270px;">
+							<div class="pane-body">
+								<ul class="list-unstyled list-menu">
+									<li ng-repeat="historyItem in ::quotationItem.history">
+										<div ng-class="{'text-inverse': $index==0}">
+											<div class="row row-sm"
+												 ng-repeat="historyReply in historyItem.replies">
+												<div class="col-xs-5">≥{{historyReply.lapQty}}</div>
+												<div class="col-xs-5">价格{{historyReply.price | number:6}}</div>
+											</div>
+										</div>
+										<div class="text-muted">{{historyItem.quotation.date |
+											date:'yyyy-MM-dd'}}{{historyItem.quotation.enterprise.enName}}
+										</div>
+									</li>
+								</ul>
+								<div ng-show="!quotationItem.history || quotationItem.history.length == 0"
+									 class="text-center text-muted">暂无历史报价</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!quotationItem.$editing" ng-repeat="detail in quotationItem.quotationItems">
+					<span ng-bind="detail.minOrderQty"></span> <span
+						ng-show="detail.minOrderQty == null" class="text-muted">-</span>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!quotationItem.$editing" ng-repeat="detail in quotationItem.quotationItems">
+					<span ng-bind="detail.minPackQty"></span> <span
+						ng-show="detail.minPackQty == null" class="text-muted">-</span>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!quotationItem.$editing"
+					 ng-init="parseDate(quotationItem)">
+					<div ng-show="quotationItem.endDate">
+						<span class="text-muted">从 </span><span
+							ng-bind="quotationItem.date | date:'yyyy-MM-dd'"></span> <span
+							class="text-muted">到 </span><span
+							ng-bind="quotationItem.endDate | date:'yyyy-MM-dd'"></span>
+					</div>
+					<div ng-show="!quotationItem.endDate">
+						<span class="text-muted">-</span>
+					</div>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-if="quotationItem.status == 101 && quotationItem.quotationItems[0].agreed == null && quotationItem.overdue != 1" class="block">
+					<span class="text-trans warning">已提交</span>
+				</div>
+				<div ng-if="quotationItem.status == 311 && quotationItem.quotationItems[0].agreed == null && quotationItem.overdue != 1" class="block">
+					<span class="text-trans warning">正在审批...</span>
+				</div>
+				<div ng-if="quotationItem.status == 101 && quotationItem.overdue == 1" class="block">
+					<span class="text-trans text-muted">已过期</span>
+				</div>
+				<div ng-if="quotationItem.status == 314" class="block">
+					<span class="text-trans text-light">已作废</span>
+				</div>
+				<div ng-if=" quotationItem.quotationItems[0].agreed == 1 && quotationItem.overdue != 1" class="block">
+					<span class="text-trans success">已采纳</span>
+				</div>
+				<div ng-if="quotationItem.quotationItems[0].agreed == 0 && quotationItem.overdue != 1" class="block">
+					<span class="text-trans error">未采纳</span>
+				</div>
+				<div ng-if="quotationItem.status == 100">
+					<a ui-sref="sale_quotation_item({id:quotationItem.id})">详情>></a>
+
+				</div>
+			</td>
+		</tr>
+		</tbody>
+	</table>
+</div>
+</div>

+ 517 - 0
src/main/webapp/resources/view/vendor/b2b/sale_tenderList.html

@@ -0,0 +1,517 @@
+<style>
+	/* 顶部搜索框 */
+	.top-nav {
+		margin-bottom: 10px;
+	}
+
+	.top-nav #search_input {
+		height: 36px;
+		font-size: 16px;
+		font-family: '微软雅黑';
+		border: 1px solid #3f84f6;
+		border-top-left-radius: 0;
+		border-bottom-left-radius: 0;
+		text-align: center;
+	}
+
+	.top-nav #search_btn {
+		height: 36px;
+		padding-top: 0;
+		padding-bottom: 0;
+		font-size: 16px;
+		background: #3f84f6;
+		border: 1px solid #3f84f6;
+		color: #fff;
+		border-top-right-radius: 0;
+		border-bottom-right-radius: 0;
+	}
+
+	/* 主内容区 */
+	.main-content {
+		font-size: 14px;
+	}
+
+	/* 选项菜单 招标单按钮*/
+	.div-menu .text-num {
+		color: rgb(211, 37, 38);
+		padding: 0 5px;
+	}
+
+	.btn-tender {
+		border-radius: 0;
+		width: 100%;
+		height: 40px;
+		font-size: 14px;
+	}
+
+	/* 选项按钮 */
+	/* 当前激活 */
+	.div-menu .menu-status .btn-selected {
+		background-color: #fff;
+		color: #D32526;
+		border: none;
+		border-bottom: 2px solid #D32526;
+		border-radius: 0;
+
+	}
+
+	.div-menu .menu-status .btn-selected:hover {
+		background-color: #f5f5f5;
+	}
+
+	.div-menu .btn-select {
+		background-color: #fff;
+		color: #000000;
+		border: none;
+		border-radius: 0;
+		height: 40px;
+		font-weight: 600;
+		padding: 0 20px 0 20px;
+		border-bottom: 2px solid #fff;
+	}
+
+	.div-menu {
+		border-bottom: 16px solid #f5f5f5;
+		height: 56px;
+	}
+
+	.div-menu .btn-select:hover {
+		border-bottom: 2px solid #D32526;
+	}
+
+	.div-menu .btn-select:focus {
+		border-bottom: 2px solid #D32526;
+	}
+
+	.div-menu .btn-select:first-child {
+		margin-left: 10px;
+	}
+
+	.div-menu > div:first-child .btn {
+		font-size: 16px;
+	}
+
+	/* 列表内容 */
+	.tender-table {
+		text-align: center;
+	}
+
+	.tender-table .header {
+		height: 50px;
+		background-color: #fff;
+		color: rgb(50, 50, 50);
+		border-bottom: 1px solid #e8e8e8;
+	}
+
+	.tender-table .header > th {
+		text-align: center;
+	}
+
+	.tender-table > tbody {
+		font-size: 14px;
+		color: #323232;
+		border: 1px solid transparent;
+	}
+
+	.tender-table > tbody.not-done > tr:nth-child(odd) {
+		height: 140px;
+	}
+
+	.tender-table > tbody.not-done > tr td div {
+		line-height: 25px;
+	}
+
+	.tender-table tbody.not-done > tr:nth-child(odd):hover {
+		border: 2px solid #3f84f6;
+
+	}
+
+	.tender-table > tbody.is-done:hover {
+		border: 2px solid #3f84f6;
+	}
+
+	.tender-table > tbody.is-done > tr:first-child {
+		background-color: #f5f5f5;
+		border-bottom: 1px solid #e8e8e8;
+	}
+
+	.tender-table > tbody.is-done > tr:first-child td {
+		padding: 10px 0;
+	}
+
+	.tender-table > tbody.is-done > tr {
+		border-bottom: 1px solid #e8e8e8;
+	}
+
+	.tender-table tbody.is-done > tr:last-child {
+		border-bottom: 1px solid #e8e8e8;
+
+	}
+
+	.tender-table tbody tr td a {
+		color: #3f84f6;
+		/*border: #e8e8e8 1px solid;*/
+	}
+
+	.main-content .btn-group {
+		font-family: "Microsoft YaHei", "微软雅黑";
+		font-weight: 500;
+	}
+
+	.main-content .btn-group button {
+		font-weight: inherit;
+	}
+
+	.list-notnum {
+		text-align: left;
+		padding-left: 20px;
+	}
+
+	.list-notnum div {
+		padding-left: 5px;
+	}
+
+	.list-num {
+		text-align: right;
+	}
+
+	.pro-line-sty01 td div {
+		padding-left: 10px;
+	}
+
+	.pro-line-sty02 {
+		height: 120px;
+	}
+
+	.pro-line-sty02 td div {
+		line-height: 25px;
+	}
+
+	.main-content {
+		border: #e8e8e8 1px solid;
+	}
+
+	.div-menu {
+		border-bottom: 0;
+	}
+
+	#public .menu {
+		border-bottom: 0 !important;
+	}
+
+	.menu .new-dot {
+		width: 20px;
+		height: 20px;
+		line-height: 20px;
+		font-size: 12px;
+		color: #fff;
+		font-weight: inherit;
+		top: -2px;
+	}
+	#public .screen .sreach .sreach-input >.form-control {
+		width: 216px !important;
+	}
+</style>
+<link rel="stylesheet" href="static/css/b2bPublic.css">
+<div id="public" class="block user_right fr">
+	<!-- 顶部导航及搜索框 -->
+	<!--<div class="pub-com_head">-->
+		<!--<span>客户招标</span>-->
+		<!--<div class="p-right">-->
+			<!--<span ui-sref-active="active"><a ui-sref="saleTenderQuestionList">招标提问列表</a></span>-->
+		<!--</div>-->
+	<!--</div>-->
+	<div class="tab_top" style="margin-bottom: 10px">
+		<ul class="fl" style="width: 100%">
+			<li ng-class="{'active': storeType=='seekPurchase'}"><a ui-sref="vendorSeekPurchase">公共询价</a></li>
+			<li ng-class="{'active': storeType=='purchase'}"><a ui-sref="saleInquiry">客户采购询价</a></li>
+			<li ng-class="{'active': storeType=='mould'}"><a ui-sref="saleInquiryMould">客户模具询价</a></li>
+			<li ng-class="{'active': storeType=='quotation'}"><a ui-sref="saleQuotationList">主动报价</a></li>
+			<li ng-class="{'active': storeType=='tender'}"><a ui-sref="saleTenderList">客户招标</a></li>
+			<li ng-class="{'active': storeType=='attend'}"><a ui-sref="purchasAttendtion">商机关注</a></li>
+			<li class="down-purchase">
+				<span ui-sref-active="active"><a style="color: #5078cb;" ui-sref="saleTenderQuestionList">招标提问列表</a></span>
+			</li>
+		</ul>
+	</div>
+	<div class="menu condition block">
+		<div class="btn-group btn-group-sm btn-group-justified">
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='all'}" ng-click="setActive('all')">全部
+					<b class="new-dot" ng-if="unread.all > 0">{{unread.all>99?'99+':unread.all}}</b>
+				</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='end'}" ng-click="setActive('end')">已结标
+				</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='waiting'}" ng-click="setActive('waiting')">待评标
+				</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='done'}" ng-click="setActive('done')">已投标
+				</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='todo'}" ng-click="setActive('todo')">待投标
+					<b class="new-dot"
+					   ng-if="unread.notReply > 0">{{unread.notReply>99?'99+':unread.notReply}}</b>
+				</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='invalid'}" ng-click="setActive('invalid')">已过期
+				</button>
+			</div>
+		</div>
+	</div>
+	<div class="block main-content">
+		<!-- 选项菜单和新增按钮 -->
+		<div class="block">
+			<div class="condition block">
+				<!--搜索时间筛选-->
+				<div class="screen check-filter">
+					<div class="radio-block date-radio">
+						时间筛选:
+						<label class="com-check-radio">
+							<input type="radio" id="oneMonth" name="date" ng-click="autoMonth = false;changeDateZone(1);condition.$open=false" checked>
+							<label for="oneMonth"></label>
+							30天
+						</label>
+						<label class="com-check-radio">
+							<input type="radio" id="threeMonth" name="date" ng-click="autoMonth = false;changeDateZone(3);condition.$open=false">
+							<label for="threeMonth"></label>
+							90天
+						</label>
+						<label class="com-check-radio">
+							<input type="radio" id="sixMonth" name="date" ng-click="autoMonth = false;changeDateZone(6);condition.$open=false">
+							<label for="sixMonth"></label>
+							180天
+						</label>
+						<label class="com-check-radio">
+							<input type="radio" id="autoMonth" name="date" ng-click="autoMonth = true;condition.$open=!condition.$open;changeDateZone(-1)">
+							<label for="autoMonth"></label>
+							自定义
+						</label>
+					</div>
+					<div class="sreach fr">
+						<div ng-show="autoMonth" class="date fl">
+							<div class="data-input">
+								<input type="text" ng-model="condition.dateFrom"
+									   class="form-control select-adder" placeholder="起始时间"
+									   datepicker-popup="yyyy-MM-dd"
+									   is-open="condition.$fromOpened"
+									   max-date="condition.dateTo" current-text="今天" clear-text="清除" close-text="关闭"
+									   ng-click="openFilterDatePicker($event, condition, '$fromOpened')"
+									   ng-focus="openFilterDatePicker($event, condition, '$fromOpened')"
+									   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+								/>
+								<button class="open" ng-click="openFilterDatePicker($event, condition, '$fromOpened')"></button>
+							</div>
+
+							<em>–</em>
+							<div class="data-input">
+								<input type="text" ng-model="condition.dateTo"
+									   class="form-control select-adder" placeholder="结束时间"
+									   datepicker-popup="yyyy-MM-dd"
+									   is-open="condition.$toOpened"
+									   min-date="condition.dateFrom" current-text="今天" clear-text="清除" close-text="关闭"
+									   ng-click="openFilterDatePicker($event, condition, '$toOpened')"
+									   ng-focus="openFilterDatePicker($event, condition, '$toOpened')"
+									   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+								/>
+								<button class="open" ng-click="openFilterDatePicker($event, condition, '$toOpened')"></button>
+							</div>
+						</div>
+						<div class="sreach-input fr">
+							<input type="search" class="form-control input-sm" ng-model="keyword"
+								   ng-search="onSearch()" placeholder="输入单据编号、客户名称、物料名称搜索"/>
+							<a class="btn input-group-addon" ng-click="onSearch()">搜索</a>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+		<!-- 除已评标的显示 -->
+		<table class="tender-table block" ng-table="tableParams">
+			<thead ng-show="active != 'end' && active != 'waiting'">
+			<tr class="header">
+				<th width="300">招标信息</th>
+				<th width="80">联系人</th>
+				<th width="100">联系电话</th>
+				<th width="150">投标截止时间</th>
+				<th width="150">公布结果时间</th>
+				<th width="150">状态</th>
+			</tr>
+			</thead>
+			<tbody ng-if="tableParams.total() == 0">
+			<tr>
+				<td colspan="6">
+					<div id="empty">
+						<div class="left_img">
+							<a href="http://www.ubtob.com/" target="_blank" title="优软云首页"><img src="static/img/empty/uas_empty.png"></a>
+							<a href="#/index" title="B2B商务首页">B2B 商务</a>
+						</div>
+						<div class="right_link">
+							<p>当前没有对应的招标单!</p>
+						</div>
+					</div>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="6">
+					<div id="empty_info">
+						<div class="f16 text-center empty_title">
+							<p>为什么我没有接收到客户的招标单?</p>
+						</div>
+						<div class="f14 empty_explain text-left">
+							<div class="info">
+								<p>1、您的客户还没有发布招标单<br>
+									解决:与您的客户沟通确认单据是否已经发布</p>
+							</div>
+							<div class="info">
+								<p>2、客户指定的投标供应商不包括您<br>
+									解决:与您的客户沟通确认是否添加了您为指定投标供应商</p>
+							</div>
+						</div>
+					</div>
+				</td>
+			</tr>
+			</tbody>
+			<tbody class="not-done" ng-repeat="tender in $data | orderBy:'-id'" ng-show="active != 'end' && active != 'waiting'">
+			<tr>
+				<td class="list-notnum" width=300">
+					<div>
+						<span class="no-circle-icon icon" ng-if="isUnread(tender.id)" title="标记为未查看">未读</span>
+						<span class="circle-icon icon" ng-if="!isUnread(tender.id)" title="标记为已查看">已读</span>
+						招标企业:{{tender.enterprise.enName}}
+					</div>
+					<div>
+						招标标题:{{tender.title}}
+					</div>
+					<div>
+						单号:<a class="order-detail" ui-sref="saleTenderDetail({id:tender.id})" target="_self" title="点击查看详情"
+							  ng-click="setOrdersRead(tender.id)">{{tender.code}}</a>
+					</div>
+					<div>
+						<strong ng-if="tender.ifOpen == 0">指定招标</strong>
+						<strong ng-if="tender.ifOpen == 1">公开招标</strong>
+					</div>
+				</td>
+				<td class="list-notnum" width="80">
+					<div>{{tender.user}}</div>
+				</td>
+				<td class="list-notnum" width="100">{{tender.userTel}}</td>
+				<td width="150">{{tender.endDate | date:'yyyy-MM-dd'}}</td>
+				<td width="150">{{tender.publishDate | date:'yyyy-MM-dd'}}</td>
+				<td width="150">
+					<div ng-if="tender.status == '已结标' && tender.result == 1">
+						<img src="static/img/tender/yijiebiao.png">
+					</div>
+					<div ng-if="(tender.status == '待评标' && tender.overdue == 1 && tender.result == 1) || (tender.status == '待投标' && tender.overdue == 1) || tender.status == '流标'">
+						<!-- 没人报、报了到期没评、评了没有采纳 -->
+						<img src="static/img/tender/liubiao.png">
+					</div>
+					<div ng-if="tender.status != '待投标' && tender.overdue == 1 && tender.result != 1">
+						<img src="static/img/tender/daipingbiao.png">
+					</div>
+					<div ng-if="tender.overdue != 1 && tender.vendorHasBid">
+						<img src="static/img/tender/yitoubiao.png">
+					</div>
+					<div ng-if="tender.overdue != 1 && !tender.vendorHasBid">
+						<img src="static/img/tender/daitoubiao.png">
+					</div>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="6">
+					<div style="height: 16px; background-color: #f5f5f5;">
+						<!-- 间隙 -->
+					</div>
+				</td>
+			</tr>
+			</tbody>
+			<!-- 已评标和已结标显示 -->
+			<thead ng-show="active == 'end' || active == 'waiting'">
+			<tr class="header">
+				<th width="350">产品信息</th>
+				<th width="150">采购数量</th>
+				<th width="150">投标截止时间</th>
+				<th width="150">公布结果时间</th>
+				<th width="150">状态</th>
+			</tr>
+			</thead>
+			<tbody class="is-done" ng-repeat="tender in $data  | orderBy:'-id'" ng-show="active == 'end' || active == 'waiting'">
+			<tr class="pro-line-sty01">
+				<td class="list-notnum" width="350">
+					<div>招标标题:{{tender.title}}</div>
+					<div>
+						招标单号:<a ui-sref="saleTenderDetail({id:tender.id})" target="_self" title="点击查看详情">{{tender.code}}</a>
+					</div>
+				</td>
+				<td class="list-notnum" width="300" colspan="2">
+					<div>招标企业:{{tender.enterprise.enName}}</div>
+				</td>
+				<td class="list-notnum" width="300" colspan="2">
+					<div>招标类型:
+						<strong ng-if="tender.ifOpen == 0">指定招标</strong>
+						<strong ng-if="tender.ifOpen == 1">公开招标</strong>
+					</div>
+					<div>联系人:{{tender.user}}&nbsp;&nbsp{{tender.userTel}}</div>
+				</td>
+			</tr>
+			<tr ng-repeat="tenderProd in tender.purchaseTenderProds | orderBy : '- id'"
+				ng-show="tenderProd.currentItem.price && tenderProd.currentItem.saleTender.auditStatus != 0"
+				class="pro-line-sty02"><!--  ng-show="tenderProd.currentItem.price" -->
+				<td class="list-notnum" width="350">
+					<div>产品名称:{{tenderProd.prodTitle}}</div>
+					<div>产品型号:{{tenderProd.prodCode}}</div>
+					<div>品牌:{{tenderProd.brand}}</div>
+					<div>单位:{{tenderProd.unit}}</div>
+				</td>
+				<td class="list-num" width="150">
+					<div>{{tenderProd.qty}}</div>
+				</td>
+				<td class="list-notnum" width="150">{{tender.endDate | date:'yyyy-MM-dd'}}</td>
+				<td class="list-notnum" width="150">{{tender.publishDate | date:'yyyy-MM-dd'}}</td>
+				<td>
+					<!-- 投标单状态 -->
+					<!-- 已评标 start -->
+					<div ng-if="tender.result == 1 && tender.status == '已结标' && tenderProd.currentItem.applyStatus == 1 && tenderProd.currentItem.price">
+						<img src="static/img/tender/zhongbiao.png">
+					</div>
+					<div ng-if="tender.result == 1 && ((tender.status == '已结标' && !tenderProd.currentItem.applyStatus) || tender.status == '流标' || (tender.status == '待评标' && tender.result == 1) || tender.status == '待投标')">
+						<!-- 报了到期没评、评了没有采纳 -->
+						<img src="static/img/tender/weizhongbiao.png">
+					</div>
+					<!-- 已评标end -->
+					<!-- 已投标start -->
+					<div ng-if="tender.overdue == 1 && tender.result != 1">
+						<img src="static/img/tender/daipingbiao.png">
+					</div>
+					<div ng-if="tender.status == '待评标' && tender.overdue != 1 && (tenderProd.currentItem.price && tenderProd.currentItem.saleTender.auditStatus != 0)">
+						<img src="static/img/tender/yitoubiao.png">
+					</div>
+					<div ng-if="tender.overdue != 1 && (!tenderProd.currentItem.price || tenderProd.currentItem.saleTender.auditStatus == 0)">
+						<img src="static/img/tender/daitoubiao.png">
+					</div>
+					<!-- 已投标end -->
+				</td>
+			</tr>
+			<!--<tr>
+                <td colspan="6">
+                    <div style="height: 16px; background-color: #f5f5f5;">
+                        &lt;!&ndash; 间隙 &ndash;&gt;
+                    </div>
+                </td>
+            </tr>-->
+			</tbody>
+		</table>
+	</div>
+</div>

+ 401 - 0
src/main/webapp/resources/view/vendor/b2b/sale_tender_question_list.html

@@ -0,0 +1,401 @@
+<style>
+	/* 顶部搜索框 */
+	.top-nav {
+		margin-bottom: 10px;
+	}
+
+	.top-nav #search_input {
+		height: 36px;
+		font-size: 16px;
+		font-family: '微软雅黑';
+		border: 1px solid #3f84f6;
+		border-top-left-radius: 0;
+		border-bottom-left-radius: 0;
+		text-align: center;
+	}
+
+	.top-nav #search_btn {
+		height: 36px;
+		padding-top: 0;
+		padding-bottom: 0;
+		font-size: 16px;
+		background: #3f84f6;
+		border: 1px solid #3f84f6;
+		color: #fff;
+		border-top-right-radius: 0;
+		border-bottom-right-radius: 0;
+	}
+
+	/* 主内容区 */
+	.main-content {
+		font-size: 14px;
+	}
+
+	/* 选项菜单 招标单按钮*/
+	.div-menu .text-num {
+		color: rgb(211, 37, 38);
+		padding: 0 5px;
+	}
+
+	.btn-tender {
+		border-radius: 0;
+		width: 100%;
+		height: 40px;
+		font-size: 14px;
+	}
+
+	/* 选项按钮 */
+	/* 当前激活 */
+	.div-menu .menu-status .btn-selected {
+		background-color: #fff;
+		color: #D32526;
+		border: none;
+		border-bottom: 2px solid #D32526;
+		border-radius: 0;
+
+	}
+
+	.div-menu .menu-status .btn-selected:hover {
+		background-color: #f5f5f5;
+	}
+
+	.div-menu .btn-select {
+		background-color: #fff;
+		color: #000000;
+		border: none;
+		border-radius: 0;
+		height: 40px;
+		font-weight: 600;
+		padding: 0 20px 0 20px;
+		border-bottom: 2px solid #fff;
+	}
+
+	.div-menu {
+		border-bottom: 16px solid #f5f5f5;
+		height: 56px;
+	}
+
+	.div-menu .btn-select:hover {
+		border-bottom: 2px solid #D32526;
+	}
+
+	.div-menu .btn-select:focus {
+		border-bottom: 2px solid #D32526;
+	}
+
+	.div-menu .btn-select:first-child {
+		margin-left: 10px;
+	}
+
+	.div-menu > div:first-child .btn {
+		font-size: 16px;
+	}
+
+	/* 列表内容 */
+	.tender-table {
+		text-align: center;
+	}
+
+	.tender-table .header {
+		height: 50px;
+		background-color: #fff;
+		color: rgb(50, 50, 50);
+		border-bottom: 1px solid #e8e8e8;
+	}
+
+	.tender-table .header > th {
+		text-align: center;
+	}
+
+	.tender-table > tbody {
+		font-size: 14px;
+		color: #323232;
+		border: 1px solid transparent;
+	}
+
+	.tender-table > tbody.not-done > tr:nth-child(odd) {
+		height: 140px;
+	}
+
+	.tender-table > tbody.not-done > tr td div {
+		line-height: 25px;
+	}
+
+	.tender-table tbody.not-done > tr:nth-child(odd):hover {
+		border: 2px solid #3f84f6;
+
+	}
+
+	.tender-table > tbody.is-done:hover {
+		border: 2px solid #3f84f6;
+	}
+
+	.tender-table > tbody.is-done > tr:first-child {
+		background-color: #f5f5f5;
+		border-bottom: 1px solid #e8e8e8;
+	}
+
+	.tender-table > tbody.is-done > tr:first-child td {
+		padding: 10px 0;
+	}
+
+	.tender-table > tbody.is-done > tr {
+		border-bottom: 1px solid #e8e8e8;
+	}
+
+	.tender-table tbody.is-done > tr:last-child {
+		border-bottom: 1px solid #e8e8e8;
+
+	}
+
+	.tender-table tbody tr td a {
+		color: #3f84f6;
+		/*border: #e8e8e8 1px solid;*/
+	}
+
+	.main-content .btn-group {
+		font-family: "Microsoft YaHei", "微软雅黑";
+		font-weight: 500;
+	}
+
+	.main-content .btn-group button {
+		font-weight: inherit;
+	}
+
+	.list-notnum {
+		text-align: left;
+		padding-left: 20px;
+	}
+
+	.list-notnum div {
+		padding-left: 5px;
+	}
+
+	.list-num {
+		text-align: right;
+	}
+
+	.pro-line-sty01 td div {
+		padding-left: 10px;
+	}
+
+	.pro-line-sty02 {
+		height: 120px;
+	}
+
+	.pro-line-sty02 td div {
+		line-height: 25px;
+	}
+
+	.main-content {
+		border: #e8e8e8 1px solid;
+	}
+
+	.div-menu {
+		border-bottom: 0;
+	}
+
+	#public .menu {
+		border-bottom: 0 !important;
+	}
+
+	.menu .new-dot {
+		width: 20px;
+		height: 20px;
+		line-height: 20px;
+		font-size: 12px;
+		color: #fff;
+		font-weight: inherit;
+		top: -2px;
+	}
+
+	/*2017年9月14日*/
+	/* 单据状态位置调整 */
+	.question-status {
+		margin-top: -20px;
+		right: 20px;
+	}
+	.pub-com_head, .com_head {
+		width: 100%;
+		height: 35px;
+		line-height: 35px;
+		background: #5078cb;
+		border-radius: 5px 5px 0 0;
+	}
+	.pub-com_head span, .com_head span {
+		margin-left: 10px;
+		color: #fff;
+		font-size: 14px;
+		font-weight: bold;
+	}
+	#public .screen .sreach .sreach-input >.form-control {
+		width: 216px!important;
+	}
+	#public .pro-line-sty01 td div {
+		color: #333 !important;
+	}
+</style>
+<link rel="stylesheet" href="static/css/b2bPublic.css">
+<div id="public" class="block user_right fr">
+	<!-- 顶部导航及搜索框 -->
+	<div class="pub-com_head">
+		<span>招标提问列表</span>
+		<div class="p-right">
+		</div>
+	</div>
+	<div class="menu condition block">
+		<!-- TODO增加红点显示 -->
+		<div class="btn-group btn-group-sm btn-group-justified" style="margin-top: 15px;">
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='all'}" ng-click="setActive('all')">全部
+					<b class="new-dot" ng-if="unread.all > 0">{{unread.all>99?'99+':unread.all}}</b>
+				</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='done'}" ng-click="setActive('done')">已回复
+					<b class="new-dot"
+					   ng-if="unread.replied > 0">{{unread.replied>99?'99+':unread.replied}}</b>
+				</button>
+			</div>
+			<div class="btn-group btn-group-sm">
+				<button type="button" class="btn btn-default btn-line"
+						ng-class="{'btn-info':active=='todo'}" ng-click="setActive('todo')">待回复
+					<b class="new-dot"
+					   ng-if="unread.notReply > 0">{{unread.notReply>99?'99+':unread.notReply}}</b>
+				</button>
+			</div>
+		</div>
+	</div>
+	<div class="block main-content">
+		<!-- 选项菜单和新增按钮 -->
+		<div class="block">
+			<div class="condition block">
+				<!--搜索时间筛选-->
+				<div class="screen check-filter">
+					<div class="radio-block date-radio">
+						时间筛选:
+						<label class="com-check-radio">
+							<input type="radio" id="oneMonth" name="date" ng-click="autoMonth = false;changeDateZone(1);condition.$open=false" checked>
+							<label for="oneMonth"></label>
+							30天
+						</label>
+						<label class="com-check-radio">
+							<input type="radio" id="threeMonth" name="date" ng-click="autoMonth = false;changeDateZone(3);condition.$open=false">
+							<label for="threeMonth"></label>
+							90天
+						</label>
+						<label class="com-check-radio">
+							<input type="radio" id="sixMonth" name="date" ng-click="autoMonth = false;changeDateZone(6);condition.$open=false">
+							<label for="sixMonth"></label>
+							180天
+						</label>
+						<label class="com-check-radio">
+							<input type="radio" id="autoMonth" name="date" ng-click="autoMonth = true;condition.$open=!condition.$open;changeDateZone(-1)">
+							<label for="autoMonth"></label>
+							自定义
+						</label>
+					</div>
+					<div class="sreach fr">
+						<div ng-show="autoMonth" class="date fl">
+							<div class="data-input">
+								<input type="text" ng-model="condition.dateFrom"
+									   class="form-control select-adder" placeholder="起始时间"
+									   datepicker-popup="yyyy-MM-dd"
+									   is-open="condition.$fromOpened"
+									   max-date="condition.dateTo" current-text="今天" clear-text="清除" close-text="关闭"
+									   ng-click="openFilterDatePicker($event, condition, '$fromOpened')"
+									   ng-focus="openFilterDatePicker($event, condition, '$fromOpened')"
+									   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+								/>
+								<button class="open" ng-click="openFilterDatePicker($event, condition, '$fromOpened')"></button>
+							</div>
+
+							<em>–</em>
+							<div class="data-input">
+								<input type="text" ng-model="condition.dateTo"
+									   class="form-control select-adder" placeholder="结束时间"
+									   datepicker-popup="yyyy-MM-dd"
+									   is-open="condition.$toOpened"
+									   min-date="condition.dateFrom" current-text="今天" clear-text="清除" close-text="关闭"
+									   ng-click="openFilterDatePicker($event, condition, '$toOpened')"
+									   ng-focus="openFilterDatePicker($event, condition, '$toOpened')"
+									   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+								/>
+								<button class="open" ng-click="openFilterDatePicker($event, condition, '$toOpened')"></button>
+							</div>
+						</div>
+						<div class="sreach-input fr">
+							<input type="search" class="form-control input-sm" ng-model="keyword"
+								   ng-search="onSearch(keyword)" placeholder="输入单据编号、客户名称、物料名称搜索"/>
+							<a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+		<table class="tender-table block" ng-table="tableParams">
+			<thead>
+			<tr class="header">
+				<th width="200">提问单号</th>
+				<th width="300">提问主题</th>
+				<th width="150">答疑截止日期</th>
+				<th width="150">提问日期</th>
+				<th width="150">回复日期</th>
+				<th width="150">状态</th>
+			</tr>
+			</thead>
+			<tbody ng-if="tableParams.total() == 0">
+			<tr>
+				<td colspan="6">
+					<div id="empty">
+						<div class="left_img">
+							<a href="http://www.ubtob.com/" target="_blank" title="优软云首页"><img src="static/img/empty/uas_empty.png"></a>
+							<a href="#/index" title="B2B商务首页">B2B 商务</a>
+						</div>
+						<div class="right_link">
+							<p>当前没有对应的提问单</p>
+						</div>
+					</div>
+				</td>
+			</tr>
+			</tbody>
+			<tbody class="is-done" ng-repeat="question in $data  | orderBy:'-id'">
+			<tr class="pro-line-sty01">
+				<td class="list-notnum" width="300" colspan="1">
+					<div>
+						招标单号:<a ui-sref="saleTenderDetail({id:question.saleTenderAnswer.tenderId})" target="_self" title="点击查看招标单详情">{{question.saleTenderAnswer.tenderCode}}</a>
+					</div>
+				</td>
+				<td class="list-notnum" width="350" colspan="2">
+					<div>招标标题:{{question.saleTenderAnswer.tenderTitle}}</div>
+				</td>
+				<td class="list-notnum" width="300" colspan="3">
+					<div>招标企业:{{question.saleTenderAnswer.enterprise.enName}}</div>
+				</td>
+
+			</tr>
+			<tr class="pro-line-sty02">
+				<td class="list-notnum" width="200">
+					<div><a ui-sref="saleTenderQuestionDetail({id:question.id})" target="_self" title="点击查看提问单详情">{{question.code}}</a></div>
+				</td>
+				<td class="list-notnum" width="300">
+					<div>{{question.topic}}</div>
+				</td>
+				<td class="list-notnum" width="150">{{question.saleTenderAnswer.questionEndDate | date:'yyyy-MM-dd'}}</td>
+				<td class="list-notnum" width="150">{{question.inDate | date:'yyyy-MM-dd'}}</td>
+				<td class="list-notnum" width="150">{{question.replyDate | date:'yyyy-MM-dd'}}</td>
+				<td>
+					<div ng-if="question.saleTenderAnswer.status == 201" class="block question-status">
+						<span class="text-trans success">已回复</span>
+					</div>
+					<div ng-if="question.saleTenderAnswer.status == 200" class="block question-status">
+						<span class="text-trans todo">待回复</span>
+					</div>
+				</td>
+			</tr>
+			</tbody>
+		</table>
+	</div>
+</div>

+ 25 - 23
src/main/webapp/resources/view/vendor/forstore/purchasAttendtion.html

@@ -5,20 +5,20 @@
   }
   .oder01 ul li.active a{
     border-bottom: #fff;
-    background: #5078cb;
-    color: #fff;
-  }
-  .oder01 ul li::after{
-    background: url('static/img/vendor/images/downicon.png');
-    width: 11px;
-    height: 6px;
-    position: absolute;
-    bottom: 0px;
-    left: 50%;
-    content: ' ';
-    margin-left: -5px;
-    display: none;
+    background: #FFF;
+    color: #333;
   }
+  /*.oder01 ul li::after{*/
+    /*background: url('static/img/vendor/images/downicon.png');*/
+    /*width: 11px;*/
+    /*height: 6px;*/
+    /*position: absolute;*/
+    /*bottom: 0px;*/
+    /*left: 50%;*/
+    /*content: ' ';*/
+    /*margin-left: -5px;*/
+    /*display: none;*/
+  /*}*/
   .oder01 ul li.active:after{
     display: block
   }
@@ -160,17 +160,19 @@
 
 </style>
 <div class="user_right fr seek-purchase">
+  <div class="tab_top" style="margin-bottom: 10px">
+    <ul class="fl" style="width: 100%">
+      <li ng-class="{'active': storeType=='seekPurchase'}"><a ui-sref="vendorSeekPurchase">公共询价</a></li>
+      <li ng-class="{'active': storeType=='purchase'}"><a ui-sref="saleInquiry">客户采购询价</a></li>
+      <li ng-class="{'active': storeType=='mould'}"><a ui-sref="saleInquiryMould">客户模具询价</a></li>
+      <li ng-class="{'active': storeType=='quotation'}"><a ui-sref="saleQuotationList">主动报价</a></li>
+      <li ng-class="{'active': storeType=='tender'}"><a ui-sref="saleTenderList">客户招标</a></li>
+      <li ng-class="{'active': storeType=='attend'}"><a ui-sref="purchasAttendtion">商机关注</a></li>
+    </ul>
+  </div>
   <!--求购询价-->
-  <div class="oder">
-    <div class="com_tab oder01">
-      <ul>
-        <li><a href="javascript:void(0)" ui-sref="vendorSeekPurchase">待报价</a></li>
-        <li><a href="javascript:void(0)" ui-sref="vendorPurchaseOffer">已报价</a></li>
-        <li class="active"><a href="javascript:void(0)" ui-sref="purchasAttendtion">商机关注</a></li>
-        <!--<li><a href="javascript:void(0)" ui-sref="vendorPurchaseAccept">已采纳</a></li>-->
-      </ul>
-    </div>
-    <div class="com_tab com_tab2" style="margin-bottom: 0px">
+  <div class="oder oder01">
+    <div class="com_tab2" style="margin-bottom: 0px">
       <ul class="fl distance" style="width: 100%">
         <li ng-class="{active : Attend_tab == 'isAttend'}"  ng-click="toggleAttend('isAttend')" title="已关注"><a>已关注</a></li>
         <li ng-class="{active : Attend_tab =='Attend'}" ng-click="toggleAttend('Attend')" title="未关注"><a>未关注</a></li>

+ 13 - 3
src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html

@@ -572,8 +572,8 @@
     }
     .oder01 ul li.active a{
         border-bottom: #fff;
-        background: #5078cb;
-        color: #fff;
+        background: #fff;
+        color: #333;
     }
     .oder01 ul li::after{
         background: url('static/img/vendor/images/downicon.png');
@@ -641,12 +641,22 @@
             </div>
         </div>
     </div>-->
+    <div class="tab_top" style="margin-bottom: 10px">
+        <ul class="fl" style="width: 100%">
+            <li ng-class="{'active': storeType=='seekPurchase'}"><a ui-sref="vendorSeekPurchase">公共询价</a></li>
+            <li ng-class="{'active': storeType=='purchase'}"><a ui-sref="saleInquiry">客户采购询价</a></li>
+            <li ng-class="{'active': storeType=='mould'}"><a ui-sref="saleInquiryMould">客户模具询价</a></li>
+            <li ng-class="{'active': storeType=='quotation'}"><a ui-sref="saleQuotationList">主动报价</a></li>
+            <li ng-class="{'active': storeType=='tender'}"><a ui-sref="saleTenderList">客户招标</a></li>
+            <li ng-class="{'active': storeType=='attend'}"><a ui-sref="purchasAttendtion">商机关注</a></li>
+        </ul>
+    </div>
     <div class="oder">
         <div class="oder01">
             <ul>
                 <li><a href="javascript:void(0)" ui-sref="vendorSeekPurchase">待报价</a></li>
                 <li class="active"><a href="javascript:void(0)" ui-sref="vendorPurchaseOffer">已报价</a></li>
-                <li><a href="javascript:void(0)" ui-sref="purchasAttendtion">商机关注</a></li>
+                <!--<li><a href="javascript:void(0)" ui-sref="purchasAttendtion">商机关注</a></li>-->
                 <!--<li><a href="javascript:void(0)" ui-sref="vendorPurchaseAccept">已采纳</a></li>-->
             </ul>
         </div>

+ 19 - 9
src/main/webapp/resources/view/vendor/forstore/seekPurchase.html

@@ -598,8 +598,8 @@
     }
     .oder01 ul li.active a{
         border-bottom: #fff;
-        background: #5078cb;
-        color: #fff;
+        background: #fff;
+        color: #333;
     }
     .oder01 ul li::after{
         background: url('static/img/vendor/images/downicon.png');
@@ -794,12 +794,12 @@
     label {
         margin-bottom: 5px;
     }
-    .oder01 ul {
-        border: 0;
-    }
-    .oder01 ul li.active a {
-        border: 0
-    }
+    /*.oder01 ul {*/
+        /*border: 0;*/
+    /*}*/
+    /*.oder01 ul li.active a {*/
+        /*border: 0*/
+    /*}*/
 </style>
 <div class="user_right fr seek-purchase">
     <!--求购询价-->
@@ -815,12 +815,22 @@
             </div>
         </div>
     </div>-->
+    <div class="tab_top" style="margin-bottom: 10px">
+        <ul class="fl" style="width: 100%">
+            <li ng-class="{'active': storeType=='seekPurchase'}"><a ui-sref="vendorSeekPurchase">公共询价</a></li>
+            <li ng-class="{'active': storeType=='purchase'}"><a ui-sref="saleInquiry">客户采购询价</a></li>
+            <li ng-class="{'active': storeType=='mould'}"><a ui-sref="saleInquiryMould">客户模具询价</a></li>
+            <li ng-class="{'active': storeType=='quotation'}"><a ui-sref="saleQuotationList">主动报价</a></li>
+            <li ng-class="{'active': storeType=='tender'}"><a ui-sref="saleTenderList">客户招标</a></li>
+            <li ng-class="{'active': storeType=='attend'}"><a ui-sref="purchasAttendtion">商机关注</a></li>
+        </ul>
+    </div>
     <div class="oder">
         <div class="oder01">
             <ul>
                 <li class="active"><a href="javascript:void(0)" ui-sref="vendorSeekPurchase">待报价</a></li>
                 <li><a href="javascript:void(0)" ui-sref="vendorPurchaseOffer">已报价</a></li>
-                <li><a href="javascript:void(0)" ui-sref="purchasAttendtion">商机关注</a></li>
+                <!--<li><a href="javascript:void(0)" ui-sref="purchasAttendtion">商机关注</a></li>-->
                 <!--<li><a href="javascript:void(0)" ui-sref="vendorPurchaseAccept">已采纳</a></li>-->
             </ul>
         </div>