Browse Source

Merge remote-tracking branch 'origin/feature-b2b-ssr-wangcz' into feature-b2b-ssr-wangcz

# Conflicts:
#	src/main/webapp/resources/js/usercenter/app.js
shenjj 8 years ago
parent
commit
ce17f4247d
25 changed files with 4321 additions and 647 deletions
  1. 242 10
      src/main/webapp/resources/css/b2bCommon.css
  2. 54 11
      src/main/webapp/resources/css/b2bPublic.css
  3. 0 7
      src/main/webapp/resources/css/user/base.css
  4. 183 424
      src/main/webapp/resources/js/common/b2bServices.js
  5. 39 0
      src/main/webapp/resources/js/common/controllers/b2bCommonCtrls.js
  6. 1 1
      src/main/webapp/resources/js/common/services.js
  7. 25 1
      src/main/webapp/resources/js/usercenter/app.js
  8. 62 4
      src/main/webapp/resources/js/usercenter/controllers/b2b/Purc/PurcNewOrderCtrl.js
  9. 209 0
      src/main/webapp/resources/js/usercenter/controllers/b2b/order/purcChangeListCtrl.js
  10. 364 0
      src/main/webapp/resources/js/usercenter/controllers/b2b/order/purcDeputyOrderCtrl.js
  11. 364 0
      src/main/webapp/resources/js/usercenter/controllers/b2b/order/purcMakeOutOrderCtrl.js
  12. 364 0
      src/main/webapp/resources/js/usercenter/controllers/b2b/order/usercenterOrderCtrl.js
  13. 406 177
      src/main/webapp/resources/view/usercenter/b2b/Purc/addOrder.html
  14. 4 5
      src/main/webapp/resources/view/usercenter/b2b/Purc/tenderlist.html
  15. 93 0
      src/main/webapp/resources/view/usercenter/b2b/modal/purc_order_vendor.html
  16. 85 0
      src/main/webapp/resources/view/usercenter/b2b/modal/purc_uplodaByBatch.html
  17. 406 0
      src/main/webapp/resources/view/usercenter/b2b/order/changeList.html
  18. 504 0
      src/main/webapp/resources/view/usercenter/b2b/order/deputyOrder.html
  19. 406 0
      src/main/webapp/resources/view/usercenter/b2b/order/outorder.html
  20. 504 0
      src/main/webapp/resources/view/usercenter/b2b/order/usercenter_order.html
  21. 1 1
      src/main/webapp/resources/view/vendor/b2b/modal/contact_person_modal.html
  22. 1 2
      src/main/webapp/resources/view/vendor/b2b/sale_inquiry.html
  23. 1 1
      src/main/webapp/resources/view/vendor/b2b/sale_inquiryMould.html
  24. 1 1
      src/main/webapp/resources/view/vendor/b2b/sale_quotationList.html
  25. 2 2
      src/main/webapp/resources/view/vendor/b2b/sale_tenderList.html

+ 242 - 10
src/main/webapp/resources/css/b2bCommon.css

@@ -4,28 +4,28 @@
     font-size: 14px;
     text-align: center;
 }
-.b2b-com-table thead tr {
+.b2b-com-table > thead > tr {
     height: 38px;
     line-height: 38px;
     background: #f5f8fe;
     border-bottom: 1px solid #dae5fd;
 }
-.b2b-com-table thead tr th {
+.b2b-com-table > thead > tr > th {
     font-size: 14px;
     font-weight: normal;
     text-align: center;
 }
-.b2b-com-table tbody tr {
+.b2b-com-table > tbody > tr {
     height: 50px;
     line-height: 50px;
     border-left: 1px solid #dae5fd;
     border-right: 1px solid #dae5fd;
     border-bottom: 1px solid #dae5fd;
 }
-.b2b-com-table tbody tr:hover {
+.b2b-com-table > tbody > tr:hover {
     background: #f9fafd;
 }
-.b2b-com-table tbody tr td {
+.b2b-com-table > tbody > tr > td {
     font-size: 14px;
 }
 .b2b-com-table .td-operate a {
@@ -81,9 +81,12 @@
     text-align: center;
     border-radius: 2px;
     color: #fff;
+    vertical-align: middle;
+    display: inline-block;
 }
 .b2b-btn[disabled] {
     cursor: not-allowed;
+    opacity: .6;
 }
 .b2b-btn-submit {
     background: #5078cb;
@@ -145,19 +148,19 @@
 .b2b-operate-modal #user-lists {
     padding: 0 30px;
 }
-table.b2b-modal-table thead tr {
+table.b2b-modal-table > thead > tr {
     height: 34px;
     line-height: 34px;
     padding: 0;
     background: #89aefa;
 }
-table.b2b-modal-table thead tr th {
+table.b2b-modal-table > thead > tr > th {
     color: #fff;
     font-weight: normal;
     font-size: 14px;
     text-align: center;
 }
-table.b2b-modal-table tbody tr {
+table.b2b-modal-table > tbody > tr {
     height: 40px;
     line-height: 40px;
     text-align: center;
@@ -165,10 +168,10 @@ table.b2b-modal-table tbody tr {
     border-right: 1px solid #ecf0fb;
     border-bottom: 1px solid #ecf0fb;
 }
-table.b2b-modal-table tbody tr:hover {
+table.b2b-modal-table > tbody > tr:hover {
     background: #f9fafd;
 }
-table.b2b-modal-table tbody tr td {
+table.b2b-modal-table > tbody > tr > td {
     font-size: 14px;
     border: none;
 }
@@ -195,4 +198,233 @@ table.b2b-modal-table tbody tr td {
     position: absolute;
     left: 0;
     top: 22px;
+}
+/*B2B商务账号设置-个人信息*/
+/*弹框*/
+.bomb-box {
+    width: 100%;
+    height: 100%;
+    position: fixed;
+    z-index: 11111;
+    background: rgba(0, 0, 0, 0.2);
+    top: 0;
+    left: 0;
+}
+
+.bomb-box .box {
+    position: absolute;
+    left: 0;
+    right: 0;
+    top: 0;
+    bottom: 0;
+    margin: auto;
+    box-shadow: 0 0 3px #888;
+}
+
+.bomb-box .box01 {
+    margin-top: 80px;
+    width: 580px;
+    height: 406px;
+    border-radius: 5px;
+    background: #fff;
+}
+
+.bomb-box .box i.off {
+    width: 20px;
+    height: 20px;
+    display: inline-block;
+    position: absolute;
+    right: 8px;
+    top: 8px;
+    text-align: center;
+    cursor: pointer;
+}
+
+.bomb-box .box p {
+    height: 40px;
+    line-height: 40px;
+    font-size: 14px;
+    width: 100%;
+    margin: 0 auto;
+    border-bottom: #e8e8e8 1px solid;
+    padding-left: 20px;
+}
+.bomb-box .box-bottom{
+    padding: 0 5px 5px;
+    width: 465px;
+    height: 450px!important;
+    background: #e8e8e8;
+}
+.bomb-box .box-bottom .box-header{
+    padding-left: 5px;
+    width: 100%;
+    height: 26px;
+}
+.bomb-box .box-bottom .box-header p{
+    float: left;
+    padding-left: 10px;
+    height: 26px;
+    line-height: 28px;
+    width: 100px;
+    font-size: 14px;
+    color: #000;
+}
+.bomb-box .box-bottom .box-header a{
+    margin-top: 6px;
+    display: inline-block;
+    float: right;
+    width: 15px;
+    height: 15px;
+    text-align: center;
+    font-size: 14px;
+    color: #000;
+    border-radius: 3px;
+    border: 1px solid #000;
+}
+.bomb-box .box-bottom .per-data{
+    margin: 0 auto;
+    width: 455px;
+    height: 418px;
+    text-align: center;
+    background: #f3f3f3;
+    border-top: 1px solid #ccc;
+}
+.bomb-box .box-bottom .per-data ul li{
+    margin-bottom: 15px;
+    height: 26PX;
+    line-height: 26px;
+}
+.bomb-box .box-bottom .per-data ul li:first-child, .bomb-box .box-bottom .per-data ul li:last-child{
+    margin-top: 25px;
+}
+.bomb-box .box-bottom .per-data ul li em{
+    width: 80px;
+    text-align: right;
+}
+.bomb-box .box-bottom .per-data ul li input{
+    padding-left: 10px;
+    width: 300px;
+    height: 26px;
+    border: 1px solid #a0a0a0;
+}
+.bomb-box .box-bottom .per-data ul li a.mod-psd{
+    float: none;
+}
+
+/*设置-企业设置-收货地址编辑*/
+.bomb-box .box04 {
+    width: 492px;
+    height: 478px;
+    background: #fff;
+}
+
+.bomb-box .box04 p {
+    height: 30px;
+    line-height: 30px;
+    background: #5078cb;
+    border-bottom: #dcdcdc 1px dotted;
+    color: #fff;
+}
+.bomb-box .box04 i.off {
+    color: #fff;
+}
+.bomb-box .box04 ul {
+    width: 92%;
+    margin: 0 auto;
+}
+
+.bomb-box .box04 ul li {
+    width: 100%;
+    height: 34px;
+    margin-top: 16px !important;
+    line-height: 34px;
+    margin: 0 auto;
+}
+.bomb-box .box04 ul li > div {
+    margin-bottom: 10px;
+}
+.bomb-box .box04 ul li.line01 div {
+    width: 100%;
+    float: left;
+}
+
+.bomb-box .box04 ul li.line01 div.fl span.fl, .bomb-box .box04 ul li.line01 div.fr span.fl {
+    width: 80px;
+    font-size: 14px;
+}
+
+.bomb-box .box04 ul li.line01 div.fl span.fr, .bomb-box .box04 ul li.line01 div.fr span.fr {
+    width: 254px;
+    height: 34px;
+    display: inline-block;
+    float: left;
+}
+
+.bomb-box .box04 ul li div em {
+    color: #f00;
+}
+
+.bomb-box .box04 ul li.line01 div.fl span.fr input, .bomb-box .box04 ul li.line01 div.fr span.fr input {
+    width: 254px;
+    height: 34px;
+    padding-left: 10px;
+    border: #cccccd 1px solid;
+    font-size: 14px;
+}
+
+.bomb-box .box04 ul li.line01 div.fr span.fl {
+    margin-left: 20px;
+}
+
+.bomb-box .box04 ul li.line02 div.fl {
+    width: 80px;
+    font-size: 14px;
+}
+
+.bomb-box .box04 ul li.line02 div.fr {
+    width: 632px;
+    height: 34px;
+    font-size: 14px;
+    float: left;
+}
+
+.bomb-box .box04 ul li.line02 div.fr input {
+    width: 632px;
+    height: 34px;
+    font-size: 14px;
+    padding-left: 10px;
+    border: #cccccd 1px solid;
+}
+
+.bomb-box .box04 .margin-top40 {
+    margin-top: 40px !important;
+}
+
+.bomb-box .box04 .emaill, .bomb-box .box04 .address {
+    position: relative;
+}
+
+.bomb-box .box04 .emaill i, .bomb-box .box04 .address i {
+    font-size: 14px;
+    color: #999;
+    left: 0;
+}
+
+.bomb-box .box04 .select {
+    position: relative;
+}
+
+.bomb-box .box04 .select i {
+    position: absolute;
+    top: 10px;
+    left: 60px;
+    color: #959595;
+}
+
+.bomb-box .box04 .many-file-btn {
+    width: 240px;
+    margin: 60px auto 0;
+}
+.no-padding {
+    padding: 0;
 }

+ 54 - 11
src/main/webapp/resources/css/b2bPublic.css

@@ -109,6 +109,8 @@
 }
 #public .screen .sreach .sreach-input >.form-control{
     width: 220px;
+    border: #5078cb 1px solid;
+    height: 32px;
 }
 #public .order-table, #public .inquiry-table {
     width: 1026px;
@@ -116,11 +118,11 @@
 #public .ng-table-pager{
     margin-top: 20px;
 }
-.order-table .order-hd .order-main span.icon{
-    position: absolute;
-    top: 0;
-    left: 0;
-}
+/*.order-table .order-hd .order-main span.icon{*/
+    /*position: absolute;*/
+    /*top: 0;*/
+    /*left: 0;*/
+/*}*/
 .no-circle-icon {
     display: inline-block;
     padding: 0 5px;
@@ -145,17 +147,26 @@
     font-size: 14px;
     color: #5078cb;
 }
+#public .tab_top ul li.down-purchase .tab_add{
+    min-width: 75px;
+    padding: 0 5px;
+    display: inline-block;
+    color: #5078cb;
+}
+#public .tab_top ul li.down-purchase .tab_add i{
+    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;
+    font-weight: bold;
 }
 #public .order-table .order-hd .order-main span {
     font-size: 14px;
+    font-weight: bold;
 }
 #public .order-table .order-hd .order-main span img {
     margin: 0px 5px 0 11px;
@@ -165,6 +176,11 @@
     border-color: #3c7cf5;
     border-width: 2px;
 }
+#public .order-table .order-hd .order-sum{
+    font-size: 14px;
+    font-weight: bold;
+    color: #333333;
+}
 #public .menu .new-dot{
     width: 20px;
     height: 20px;
@@ -223,8 +239,35 @@ tbody td.enddate span{
     font-size: 14px;
     color: #666;
 }
-#public .icon{
-    position: absolute;
-    top: 0;
-    left: 0;
+/*#public .icon{*/
+    /*position: absolute;*/
+    /*top: 0;*/
+    /*left: 0;*/
+/*}*/
+#public .condition .screen {
+    background: #fff;
+}
+#public .order-table>tbody:hover .operates , #public .order-table>tbody:hover .operates i, #public .order-table>tbody:hover .operates a{
+    color: #5078cb;
+    font-weight: bold;
+}
+#public .text-red {
+    color: #ff4400;
+}
+#public .product> div b.text-muted01 {
+    float: left;
+    display: inline-block;
+    width: 70px;
+    color: #666;
+}
+#public .text-bold{
+    font-size: 14px;
+}
+#public .text-inverse {
+    font-size: 14px;
+    color: #f40 !important;
+}
+#public .text-muted {
+    color: #888 !important;
+    font-size: 14px;
 }

+ 0 - 7
src/main/webapp/resources/css/user/base.css

@@ -502,13 +502,6 @@ select {
     right: -5px;
 }
 
-select {
-    filter: alpha(opacity=0);
-    -moz-opacity: .0;
-    opacity: 0.0;
-    opacity: 0;
-}
-
 .undo {
     color: #ccc !important;
 }

+ 183 - 424
src/main/webapp/resources/js/common/b2bServices.js

@@ -950,7 +950,7 @@ 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', {}, {
@@ -1448,399 +1448,6 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
                 }
             });
         }])
-        .factory('B2bShipAddress', ['$resource', 'BaseService', function($resource, BaseService){
-          var b2bPath = BaseService.getB2bUrl();
-          return $resource('account/enterprise', {}, {
-            saveAddress: {
-              url: b2bPath + 'account/enterprise/saveShipAddress',
-              method: 'POST'
-            },
-            shipAddList: {
-              url: b2bPath + 'account/enterprise/shipAddList',
-              method: 'GET',
-              isArray: true
-            },
-            removeShipAddress: {
-              url: b2bPath + 'account/enterprise/removeShipAddress/:id',
-              method: 'DELETE'
-            }
-          });
-        }])
-        .factory('B2bKindAPI', ['$resource', 'BaseService', '$cacheFactory', function($resource, BaseService, $cacheFactory) {
-          var b2bPath = BaseService.getB2bUrl();
-          var cache = $cacheFactory('KindAPI');
-          return $resource (b2bPath + 'product/kind', {}, {
-            // 根据父级类目获取其子类目,不包含深层
-            getChildren: {
-              url: b2bPath +  'product/kind/:parentId/children',
-              method: 'GET',
-              isArray: true
-            },
-            // 获取父级分类的所有子分类,含深层
-            getAllChildren: {
-              url: b2bPath +  'product/kind/:parentId/children_all',
-              method: 'GET',
-              isArray: true
-            },
-            // 获取子类目的所有父类目(含每级类目的兄弟类目),返回逐级向下的类目数组
-            getParentsWithBothers: {
-              url: b2bPath +  'product/kind/:childId/parentsWithBothers',
-              method: 'GET',
-              isArray: true
-            },
-            // 获取子类目的所有父类目,返回逐级向下的类目数组
-            getParents: {
-              url: b2bPath +  'product/kind/:childId/parents',
-              method: 'GET',
-              isArray: true
-            },
-            // 获取分类的所有属性,包括存在的值选项
-            getPropertiesValues: {
-              url: b2bPath +  'product/kind/:kindId/properties/values',
-              method: 'GET',
-              isArray: true
-            },
-            // 获取分类的所有属性,不含值选项
-            getProperties: {
-              url: b2bPath +  'product/kind/:kindId/properties',
-              method: 'GET',
-              isArray: true
-            },
-            // 获取类目下器件的所属品牌列表
-            getBrands: {
-              url: b2bPath +  'product/kind/:kindId/brands',
-              methos: 'GTE',
-              isArray: true
-            },
-            // 获取类目下主要属性存在的值选项
-            getPropertyOptions: {
-              url: b2bPath +  'product/kind/:kindId/propertyOptions',
-              method: 'GET',
-              isArray: true
-            },
-            // 根据kindid获取一页ComponentGoods
-            getCompGoodsByKindid: {
-              url: b2bPath +  'product/product/getCompGoodsByKindid',
-              method: 'GET'
-            },
-            // 根据keyword获取一页ComponentGoods
-            getCompGoodsBySearch: {
-              url: b2bPath +  'product/component/search/compGoods',
-              method: 'GET'
-            },
-            // 根据kindid获取类目属性
-            getKindProperties: {
-              url: b2bPath +  'product/kind/:kindId/kindProperties',
-              method: 'GET',
-              isArray: true
-            }
-          })
-        }])
-        .factory('B2bBrandActiveAPI', ['$resource', 'BaseService', function($resource, BaseService) {
-          //对单个BrandActive对象操作
-          var b2bPath = BaseService.getB2bUrl();
-          return $resource(b2bPath + 'product/brand/:uuid', {}, {
-            /*
-             * get,根据uuid获得BrandActive
-             */
-            // 获取所有品牌的简要信息
-            getSimpleInfo : {
-              url : b2bPath + 'product/brand/Info',
-              method : 'GET',
-              isArray : true
-            },
-            // 分页获取简要信息
-            getSimpleInfoPage: {
-              url: b2bPath + 'product/brand/Info/ByPage',
-              method: 'GET'
-            },
-            // 通过名称获取品牌
-            findByName : {
-              url: b2bPath + 'product/brand/ByName/:name',
-              method: 'GET'
-            }
-          })
-        }])
-        .factory('B2bSearch', ['$resource', 'BaseService',  function($resource, BaseService) {
-          var b2bPath = BaseService.getB2bUrl();
-          return $resource(b2bPath + 'search/', {}, {// 搜索接口
-            getSimilarBrands: {
-              // 根据品牌名获取品牌联想词
-              url: b2bPath + 'search/similarBrands',
-              method: 'GET',
-              isArray: true
-            },
-            getSimilarKinds: {
-              // 根据类目名获取类目联想词
-              url: b2bPath + 'search/similarKinds',
-              method: 'GET',
-              isArray: true
-            },
-            getSimilarLeafKinds: {
-              // 根据类目名获取 末级类目 联想词
-              url:b2bPath +  'search/similarLeafKinds',
-              method: 'GET',
-              isArray: true
-            },
-            getSimilarComponents: {
-              // 根据器件名获取器件联想词
-              url:b2bPath +  'search/similarComponents',
-              method: 'GET',
-              isArray: true
-            }
-          });
-        }])
-        .factory('B2bComponentActiveAPI', ['$resource', 'BaseService', function($resource, BaseService){
-          var b2bPath = BaseService.getB2bUrl();
-          return $resource(b2bPath + 'product/component', {},{
-            //获取ComponentInfo的分页数据
-            getInfoPage: {
-              url: b2bPath +  'product/component/list',
-              method: 'GET'
-            },
-            //根据uuid获取器件信息
-            get: {
-              url: b2bPath +  'product/component/:uuid',
-              method: 'GET'
-            },// 根据UUid获取单个器件的简要信息
-            // 分页获取简要信息
-            getInfo: {
-              url: b2bPath +  'product/component/info',
-              method: 'GET'
-            }
-          });
-        }])
-        .factory('B2bGetProductInfo', ['$resource',  'BaseService', function($resource, BaseService) {
-          var b2bPath = BaseService.getB2bUrl();
-          return $resource(b2bPath + 'product/baseInfo/info/search', {}, {
-            getSaleProduct: {
-              url: b2bPath +  'product/baseInfo/:id/info',
-              method: 'GET'
-            },
-            getPurcProduct: {
-              url: b2bPath + 'purcProduct/:id/info',
-              method: 'GET'
-            },
-            getOne : {
-              url : b2bPath + "product/baseInfo/:id",
-              method : 'GET'
-            },
-            getAll : {
-              isArray : false
-            },
-            getStandard: {
-              params: {
-                _state: 'standard'
-              }
-            },
-            getNonstandard: {
-              params: {
-                _state: 'nonstandard'
-              }
-            },
-            uploadByBatch : {
-              url : b2bPath + "product/baseInfo/uploadByBatch",
-              method : 'GET',
-            },
-            addNewProd : {
-              url: b2bPath + "product/baseInfo/edit/addNewProduct",
-              method : 'POST'
-            },
-            update : {
-              url: b2bPath + "product/baseInfo/edit/updateProdInfo",
-              method : 'POST'
-            },
-            deleteById : {
-              url: b2bPath + "product/baseInfo/edit/delete",
-              method : 'POST'
-            },
-            deletePurcById : {
-              url: b2bPath + "purcProduct/edit/delete",
-              method : 'POST'
-            },
-            getAllPartners : {
-              url : b2bPath + "product/baseInfo/getAllPartners",
-              method : 'GET',
-              isArray : true
-            },
-            addCust : {
-              url : b2bPath + "product/baseInfo/addCust",
-              method : 'POST',
-              isArray: false,
-              headers: {
-                'Content-Type' : 'application/text;charset=UTF-8'
-              }
-            },
-            addSupplier : {
-              url: b2bPath + "product/baseInfo/addSupplier",
-              method : 'POST',
-              isArray: false,
-              headers: {
-                'Content-Type' : 'application/text;charset=UTF-8'
-              }
-            },
-            businessGroups: {
-              url: b2bPath + "product/baseInfo/enterbusinessGroups",
-              method : 'GET',
-              headers: {
-                'Content-Type' : 'application/text;charset=UTF-8'
-              }
-            },
-            getAttach: {
-              url: b2bPath + "product/baseInfo/getAttach/:id",
-              method: 'GET',
-            },
-            toggle: {
-              url: b2bPath + 'product/baseInfo/edit/toggle/:status',
-              method: 'POST'
-            },
-            setRead:{
-              url: b2bPath + 'product/baseInfo/setRead',
-              method: 'POST'
-            },
-            getUnreadIds:{
-              url: b2bPath + 'product/baseInfo/getUnreadIds',
-              method: 'GET'
-            },
-            getUnreadCount:{
-              url: b2bPath + 'product/baseInfo/unread',
-              method: 'GET'
-            },
-            exportXls: {
-              url: b2bPath + 'product/baseInfo/xls/permission',
-              method: 'GET'
-            },
-            matchbytype: {
-              url: b2bPath + 'product/baseInfo/edit/matchbytype/:type',
-              method: 'POST'
-            }
-          })
-        }])
-        .factory('B2bVendor', ['$resource', 'BaseService', function($resource, BaseService){
-          var b2bPath = BaseService.getB2bUrl();
-          return $resource(b2bPath + 'purc/vendor/:id', {}, {
-            getServe: {
-              // 调取使用uas系统的供应商信息
-              url: b2bPath + 'purc/vendor/serve',
-              isArray: true
-            },
-            getVendor: {
-              url: b2bPath + 'vendor/info/search'
-            },
-            getServicer: {
-              url: b2bPath + 'vendor/servicer'
-            },
-            getVendorDetail: {
-              url: b2bPath + 'vendor/:id/info',
-              method: 'GET'
-            },
-            getCustomerDetail: {
-              url: b2bPath + 'vendor/customer/:id/info',
-              method: 'GET'
-            },
-            saveContact: {
-              url: b2bPath + 'vendor/savecontact',
-              method: 'POST'
-            },
-            contacts: {
-              url:b2bPath +  'vendor/contacts/:venduu',
-              method: 'GET',
-              isArray: true
-            },
-            deleteContact: {
-              url: b2bPath + 'vendor/deleteContact/:id',
-              method: 'DELETE'
-            },
-            getSimilarVendors: {
-              url: b2bPath + 'search/similarVendors',
-              method: 'GET',
-              isArray: true
-            },
-            getSimilarCustomers: {
-              url: b2bPath + 'search/similarCustomers',
-              method: 'GET',
-              isArray: true
-            },
-            saveCustContact: {
-              url:b2bPath +  'vendor/saveCustomerContact',
-              method: 'POST'
-            },
-            custContacts: {
-              url:b2bPath +  'vendor/custContacts/:enuu',
-              method: 'GET',
-              isArray: true
-            },
-            getSimilarEnterprise: {
-              url: b2bPath + 'search/similarEnterprise',
-              method: 'GET',
-              isArray: true
-            },
-            vendorInfo: {
-              url: b2bPath + 'vendor/vendorInfo',
-              method: 'GET'
-            },
-            enterpriseInfo: {
-              url: b2bPath + 'account/enterprise/info/:bussinessCode',
-              method: 'GET'
-            },
-            setRead:{
-              url: b2bPath + 'vendor/customer/setRead',
-              method: 'POST'
-            },
-            setVendorRead:{
-              url: b2bPath + 'vendor/vendor/setRead',
-              method: 'POST'
-            }
-          });
-        }])
-        .factory('B2bPurcProduct', ['$resource', 'BaseService', function($resource, BaseService) {
-          var b2bPath = BaseService.getB2bUrl();
-          return $resource(b2bPath + 'purcProduct/info/search', {}, {
-            getAll : {
-              isArray : false
-            },
-            getStandard: {
-              params: {
-                _state: 'standard'
-              }
-            },
-            getNonstandard: {
-              params: {
-                _state: 'nonstandard'
-              }
-            },
-            setRead:{
-              url: b2bPath + 'purcProduct/setRead',
-              method: 'POST'
-            },
-            matchbytype: {
-              url: b2bPath + 'purcProduct/edit/matchbytype/:type',
-              method: 'POST'
-            },
-            exportXls: {
-              url:b2bPath +  'purcProduct/xls/permission',
-              method: 'GET'
-            }
-          })
-        }])
-        .factory('B2bPurcProductNewest', ['$resource', 'BaseService', function($resource, BaseService) {
-          var b2bPath = BaseService.getB2bUrl();
-          return $resource(b2bPath + 'purcProduct/info/nosearch', {}, {
-            getAll : {
-              isArray : false
-            },
-            getStandard: {
-              params: {
-                _state: 'standard'
-              }
-            },
-            getNonstandard: {
-              params: {
-                _state: 'nonstandard'
-              }
-            }
-          })
-        }])
         // 数据库直接获取
         .factory('B2bPurcTenderInfo', ['$resource', 'BaseService', function($resource, BaseService) {
             var b2bPath = BaseService.getB2bUrl();
@@ -2205,42 +1812,194 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
                     method: 'GET'
                 }
             })
+        }]).factory('B2bShipAddress', ['$resource', 'BaseService', function($resource, BaseService){
+        var b2bUrl = BaseService.getB2bUrl();
+        return $resource(b2bUrl + '/account/enterprise', {}, {
+            saveAddress: {
+                url: b2bUrl + '/account/enterprise/saveShipAddress',
+                method: 'POST'
+            },
+            shipAddList: {
+                url: b2bUrl + '/account/enterprise/shipAddList',
+                method: 'GET',
+                isArray: true
+            },
+            removeShipAddress: {
+                url: b2bUrl + '/account/enterprise/removeShipAddress/:id',
+                method: 'DELETE'
+            }
+        });
+    }]).factory('B2bRecentPrice', ['$resource', 'BaseService', function($resource, BaseService) {
+        var b2bUrl = BaseService.getB2bUrl();
+        return $resource(b2bUrl + '/sale/inquiry', {}, {
+            // 获取最新的已采纳的价信息
+            agreed: {
+                url: b2bUrl + '/sale/inquiry/recentPrice/:prId',
+                method: 'GET'
+            }
+        });
+    }]).factory('B2bToken', ['$resource', 'BaseService', function($resource, BaseService) {
+        var b2bUrl = BaseService.getB2bUrl();
+        return $resource(b2bUrl + '/token', {}, {
+            info: {
+                url: b2bUrl + '/token',
+                mehtod: 'GET'
+            }
+        })
+    }])
+        .factory('B2bPurchaseOrder', ['$resource', 'BaseService', function($resource, BaseService){
+            var b2bUrl = BaseService.getB2bUrl();
+            return $resource(b2bUrl + '/purchase', {}, {
+                copyorder: {
+                    url: b2bUrl + '/purchase/copyorder/:id',
+                    method: 'POST'
+                }
+            });
         }])
-        .factory('B2bShipAddress', ['$resource', 'BaseService', function($resource, BaseService){
-          var b2bUrl = BaseService.getB2bUrl();
-          return $resource(b2bUrl + '/account/enterprise', {}, {
-              saveAddress: {
-                  url: b2bUrl + '/account/enterprise/saveShipAddress',
-                  method: 'POST'
-              },
-              shipAddList: {
-                  url: b2bUrl + '/account/enterprise/shipAddList',
-                  method: 'GET',
-                  isArray: true
-              },
-              removeShipAddress: {
-                  url: b2bUrl + '/account/enterprise/removeShipAddress/:id',
-                  method: 'DELETE'
-              }
-          });
+        .factory('B2bChange', ['$resource', 'BaseService', function($resource, BaseService) {
+            var b2bUrl = BaseService.getB2bUrl();
+            return $resource(b2bUrl + '/purc/change/info', {}, {
+                /**
+                 * 以客户角度,获取全部采购变更单
+                 */
+                getAll: {
+
+                },
+                /**
+                 * 以客户角度,获取待处理的采购变更单
+                 */
+                getTodo: {
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                /**
+                 * 以客户角度,获取已确认的采购变更单
+                 */
+                getDone: {
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                /**
+                 * 以客户角度,获取无需确认的采购变更单
+                 */
+                getUnread: {
+                    params: {
+                        _state: 'unread'
+                    }
+                },
+                /**
+                 * 查询符合条件的可以作为采购变更单的采购单信息
+                 */
+                getEnableOrderList: {
+                    url: b2bUrl + '/purc/change/enable/orderList'
+                },
+                /**
+                 * 保存采购变更单
+                 */
+                save: {
+                    method: 'POST',
+                    url: b2bUrl + '/purc/change/save',
+                    isArray: false,
+                    headers: {
+                        'Content-Type' : 'application/json;charset=UTF-8'
+                    }
+                },
+                /**
+                 * 查询采购变更单详情
+                 */
+                getItem: {
+                    url: b2bUrl + '/purc/change/:id/info',
+                    method: 'GET'
+                },
+                /**
+                 * 导出
+                 */
+                exportXls: {
+                    url: b2bUrl + '/purc/change/xls/permission',
+                    method: 'GET'
+                }
+            })
         }])
-        .factory('B2bRecentPrice', ['$resource', 'BaseService', function($resource, BaseService) {
+        .factory('B2bPurcOrdersInfo', ['$resource', 'BaseService', function($resource, BaseService) {
             var b2bUrl = BaseService.getB2bUrl();
-            return $resource(b2bUrl + '/sale/inquiry', {}, {
-                // 获取最新的已采纳的价信息
-                agreed: {
-                    url: b2bUrl + '/sale/inquiry/recentPrice/:prId',
+            return $resource(b2bUrl + '/sale/orders/purc/info/nosearch', {}, {
+                getAll: {
+                    url: b2bUrl + '/sale/orders/purc/:id/info',
                     method: 'GET'
+                },
+                getTodo: {
+                    params: {
+                        _state: 'todo'
+                    }
+                },
+                getDone: {
+                    params: {
+                        _state: 'done'
+                    }
+                },
+                getEnd: {
+                    params: {
+                        _state: 'end'
+                    }
+                },
+                getReceived:{
+                    params: {
+                        _state: 'received'
+                    }
+                },
+                getWaiting: {
+                    params: {
+                        _state: 'waiting'
+                    }
                 }
             });
         }])
-        .factory('B2bToken', ['$resource', 'BaseService', function($resource, BaseService) {
-            var b2bUrl = BaseService.getB2bUrl();
-            return $resource(b2bUrl + '/token', {}, {
-                info: {
-                    url: b2bUrl + '/token',
-                    mehtod: 'GET'
+        .factory('B2bPurcOrders', ['$resource', 'BaseService', function($resource, BaseService) {
+        var b2bUrl = BaseService.getB2bUrl();
+        return $resource(b2bUrl + '/sale/orders/purc/info/search', {}, {
+            getTodo: {
+                params: {
+                    _state: 'todo'
                 }
-            })
-        }]);
+            },
+            getDone: {
+                params: {
+                    _state: 'done'
+                }
+            },
+            getEnd: {
+                params: {
+                    _state: 'end'
+                }
+            },
+            getReceived:{
+                params: {
+                    _state: 'received'
+                }
+            },
+            getWaiting: {
+                params: {
+                    _state: 'waiting'
+                }
+            },
+            setRead:{
+                url: b2bUrl + '/sale/orders/setRead/purc',
+                method: 'POST'
+            },
+            getUnreadIds:{
+                url: b2bUrl + '/sale/orders/getUnreadIds/purc',
+                method: 'GET'
+            },
+            getUnreadCount:{
+                url: b2bUrl + '/sale/orders/unread/purc',
+                method: 'GET'
+            },
+            exportXls: {
+                url: b2bUrl + '/sale/orders/purc/xls/permission',
+                method: 'GET'
+            }
+        });
+    }]);
 });

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

@@ -68,5 +68,44 @@ define([ 'app/app' ], function(app) {
             });
         };
     }]);
+    /**
+     * 采购批量导入
+     */
+    app.controller('PurcUploadByBatchCtrl', ['$scope', 'toaster', '$upload', '$modalInstance', 'BaseService', function ($scope, toaster, $upload, $modalInstance, BaseService) {
+        // 通过excel批量上传物料
+        $scope.result = null;
+        $scope.loading = false;
+        $scope.upload = function () {
+            $scope.loading = true;
+            var file = $scope.myFiles[0];
+            $upload.upload({
+                url: BaseService.getB2bUrl() + '/purchase/release/excel',
+                file: file,
+                method: 'POST'
+            }).success(function (data) {
+                $scope.loading = false;
+                $scope.result = data;
+                $scope.success = $scope.result.success;
+                $scope.total = $scope.result.total;
+                $scope.alters = $scope.result.alters;
+            }).error(function (response) {
+                $scope.loading = false;
+                toaster.pop('error', response.data || response);
+            });
+        };
 
+        // 下载模板
+        $scope.download = function () {
+            window.location.href = BaseService.getB2bUrl() + '/purchase/upload/template';
+        };
+
+        $scope.enSure = function () {
+            $scope.loading = true;
+            $modalInstance.close($scope.result.products);
+        }
+
+        $scope.cancel = function () {
+            $modalInstance.dismiss();
+        }
+    }]);
 });

+ 1 - 1
src/main/webapp/resources/js/common/services.js

@@ -151,7 +151,7 @@ define([ 'angular', 'common/utils', 'big'], function(angular, utils, Big) {
 					// defer.promise.then(function (resolve) {
 					// 	$rootScope.b2bUrl = resolve.url;
 					// });
-					$rootScope.b2bUrl = this.getRootPath().indexOf('usoftmall.com') > -1 ? 'http://uas.ubtob.com' : 'http://10.1.51.91:8090/platform-b2b/';
+					$rootScope.b2bUrl = this.getRootPath().indexOf('usoftmall.com') > -1 ? 'http://uas.ubtob.com' : 'http://10.1.51.91:8090/platform-b2b';
 				}
 				return $rootScope.b2bUrl;
 			}

+ 25 - 1
src/main/webapp/resources/js/usercenter/app.js

@@ -498,7 +498,31 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
       templateUrl: "static/view/usercenter/b2b/Purc/vendor_tender.html",
       controller: 'SaleVendorTenderDetailCtrl',
       controllerUrl: 'app/controllers/b2b/Purc/vendor_tender'
-    }));
+    })).state('purc_usercenter_order', angularAMD.route({
+            url: "/purc/order",
+            title: '买家中心-B2b采购订单',
+            templateUrl: "static/view/usercenter/b2b/order/usercenter_order.html",
+            controller: 'PurcUsercenterOrderCtrl',
+            controllerUrl: 'app/controllers/b2b/order/usercenterOrderCtrl'
+        })).state('purc_change_list', angularAMD.route({
+            url: "/purc/change",
+            title: '买家中心-B2b采购变更单',
+            templateUrl: "static/view/usercenter/b2b/order/changeList.html",
+            controller: 'PurcChangeListCtrl',
+            controllerUrl: 'app/controllers/b2b/order/purcChangeListCtrl'
+        })).state('purc_deputy', angularAMD.route({
+            url: "/purc/deputy",
+            title: '买家中心-B2b代采订单',
+            templateUrl: "static/view/usercenter/b2b/order/deputyOrder.html",
+            controller: 'PurcDeputyOrderCtrl',
+            controllerUrl: 'app/controllers/b2b/order/purcDeputyOrderCtrl'
+        })).state('purc_make_outorder', angularAMD.route({
+            url: "/purc/makeoutorder",
+            title: '买家中心-B2b委外订单',
+            templateUrl: "static/view/usercenter/b2b/order/outorder.html",
+            controller: 'PurcMakeOutOrderCtrl',
+            controllerUrl: 'app/controllers/b2b/order/purcMakeOutOrderCtrl'
+        }));
 	}]);
 
 	// 状态码  -> 描述

+ 62 - 4
src/main/webapp/resources/js/usercenter/controllers/b2b/Purc/PurcNewOrderCtrl.js

@@ -14,7 +14,7 @@ define(['app/app'], function(app) {
             });
 
             // 获取地址信息
-            $http.get('resources/citydata/city.json', {
+            $http.get('resources/js/prod/data/city.json', {
                 "Accept": "application/json;charset=utf-8", "Accept-Charset": "charset=utf-8"
             }).then(function (response) {
                 $scope.provinces = response.data;
@@ -79,7 +79,7 @@ define(['app/app'], function(app) {
             // 查找供应商
             $scope.dbfindVend = function () {
                 var modalInstance = $modal.open({
-                    templateUrl: 'static/tpl/index/purc/modal/purc_order_vendor.html',
+                    templateUrl: 'static/view/usercenter/b2b/modal/purc_order_vendor.html',
                     controller: 'DbfindVendorInfoCtrl',
                     size: 'lg',
                     resolve: {
@@ -245,7 +245,7 @@ define(['app/app'], function(app) {
             // 导入商品信息
             $scope.uplodaByBatch = function () {
                 var modalInstance = $modal.open({
-                    templateUrl: 'static/tpl/index/purc/modal/purc_uplodaByBatch.html',
+                    templateUrl: 'static/view/usercenter/b2b/modal/purc_uplodaByBatch.html',
                     controller: 'PurcUploadByBatchCtrl',
                     size: 'lg',
                     resolve: {}
@@ -374,7 +374,7 @@ define(['app/app'], function(app) {
             $scope.addContact = function (uu) {
                 var modalInstance = $modal.open({
                     animation: true,
-                    templateUrl: 'static/tpl/index/purc/modal/contact_person_modal.html',
+                    templateUrl: 'static/view/vendor/b2b/modal/contact_person_modal.html',
                     controller: 'AddContacCtrl',
                     resolve: {}
                 });
@@ -394,4 +394,62 @@ define(['app/app'], function(app) {
             }
 
         }]);
+
+    // 查找供应商
+    app.register.controller('DbfindVendorInfoCtrl', ['$scope', 'BaseService', 'ngTableParams', 'toaster', '$modalInstance', 'B2bVendor', '$rootScope', 'orderItems', function ($scope, BaseService, ngTableParams, toaster, $modalInstance, Vendor, $rootScope, orderItems) {
+        $scope.prod = false;
+        if (orderItems.length != 0) {
+            $scope.prod = true;
+        }
+        BaseService.scrollBackToTop();
+        if ($rootScope.venduu != null) {
+            $scope.venduu = $rootScope.venduu;
+        }
+        // 搜索框回车
+        $scope.onSearch = function (keyword) {
+            $scope.keyword = keyword;
+            $scope.customerParams.page(1);
+            $scope.customerParams.reload();
+        };
+
+        $scope.customerParams = new ngTableParams({
+            page: 1,
+            count: 20
+        }, {
+            total: 0,
+            counts: [5, 10, 25, 50],
+            getData: function ($defer, params) {
+                $scope.loading = true;
+                var pageParams = params.url();
+                pageParams.keyword = $scope.keyword;
+                Vendor.getVendor.call(null, BaseService.parseParams(pageParams), function (page) {
+                    $scope.loading = false;
+                    if (page) {
+                        params.total(page.totalElement);
+                        $defer.resolve(page.content);
+                    }
+                    $scope.totalCount = page.totalElement;
+                }, function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '数据加载失败', response.data);
+                });
+            }
+        });
+
+        $scope.cancel = function () {
+            $modalInstance.dismiss();
+        };
+
+        $scope.ensure = false;
+        $scope.check = function (vendor) { // 需要进行判断的选择
+            $scope.vendorInfo = vendor;
+            $scope.ensure = true;
+        };
+
+        $scope.checkVendor = function (vendor) { // 直接选择
+            $modalInstance.close(vendor);
+        }
+
+    }]);
+
 });

+ 209 - 0
src/main/webapp/resources/js/usercenter/controllers/b2b/order/purcChangeListCtrl.js

@@ -0,0 +1,209 @@
+/**
+ * 采购变更单列表
+ *
+ * @author hejq
+ * @date 2018-06-25 17:13
+ */
+
+define(['app/app'], function(app) {
+	app.register.controller('PurcChangeListCtrl', ['$scope', '$rootScope', '$filter', 'B2bChange', 'ngTableParams', 'toaster', 'BaseService', 'B2bCurrentRole', function ($scope, $rootScope, $filter, change, ngTableParams, toaster, BaseService, CurrentRole) {
+        BaseService.scrollBackToTop();
+        $rootScope.active = 'buyer_order';
+        $scope.storeType = 'purcChange';
+        $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 == 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 () {
+            return change;
+        };
+        $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.onSearch = function (keyword) {
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
+        };
+
+        // 导出
+        $scope.exportXls = function () {
+            change.exportXls({}, {}, function (data) {
+                if (data.success){
+                    window.location.href = 'purc/change/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                }
+            }, function (response) {
+                toaster.pop('error', '数据加载失败', response.data);
+            });
+        }
+    }]);
+})

+ 364 - 0
src/main/webapp/resources/js/usercenter/controllers/b2b/order/purcDeputyOrderCtrl.js

@@ -0,0 +1,364 @@
+/**
+ * 采购订单
+ *
+ * @author hejq
+ * @date 2018-06-25 17:13
+ */
+
+
+define(['app/app'], function(app) {
+	app.register.controller('PurcDeputyOrderCtrl', ['$scope', '$filter', 'B2bPurcOrders', 'B2bPurcOrder', 'ngTableParams', 'toaster', 'B2bReportService', 'BaseService', '$rootScope', 'B2bPurchaseOrder', 'B2bPurcOrdersInfo', 'B2bPurcOrderItem', 'B2bCurrentRole',
+        function ($scope, $filter, PurcOrders, PurcOrder, ngTableParams, toaster, ReportService, BaseService, $rootScope, PurchaseOrder, PurcOrdersInfo, PurcOrderItem, CurrentRole) {
+            BaseService.scrollBackToTop();
+            $scope.storeType = 'purcOrder';
+            $rootScope.active = 'buyer_order';
+            /**
+             * 将日期转化为整数日期
+             */
+            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;
+                }
+            };
+
+            // 获取当前用户是否为普通用户
+            CurrentRole.isUser({}, {}, function (data) {
+                $scope.isUser = data.isUser;
+            });
+            // if ($rootScope.active) {
+            //     $scope.active = $rootScope.active;
+            //     $rootScope.active = null;
+            // } else {
+                $scope.active = 'all';
+            // }
+            $scope.dateZoneText = '不限';
+            $scope.deliveryZoneText = '不限';
+            $scope.condition = {dateZone: 1, deliveryZone: -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.reload();
+            };
+            $scope.searchMethod = false;
+            var getService = function () {
+                return $scope.searchMethod ? PurcOrders : PurcOrdersInfo;
+            };
+            // 切换单据类型
+            $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 getPurcStatus = function (active) {
+                var fn = 'getPurcAll';
+                switch (active) {
+                    case 'done':
+                        fn = 'getPurcDone';
+                        break;
+                    case 'todo':
+                        fn = 'getPurcTodo';
+                        break;
+                    case 'end':
+                        fn = 'getPurcEnd';
+                        break;
+                    case 'waiting':
+                        fn = 'getPurcWaiting';
+                        break;
+                }
+                return fn;
+            };
+
+            $scope.tableParams = new ngTableParams({ // ng-Table参数
+                page: 1,
+                count: 20,
+                sorting: {
+                    display: 'desc',
+                    date: 'desc'
+                }
+            }, {
+                total: 0,
+                counts: [5, 10, 15, 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) {
+                            $defer.resolve(page.content);
+                            $scope.total = page.totalElement;
+                            params.total(page.totalElement);
+                            $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
+                        }
+                    }, function (response) {
+                        $scope.loading = false;
+                        toaster.pop('error', '数据加载失败', response.data);
+                    });
+                }
+            });
+
+            //获得各分类未阅读数量
+            var getUnreadCount = function () {
+                PurcOrders.getUnreadCount(null, function (data) {
+                    $scope.unread = data;
+                });
+            };
+            getUnreadCount();
+
+            //设置单据已读
+            $scope.setOrdersRead = function (id) {
+                // 如果单据本身已读,则不发送请求修改数据
+                if (!$scope.isUnread(id)){
+                    return;
+                }
+                var sourceId = [];
+                sourceId.push(id);
+                PurcOrders.setRead({}, sourceId, function (message) {
+                    // $scope.getUnreadIds();
+                    getUnreadCount();
+                });
+            };
+
+            //获取未读单据id
+            var getUnreadIds = function () {
+                PurcOrders.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.getReply = function (item) {
+                if (!item.replies) {
+                    PurcOrderItem.getReply({orderItemId: item.id}, function (replies) {
+                        item.replies = replies;
+                    });
+                }
+            };
+
+            $scope.getOrderTotal = function (items) {
+                var sum = 0;
+                angular.forEach(items, function (item) {
+                    sum += item.qty * item.price;
+                });
+                return sum;
+            };
+
+            // 需方  打印    采购单
+            $scope.custPrint = function (order) {
+                var newPage = window.open("about:blank");
+                PurcOrder.printPermission({}, function () {
+                    PurcOrder.custPrintCount({id: order.id}, {});//增加打印此次
+                    ReportService.print(order.enUU, 'PURCLIST_CUST', "where purc$orders.pu_id=" + order.id, newPage);
+                }, function (response) {
+                    newPage.close();
+                    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.parseDate = function (dateStr) {
+                if (dateStr)
+                    return Date.parse(dateStr, 'yyyy-MM-dd');
+                return new Date();
+            };
+
+            $scope.checkboxes = {
+                checked: false
+            };
+
+            // 点击勾选全部的复选框
+            $scope.checkAll = function () {
+                angular.forEach($scope.tableParams.data, function (item) {
+                    item.$selected = $scope.checkboxes.checked;
+                });
+            };
+
+            // 点击其中一个明细的复选框
+            $scope.checkOne = function (order) {
+                var result = true;
+                angular.forEach($scope.tableParams.data, function (item) {
+                    if (item.$selected != true) {
+                        result = false;
+                        return;
+                    }
+                });
+                $scope.checkboxes.checked = result;
+            };
+
+            // 搜索框回车
+            $scope.onSearch = function (keyword) {
+                // 每次搜索重置获取数据方法
+                $scope.searchMethod = false;
+                if(keyword != null && keyword != '') {
+                    $scope.searchMethod = true;
+                }
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+                $scope.tip = keyword;
+            };
+            // 选择查找日期
+            $scope.onDateCondition = function () {
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+            };
+
+            // 复制订单
+            $scope.copyorder = function (id) {
+                PurchaseOrder.copyorder({id: id}, {}, function (data) {
+                    if (data.id) {
+                        toaster.pop('success', '提示', '单据复制成功');
+                        window.location.hash = "#purc/cart/" + data.id;
+                    }
+                }, function (response) {
+                    toaster.pop('error', '提示', response.data);
+                });
+            }
+
+            // 导出
+            $scope.exportXls = function () {
+                PurcOrders.exportXls({}, {}, function (data) {
+                    if (data.success){
+                        window.location.href = 'sale/orders/purc/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    }
+                }, function (response) {
+                    toaster.pop('error', '数据加载失败', response.data);
+                });
+            }
+        }]);
+})

+ 364 - 0
src/main/webapp/resources/js/usercenter/controllers/b2b/order/purcMakeOutOrderCtrl.js

@@ -0,0 +1,364 @@
+/**
+ * 采购订单
+ *
+ * @author hejq
+ * @date 2018-06-25 17:13
+ */
+
+
+define(['app/app'], function(app) {
+	app.register.controller('PurcMakeOutOrderCtrl', ['$scope', '$filter', 'B2bPurcOrders', 'B2bPurcOrder', 'ngTableParams', 'toaster', 'B2bReportService', 'BaseService', '$rootScope', 'B2bPurchaseOrder', 'B2bPurcOrdersInfo', 'B2bPurcOrderItem', 'B2bCurrentRole',
+        function ($scope, $filter, PurcOrders, PurcOrder, ngTableParams, toaster, ReportService, BaseService, $rootScope, PurchaseOrder, PurcOrdersInfo, PurcOrderItem, CurrentRole) {
+            BaseService.scrollBackToTop();
+            $scope.storeType = 'purcOrder';
+            $rootScope.active = 'buyer_order';
+            /**
+             * 将日期转化为整数日期
+             */
+            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;
+                }
+            };
+
+            // 获取当前用户是否为普通用户
+            CurrentRole.isUser({}, {}, function (data) {
+                $scope.isUser = data.isUser;
+            });
+            // if ($rootScope.active) {
+            //     $scope.active = $rootScope.active;
+            //     $rootScope.active = null;
+            // } else {
+                $scope.active = 'all';
+            // }
+            $scope.dateZoneText = '不限';
+            $scope.deliveryZoneText = '不限';
+            $scope.condition = {dateZone: 1, deliveryZone: -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.reload();
+            };
+            $scope.searchMethod = false;
+            var getService = function () {
+                return $scope.searchMethod ? PurcOrders : PurcOrdersInfo;
+            };
+            // 切换单据类型
+            $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 getPurcStatus = function (active) {
+                var fn = 'getPurcAll';
+                switch (active) {
+                    case 'done':
+                        fn = 'getPurcDone';
+                        break;
+                    case 'todo':
+                        fn = 'getPurcTodo';
+                        break;
+                    case 'end':
+                        fn = 'getPurcEnd';
+                        break;
+                    case 'waiting':
+                        fn = 'getPurcWaiting';
+                        break;
+                }
+                return fn;
+            };
+
+            $scope.tableParams = new ngTableParams({ // ng-Table参数
+                page: 1,
+                count: 20,
+                sorting: {
+                    display: 'desc',
+                    date: 'desc'
+                }
+            }, {
+                total: 0,
+                counts: [5, 10, 15, 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) {
+                            $defer.resolve(page.content);
+                            $scope.total = page.totalElement;
+                            params.total(page.totalElement);
+                            $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
+                        }
+                    }, function (response) {
+                        $scope.loading = false;
+                        toaster.pop('error', '数据加载失败', response.data);
+                    });
+                }
+            });
+
+            //获得各分类未阅读数量
+            var getUnreadCount = function () {
+                PurcOrders.getUnreadCount(null, function (data) {
+                    $scope.unread = data;
+                });
+            };
+            getUnreadCount();
+
+            //设置单据已读
+            $scope.setOrdersRead = function (id) {
+                // 如果单据本身已读,则不发送请求修改数据
+                if (!$scope.isUnread(id)){
+                    return;
+                }
+                var sourceId = [];
+                sourceId.push(id);
+                PurcOrders.setRead({}, sourceId, function (message) {
+                    // $scope.getUnreadIds();
+                    getUnreadCount();
+                });
+            };
+
+            //获取未读单据id
+            var getUnreadIds = function () {
+                PurcOrders.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.getReply = function (item) {
+                if (!item.replies) {
+                    PurcOrderItem.getReply({orderItemId: item.id}, function (replies) {
+                        item.replies = replies;
+                    });
+                }
+            };
+
+            $scope.getOrderTotal = function (items) {
+                var sum = 0;
+                angular.forEach(items, function (item) {
+                    sum += item.qty * item.price;
+                });
+                return sum;
+            };
+
+            // 需方  打印    采购单
+            $scope.custPrint = function (order) {
+                var newPage = window.open("about:blank");
+                PurcOrder.printPermission({}, function () {
+                    PurcOrder.custPrintCount({id: order.id}, {});//增加打印此次
+                    ReportService.print(order.enUU, 'PURCLIST_CUST', "where purc$orders.pu_id=" + order.id, newPage);
+                }, function (response) {
+                    newPage.close();
+                    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.parseDate = function (dateStr) {
+                if (dateStr)
+                    return Date.parse(dateStr, 'yyyy-MM-dd');
+                return new Date();
+            };
+
+            $scope.checkboxes = {
+                checked: false
+            };
+
+            // 点击勾选全部的复选框
+            $scope.checkAll = function () {
+                angular.forEach($scope.tableParams.data, function (item) {
+                    item.$selected = $scope.checkboxes.checked;
+                });
+            };
+
+            // 点击其中一个明细的复选框
+            $scope.checkOne = function (order) {
+                var result = true;
+                angular.forEach($scope.tableParams.data, function (item) {
+                    if (item.$selected != true) {
+                        result = false;
+                        return;
+                    }
+                });
+                $scope.checkboxes.checked = result;
+            };
+
+            // 搜索框回车
+            $scope.onSearch = function (keyword) {
+                // 每次搜索重置获取数据方法
+                $scope.searchMethod = false;
+                if(keyword != null && keyword != '') {
+                    $scope.searchMethod = true;
+                }
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+                $scope.tip = keyword;
+            };
+            // 选择查找日期
+            $scope.onDateCondition = function () {
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+            };
+
+            // 复制订单
+            $scope.copyorder = function (id) {
+                PurchaseOrder.copyorder({id: id}, {}, function (data) {
+                    if (data.id) {
+                        toaster.pop('success', '提示', '单据复制成功');
+                        window.location.hash = "#purc/cart/" + data.id;
+                    }
+                }, function (response) {
+                    toaster.pop('error', '提示', response.data);
+                });
+            }
+
+            // 导出
+            $scope.exportXls = function () {
+                PurcOrders.exportXls({}, {}, function (data) {
+                    if (data.success){
+                        window.location.href = 'sale/orders/purc/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    }
+                }, function (response) {
+                    toaster.pop('error', '数据加载失败', response.data);
+                });
+            }
+        }]);
+})

+ 364 - 0
src/main/webapp/resources/js/usercenter/controllers/b2b/order/usercenterOrderCtrl.js

@@ -0,0 +1,364 @@
+/**
+ * 采购订单
+ *
+ * @author hejq
+ * @date 2018-06-25 17:13
+ */
+
+
+define(['app/app'], function(app) {
+	app.register.controller('PurcUsercenterOrderCtrl', ['$scope', '$filter', 'B2bPurcOrders', 'B2bPurcOrder', 'ngTableParams', 'toaster', 'B2bReportService', 'BaseService', '$rootScope', 'B2bPurchaseOrder', 'B2bPurcOrdersInfo', 'B2bPurcOrderItem', 'B2bCurrentRole',
+        function ($scope, $filter, PurcOrders, PurcOrder, ngTableParams, toaster, ReportService, BaseService, $rootScope, PurchaseOrder, PurcOrdersInfo, PurcOrderItem, CurrentRole) {
+            BaseService.scrollBackToTop();
+            $scope.storeType = 'purcOrder';
+            $rootScope.active = 'buyer_order';
+            /**
+             * 将日期转化为整数日期
+             */
+            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;
+                }
+            };
+
+            // 获取当前用户是否为普通用户
+            CurrentRole.isUser({}, {}, function (data) {
+                $scope.isUser = data.isUser;
+            });
+            // if ($rootScope.active) {
+            //     $scope.active = $rootScope.active;
+            //     $rootScope.active = null;
+            // } else {
+                $scope.active = 'all';
+            // }
+            $scope.dateZoneText = '不限';
+            $scope.deliveryZoneText = '不限';
+            $scope.condition = {dateZone: 1, deliveryZone: -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.reload();
+            };
+            $scope.searchMethod = false;
+            var getService = function () {
+                return $scope.searchMethod ? PurcOrders : PurcOrdersInfo;
+            };
+            // 切换单据类型
+            $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 getPurcStatus = function (active) {
+                var fn = 'getPurcAll';
+                switch (active) {
+                    case 'done':
+                        fn = 'getPurcDone';
+                        break;
+                    case 'todo':
+                        fn = 'getPurcTodo';
+                        break;
+                    case 'end':
+                        fn = 'getPurcEnd';
+                        break;
+                    case 'waiting':
+                        fn = 'getPurcWaiting';
+                        break;
+                }
+                return fn;
+            };
+
+            $scope.tableParams = new ngTableParams({ // ng-Table参数
+                page: 1,
+                count: 20,
+                sorting: {
+                    display: 'desc',
+                    date: 'desc'
+                }
+            }, {
+                total: 0,
+                counts: [5, 10, 15, 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) {
+                            $defer.resolve(page.content);
+                            $scope.total = page.totalElement;
+                            params.total(page.totalElement);
+                            $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
+                        }
+                    }, function (response) {
+                        $scope.loading = false;
+                        toaster.pop('error', '数据加载失败', response.data);
+                    });
+                }
+            });
+
+            //获得各分类未阅读数量
+            var getUnreadCount = function () {
+                PurcOrders.getUnreadCount(null, function (data) {
+                    $scope.unread = data;
+                });
+            };
+            getUnreadCount();
+
+            //设置单据已读
+            $scope.setOrdersRead = function (id) {
+                // 如果单据本身已读,则不发送请求修改数据
+                if (!$scope.isUnread(id)){
+                    return;
+                }
+                var sourceId = [];
+                sourceId.push(id);
+                PurcOrders.setRead({}, sourceId, function (message) {
+                    // $scope.getUnreadIds();
+                    getUnreadCount();
+                });
+            };
+
+            //获取未读单据id
+            var getUnreadIds = function () {
+                PurcOrders.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.getReply = function (item) {
+                if (!item.replies) {
+                    PurcOrderItem.getReply({orderItemId: item.id}, function (replies) {
+                        item.replies = replies;
+                    });
+                }
+            };
+
+            $scope.getOrderTotal = function (items) {
+                var sum = 0;
+                angular.forEach(items, function (item) {
+                    sum += item.qty * item.price;
+                });
+                return sum;
+            };
+
+            // 需方  打印    采购单
+            $scope.custPrint = function (order) {
+                var newPage = window.open("about:blank");
+                PurcOrder.printPermission({}, function () {
+                    PurcOrder.custPrintCount({id: order.id}, {});//增加打印此次
+                    ReportService.print(order.enUU, 'PURCLIST_CUST', "where purc$orders.pu_id=" + order.id, newPage);
+                }, function (response) {
+                    newPage.close();
+                    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.parseDate = function (dateStr) {
+                if (dateStr)
+                    return Date.parse(dateStr, 'yyyy-MM-dd');
+                return new Date();
+            };
+
+            $scope.checkboxes = {
+                checked: false
+            };
+
+            // 点击勾选全部的复选框
+            $scope.checkAll = function () {
+                angular.forEach($scope.tableParams.data, function (item) {
+                    item.$selected = $scope.checkboxes.checked;
+                });
+            };
+
+            // 点击其中一个明细的复选框
+            $scope.checkOne = function (order) {
+                var result = true;
+                angular.forEach($scope.tableParams.data, function (item) {
+                    if (item.$selected != true) {
+                        result = false;
+                        return;
+                    }
+                });
+                $scope.checkboxes.checked = result;
+            };
+
+            // 搜索框回车
+            $scope.onSearch = function (keyword) {
+                // 每次搜索重置获取数据方法
+                $scope.searchMethod = false;
+                if(keyword != null && keyword != '') {
+                    $scope.searchMethod = true;
+                }
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+                $scope.tip = keyword;
+            };
+            // 选择查找日期
+            $scope.onDateCondition = function () {
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+            };
+
+            // 复制订单
+            $scope.copyorder = function (id) {
+                PurchaseOrder.copyorder({id: id}, {}, function (data) {
+                    if (data.id) {
+                        toaster.pop('success', '提示', '单据复制成功');
+                        window.location.hash = "#purc/cart/" + data.id;
+                    }
+                }, function (response) {
+                    toaster.pop('error', '提示', response.data);
+                });
+            }
+
+            // 导出
+            $scope.exportXls = function () {
+                PurcOrders.exportXls({}, {}, function (data) {
+                    if (data.success){
+                        window.location.href = 'sale/orders/purc/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    }
+                }, function (response) {
+                    toaster.pop('error', '数据加载失败', response.data);
+                });
+            }
+        }]);
+})

+ 406 - 177
src/main/webapp/resources/view/usercenter/b2b/Purc/addOrder.html

@@ -1,100 +1,254 @@
 <style>
-	#pub .purc li div span .select02 {
-		background: none;
-		-webkit-appearance: inherit;
-		appearance: inherit;
-		-o-appearance: inherit;
-		-moz-appearance: inherit;
-		-ms-appearance: inherit;
-		border: #bfbfbf 1px solid !important;
-		width: 187px;
+	.add-order {
+		background: #fff;
+	}
+	.add-order .content-wrap {
+		padding: 0 20px;
+	}
+	.add-order .oder-change .title {
+		width: 86px;
+		display: inline-block;
+		vertical-align: middle;
+		position: relative;
+	}
+	.add-order .oder-change .title i {
+		position: absolute;
+		left: -7px;
+	}
+	.add-order .oder-change .item {
+		line-height: 48px;
+	}
+	.add-order .oder-change .item .input-group {
+		width: 280px;
+		display: inline-table;
+		vertical-align: middle;
+	}
+	.add-order .oder-change .item .form-control {
+		width: 280px;
+		display: inline-block;
+		vertical-align: middle;
+	}
+	.add-order .oder-change .item .form-control.large {
+		width: 773px;
+	}
+	.add-order .oder-change .item .plus {
+		color: #30a603;
+	}
+	.add-order .b2b-com-title .operate {
+		float: right;
+		color: #30a603;
+		font-weight: normal;
+	}
+	.add-order #empty {
+		text-align: center;
+		padding: 30px 0;
+	}
+	.add-order .buy-wrap {
+		padding-right: 50px;
+		margin-top: 30px;
+	}
+	.add-order .buy-wrap .b2b-btn {
+		width: 94px;
+		margin-right: 10px;
+	}
+	.editable {
+		width: 92px;
+		height: 34px;
+		border-radius: 2px;
+		border: 1px solid #ccc;
+		text-align: center;
+		padding: 0 10px;
+	}
+	.add-order .b2b-com-table > tbody > tr {
+		line-height: 30px;
+		height: 30px;
+	}
+	.add-order .form-control {
+		border-radius: 2px;
+	}
+	.add-order .select .select-adder {
+		width: 100px;
 	}
 
-	.dropdown-menu tr td button {
-		border: none;
+	.add-tanchuang {
+		position: absolute;
+		box-shadow: 0 0 3px #888;
+		width: 238px;
+		height: 202px;
+		background: #fff;
+		right: 100px;
+		top: 20%;
+		display: none;
 	}
 
-	.oder-change .purc li .dropdown-menu {
-		padding: 0;
-		margin: 0;
-		width: 185px;
+	.add-tanchuang ul {
+		width: 195px;
+		margin: 0 auto;
+		margin-top: 10px;
 	}
 
-	.oder-change .purc li .dropdown-menu li {
-		margin-bottom: 0;
+	.add-tanchuang ul li {
+		width: 100%;
+		margin: 0 auto;
 		height: 34px;
 		line-height: 34px;
+		margin-top: 12px;
 	}
 
-	.oder-change .purc li  .dropdown-menu>li>a {
-		display: inline-block;
-		width: 100%;
-		padding: 0;
+	.add-tanchuang ul li div.fl {
+		width: 50px;
+		font-size: 14px;
+	}
+
+	.add-tanchuang ul li div.fr {
+		width: 145px;
+	}
+
+	.add-tanchuang ul li div.fr .price-input {
+		width: 145px;
+		border: #969595 1px solid;
 		height: 34px;
-		line-height: 34px;
+		font-size: 14px;
 		padding-left: 10px;
 	}
 
-	.dropdown-menu>.active>a, .dropdown-menu>.active>a:hover, .dropdown-menu>.active>a:focus
-	{
+	.add-tanchuang ul li.add-btn {
+		margin-top: 20px;
+	}
+
+	.add-tanchuang ul li.add-btn div.fr a {
+		width: 62px;
+		height: 24px;
+		display: inline-block;
+		line-height: 24px;
+		text-align: center;
+	}
+
+	.add-tanchuang ul li div.fr a.off {
+		border: #3f84f6 1px solid;
+		color: #3f84f6;
+		float: left;
+	}
+
+	.add-tanchuang ul li div.fr a.ok {
+		background: #3f84f6;
+		color: #fff;
+		float: right;
+	}
+
+	.add-tanchuang ul li div.fr a:hover {
 		background: #5078cb;
+		color: #fff;
+	}
+
+	.add-tanchuang ul li .btn-wrap {
+		position: relative;
+		height: 30px;
+		width: 145px;
+		line-height: 30px;
+	}
+
+	.add-tanchuang ul li .btn-wrap input {
+		display: inline-block;
 	}
 
-	.com_title01 a {
+	.add-tanchuang ul li .btn-wrap .number {
+		width: 145px;
+		height: 34px !important;
+		border: #969595 1px solid;
+		display: inline-block;
+		text-align: center;
+		line-height: 34px !important;
+		color: #333;
+	}
+
+	.add-tanchuang ul li .btn-wrap .number a {
+		width: 26px;
+		height: 33px;
+		display: inline-block;
+		font-size: 18px;
+		color: #666;
+		line-height: 28px;
+	}
+
+	.add-tanchuang ul li .btn-wrap .number a:hover {
+		color: #fff;
+		background: #5078cb
+	}
+
+	.add-tanchuang ul li .btn-wrap .number .reduce {
+		float: left;
+		border-right: #969595 1px solid;
+	}
+
+	.add-tanchuang ul li .btn-wrap .number .add {
 		float: right;
-		color: #5078cb;
-		font-weight: normal;
-		margin-right: 30px;
-		margin-top: 20px;
-		font-size: 14px;
+		border-left: #969595 1px solid;
+	}
+
+	.add-tanchuang ul li .btn-wrap .number input {
+		float: left;
+		width: 91px;
+		height: 32px;
+		line-height: 32px;
+		text-align: center;
+		font-size: 16px;
+		color: #666;
+		border: none;
 	}
+
 </style>
-<div class="wrap" id="pub">
-	<div class="content">
-		<!--<div class="com_title">服务>采购模块>采购单<font>>新增采购单</font></div>-->
-		<div class="com_head">
-			<span>新增采购单</span>
-		</div>
+<div class="user_right fr add-order">
+	<div class="b2b-com-head">新增采购单</div>
+	<div class="content-wrap">
 		<!--B2B商务采购变更-添加-->
+		<div class="b2b-com-title">基本信息</div>
 		<form class="oder-change clearfix" name="orderForm" id="orderForm">
-			<ul class="purc">
-				<li>
-					<div class="fl">
-						<em>流水号:</em> <span>{{::order.code}}</span>
+			<ul>
+				<li class="clearfix item">
+					<div class="col-sm-6">
+						<em class="title">流水号:</em> <span>{{::order.code}}</span>
 					</div>
-					<div class="fr">
-						<em>录入时间:</em> <span>{{::order.date | date:'yyyy-MM-dd HH:mm:ss'}}</span>
+					<div class="col-sm-6">
+						<em class="title">录入时间:</em> <span>{{::order.date | date:'yyyy-MM-dd HH:mm:ss'}}</span>
 					</div>
 				</li>
-				<li>
-					<div class="fl">
-						<em>供应商:</em> <span><input type="text"
-												   ng-model="order.vend.enName" placeholder="输入供应商名称" class="bor01"
-												   ng-required="true"
-												   ng-change="getSimilarVendors(order.vend.enName)" name="enName"
-												   ng-focus="onFocus('enName')"
-												   typeahead="order.vendName for order in getSimilarVendors($viewValue)"
-												   autocomplete="off"
-												   typeahead-on-select="onAssociateCmpClick($item, order)"
-												   spellcheck="false" style="width: 147px;"> <a class="btn"
-																								ng-click="dbfindVend()"
-																								style="width: 40px; border: #bfbfbf 1px solid !important; border-radius: 0px; margin-left: -5px; margin-top: -3px;"><i
-							class="fa fa-search" aria-hidden="true"></i></a> </span>
+				<li class="clearfix item">
+					<div class="col-sm-6">
+						<em class="title"><i class="must">*</i>供应商:</em>
+						<span class="input-group">
+							<input type="text"
+								   ng-model="order.vend.enName" placeholder="输入供应商名称"
+								   class="form-control input-sm"
+								   ng-required="true"
+								   ng-change="getSimilarVendors(order.vend.enName)" name="enName"
+								   ng-focus="onFocus('enName')"
+								   typeahead="order.vendName for order in getSimilarVendors($viewValue)"
+								   autocomplete="off"
+								   typeahead-on-select="onAssociateCmpClick($item, order)"
+								   spellcheck="false">
+						<a class="btn input-group-addon" ng-click="dbfindVend()">
+							<i class="fa fa-search" aria-hidden="true"></i>
+						</a>
+					</span>
 					</div>
-					<div class="fr">
-						<em>供应商联系人:</em> <span> <select class="select01"
-														ng-model="order.vendor" required="required"
-														ng-options="(contact.venduser + '' + contact.tel) for contact in contacts">
-									<option value="">请选择供应商联系人</option>
-							</select> <a class="add-address" ng-if="id!=null"
-										 ng-click="addContact(venduu)">+增加联系人</a>
-							</span>
+					<div class="col-sm-6 item">
+						<em class="title"><i class="must">*</i>供应商联系人:</em>
+						<span>
+							<select class="form-control select-adder"
+									ng-model="order.vendor" required="required"
+									ng-options="(contact.venduser + '' + contact.tel) for contact in contacts">
+								<option value="">请选择供应商联系人</option>
+							</select>
+							<a class="plus" ng-if="id!=null"
+							   ng-click="addContact(venduu)"><i class="fa fa-plus-circle"></i> 增加联系人</a>
+						</span>
 					</div>
 				</li>
-				<li>
-					<div class="fl">
-						<em>付款方式:</em> <span> <input ng-model="order.payments"
-													 list="paymentmethod" class="select02 wid152"
+				<li class="clearfix item">
+					<div class="col-sm-6">
+						<em class="title"><i class="must">*</i>付款方式:</em> <span> <input ng-model="order.payments"
+													 list="paymentmethod" class="form-control"
 													 placeholder="选择付款方式" /> <datalist id="paymentmethod">
 									<option value="月结30天">月结30天</option>
 									<option value="月结60天">月结60天</option>
@@ -102,36 +256,38 @@
 								</datalist>
 							</span>
 					</div>
-					<div class="fr">
-						<em>交易币别:</em> <span> <select name=""
-													  class="select02 wid100" ng-model="order.currency"
-													  ng-init="order.currency = 'RMB'">
-									<option value="RMB">RMB</option>
-									<option value="USD">USD</option>
-									<option value="HKD">HKD</option>
+					<div class="col-sm-6">
+						<em class="title"><i class="must">*</i>交易币别:</em>
+						<span>
+							<select name="" class="form-control select-adder" ng-model="order.currency" ng-init="order.currency = 'RMB'">
+								<option value="RMB">RMB</option>
+								<option value="USD">USD</option>
+								<option value="HKD">HKD</option>
 							</select>
-							</span>
+						</span>
 					</div>
 				</li>
-				<li>
-					<div class="fr address">
-						<em>收货信息:</em> <span class="fr" required="required"> <select
-							class="select fl" ng-model="order.shipadd" required="required"
+				<li class="clearfix item">
+					<div class="col-sm-12 address" style="padding-right: 0;">
+						<em class="title"><i class="must">*</i>收货信息:</em> <span required="required"> <select
+							ng-model="order.shipadd" required="required"
+							class="form-control large select-adder"
 							ng-options="(ship.address + ship.addressdet + ' ' + ship.receiver + ' ' + ship.usertel) for ship in ships">
 									<option value="">请选择收货地址</option>
-							</select> <a href="javascript:void(0);" class="add-address"><i class="fa fa-plus-square fa-fw"></i>新增收货信息</a>
+							</select> <a href="javascript:void(0);" class="plus add-address"><i class="fa fa-plus-circle"></i> 新增收货信息</a>
 							</span>
 					</div>
 				</li>
-				<li class="beizhu">
-					<div class="fl">
-						<em>备注:</em> <span><input type="text"
-												  ng-model="order.remark" class="bor01" placeholder="请填写备注"
-												  style="cursor: pointer; width: 568px;" /></span>
+				<li class="beizhu clearfix item">
+					<div class="col-sm-12">
+						<em class="title">备注:</em>
+						<span>
+							<input type="text" class="form-control large" ng-model="order.remark" placeholder="请填写备注" />
+						</span>
 					</div>
 				</li>
-				<li ng-show="false">
-					<div class="fl">
+				<li class="clearfix item" ng-show="false">
+					<div class="col-sm-6">
 						<em>税率:</em> <span class="fl" required="required"
 										   ng-if="order.currency == 'RMB'"> <select
 							class="select02 wid100" ng-model="order.rate"
@@ -146,20 +302,81 @@
 					</div>
 				</li>
 			</ul>
-			<div class="com_title01"
+			<div class="b2b-com-title"
 				 ng-if="order.orderItems[0].code == null && !order.vend.uu">
 				<span>请先选择供应商</span>
 			</div>
-			<div class="com_title01"
+			<div class="b2b-com-title"
 				 ng-if="order.orderItems[0].code == null && order.vend.uu">
-				<span>请先选择供应商产品</span> <a ng-click="uplodaByBatch()">批量导入</a>
+				<span>请先选择供应商产品</span> <a class="operate" ng-click="uplodaByBatch()"><i class="fa fa-arrow-circle-o-up"></i> 批量导入</a>
 			</div>
-			<div class="com_title01"
+			<div class="b2b-com-title"
 				 ng-if="order.orderItems[0].code != null && order.vend.uu">
-				<span>产品信息</span> <a ng-click="uplodaByBatch()">批量导入</a>
+				<span>产品信息</span> <a class="operate" ng-click="uplodaByBatch()"><i class="fa fa-arrow-circle-o-up"></i> 批量导入</a>
 			</div>
 			<!--产品信息-->
-			<dl ng-if="order.orderItems[0].code != null">
+			<table class="b2b-com-table" ng-if="order.orderItems[0].code != null">
+				<thead>
+				<tr>
+					<th>序号</th>
+					<th>产品信息</th>
+					<th>单位</th>
+					<th>数量</th>
+					<th>单价</th>
+					<th>税率(%)</th>
+					<th>交货日期</th>
+					<th>备注</th>
+					<th></th>
+				</tr>
+				</thead>
+				<tbody>
+				<tr ng-repeat="item in order.orderItems">
+					<td>{{$index + 1}}</td>
+					<td>
+						<p>{{::item.code}}</p>
+						<p>{{::item.title}}</p>
+						<p>{{::item.spec}}</p>
+					</td>
+					<td>{{::item.unit||'-'}}</td>
+					<td>
+						<input class="editable" type="text"
+							   ng-model="item.qty" placeholder="数量" style="cursor: pointer;"
+							   required="true"
+							   ng-pattern="/^(([0-9]+\.[0-9]{1,3})|([0-9]*[1-9][0-9]*\.[0-9]{1,3})|([0-9]*[1-9][0-9]*))$/" />
+					</td>
+					<td>
+						<input class="editable" type="text" ng-model="item.price"
+							   placeholder="单价" style="cursor: pointer;" required="true"
+							   ng-pattern="/^(([0-9]+\.[0-9]{1,6})|([0-9]*[1-9][0-9]*\.[0-9]{1,6})|([0-9]*[1-9][0-9]*))$/" />
+					</td>
+					<td ng-if="order.currency == 'RMB'">
+						<input class="editable" type="text" ng-model="item.taxrate" placeholder="税率"
+							   style="cursor: pointer;" ng-pattern="/^[0-9][0-9]{0,1}$/" />
+					</td>
+					<td ng-if="order.currency != 'RMB'">
+						<input class="editable" type="text" style="cursor: pointer;" value="0" readonly="readonly" />
+					</td>
+					<td>
+						<input ng-model="item.delivery"
+							   type="text" class="editable" placeholder="选择时间"
+							   datepicker-popup="yyyy-MM-dd" is-open="item.$endDateOpen"
+							   min-date="getMinDate()" ng-required="true" current-text="今天"
+							   clear-text="清除" close-text="关闭"
+							   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+							   ng-focus="openDatePicker($event, item.$endDateOpen)"
+							   readonly="readonly"
+							   ng-click="openDatePicker($event, item.$endDateOpen, $index)">
+					</td>
+					<td>
+						<input class="editable" type="text" ng-model="item.remark" placeholder="备注" />
+					</td>
+					<td>
+						<a ng-click="deleteProduct($index)"><i class="fa fa-close"></i></a>
+					</td>
+				</tr>
+				</tbody>
+			</table>
+			<!--<dl ng-if="order.orderItems[0].code != null">
 				<dt>
 					<b>序号</b> <b class="wid01">产品信息</b> <b>单位</b> <b>数量</b> <b>单价</b>
 					<b>税率(%)</b> <b>交货日期</b> <b>备注</b> <b class="wid02">&nbsp;</b>
@@ -204,11 +421,11 @@
 						<a ng-click="deleteProduct($index)"><i class="fa fa-close"></i></a>
 					</b>
 				</dd>
-			</dl>
-			<div class="save" ng-if="order.orderItems[0].code != null">
-				<button ng-click="addToOrder(order)"
+			</dl>-->
+			<div class="text-right buy-wrap" ng-if="order.orderItems[0].code != null">
+				<button class="b2b-btn b2b-btn-submit" ng-click="addToOrder(order)"
 						ng-disabled="orderForm.$invalid">立即购买</button>
-				<button ng-click="addToCart(order)"
+				<button class="b2b-btn b2b-btn-submit" ng-click="addToCart(order)"
 						ng-disabled="orderForm.$invalid">添加购物车</button>
 			</div>
 		</form>
@@ -216,19 +433,20 @@
 		<div class="pro-add-data02" style="min-height: 500px;"
 			 ng-if="order.vend.uu">
 			<div class="pro-search">
-				<div class="col-xs-2 search-title fl">供应商产品库</div>
-				<div class="col-xs-8 fr">
-					<div class="col-xs-9 search" style="margin-right: 0;">
-						<input type="text" placeholder="输入供应商物料关键字查询" ng-model="keyword"
-							   ng-search="onSearch(keyword)" /> <a class="seek"
-																   ng-click="onSearch(keyword)" style="right: inherit;">搜索</a>
-					</div>
-					<div class="col-xs-3 result-title fr">
+				<div class="b2b-com-title">供应商产品库</div>
+				<div class="b2b-com-search" style="margin-bottom: 15px;">
+					<div class="search-result inline-block">
 						搜索到<em>{{total}}</em>条
 					</div>
+					<div class="search-content inline-block fr">
+						<input type="text" placeholder="输入供应商物料关键字查询" ng-model="keyword"
+							   class="inline-block"
+							   ng-search="onSearch(keyword)" />
+						<a class="seek" ng-click="onSearch(keyword)" style="right: inherit;">搜索</a>
+					</div>
 				</div>
 			</div>
-			<table class="block table table-default table-striped"
+			<table class="b2b-modal-table table"
 				   ng-table="tableParams">
 				<thead>
 				<tr class="header">
@@ -312,81 +530,92 @@
 				</tbody>
 			</table>
 		</div>
-	</div>
-</div>
-<!--设置-企业设置-收货地址编辑-->
-<div class="bomb-box" style="display: none">
-	<form class="box04 box" name="shipAddress" id="shipAddress">
-		<i class="off"><img src="static/img/purc/close.png" alt="" /></i>
-		<p>收货人资料</p>
-		<ul>
-			<li class="line01">
-				<div class="fl">
-						<span class="fl"><em>*</em>收货人:
-						</span> <span class="fr"><input type="text" placeholder="填写收货人"
-														ng-model="ship.receiver" required="true"
-														ng-pattern="/^[\u4e00-\u9fa5]{1,6}$|^[\dA-Za-z]{1,12}$/" /></span>
-				</div>
-				<div class="fr">
-						<span class="fl"><em>*</em>手机:
-						</span> <span class="fr"><input type="text"
+		<!--设置-企业设置-收货地址编辑-->
+		<div class="bomb-box" style="display: none">
+			<form class="box04 box" name="shipAddress" id="shipAddress">
+				<i class="off"><i class="fa fa-close"></i></i>
+				<p>收货人资料</p>
+				<ul>
+					<li class="line01">
+						<div>
+						<span class="col-xs-3"><em>*</em>收货人:
+						</span> <span class="col-xs-9">
+							<input type="text" placeholder="填写收货人"
+								   ng-model="ship.receiver" required="true"
+								   class="form-control"
+								   ng-pattern="/^[\u4e00-\u9fa5]{1,6}$|^[\dA-Za-z]{1,12}$/" /></span>
+						</div>
+						<div>
+						<span class="col-xs-3"><em>*</em>手机:
+						</span> <span class="col-xs-9"><input type="text"
+															  class="form-control"
 														ng-model="ship.usertel" required="true"
 														ng-pattern="/^1(3|4|5|7|8)\d{9}$/" /></span>
-				</div>
-			</li>
-			<li class="line01">
-				<div class="fl">
-						<span class="fl">固定电话<em></em>:
-						</span> <span class="fr"><input type="text" ng-model="ship.phone"
+						</div>
+					</li>
+					<li class="line01">
+						<div>
+						<span class="col-xs-3">固定电话<em></em>:
+						</span> <span class="col-xs-9"><input class="form-control" type="text" ng-model="ship.phone"
 														ng-pattern="/([0-9]{3,4}-)?[0-9]{7,8}/" /></span>
+						</div>
+						<div>
+							<span class="col-xs-3">邮箱:</span> <span class="col-xs-9 emaill"><input
+								type="text" ng-model="ship.email" class="form-control"
+								ng-pattern="/^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/" /><i>用于接收订单提醒邮件,便于您及时了解订单状态</i></span>
+						</div>
+					</li>
+					<li class="line02 margin-top40">
+						<div class="col-xs-3">
+							<em>*</em>所在地址:
+						</div> <!--<div class="select fr"><input type="text" placeholder="请选择" ng-model="ship.address" required="true"/><i class="fa fa-angle-down"></i></div>-->
+						<div class="select col-xs-9">
+							<div class="col-xs-4 no-padding">
+								<select required="" class="select-adder form-control" ng-model="ship.province"
+										ng-options="key as key for (key,value) in provinces"
+										ng-change="ship.city='';ship.district='';" required="true">
+									<option value="">省</option>
+								</select>
+							</div>
+							<div class="col-xs-4 no-padding">
+								<select class="select-adder form-control col-xs-4" ng-model="ship.city"
+										ng-options="key as key for (key,value) in provinces[ship.province]"
+										ng-change="ship.district='';" required="true">
+									<option value="">市</option>
+								</select>
+							</div>
+							<div class="col-xs-4 no-padding">
+								<select class="select-adder form-control col-xs-4" ng-model="ship.district"
+										ng-options="value as value for value in provinces[ship.province][ship.city]"
+										required="true">
+									<option value="">区</option>
+								</select>
+							</div>
+						</div>
+					</li>
+					<li class="line02">
+						<div class="col-xs-3">
+							<em>*</em>详细地址:
+						</div>
+						<div class="col-xs-9">
+							<input type="text" class="form-control" ng-model="ship.addressdet" required="true" />
+						</div>
+					</li>
+					<li class="line02">
+						<div class="col-xs-3">地址别名:</div>
+						<div class="col-xs-9 address">
+							<input type="text" class="form-control" ng-model="ship.addalias" /><i>建议填写常用名称:家里/父母家/公司</i>
+						</div>
+					</li>
+				</ul>
+				<div class="many-file-btn text-center">
+					<button class="b2b-btn b2b-btn-submit btn01" ng-click="saveShipAddress(ship)"
+							ng-disabled="shipAddress.$invalid">保存</button>
+					<button href="#" class="b2b-btn b2b-btn-cancel btn02">取消</button>
 				</div>
-				<div class="fr">
-					<span class="fl">邮箱:</span> <span class="fr emaill"><input
-						type="text" ng-model="ship.email"
-						ng-pattern="/^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/" /><i>用于接收订单提醒邮件,便于您及时了解订单状态</i></span>
-				</div>
-			</li>
-			<li class="line02 margin-top40">
-				<div class="fl">
-					<em>*</em>所在地址:
-				</div> <!--<div class="select fr"><input type="text" placeholder="请选择" ng-model="ship.address" required="true"/><i class="fa fa-angle-down"></i></div>-->
-				<div class="select fr">
-					<select required="" class="area-select" ng-model="ship.province"
-							ng-options="key as key for (key,value) in provinces"
-							ng-change="ship.city='';ship.district='';" required="true">
-						<option value="">省</option>
-					</select> <select class="area-select" ng-model="ship.city"
-									  ng-options="key as key for (key,value) in provinces[ship.province]"
-									  ng-change="ship.district='';" required="true">
-					<option value="">市</option>
-				</select> <select class="area-select" ng-model="ship.district"
-								  ng-options="value as value for value in provinces[ship.province][ship.city]"
-								  required="true">
-					<option value="">区</option>
-				</select>
-				</div>
-			</li>
-			<li class="line02">
-				<div class="fl">
-					<em>*</em>详细地址:
-				</div>
-				<div class="fr">
-					<input type="text" ng-model="ship.addressdet" required="true" />
-				</div>
-			</li>
-			<li class="line02">
-				<div class="fl">地址别名:</div>
-				<div class="fr address">
-					<input type="text" ng-model="ship.addalias" /><i>建议填写常用名称:家里/父母家/公司</i>
-				</div>
-			</li>
-		</ul>
-		<div class="many-file-btn">
-			<button class="btn01" ng-click="saveShipAddress(ship)"
-					ng-disabled="shipAddress.$invalid">保存</button>
-			<a href="#" class="btn02">取消</a>
+			</form>
 		</div>
-	</form>
+	</div>
 </div>
 <script src="static/lib/jquery/jquery.min.js"></script>
 <script>

+ 4 - 5
src/main/webapp/resources/view/usercenter/b2b/Purc/tenderlist.html

@@ -119,7 +119,7 @@
 
   .tender-table tbody > tr:nth-child(odd):hover {
     border: 2px solid #3f84f6;
-  background: #f8fafe;
+
   }
 
   .tender-table tbody tr td a {
@@ -519,16 +519,15 @@
     <div class="com_tab" style="margin-bottom: 10px">
       <ul class="fl" style="width: 100%">
         <li class="active"><a >采购招标</a></li>
-        <li><a ui-sref="purc_tenderanswerlist">提问列表</a></li>
         <li class="down-purchase" style="margin-right: 0;min-width: 80px">
           <a ui-sref="purc_tender"  style="color: #5078cb;line-height: 40px;min-width: 80px;padding: 0;" type="button" title="新增招标单" class="btn btn-tender">
             <i class="fa fa-plus-square fa-fw"></i>新增
           </a>
         </li>
-        <!--<li class="down-purchase" style="margin-right: 0">-->
-          <!--<a ui-sref="purc_tenderanswerlist" style="color: #5078cb;line-height: 40px;padding: 0;">招标提问列表</a>-->
+        <li class="down-purchase" style="margin-right: 0">
+          <a ui-sref="purc_tenderanswerlist" style="color: #5078cb;line-height: 40px;padding: 0;">招标提问列表</a>
           <!--<span ui-sref-active="active" ></span>-->
-        <!--</li>-->
+        </li>
       </ul>
     </div>
     <div class="oder01" style="margin-bottom: 0px">

+ 93 - 0
src/main/webapp/resources/view/usercenter/b2b/modal/purc_order_vendor.html

@@ -0,0 +1,93 @@
+<style>
+.headerline .content {
+	width: 200px;
+	font-size: 14px;
+}
+.modal-body {
+	min-height: 350px;
+}
+.modal {
+	position: fixed;
+	top: 70px;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	margin: 0 auto;
+	overflow-y: auto !important;
+}
+
+@media screen and (max-width: 1366px) {
+	.modal {
+ 		top: -20px;
+}
+}
+.form-horizontal .form-control{
+	border: #3578ba 1px solid;
+	height: 36px;
+	line-height: 36px;
+}
+</style>
+<div class="b2b-com-modal b2b-operate-modal">
+	<p class="title">采购订单 - 选择供应商
+		<i class="fa fa-close" ng-click="cancel()"></i>
+	</p>
+	<div class="modal-body" style="padding-top: 0;">
+		<div class="form-group" id="window-search">
+			<div class="text-center" style="margin: 12px 0;">
+				<input type="text" class="form-control input-sm"
+					   required placeholder="输入供应商名称关键字查询" autofocus ng-model="keyword" ng-search="onSearch(keyword)">
+				<a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
+			</div>
+		</div>
+		<table class="table b2b-modal-table"
+			   ng-table="customerParams">
+			<thead>
+			<tr class="header">
+				<th>UU</th>
+				<th>供应商名称</th>
+				<th>地址</th>
+				<th>操作</th>
+			</tr>
+			</thead>
+			<tbody ng-if="loading">
+			<tr>
+				<td colspan="5">
+					<div class="text-center">
+						<img src="static/img/all/loading.gif">
+					</div>
+				</td>
+			</tr>
+			</tbody>
+			<tbody>
+			<tr ng-repeat="vendor in $data">
+				<td class="text-center" >
+					<a ng-bind="::vendor.vendorEnterprise.uu" ng-click="checkVendor(vendor)" ng-if="!prod && vendor.vendorEnterprise.uu!=venduu"></a>
+					<a ng-bind="::vendor.vendorEnterprise.uu" ng-click="check(vendor)" ng-if="prod && vendor.vendorEnterprise.uu!=venduu"></a>
+					<a ng-bind="::vendor.vendorEnterprise.uu" ng-if="vendor.vendorEnterprise.uu==venduu"></a>
+				</td>
+				<td class="text-center" >
+					<a ng-bind="::vendor.vendorEnterprise.enName" ng-click="checkVendor(vendor)" ng-if="!prod && vendor.vendorEnterprise.uu!=venduu"></a>
+					<a ng-bind="::vendor.vendorEnterprise.enName" ng-click="check(vendor)" ng-if="prod && vendor.vendorEnterprise.uu!=venduu"></a>
+					<a ng-bind="::vendor.vendorEnterprise.enName" ng-if="vendor.vendorEnterprise.uu==venduu"></a>
+				</td>
+				<td class="text-center" >
+					<a ng-bind="::vendor.vendorEnterprise.enAddress" ng-click="checkVendor(vendor)" ng-if="!prod && vendor.vendorEnterprise.uu!=venduu"></a>
+					<a ng-bind="::vendor.vendorEnterprise.enAddress" ng-click="check(vendor)" ng-if="prod && vendor.vendorEnterprise.uu!=venduu"></a>
+					<a ng-bind="::vendor.vendorEnterprise.enAddress" ng-if="vendor.vendorEnterprise.uu==venduu"></a>
+				</td>
+				<td class="text-center" ng-if="prod && vendor.vendorEnterprise.uu!=venduu"><a title="选择" href="javascript:void(0)" ng-click="check(vendor)" style="text-decoration: none;">选择</a></td>
+				<td class="text-center" ng-if="vendor.vendorEnterprise.uu==venduu"><a style="text-decoration: none;">已选择</a></td>
+				<td class="text-center" ng-if="!prod && vendor.vendorEnterprise.uu!=venduu"><a title="选择" href="javascript:void(0)" ng-click="checkVendor(vendor)" style="text-decoration: none;">选择</a></td>
+			</tr>
+			</tbody>
+		</table>
+	</div>
+	<div class="modal-footer" style="text-align: center">
+		<div class="pull-left" ng-if="ensure && prod">
+			<span style="color: red; font-size: 14px;">重新选择供应商将会清掉已经选择的产品信息,请确认是否执行?</span>
+			<br>
+		</div>
+		<button class="b2b-btn b2b-btn-submit" ng-if="ensure && prod" ng-click="checkVendor(vendorInfo)">确定</button>
+		<button class="b2b-btn b2b-btn-cancel" ng-click="cancel()" type="button">取消</button>
+	</div>
+</div>

+ 85 - 0
src/main/webapp/resources/view/usercenter/b2b/modal/purc_uplodaByBatch.html

@@ -0,0 +1,85 @@
+<style>
+	.modal-content {
+		width: 492px;
+		margin: 0 auto;
+	}
+	.step {
+		margin-bottom: 40px;
+	}
+	.step .content {
+		margin-bottom: 10px;
+	}
+	.step .box-item {
+		margin-left: 10px;
+	}
+</style>
+<!--<div class="loading " ng-class="{'in': loading}">
+	&lt;!&ndash;<i></i>&ndash;&gt;
+	<div class="wrap">
+		<div class="outer"></div>
+	</div>
+</div>-->
+<div class="b2b-com-modal">
+	<p class="title">批量导入<i class="fa fa-close" ng-click="cancel()"></i></p>
+	<div class="modal-body" style="min-height: 200px;">
+		<div class="step">
+			<div class="content f14">第一步、下载Excel模板</div>
+			<div class="box-item">
+				<p>
+					<button class="btn btn-success btn-sm" ng-click="download()">下载Excel模板 <i
+							class="fa fa-download"></i></button> 在Excel模板上录入商品信息。
+				</p>
+			</div>
+			<div id="image-box" style="display: none">
+				<div class="x-close-wrap" title="关闭">
+					<a href="javascript:void(0);">&times;</a>
+				</div>
+				<div class="x-floating-wrap"></div>
+				<div class="x-floating">
+					<img />
+				</div>
+			</div>
+		</div>
+		<div class="step">
+			<div class="content f14">第二步、上传已经填好的Excel文件</div>
+			<div class="box-item">
+				<form class="form-horizontal">
+					<div class="form-group">
+						<div class="col-xs-4">
+							<input required ng-file-select accept="*.xls,*.xlsx"
+								   ng-model="myFiles" type="file" ng-multiple="false"
+								   class="form-control input-sm" id="xlsFile" name="xlsFile"
+								   placeholder="请上传.xls或.xlsx文件" />
+						</div>
+						<div class="col-xs-4">
+							<button ng-click="upload()" class="btn btn-success btn-sm">
+								确认上传 <i class="fa fa-upload"></i>
+							</button>
+						</div>
+					</div>
+					<div>
+					</div>
+					<!-- 分页 Start -->
+				</form>
+			</div>
+		</div>
+		<div class="step">
+			<div class="content f14">第三步、信息提示</div>
+			<div class="box-item">
+				<p ng-if="result.total">
+					<span>总共上传{{result.total}}个,成功{{result.success}}个</span>
+				</p>
+				<p ng-if="alters" ng-repeat="a in alters">
+					<span ng-bind="a" class="text-inverse"></span>
+				</p>
+			</div>
+		</div>
+	</div>
+	<div class="modal-footer Deputy">
+		<div class="text-center">
+			<button class="b2b-btn b2b-btn-submit" ng-click="enSure()" type="button">确定</button>
+			<button class="b2b-btn b2b-btn-cancel" ng-click="cancel()" type="button">取消</button>
+		</div>
+	</div>
+</div>
+<!-- block end -->

+ 406 - 0
src/main/webapp/resources/view/usercenter/b2b/order/changeList.html

@@ -0,0 +1,406 @@
+<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 .order-info {
+		padding-left: 45px;
+	}
+
+	.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;
+	}
+
+	.menu .new-dot{
+		width: 20px;
+		height: 20px;
+		line-height: 20px;
+		font-size: 12px;
+		color: #fff;
+		font-weight: inherit;
+		top: -2px;
+	}
+</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 ui-sref="purc.changeNew" type="button" 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 class="com_tab" style="margin-bottom: 10px">
+		<ul class="fl" style="width: 100%">
+			<li><a ui-sref="buyer_order" href="#/order">优软商城</a></li>
+			<li class="active"><a ui-sref="purc_usercenter_order" href="#/purc/order">B2B</a></li>
+		</ul>
+	</div>
+	<div class="tab_top" style="margin-bottom: 10px">
+		<ul class="fl" style="width: 100%">
+			<li ng-class="{'active': storeType=='purcOrder'}"><a ui-sref="purc_usercenter_order">采购订单</a></li>
+			<li ng-class="{'active': storeType=='purcChange'}"><a ui-sref="purc_change_list">采购变更单</a></li>
+			<li ng-class="{'active': storeType=='deputy'}"><a ui-sref="purc_deputy">代采订单</a></li>
+			<li ng-class="{'active': storeType=='outorder'}"><a ui-sref="purc_make_outorder">委外订单</a></li>
+			<li class="down-purchase">
+				<a class="tab_add" ui-sref="purc.changeNew" type="button" title="新增采购变更单"><i class="fa fa-plus-square fa-fw"></i>新增</a>
+				<span class='tab_add' 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=='unread'}" ng-click="setActive('unread')">无需确认
+					<b class="new-dot" ng-if="unread.unNeedReply > 0">({{unread.unNeedReply>99?'99+':unread.unNeedReply}})</b>
+				</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="580">产品</th>
+			<th width="100">单价</th>
+			<th width="50">数量</th>
+			<th width="120">交货日期</th>
+			<th width="120">变更内容</th>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="6"></td>
+		</tr>
+		</thead>
+		<tbody ng-repeat="change in $data track by change.id">
+		<tr class="order-hd">
+			<td class="first" colspan="6">
+				<div class="order-main">
+					<span class="no-circle-icon icon" ng-if="isUnread(change.id)" title="标记为未查看">未读</span>
+					<span class="circle-icon icon" ng-if="!isUnread(change.id)" title="标记为已查看">已读</span>
+					<span class="text-num text-bold">日期:<span ng-bind="::change.date | date:'yyyy-MM-dd'"></span></span>
+					<span><img src="static/img/user/images/shop_home.png"><span ng-bind="::change.apVendorName"></span></span>
+					<span>流水号:<a title="查看变更单详情"
+								 class="text-num order-detail" ng-bind="::change.code" ui-sref="purc.change_detail({id:change.id})" target="_self"
+								 ng-click="setOrdersRead(change.id)"></a>
+					</span>
+					<span>订单:<a title="查看采购单详情"
+								class="text-num text-bold order-detail" ng-bind="::change.orderCode" ui-sref="purc.order_detail({id:change.orderId})" target="_blank"></a></span>
+				</div>
+			</td>
+			<!--<td colspan="2" class="" style="line-height: 20px; padding-top: 5px;">-->
+				<!--<span ng-bind="change.description"></span>-->
+			<!--</td>-->
+		</tr>
+		<tr class="order-hd">
+			<td colspan="6" class="order-info">
+				 <span style="padding-left: 24px; margin-right: 66px;"><span class="text-bold">币别:</span>
+				 	<span class="text-inverse" ng-class="{'text-inverse': change.newCurrency != change.oldCurrency}" ng-bind="::change.newCurrency"></span>&nbsp;
+				 	<s class="text-muted" ng-if="(change.newCurrency != change.oldCurrency) && (change.newCurrency != null)" ng-bind="::change.oldCurrency"></s>
+					<span class="text-bold"  ng-if="(change.newCurrency != change.oldCurrency) && (change.newCurrency == null)" ng-bind="::change.oldCurrency"></span>&nbsp;&nbsp;&nbsp;&nbsp;
+				 </span>
+				<span><span class="text-bold">支付方式:</span>
+				 	<span class="text-inverse" ng-class="{'text-inverse': change.newPayments != change.oldPayments}" ng-bind="::change.newPayments"></span>&nbsp;
+				 	<s class="text-muted" ng-if="(change.newPayments != change.oldPayments) && (change.newPayments != null)" ng-bind="::change.oldPayments"></s>
+					<span class="text-bold"  ng-if="(change.newPayments != change.oldPayments) && (change.newPayments == null)" ng-bind="::change.oldPayments"></span>&nbsp;&nbsp;&nbsp;&nbsp;
+				 </span>
+				<span><span class="text-bold" ng-if="change.newApVendorName">应付供应商:</span>
+				 	<span class="text-bold" ng-class="{'text-inverse': change.apVendorName != change.newApVendorName && change.newApVendorName != null}" ng-bind="::change.newApVendorName"></span>&nbsp;
+				 	<s class="text-muted" ng-if="change.apVendorName != change.newApVendorName  && change.newApVendorName != null" ng-bind="::change.apVendorName"></s>
+				</span>
+			</td>
+		</tr>
+		<tr ng-if="change.$editing" class="br-b">
+			<td colspan="2"></td>
+			<td colspan="2">
+				<div style="margin: 0 auto" ng-init="change.$agreed = 1">
+					<div class="form-group">
+						<label class="radio-inline"> <input type="radio"
+															ng-model="change.$agreed" value="1"> 同意
+						</label> <label class="radio-inline"> <input type="radio"
+																	 ng-model="change.$agreed" value="0"> 不同意
+					</label>
+					</div>
+				</div>
+			</td>
+			<td>
+				<div class="form-group">
+					<input type="text" ng-model="change.replyRemark"
+						   class="form-control input-xs" placeholder="回复备注">
+				</div>
+			</td>
+			<td class="text-center"><br>
+				<div>
+					<a ng-click="change.$editing=!change.$editing">取消</a>
+				</div> <br>
+				<div>
+					<a ng-click="onReplyClick(change);setOrdersRead(change.id)" class="text-inverse">确认回复</a>
+				</div> <br></td>
+		</tr>
+		<tr class="order-bd" ng-repeat="item in ::change.orderChangeItems">
+			<td class="product">
+				<div>
+					<span class="text-num text-bold">物料型号:<span ng-bind="::item.oldProduct.code"></span></span>
+					<!--<span class="text-light">&nbsp;&nbsp;&nbsp;订单第 <span class="text-num">{{::item.orderItemNumber}}</span> 行</span>-->
+				</div>
+				<!--<div>-->
+				<!--<span class="text-num text-bold"  ng-bind="::item.oldProduct.code"></span>-->
+				<!--</div>-->
+				<div>
+					<span>物料名称:<span ng-bind="::item.oldProduct.title"></span></span>
+				</div>
+				<!--<div><span ng-bind="::item.oldProduct.title"></span></div>-->
+				<div>
+					<span>物料规格:<span ng-bind="::item.oldProduct.spec"></span></span>
+				</div>
+				<!--<div><span class="text-muted" ng-bind="::item.oldProduct.spec"></span></div>-->
+			</td>
+			<td class="text-center">
+				<div class="text-num" ng-if="!isUser"
+					 ng-class="{'text-inverse': item.newPrice != item.oldPrice}"
+					 title="{{item.newPrice}}" ng-bind="::item.newPrice | number:6"></div>
+				<div ng-if="isUser" ng-class="{'text-inverse': item.newPrice != item.oldPrice}">-</div>
+				<div ng-show="(item.newPrice != item.oldPrice) && (item.newPrice != null)">
+					<s ng-if="!isUser" class="text-num text-muted" ng-bind="::item.oldPrice | number:6"></s>
+					<s ng-if="isUser" class="text-num text-muted" >-</s>
+				</div>
+				<div ng-show="(item.newPrice != item.oldPrice) && (item.newPrice == null)">
+					<span ng-if="!isUser"  ng-bind="::item.oldPrice | number:6"></span>
+					<span ng-if="isUser"  >-</span>
+				</div>
+				<div class="text-muted">
+					税率 <span ng-show="item.newTaxrate != item.oldTaxrate && item.newTaxrate != null"><span class="text-num" ng-class="{'text-inverse': item.newTaxrate != item.oldTaxrate && item.newTaxrate != null}">
+						{{::item.newTaxrate}}%
+					</span> </span><s ng-if="(item.newTaxrate != item.oldTaxrate) && (item.newTaxrate != null)">{{::item.oldTaxrate}}%</s>
+					<span ng-if="(item.newTaxrate != item.oldTaxrate) && (item.newTaxrate == null)">{{::item.oldTaxrate}}%</span>
+				</div>
+			</td>
+			<td class="text-center">
+				<div class="text-num"
+					 ng-class="{'text-inverse': item.newQty != item.oldQty}"
+					 title="{{item.newQty}}" ng-bind="::item.newQty"></div>
+				<div ng-show="item.newQty != item.oldQty && item.newQty != null">
+					<s class="text-num text-muted" title="{{item.oldQty}}"
+					   ng-bind="::item.oldQty"></s>
+				</div>
+				<div ng-show="item.newQty != item.oldQty && item.newQty == null">
+					<span  title="{{item.oldQty}}"
+						   ng-bind="::item.oldQty"></span>
+				</div>
+				<div class="text-muted" ng-bind="::item.newProduct.unit"></div>
+			</td>
+			<td class="text-center br-l">
+				<div class="text-num"
+					 ng-class="{'text-inverse': item.newDelivery != item.oldDelivery}"
+					 ng-bind="::item.newDelivery | date:'yyyy-MM-dd'"></div>
+				<div ng-show="item.newDelivery != item.oldDelivery && item.newDelivery != null">
+					<s class="text-num text-muted"
+					   ng-bind="::item.oldDelivery | date:'yyyy-MM-dd'"></s>
+				</div>
+				<div ng-show="item.newDelivery != item.oldDelivery && item.newDelivery == null">
+					<span
+							ng-bind="::item.oldDelivery | date:'yyyy-MM-dd'"></span>
+				</div>
+			</td>
+			<td class="text-center br-l" colspan="2">
+				<div ng-bind="::item.description"></div>
+				<div ng-if="change.agreed == 1 && !change.unNeedReply" class="block">
+					<span class="text-trans success">已同意</span>
+				</div>
+				<div ng-if="change.unNeedReply" class="block">
+					<span class="text-trans success">无需确认</span>
+				</div>
+				<div ng-if="change.agreed == 0" class="block">
+					<span class="text-trans warning">不同意</span>
+				</div>
+				<div ng-show="change.agreed == null && change.unNeedReply == 0" class="block">
+					<span class="text-trans success">待供应商确认</span>
+				</div>
+			</td>
+		</tr>
+		</tbody>
+		<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>
+						<a href="javascript:location.reload()">点击重新加载<i class="load_icon"></i></a>
+					</div>
+				</div>
+			</td>
+		</tr>
+		</tbody>
+	</table>
+</div>

+ 504 - 0
src/main/webapp/resources/view/usercenter/b2b/order/deputyOrder.html

@@ -0,0 +1,504 @@
+<style>
+	.condition .more.open {
+		margin-top: 10px;
+		height: 36px;
+		opacity: 1;
+	}
+
+	.condition .more .form-group {
+		margin-bottom: 0;
+	}
+
+	.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;
+        border-bottom: 10px #ddd solid;
+    }*/
+	.order-table>tbody:hover{
+		border: #3f84f6 2px solid !important;
+	}
+	/*.order-table>tbody:hover .order-hd td{
+        border-top: #d32526 2px solid !important;
+    }*/
+
+	.order-table .operates {
+		display: none;
+	}
+
+	.order-table .operates i {
+		padding: 0 2px;
+	}
+
+	.order-table>tbody:hover .operates {
+		display: block;
+	}
+	.order-table>tbody:hover .operates-status {
+		display: none;
+	}
+
+
+	.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;
+	}
+
+	.order-table .order-bd .order-number {
+		position: absolute;
+		top: -1px;
+		left: -1px;
+		width: 20px;
+		height: 20px;
+		line-height: 20px;
+		text-align: center;
+		background: #f5f5f5;
+		font-weight: 500;
+		border: solid 1px #d5d5d5;
+		border-radius: 0 0 10px 0;
+	}
+
+	.order-table .order-bd .order-number.key {
+		background: #56a022;
+		color: #ffffff;
+	}
+
+	.unPrinted {
+		color: #56a022;
+	}
+
+	.info-container .info:hover {
+		color: #CC3333;
+	}
+	.buy-cart{
+		font-size: 14px;
+		padding: 0;
+		margin-left: 50px;
+	}
+	.buy-cart a{
+		color: #5078cb;
+		float: left;
+		margin-left: 15px;
+	}
+	.buy-cart a img{
+		margin-right: 3px;
+	}
+	.menu .new-dot{
+		width: 20px;
+		height: 20px;
+		line-height: 20px;
+		font-size: 12px;
+		color: #fff;
+		font-weight: inherit;
+		top: -2px;
+	}
+	.order-table .product div.text-over {
+		width: 340px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+	.order-table .product div.text-flow b{
+		float: left;
+	}
+	.order-table .product div.text-flow span{
+		float: left;
+		display: inline-block;
+		width: 290px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+	.order-table .product div.text-overflow span{
+		float: left;
+		display: inline-block;
+		width: 265px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+</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 ui-sref="purc.newOrder" title="新增采购单"><i class="fa fa-plus-square fa-fw"></i>新增</a>-->
+		<!--<a ui-sref="purc.cart" title="购物车"><i class="fa fa-shopping-cart 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 class="com_tab" style="margin-bottom: 10px">
+		<ul class="fl" style="width: 100%">
+			<li><a ui-sref="buyer_order" href="#/order">优软商城</a></li>
+			<li class="active"><a ui-sref="purc_usercenter_order" href="#/purc/order">B2B</a></li>
+		</ul>
+	</div>
+	<div class="tab_top" style="margin-bottom: 10px">
+		<ul class="fl" style="width: 100%">
+			<li ng-class="{'active': storeType=='purcOrder'}"><a ui-sref="purc_usercenter_order">采购订单</a></li>
+			<li ng-class="{'active': storeType=='purcChange'}"><a ui-sref="purc_change_list">采购变更单</a></li>
+			<li ng-class="{'active': storeType=='deputy'}"><a ui-sref="purc_deputy">代采订单</a></li>
+			<li ng-class="{'active': storeType=='outorder'}"><a ui-sref="purc_make_outorder">委外订单</a></li>
+			<li class="down-purchase">
+				<a class="tab_add" ui-sref="purc.newOrder" title="新增采购单"><i class="fa fa-plus-square fa-fw"></i>新增</a>
+				<a class="tab_add" ui-sref="purc.cart" title="购物车"><i class="fa fa-shopping-cart fa-fw"></i>购物车</a>
+				<span class='tab_add' 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')">已回复
+					<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')">待回复</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=='end'}" ng-click="setActive('end')">已结案</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>物料</th>
+			<th width="80">含税单价</th>
+			<th width="100">税率</th>
+			<th width="100">数量</th>
+			<th width="120">交货日期</th>
+			<th width="180">单据状态</th>
+			<th width="120">供应商</th>
+		</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、您的采购单在ERP系统上还没审核,订单无法上传到平台<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="order in $data track by order.id">
+		<tr class="order-hd" ng-dblclick="order.$collapsed=!order.$collapsed" ng-class="{'text-bold': order.display>0}">
+			<td class="first" colspan="5">
+				<div class="order-main">
+					<span class="no-circle-icon icon" ng-if="isUnread(order.id)" title="标记为未查看">未读</span>
+					<span class="circle-icon icon" ng-if="!isUnread(order.id)" title="标记为已查看">已读</span>
+					<!--<span> <input type="checkbox" class="selector"
+						ng-model="order.$selected" ng-click="checkOne(order)">
+					</span> -->
+					<span class="text-num text-bold"
+						  ng-bind="::order.date | date:'yyyy-MM-dd'"></span>
+					<span><img src="static/img/user/images/shop_home.png"><span ng-bind="::order.receiveName"></span></span>
+					<span style="margin-left: 126px;">订单号:<a title="查看详情"
+								 class="text-num order-detail" ng-bind="::order.code" ui-sref="purc.order_detail({id:order.id})" target="_self"
+								 ng-click="setOrdersRead(order.id)"></a></span>
+				</div>
+			</td>
+			<td ng-if="!isUser" class="order-sum">{{::order.currency}}: <span
+					ng-bind="getOrderTotal(order.orderItems) | number : 2"
+					class="text-num text-bold"></span>
+			</td>
+			<td ng-if="isUser" class="order-sum"></td>
+			<td class="text-center">
+				<span ng-if="order.custPrint" class="label ng-scope operates-status" style="margin-right: 5px;background-color: #5D6C79">已打印</span>
+				<span ng-if="!order.custPrint" class="label ng-scope operates-status" style="margin-right: 5px;background-color: #CA3955">未打印</span>
+				<div class="operates">
+					<a ng-click="custPrint(order)" title="打印{{order.custPrint? '(已打印)':'(未打印)'}}" ng-class="{'unPrinted' : !order.custPrint, 'text-muted': order.custPrint}"><i
+							class="fa fa-print fa-lg"></i></a></a>
+					<a ng-click="copyorder(order.id)">复制</a>
+				</div>
+			</td>
+		</tr>
+		<tr class="order-bd" ng-repeat="item in order.orderItems track by item.id"
+			ng-if="!order.$collapsed "><!-- && (!searchFilterXls.keyword || item.key || order.$showAll) -->
+			<td class="product">
+				<div class="text-num order-number" ng-class="{'key': item.key&&order.$showAll}" title="第{{::item.number}}行">{{::item.number}}</div>
+				<div class="text-num text-muted text-bold text-overflow" title="{{::item.product.code}}">
+					<b class="text-muted01" style="color: #333; font-weight: bold;">物料编号:</b><span class="text-muted" ng-bind="::item.product.code" style="color: #333!important; "></span>
+				</div>
+				<div class="text-overflow" title="{{::item.product.title}}">
+					<b class="text-muted01">物料名称:</b><span ng-bind="::item.product.title"></span>
+				</div>
+				<div class="text-muted text-over"
+					 title="{{::item.product.spec}}"><b class="text-muted01">物料规格:</b><span ng-bind="::item.product.spec"></span></div>
+				<div class="text-muted text-bold text-overflow" ng-if="item.vendspec" title="{{item.vendspec}}"><span ng-bind="::item.vendspec"></span></div>
+				<div class="text-bold text-inverse text-flow" ng-if="item.factory" title="{{item.factory}}"><b>送货工厂:</b><span ng-bind="::item.factory"></span></div>
+				<div class="text-bold text-inverse text-flow" ng-if="item.remark" title="{{item.remark}}"><b>备注:</b><span ng-bind="::item.remark"></span></div>
+			</td>
+			<td class="text-center">
+				<div ng-if="!isUser" class="text-num text-red" ng-bind="::item.price | number:6"></div>
+			</td>
+			<td class="text-center"><div class="text-muted">{{::item.taxrate || 0}}</div></td>
+			<td class="text-center">
+				<div class="text-num text-red" ng-bind="::item.qty"></div>
+				<div class="text-muted" ng-bind="::item.product.unit"></div>
+				<div style="margin: 0 auto" ng-if="item.$editing">
+					<input type="number" ng-model="item.reply.qty" min="0" max="{{item.qty}}"
+						   ng-init="item.reply.qty=item.qty-item.replyQty"
+						   class="form-control input-xs" placeholder="0~{{item.qty-item.replyQty}}">
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div class="text-num" ng-bind="::item.delivery | date:'yyyy-MM-dd'"></div>
+				<br>
+				<div style="margin: 0 auto"
+					 class="input-group input-group-xs input-trigger"
+					 ng-if="item.$editing">
+					<input type="text" ng-model="item.reply.delivery"
+						   class="form-control" placeholder="回复交期"
+						   datepicker-popup="yyyy-MM-dd" is-open="item.$opened"
+						   min-date="order.date" ng-required="true" current-text="今天"
+						   clear-text="清除" close-text="关闭"
+						   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+						   ng-focus="openDatePicker($event, item, '$opened')"> <span
+						class="input-group-btn">
+						<button type="button" class="btn btn-default"
+								ng-click="openDatePicker($event, item, '$opened')">
+							<i class="fa fa-calendar"></i>
+						</button>
+					</span>
+				</div>
+			</td>
+			<td class="br-l">
+				<div ng-if="!item.$editing">
+					<div ng-if="!item.replyQty" class="text-muted text-center">未回复</div>
+					<div ng-if="item.replyQty > 0 && item.replyQty < item.qty">
+						<div class="progress progress-sm">
+							<div class="progress-bar progress-bar-success"
+								 ng-style="{'width': 100*item.replyQty/item.qty + '%'}">
+								<span class="sr-only"></span>
+							</div>
+						</div>
+						已回复 <span class="text-default">{{::item.replyQty}}</span> /
+						<span>{{::item.qty}}</span>
+					</div>
+					<div ng-if="item.replyQty > 0" class="dropdown" ng-class="{'text-center': item.replyQty>=item.qty}">
+						<a href="javascript:void(0);" class="dropdown-toggle text-default"
+						   ng-mouseover="getReply(item)">回复历史<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="reply in ::item.replies">
+										<div class="row row-sm"
+											 ng-class="{'text-inverse': $index==0}">
+											<div class="col-xs-6">
+												<span ng-if="reply.qty < 0"> 撤销</span>
+												数量 {{::reply.qty}}
+											</div>
+											<div class="col-xs-6">交期{{::reply.delivery |
+												date:'yyyy-MM-dd'}}</div>
+										</div>
+										<div class="text-muted">{{::reply.recorder}}&nbsp;&nbsp;{{::reply.date
+											| date:'MM-dd HH:mm'}}&nbsp;回复</div>
+										<div class="text-muted" ng-if="reply.remark != null">备注:{{::reply.remark}}</div>
+									</li>
+								</ul>
+							</div>
+						</div>
+					</div>
+					<div ng-if="item.acceptQty" class="text-success text-center text-bold f14">
+						已验收:{{::item.acceptQty}}{{::item.product.unit}}
+					</div>
+					<div ng-if="item.returnQty" class="text-error text-center text-bold f14">
+						已验退:{{::item.returnQty}}{{::item.product.unit}}
+					</div>
+				</div>
+				<div style="margin: 0 auto" ng-if="item.$editing">
+					<br><br><input type="text" ng-model="item.reply.remark"
+								   class="form-control input-xs" placeholder="回复备注" />
+				</div>
+			</td>
+			<td ng-bind="::order.enName"></td>
+		</tr>
+		<!-- <tr ng-if="!order.$collapsed && searchFilterXls.keyword" style="cursor: pointer;padding: 10px 0;">
+			<td colspan="6" class="text-center text-simple" ng-if="!order.$showAll" style="cursor: pointer;padding: 10px 0;" ng-click="order.$showAll = true">
+				展开所有明细(包括不含关键词的) <i class="fa fa-angle-down"></i>
+			</td>
+			<td colspan="6" class="text-center text-simple" ng-if="order.$showAll" style="cursor: pointer;padding: 10px 0;" ng-click="order.$showAll = false">
+				收起不含关键词的明细 <i class="fa fa-angle-up"></i>
+			</td>
+		</tr> -->
+		</tbody>
+	</table>
+</div>

+ 406 - 0
src/main/webapp/resources/view/usercenter/b2b/order/outorder.html

@@ -0,0 +1,406 @@
+<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 .order-info {
+		padding-left: 45px;
+	}
+
+	.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;
+	}
+
+	.menu .new-dot{
+		width: 20px;
+		height: 20px;
+		line-height: 20px;
+		font-size: 12px;
+		color: #fff;
+		font-weight: inherit;
+		top: -2px;
+	}
+</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 ui-sref="purc.changeNew" type="button" 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 class="com_tab" style="margin-bottom: 10px">
+		<ul class="fl" style="width: 100%">
+			<li><a ui-sref="buyer_order" href="#/order">优软商城</a></li>
+			<li class="active"><a ui-sref="purc_usercenter_order" href="#/purc/order">B2B</a></li>
+		</ul>
+	</div>
+	<div class="tab_top" style="margin-bottom: 10px">
+		<ul class="fl" style="width: 100%">
+			<li ng-class="{'active': storeType=='purcOrder'}"><a ui-sref="purc_usercenter_order">采购订单</a></li>
+			<li ng-class="{'active': storeType=='purcChange'}"><a ui-sref="purc_change_list">采购变更单</a></li>
+			<li ng-class="{'active': storeType=='deputy'}"><a ui-sref="purc_deputy">代采订单</a></li>
+			<li ng-class="{'active': storeType=='outorder'}"><a ui-sref="purc_make_outorder">委外订单</a></li>
+			<li class="down-purchase">
+				<a class="tab_add" ui-sref="purc.changeNew" type="button" title="新增采购变更单"><i class="fa fa-plus-square fa-fw"></i>新增</a>
+				<span class='tab_add' 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=='unread'}" ng-click="setActive('unread')">无需确认
+					<b class="new-dot" ng-if="unread.unNeedReply > 0">({{unread.unNeedReply>99?'99+':unread.unNeedReply}})</b>
+				</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="580">产品</th>
+			<th width="100">单价</th>
+			<th width="50">数量</th>
+			<th width="120">交货日期</th>
+			<th width="120">变更内容</th>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="6"></td>
+		</tr>
+		</thead>
+		<tbody ng-repeat="change in $data track by change.id">
+		<tr class="order-hd">
+			<td class="first" colspan="6">
+				<div class="order-main">
+					<span class="no-circle-icon icon" ng-if="isUnread(change.id)" title="标记为未查看">未读</span>
+					<span class="circle-icon icon" ng-if="!isUnread(change.id)" title="标记为已查看">已读</span>
+					<span class="text-num text-bold">日期:<span ng-bind="::change.date | date:'yyyy-MM-dd'"></span></span>
+					<span><img src="static/img/user/images/shop_home.png"><span ng-bind="::change.apVendorName"></span></span>
+					<span>流水号:<a title="查看变更单详情"
+								 class="text-num order-detail" ng-bind="::change.code" ui-sref="purc.change_detail({id:change.id})" target="_self"
+								 ng-click="setOrdersRead(change.id)"></a>
+					</span>
+					<span>订单:<a title="查看采购单详情"
+								class="text-num text-bold order-detail" ng-bind="::change.orderCode" ui-sref="purc.order_detail({id:change.orderId})" target="_blank"></a></span>
+				</div>
+			</td>
+			<!--<td colspan="2" class="" style="line-height: 20px; padding-top: 5px;">-->
+				<!--<span ng-bind="change.description"></span>-->
+			<!--</td>-->
+		</tr>
+		<tr class="order-hd">
+			<td colspan="6" class="order-info">
+				 <span style="padding-left: 24px; margin-right: 66px;"><span class="text-bold">币别:</span>
+				 	<span class="text-inverse" ng-class="{'text-inverse': change.newCurrency != change.oldCurrency}" ng-bind="::change.newCurrency"></span>&nbsp;
+				 	<s class="text-muted" ng-if="(change.newCurrency != change.oldCurrency) && (change.newCurrency != null)" ng-bind="::change.oldCurrency"></s>
+					<span class="text-bold"  ng-if="(change.newCurrency != change.oldCurrency) && (change.newCurrency == null)" ng-bind="::change.oldCurrency"></span>&nbsp;&nbsp;&nbsp;&nbsp;
+				 </span>
+				<span><span class="text-bold">支付方式:</span>
+				 	<span class="text-inverse" ng-class="{'text-inverse': change.newPayments != change.oldPayments}" ng-bind="::change.newPayments"></span>&nbsp;
+				 	<s class="text-muted" ng-if="(change.newPayments != change.oldPayments) && (change.newPayments != null)" ng-bind="::change.oldPayments"></s>
+					<span class="text-bold"  ng-if="(change.newPayments != change.oldPayments) && (change.newPayments == null)" ng-bind="::change.oldPayments"></span>&nbsp;&nbsp;&nbsp;&nbsp;
+				 </span>
+				<span><span class="text-bold" ng-if="change.newApVendorName">应付供应商:</span>
+				 	<span class="text-bold" ng-class="{'text-inverse': change.apVendorName != change.newApVendorName && change.newApVendorName != null}" ng-bind="::change.newApVendorName"></span>&nbsp;
+				 	<s class="text-muted" ng-if="change.apVendorName != change.newApVendorName  && change.newApVendorName != null" ng-bind="::change.apVendorName"></s>
+				</span>
+			</td>
+		</tr>
+		<tr ng-if="change.$editing" class="br-b">
+			<td colspan="2"></td>
+			<td colspan="2">
+				<div style="margin: 0 auto" ng-init="change.$agreed = 1">
+					<div class="form-group">
+						<label class="radio-inline"> <input type="radio"
+															ng-model="change.$agreed" value="1"> 同意
+						</label> <label class="radio-inline"> <input type="radio"
+																	 ng-model="change.$agreed" value="0"> 不同意
+					</label>
+					</div>
+				</div>
+			</td>
+			<td>
+				<div class="form-group">
+					<input type="text" ng-model="change.replyRemark"
+						   class="form-control input-xs" placeholder="回复备注">
+				</div>
+			</td>
+			<td class="text-center"><br>
+				<div>
+					<a ng-click="change.$editing=!change.$editing">取消</a>
+				</div> <br>
+				<div>
+					<a ng-click="onReplyClick(change);setOrdersRead(change.id)" class="text-inverse">确认回复</a>
+				</div> <br></td>
+		</tr>
+		<tr class="order-bd" ng-repeat="item in ::change.orderChangeItems">
+			<td class="product">
+				<div>
+					<span class="text-num text-bold">物料型号:<span ng-bind="::item.oldProduct.code"></span></span>
+					<!--<span class="text-light">&nbsp;&nbsp;&nbsp;订单第 <span class="text-num">{{::item.orderItemNumber}}</span> 行</span>-->
+				</div>
+				<!--<div>-->
+				<!--<span class="text-num text-bold"  ng-bind="::item.oldProduct.code"></span>-->
+				<!--</div>-->
+				<div>
+					<span>物料名称:<span ng-bind="::item.oldProduct.title"></span></span>
+				</div>
+				<!--<div><span ng-bind="::item.oldProduct.title"></span></div>-->
+				<div>
+					<span>物料规格:<span ng-bind="::item.oldProduct.spec"></span></span>
+				</div>
+				<!--<div><span class="text-muted" ng-bind="::item.oldProduct.spec"></span></div>-->
+			</td>
+			<td class="text-center">
+				<div class="text-num" ng-if="!isUser"
+					 ng-class="{'text-inverse': item.newPrice != item.oldPrice}"
+					 title="{{item.newPrice}}" ng-bind="::item.newPrice | number:6"></div>
+				<div ng-if="isUser" ng-class="{'text-inverse': item.newPrice != item.oldPrice}">-</div>
+				<div ng-show="(item.newPrice != item.oldPrice) && (item.newPrice != null)">
+					<s ng-if="!isUser" class="text-num text-muted" ng-bind="::item.oldPrice | number:6"></s>
+					<s ng-if="isUser" class="text-num text-muted" >-</s>
+				</div>
+				<div ng-show="(item.newPrice != item.oldPrice) && (item.newPrice == null)">
+					<span ng-if="!isUser"  ng-bind="::item.oldPrice | number:6"></span>
+					<span ng-if="isUser"  >-</span>
+				</div>
+				<div class="text-muted">
+					税率 <span ng-show="item.newTaxrate != item.oldTaxrate && item.newTaxrate != null"><span class="text-num" ng-class="{'text-inverse': item.newTaxrate != item.oldTaxrate && item.newTaxrate != null}">
+						{{::item.newTaxrate}}%
+					</span> </span><s ng-if="(item.newTaxrate != item.oldTaxrate) && (item.newTaxrate != null)">{{::item.oldTaxrate}}%</s>
+					<span ng-if="(item.newTaxrate != item.oldTaxrate) && (item.newTaxrate == null)">{{::item.oldTaxrate}}%</span>
+				</div>
+			</td>
+			<td class="text-center">
+				<div class="text-num"
+					 ng-class="{'text-inverse': item.newQty != item.oldQty}"
+					 title="{{item.newQty}}" ng-bind="::item.newQty"></div>
+				<div ng-show="item.newQty != item.oldQty && item.newQty != null">
+					<s class="text-num text-muted" title="{{item.oldQty}}"
+					   ng-bind="::item.oldQty"></s>
+				</div>
+				<div ng-show="item.newQty != item.oldQty && item.newQty == null">
+					<span  title="{{item.oldQty}}"
+						   ng-bind="::item.oldQty"></span>
+				</div>
+				<div class="text-muted" ng-bind="::item.newProduct.unit"></div>
+			</td>
+			<td class="text-center br-l">
+				<div class="text-num"
+					 ng-class="{'text-inverse': item.newDelivery != item.oldDelivery}"
+					 ng-bind="::item.newDelivery | date:'yyyy-MM-dd'"></div>
+				<div ng-show="item.newDelivery != item.oldDelivery && item.newDelivery != null">
+					<s class="text-num text-muted"
+					   ng-bind="::item.oldDelivery | date:'yyyy-MM-dd'"></s>
+				</div>
+				<div ng-show="item.newDelivery != item.oldDelivery && item.newDelivery == null">
+					<span
+							ng-bind="::item.oldDelivery | date:'yyyy-MM-dd'"></span>
+				</div>
+			</td>
+			<td class="text-center br-l" colspan="2">
+				<div ng-bind="::item.description"></div>
+				<div ng-if="change.agreed == 1 && !change.unNeedReply" class="block">
+					<span class="text-trans success">已同意</span>
+				</div>
+				<div ng-if="change.unNeedReply" class="block">
+					<span class="text-trans success">无需确认</span>
+				</div>
+				<div ng-if="change.agreed == 0" class="block">
+					<span class="text-trans warning">不同意</span>
+				</div>
+				<div ng-show="change.agreed == null && change.unNeedReply == 0" class="block">
+					<span class="text-trans success">待供应商确认</span>
+				</div>
+			</td>
+		</tr>
+		</tbody>
+		<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>
+						<a href="javascript:location.reload()">点击重新加载<i class="load_icon"></i></a>
+					</div>
+				</div>
+			</td>
+		</tr>
+		</tbody>
+	</table>
+</div>

+ 504 - 0
src/main/webapp/resources/view/usercenter/b2b/order/usercenter_order.html

@@ -0,0 +1,504 @@
+<style>
+	.condition .more.open {
+		margin-top: 10px;
+		height: 36px;
+		opacity: 1;
+	}
+
+	.condition .more .form-group {
+		margin-bottom: 0;
+	}
+
+	.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;
+        border-bottom: 10px #ddd solid;
+    }*/
+	.order-table>tbody:hover{
+		border: #3f84f6 2px solid !important;
+	}
+	/*.order-table>tbody:hover .order-hd td{
+        border-top: #d32526 2px solid !important;
+    }*/
+
+	.order-table .operates {
+		display: none;
+	}
+
+	.order-table .operates i {
+		padding: 0 2px;
+	}
+
+	.order-table>tbody:hover .operates {
+		display: block;
+	}
+	.order-table>tbody:hover .operates-status {
+		display: none;
+	}
+
+
+	.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;
+	}
+
+	.order-table .order-bd .order-number {
+		position: absolute;
+		top: -1px;
+		left: -1px;
+		width: 20px;
+		height: 20px;
+		line-height: 20px;
+		text-align: center;
+		background: #f5f5f5;
+		font-weight: 500;
+		border: solid 1px #d5d5d5;
+		border-radius: 0 0 10px 0;
+	}
+
+	.order-table .order-bd .order-number.key {
+		background: #56a022;
+		color: #ffffff;
+	}
+
+	.unPrinted {
+		color: #56a022;
+	}
+
+	.info-container .info:hover {
+		color: #CC3333;
+	}
+	.buy-cart{
+		font-size: 14px;
+		padding: 0;
+		margin-left: 50px;
+	}
+	.buy-cart a{
+		color: #5078cb;
+		float: left;
+		margin-left: 15px;
+	}
+	.buy-cart a img{
+		margin-right: 3px;
+	}
+	.menu .new-dot{
+		width: 20px;
+		height: 20px;
+		line-height: 20px;
+		font-size: 12px;
+		color: #fff;
+		font-weight: inherit;
+		top: -2px;
+	}
+	.order-table .product div.text-over {
+		width: 340px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+	.order-table .product div.text-flow b{
+		float: left;
+	}
+	.order-table .product div.text-flow span{
+		float: left;
+		display: inline-block;
+		width: 290px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+	.order-table .product div.text-overflow span{
+		float: left;
+		display: inline-block;
+		width: 265px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+</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 ui-sref="purc.newOrder" title="新增采购单"><i class="fa fa-plus-square fa-fw"></i>新增</a>-->
+		<!--<a ui-sref="purc.cart" title="购物车"><i class="fa fa-shopping-cart 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 class="com_tab" style="margin-bottom: 10px">
+		<ul class="fl" style="width: 100%">
+			<li><a ui-sref="buyer_order" href="#/order">优软商城</a></li>
+			<li class="active"><a ui-sref="purc_usercenter_order" href="#/purc/order">B2B</a></li>
+		</ul>
+	</div>
+	<div class="tab_top" style="margin-bottom: 10px">
+		<ul class="fl" style="width: 100%">
+			<li ng-class="{'active': storeType=='purcOrder'}"><a ui-sref="purc_usercenter_order">采购订单</a></li>
+			<li ng-class="{'active': storeType=='purcChange'}"><a ui-sref="purc_change_list">采购变更单</a></li>
+			<li ng-class="{'active': storeType=='deputy'}"><a ui-sref="purc_deputy">代采订单</a></li>
+			<li ng-class="{'active': storeType=='outorder'}"><a ui-sref="purc_make_outorder">委外订单</a></li>
+			<li class="down-purchase">
+				<a class="tab_add" ui-sref="purc.newOrder" title="新增采购单"><i class="fa fa-plus-square fa-fw"></i>新增</a>
+				<a class="tab_add" ui-sref="purc.cart" title="购物车"><i class="fa fa-shopping-cart fa-fw"></i>购物车</a>
+				<span class='tab_add' 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')">已回复
+					<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')">待回复</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=='end'}" ng-click="setActive('end')">已结案</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>物料</th>
+			<th width="80">含税单价</th>
+			<th width="100">税率</th>
+			<th width="100">数量</th>
+			<th width="120">交货日期</th>
+			<th width="180">单据状态</th>
+			<th width="120">供应商</th>
+		</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、您的采购单在ERP系统上还没审核,订单无法上传到平台<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="order in $data track by order.id">
+		<tr class="order-hd" ng-dblclick="order.$collapsed=!order.$collapsed" ng-class="{'text-bold': order.display>0}">
+			<td class="first" colspan="5">
+				<div class="order-main">
+					<span class="no-circle-icon icon" ng-if="isUnread(order.id)" title="标记为未查看">未读</span>
+					<span class="circle-icon icon" ng-if="!isUnread(order.id)" title="标记为已查看">已读</span>
+					<!--<span> <input type="checkbox" class="selector"
+						ng-model="order.$selected" ng-click="checkOne(order)">
+					</span> -->
+					<span class="text-num text-bold"
+						  ng-bind="::order.date | date:'yyyy-MM-dd'"></span>
+					<span><img src="static/img/user/images/shop_home.png"><span ng-bind="::order.receiveName"></span></span>
+					<span style="margin-left: 126px;">订单号:<a title="查看详情"
+								 class="text-num order-detail" ng-bind="::order.code" ui-sref="purc.order_detail({id:order.id})" target="_self"
+								 ng-click="setOrdersRead(order.id)"></a></span>
+				</div>
+			</td>
+			<td ng-if="!isUser" class="order-sum">{{::order.currency}}: <span
+					ng-bind="getOrderTotal(order.orderItems) | number : 2"
+					class="text-num text-bold"></span>
+			</td>
+			<td ng-if="isUser" class="order-sum"></td>
+			<td class="text-center">
+				<span ng-if="order.custPrint" class="label ng-scope operates-status" style="margin-right: 5px;background-color: #5D6C79">已打印</span>
+				<span ng-if="!order.custPrint" class="label ng-scope operates-status" style="margin-right: 5px;background-color: #CA3955">未打印</span>
+				<div class="operates">
+					<a ng-click="custPrint(order)" title="打印{{order.custPrint? '(已打印)':'(未打印)'}}" ng-class="{'unPrinted' : !order.custPrint, 'text-muted': order.custPrint}"><i
+							class="fa fa-print fa-lg"></i></a></a>
+					<a ng-click="copyorder(order.id)">复制</a>
+				</div>
+			</td>
+		</tr>
+		<tr class="order-bd" ng-repeat="item in order.orderItems track by item.id"
+			ng-if="!order.$collapsed "><!-- && (!searchFilterXls.keyword || item.key || order.$showAll) -->
+			<td class="product">
+				<div class="text-num order-number" ng-class="{'key': item.key&&order.$showAll}" title="第{{::item.number}}行">{{::item.number}}</div>
+				<div class="text-num text-muted text-bold text-overflow" title="{{::item.product.code}}">
+					<b class="text-muted01" style="color: #333; font-weight: bold;">物料编号:</b><span class="text-muted" ng-bind="::item.product.code" style="color: #333!important; "></span>
+				</div>
+				<div class="text-overflow" title="{{::item.product.title}}">
+					<b class="text-muted01">物料名称:</b><span ng-bind="::item.product.title"></span>
+				</div>
+				<div class="text-muted text-over"
+					 title="{{::item.product.spec}}"><b class="text-muted01">物料规格:</b><span ng-bind="::item.product.spec"></span></div>
+				<div class="text-muted text-bold text-overflow" ng-if="item.vendspec" title="{{item.vendspec}}"><span ng-bind="::item.vendspec"></span></div>
+				<div class="text-bold text-inverse text-flow" ng-if="item.factory" title="{{item.factory}}"><b>送货工厂:</b><span ng-bind="::item.factory"></span></div>
+				<div class="text-bold text-inverse text-flow" ng-if="item.remark" title="{{item.remark}}"><b>备注:</b><span ng-bind="::item.remark"></span></div>
+			</td>
+			<td class="text-center">
+				<div ng-if="!isUser" class="text-num text-red" ng-bind="::item.price | number:6"></div>
+			</td>
+			<td class="text-center"><div class="text-muted">{{::item.taxrate || 0}}</div></td>
+			<td class="text-center">
+				<div class="text-num text-red" ng-bind="::item.qty"></div>
+				<div class="text-muted" ng-bind="::item.product.unit"></div>
+				<div style="margin: 0 auto" ng-if="item.$editing">
+					<input type="number" ng-model="item.reply.qty" min="0" max="{{item.qty}}"
+						   ng-init="item.reply.qty=item.qty-item.replyQty"
+						   class="form-control input-xs" placeholder="0~{{item.qty-item.replyQty}}">
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div class="text-num" ng-bind="::item.delivery | date:'yyyy-MM-dd'"></div>
+				<br>
+				<div style="margin: 0 auto"
+					 class="input-group input-group-xs input-trigger"
+					 ng-if="item.$editing">
+					<input type="text" ng-model="item.reply.delivery"
+						   class="form-control" placeholder="回复交期"
+						   datepicker-popup="yyyy-MM-dd" is-open="item.$opened"
+						   min-date="order.date" ng-required="true" current-text="今天"
+						   clear-text="清除" close-text="关闭"
+						   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+						   ng-focus="openDatePicker($event, item, '$opened')"> <span
+						class="input-group-btn">
+						<button type="button" class="btn btn-default"
+								ng-click="openDatePicker($event, item, '$opened')">
+							<i class="fa fa-calendar"></i>
+						</button>
+					</span>
+				</div>
+			</td>
+			<td class="br-l">
+				<div ng-if="!item.$editing">
+					<div ng-if="!item.replyQty" class="text-muted text-center">未回复</div>
+					<div ng-if="item.replyQty > 0 && item.replyQty < item.qty">
+						<div class="progress progress-sm">
+							<div class="progress-bar progress-bar-success"
+								 ng-style="{'width': 100*item.replyQty/item.qty + '%'}">
+								<span class="sr-only"></span>
+							</div>
+						</div>
+						已回复 <span class="text-default">{{::item.replyQty}}</span> /
+						<span>{{::item.qty}}</span>
+					</div>
+					<div ng-if="item.replyQty > 0" class="dropdown" ng-class="{'text-center': item.replyQty>=item.qty}">
+						<a href="javascript:void(0);" class="dropdown-toggle text-default"
+						   ng-mouseover="getReply(item)">回复历史<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="reply in ::item.replies">
+										<div class="row row-sm"
+											 ng-class="{'text-inverse': $index==0}">
+											<div class="col-xs-6">
+												<span ng-if="reply.qty < 0"> 撤销</span>
+												数量 {{::reply.qty}}
+											</div>
+											<div class="col-xs-6">交期{{::reply.delivery |
+												date:'yyyy-MM-dd'}}</div>
+										</div>
+										<div class="text-muted">{{::reply.recorder}}&nbsp;&nbsp;{{::reply.date
+											| date:'MM-dd HH:mm'}}&nbsp;回复</div>
+										<div class="text-muted" ng-if="reply.remark != null">备注:{{::reply.remark}}</div>
+									</li>
+								</ul>
+							</div>
+						</div>
+					</div>
+					<div ng-if="item.acceptQty" class="text-success text-center text-bold f14">
+						已验收:{{::item.acceptQty}}{{::item.product.unit}}
+					</div>
+					<div ng-if="item.returnQty" class="text-error text-center text-bold f14">
+						已验退:{{::item.returnQty}}{{::item.product.unit}}
+					</div>
+				</div>
+				<div style="margin: 0 auto" ng-if="item.$editing">
+					<br><br><input type="text" ng-model="item.reply.remark"
+								   class="form-control input-xs" placeholder="回复备注" />
+				</div>
+			</td>
+			<td ng-bind="::order.enName"></td>
+		</tr>
+		<!-- <tr ng-if="!order.$collapsed && searchFilterXls.keyword" style="cursor: pointer;padding: 10px 0;">
+			<td colspan="6" class="text-center text-simple" ng-if="!order.$showAll" style="cursor: pointer;padding: 10px 0;" ng-click="order.$showAll = true">
+				展开所有明细(包括不含关键词的) <i class="fa fa-angle-down"></i>
+			</td>
+			<td colspan="6" class="text-center text-simple" ng-if="order.$showAll" style="cursor: pointer;padding: 10px 0;" ng-click="order.$showAll = false">
+				收起不含关键词的明细 <i class="fa fa-angle-up"></i>
+			</td>
+		</tr> -->
+		</tbody>
+	</table>
+</div>

+ 1 - 1
src/main/webapp/resources/view/vendor/b2b/modal/contact_person_modal.html

@@ -31,7 +31,7 @@
 	}
 </style>
 <div class="cus-person-modal b2b-com-modal" >
-	<p class="title">客户联系人信息 <i class="fa fa-close" ng-click="cancel()"></i></p>
+	<p class="title">联系人信息 <i class="fa fa-close" ng-click="cancel()"></i></p>
 	<form class="contact-info content" name="contactInfo" id="contactInfo">
 		<ul>
 			<li><em><i class="must">*</i>姓名</em><input type="text" placeholder="姓名" ng-model="contact.venduser" required="true" ng-pattern="/^[\u4e00-\u9fa5]{1,6}$|^[\dA-Za-z]{1,12}$/"></li>

+ 1 - 2
src/main/webapp/resources/view/vendor/b2b/sale_inquiry.html

@@ -423,8 +423,7 @@
 				<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>
+					&nbsp;&nbsp;<span class="text-num text-bold" title="{{inquiryItem.inquiry.date}}">日期:<span ng-bind="::inquiryItem.inquiry.date | date:'yyyy-MM-dd'"></span></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"

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

@@ -361,7 +361,7 @@
 				<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 class="text-num text-bold" title="{{inquiryMould.date}}">日期:<span ng-bind="::inquiryMould.date | date:'yyyy-MM-dd'"></span></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>

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

@@ -350,7 +350,7 @@
 			<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 class="text-num text-bold" title="{{quotationItem.date}}">日期:<span ng-bind="::quotationItem.date | date:'yyyy-MM-dd'"></span></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>

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

@@ -408,8 +408,8 @@
 					<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" style="font-size: 14px;">{{tender.endDate | date:'yyyy-MM-dd'}}</td>
+				<td width="150" style="font-size: 14px;">{{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">