Forráskód Böngészése

买家采购订单页面(采购变更单)

wangcz 8 éve
szülő
commit
c12e353b89

+ 60 - 0
src/main/webapp/resources/css/public.css

@@ -0,0 +1,60 @@
+#public .com_title{width: 100%;margin: 0px auto;height: 40px;line-height: 40px;font-size: 14px;color: #323232;background: #f5f5f5;}
+#public .com_title font{color: #3f84f6;}
+#public .com_title .search{position: relative;}
+#public .com_title .search input{width: 300px;padding-left: 10px;height: 36px;background: #fff;float: left;vertical-align: middle;border: #3578ba 1px solid;font-size: 14px;text-align: center;padding-right: 85px;line-height: 36px;}
+#public .com_title .search a.seek{vertical-align: middle;display: inline-block;line-height: 36px;text-align: center;height: 36px;width: 85px;border-left: 0;background: #3578ba;color: #fff;text-align: center;font-size: 16px;float: right;border: #3578ba 1px solid;position: absolute;right: 0;}
+#public .com_title .search a.seek:hover{background: #1f6199;color: #fff;}
+.fl{float: left;}
+.fr{float: right;}
+/*切换导航*/
+#public .menu{background: #fff;padding: 0;border-bottom: #e8e8e8 1px solid;}
+#public .menu .btn-group{width: 100px;border: none;height: 45px;}
+#public .menu .row{height: 40px;line-height: 40px;}
+#public .menu .btn-group > .btn-info{border-bottom: #000 1px solid;}
+#public .menu .btn-group .btn{color: #000;}
+#public .menu .btn-group .btn-info{color: #d32526;background: #fff;border-bottom: #d32526 2px solid !important;}
+#public .menu .btn-group .btn{border: none;font-size: 16px;font-family: "Microsoft YaHei", "微软雅黑";}
+#public .menu .btn-group .btn em{color: #d32526;font-style: inherit;}
+#public .menu .btn-group .btn:hover{background: #fff;color: #d32526;}
+#public #topSearch{font-size: 16px;}
+#public .form-group-sm .form-control{height: 36px;/*line-height: 36px;*/border: #3f84f6 1px solid;border-radius: 0px;font-size: 14px;}
+#public .search-bg .col-xs-6{/*margin-left: 90px;*/}
+#public .search-bg .input-group-addon{width: 70px;height: 36px;display: inline-block;background: #3f84f6;font-size: 16px;text-align: center;line-height: 36px;color: #fff;padding: 0;border: none;border-radius: 0;position: absolute;top: 0;right: 0;}
+#public .order-table .header th,#public .inquiry-table .header th{height: 40px;line-height: 40px;background: none;font-size: 14px;}
+#public .order-table .order-hd,#public .inquiry-table .inquiry-hd{font-size: 14px;}
+#public .order-table .order-hd{ line-height: normal;}
+#public .order-table .order-bd,#public .inquiry-table .inquiry-bd{height: 100px;}
+#public .order-table .order-bd .product,#public .inquiry-table .inquiry-bd .product{line-height: 30px;font-size: 14px;}
+.height10{width: 100%;height: 10px;background: #f5f5f5;}
+#public .order-table .order-bd>td,#public .inquiry-table .inquiry-bd>td{ font-size: 14px;}
+#public .order-table,#public .inquiry-table{  background: #fff; }
+/*购物车*/
+#public .cart-table .header th{height: 40px;line-height: 40px;background: none;font-size: 14px;}
+#public .cart-table .cart-hd{font-size: 14px;}
+#public .cart-table .cart-bd{height: 100px;}
+#public .cart-table .cart-bd .product{line-height: 30px;font-size: 14px;}
+#public .cart-table .cart-bd>td{ font-size: 14px;}
+#public .cart-table{background: #fff;}
+#public .toolbar-top{font-size: 14px;}
+.com-text-1{
+    font-size: 14px;
+    margin-left: 20px;
+}
+
+#public .condition .toggle{
+    font-size: 14px;
+}
+#public .search-bg .col-xs-6{
+    width: 40%;
+    padding: 0;
+}
+#public .search-bg #topSearch{
+    width: 47%;
+}
+#public .toolbar-top .text-center .text-simple{
+    color: #3a89d1;
+    font-size: 14px;
+}
+#public #bg-white,#public #bg-white .search-bg{
+    background: #f5f5f5;
+}

+ 22 - 27
src/main/webapp/resources/js/common/b2bServices.js

@@ -1812,26 +1812,24 @@ 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) {
+        }]).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', {}, {
                 // 获取最新的已采纳的价信息
@@ -1839,9 +1837,8 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
                     url: b2bUrl + '/sale/inquiry/recentPrice/:prId',
                     method: 'GET'
                 }
-            });
-        }])
-        .factory('B2bToken', ['$resource', 'BaseService', function($resource, BaseService) {
+        });
+        }]).factory('B2bToken', ['$resource', 'BaseService', function($resource, BaseService) {
             var b2bUrl = BaseService.getB2bUrl();
             return $resource(b2bUrl + '/token', {}, {
                 info: {
@@ -1849,8 +1846,7 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
                     mehtod: 'GET'
                 }
             })
-        }])
-        .factory('B2bPurchaseOrder', ['$resource', 'BaseService', function($resource, BaseService){
+        }]).factory('B2bPurchaseOrder', ['$resource', 'BaseService', function($resource, BaseService){
             var b2bUrl = BaseService.getB2bUrl();
             return $resource(b2bUrl + '/purchase', {}, {
                 copyorder: {
@@ -1858,8 +1854,7 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
                     method: 'POST'
                 }
             });
-        }])
-        .factory('B2bChange', ['$resource', 'BaseService', function($resource, BaseService) {
+        }]).factory('B2bChange', ['$resource', 'BaseService', function($resource, BaseService) {
             var b2bUrl = BaseService.getB2bUrl();
             return $resource(b2bUrl + '/purc/change/info', {}, {
                 /**

+ 18 - 0
src/main/webapp/resources/js/usercenter/app.js

@@ -504,12 +504,30 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
             templateUrl: "static/view/usercenter/b2b/order/usercenter_order.html",
             controller: 'PurcUsercenterOrderCtrl',
             controllerUrl: 'app/controllers/b2b/order/usercenterOrderCtrl'
+        })).state('purc_order_detail', angularAMD.route({
+            url: "/purc/order/:id",
+            title: '买家中心-B2b采购订单详情页面',
+            templateUrl: "static/view/usercenter/b2b/Purc/order_detail.html",
+            controller: 'PurcOrderDetailCtrl',
+            controllerUrl: 'app/controllers/b2b/Purc/purcOrderDetailCtrl'
         })).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_change_detail', angularAMD.route({
+            url: "/purc/change/:id",
+            title: '买家中心-B2b采购变更单详情页面',
+            templateUrl: "static/view/usercenter/b2b/Purc/change_detail.html",
+            controller: 'PurcChangeDetailCtrl',
+            controllerUrl: 'app/controllers/b2b/Purc/purcChangeDetailCtrl'
+        })).state('purc_change_new', angularAMD.route({
+            url: "/purc/change_new",
+            title: '买家中心-B2b采购变更单新增',
+            templateUrl: "static/view/usercenter/b2b/Purc/change_new.html",
+            controller: 'PurcChangeNewCtrl',
+            controllerUrl: 'app/controllers/b2b/Purc/purcChangeNewCtrl'
         })).state('purc_deputy', angularAMD.route({
             url: "/purc/deputy",
             title: '买家中心-B2b代采订单',

+ 26 - 0
src/main/webapp/resources/js/usercenter/controllers/b2b/Purc/purcChangeDetailCtrl.js

@@ -0,0 +1,26 @@
+/**
+ * 采购变更单详情
+ */
+
+define(['app/app'], function(app) {
+    app.register.controller('PurcChangeDetailCtrl', ['$scope', '$stateParams', 'B2bChange', 'toaster', 'B2bCurrentRole',
+        function ($scope, $stateParams, change, toaster, CurrentRole) {
+            // 获取当前用户是否为普通用户
+            CurrentRole.isUser({}, {}, function (data) {
+                $scope.isUser = data.isUser;
+            });
+            var loadData = function () {
+                change.getItem({id: $stateParams.id}, function (data) {
+                    $scope.change = data;
+                }, function (response) {
+                    toaster.pop('error', '', response.data);
+                });
+            };
+            loadData();
+            $scope.openDatePicker = function ($event, item, openParam) {
+                $event.preventDefault();
+                $event.stopPropagation();
+                item[openParam] = !item[openParam];
+            };
+    }]);
+})

+ 305 - 0
src/main/webapp/resources/js/usercenter/controllers/b2b/Purc/purcChangeNewCtrl.js

@@ -0,0 +1,305 @@
+/**
+ * 采购变更单新增
+ */
+
+define(['app/app'], function(app) {
+    app.register.controller('PurcChangeNewCtrl', ['$scope', 'toaster', 'BaseService', 'AuthenticationService', '$modal', '$filter', 'B2bChange',
+        function ($scope, toaster, BaseService, AuthenticationService, $modal, $filter, change) {
+            // 获取登录人员信息
+            AuthenticationService.getAuthentication().success(function (data) {
+                $scope.user = data;
+                initChange();
+            });
+
+            // 初始化变更单信息
+            var initChange = function () {
+                $scope.change = {
+                    date: new Date(),
+                    recorder: $scope.user.userName,
+                    orderCode: null,
+                    code: 'B2BPC' + $filter('date')(new Date(), 'yyMMddHHmmss_sss'),
+                    orderId: null,
+                    orderChangeItems: []
+                }
+            }
+            $scope.getEnableOrders = function() {
+                initChange();
+                var modalInstance = $modal.open({
+                    animation: true,
+                    size: 'lg',
+                    templateUrl: 'static/view/usercenter/b2b/modal//enableOrderList.html',
+                    controller: 'EnableChangeListCtrl',
+                    resolve: {
+                    }
+                });
+                modalInstance.result.then(function (data) {
+                    $scope.change.orderCode = data.code;
+                    $scope.change.orderId = data.id;
+                    $scope.orderItems = data.orderItems;
+                    $scope.change.oldCurrency = data.currency;
+                    $scope.change.oldPayments = data.payments;
+                    $scope.change.oldRate = data.rate;
+                    $scope.change.vendUU = data.vendUU;
+                    $scope.change.apVendorName = data.receiveName;
+                    $scope.change.vendUserUU = data.vendUserUU;
+                    $scope.change.newCurrency = data.currency != null ? data.currency :null;
+                    $scope.change.newPayments = data.payments != null ? data.payments :null;
+                    angular.forEach($scope.orderItems, function (item, index) {
+                        $scope.change.orderChangeItems.push({
+                            oldProductId: item.productId,
+                            orderItemId: item.id,
+                            orderItemNumber: item.number,
+                            oldQty: item.qty,
+                            oldPrice: item.price,
+                            oldTaxrate: item.taxrate,
+                            oldDelivery: item.delivery,
+                            newQty: item.qty != null ? item.qty :null,
+                            newPrice: item.price != null ? item.price :null,
+                            newTaxrate: item.taxrate != null ? item.taxrate :null,
+                            newDelivery: item.delivery != null ? item.delivery :null,
+                            oldProduct: item.product,
+                            number: index + 1
+                        });
+                    });
+                });
+            }
+
+            // 删除明细
+            $scope.del = function (index) {
+                $scope.change.orderChangeItems.splice(index, 1);
+            }
+
+            $scope.getMinDate = function () {
+                return $filter('date')(new Date, 'yyyy-MM-dd');
+            };
+
+            $scope.openDatePicker = function ($event, openParam, index) {
+                $event.preventDefault();
+                $event.stopPropagation();
+                $scope.change.orderChangeItems[index].$dateOpen = !openParam;
+            };
+
+            $scope.save = function() {
+                if ($scope.change.unNeedReply == null) {
+                    toaster.pop('error', '请选择是否需要供应商确认');
+                } else if ($scope.change.orderChangeItems.length == 0) {
+                    toaster.pop('error', '请至少选择一条采购明细')
+                } else {
+                    change.save({}, $scope.change, function (data) {
+                        window.location.hash = "/purc/change/" + data.id;
+                        toaster.pop('success', '采购变更单保存成功');
+                    }, function(res) {
+                        toaster.pop('error','请输入正确的信息')
+                    });
+                }
+            }
+        }]);
+
+    app.register.controller('EnableChangeListCtrl', ['$scope', 'B2bChange', 'BaseService', 'ngTableParams', 'toaster', '$modalInstance',
+        function ($scope, change, BaseService, ngTableParams, toaster, $modalInstance) {
+            /**
+             * 将日期转化为整数日期
+             */
+            var getDateTime = function (date) {
+                if (angular.isDate(date)) {
+                    return date.getTime();
+                } else {
+                    return null;
+                }
+            };
+
+            /**
+             * 改变单据日期范围
+             */
+            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;
+                }
+            };
+
+            $scope.dateZoneText = '一个月内';
+            $scope.condition = {dateZone: 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.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.tableParams = new ngTableParams({
+                page: 1,
+                count: 5,
+                sorting: {
+                    'id': 'desc'
+                }
+            }, {
+                total: 0,
+                counts: [],
+                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)
+                    };
+                    change.getEnableOrderList.call(null, BaseService.parseParams(pageParams), function (page) {
+                        $scope.loading = false;
+                        if (page) {
+                            params.total(page.totalElement);
+                            $defer.resolve(page.content);
+                        }
+                    }, function (response) {
+                        $scope.loading = false;
+                        toaster.pop('error', '数据加载失败', response.data);
+                    });
+                }
+            });
+
+            $scope.checkedOrder = null;
+            var checkItems = [];
+            // 单选
+            $scope.checkOne = function (order) {
+                var changeflag = false;
+                order.checked = !order.checked;
+                if ((order.checked) && ($scope.checkedOrder != null) && ($scope.checkedOrder != order)) {
+                    $scope.checkedOrder.checked = false;
+                    angular.forEach($scope.checkedOrder.orderItems, function (item) {
+                        item.checked = false;
+                    });
+                    $scope.checkedOrder = null;
+                    checkItems = [];
+                }
+                if (order.checked) {
+                    $scope.checkedOrder = order;
+                    angular.forEach(order.orderItems, function (item) {
+                        if (item.change) {
+                            item.checked = false;
+                            changeflag = true;
+                        } else {
+                            item.checked = true;
+                            checkItems.push(item);
+                        }
+                    });
+                } else {
+                    $scope.checkedOrder = null;
+                    angular.forEach(order.orderItems, function (item) {
+                        item.checked = false;
+                    });
+                    checkItems = [];
+                }
+                if (checkItems.length == 0 && changeflag) {
+                    order.checked =false;
+                    toaster.pop('warning', '提示', "该采购单所有明细正在变更中,在供应商确认之前不可再次变更");
+                }
+            };
+
+            // 明细
+            $scope.checkItem = function (item, order) {
+                // 先判断选中信息
+                if (item.change) {
+                    toaster.pop('warning', '提示', "该明细正在变更中,在供应商确认之前不可再次变更");
+                    item.checked = null;
+                    return;
+                }
+                order.checked = true;
+                if ($scope.checkedOrder != null && order.id != $scope.checkedOrder.id) {
+                    $scope.checkedOrder.checked = false;
+                    $scope.checkedOrder = order;
+                    order.checked = true;
+                    angular.forEach(checkItems, function (checkItem) {
+                        checkItem.checked = false;
+                    });
+                    checkItems = [];
+                }
+                item.checked = !item.checked;
+                if (item.checked) {
+                    checkItems.push(item);
+                    if ($scope.checkedOrder == null) {
+                        $scope.checkedOrder = order;
+                    }
+                    order.checked = true;
+                } else {
+                    angular.forEach(checkItems, function (checkItem, index) {
+                        if (checkItem.id == item.id) {
+                            checkItems.splice(index, 1);
+                        }
+                    });
+                }
+                if (checkItems.length == 0) {
+                    $scope.checkedOrder = null;
+                    order.checked = false;
+                }
+            };
+
+            // 搜索框回车
+            $scope.onSearch = function (keyword) {
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+            };
+
+            $scope.getCartTotal = function (items) {
+                var sum = 0;
+                angular.forEach(items, function (item) {
+                    sum += item.qty * item.price;
+                });
+                return sum;
+            };
+
+            // 选择
+            $scope.choose = function () {
+                if ($scope.checkedOrder == null || checkItems.length == 0) {
+                    toaster.pop('error', '请先选择采购单信息');
+                } else {
+                    $scope.checkedOrder.orderItems = checkItems;
+                    $modalInstance.close($scope.checkedOrder);
+                }
+            }
+
+            // 关闭
+            $scope.close = function () {
+                $modalInstance.dismiss();
+            };
+        }]);
+})

+ 95 - 0
src/main/webapp/resources/js/usercenter/controllers/b2b/Purc/purcOrderDetailCtrl.js

@@ -0,0 +1,95 @@
+/**
+ * 采购单详情
+ */
+
+define(['app/app'], function(app) {
+    app.register.controller('PurcOrderDetailCtrl', ['$scope', '$stateParams', 'B2bPurcOrder', 'B2bPurcOrderItem', 'toaster', 'B2bReportService', 'B2bPurcOrdersInfo', 'B2bCurrentRole',
+        function ($scope, $stateParams, PurcOrder, PurcOrderItem, toaster, ReportService, PurcOrdersInfo, CurrentRole) {
+        // 获取当前用户是否为普通用户
+        CurrentRole.isUser({}, {}, function (data) {
+            $scope.isUser = data.isUser;
+        });
+        var loadData = function () {
+            $scope.loading = true;
+            PurcOrdersInfo.getAll({id: $stateParams.id},{}, function (data) {
+                $scope.order = data;
+                var sum = 0;
+                angular.forEach($scope.order.orderItems, function (item) {
+                    sum += item.qty * item.price;
+                });
+                $scope.order.total = sum;
+                // if($scope.order.display == 1) {//未查看的设为已查看
+                // 	$scope.setDisplay('setRead', $scope.order.id);
+                // }
+                //$scope.loading = false;
+            }, function (response) {
+                toaster.pop('error', '提示', response.data);
+            });
+        };
+        loadData();
+        $scope.getReply = function (item) {
+            if (!item.replies) {
+                PurcOrderItem.getReply({orderItemId: item.id}, function (replies) {
+                    item.replies = replies;
+                });
+            }
+        };
+        $scope.openDatePicker = function ($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
+        };
+
+        $scope.onReplyClick = function (item, inverse) {
+            if (item.reply) {
+                if (!item.reply.qty || item.reply.qty < 0 || item.reply.qty > item.qty) {
+                    toaster.pop('warning', '提示', '请填写有效的回复数量!');
+                    return;
+                }
+                var reply = angular.copy(item.reply);
+                if (reply.delivery) {
+                    if (typeof reply.delivery == 'object')
+                        reply.delivery = reply.delivery.getTime();
+                } else {
+                    reply.delivery = item.delivery;
+                }
+                if (inverse && inverse == -1) reply.qty = -1 * reply.qty;// 取相反
+                $scope.loading = true;
+                PurcOrderItem.reply({orderItemId: item.id}, reply, function () {
+                    $scope.loading = false;
+                    toaster.pop('info', '提示', (inverse == -1 ? '撤销成功' : '回复成功'));
+                    loadData();
+                }, function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '回复失败', response.data);
+                });
+            }
+        };
+
+        //设置为已查看
+        $scope.setDisplay = function (state, orderId) {
+            if (orderId) {//设置单个
+                PurcOrder[state].call({}, {ids: '' + orderId}, function () {
+//					$scope.tableParams.reload();
+                }, function () {
+                    toaster.pop('error', '错误', "设置失败");
+                });
+            } else {//设置已勾选的
+                var str = null;
+                angular.forEach($scope.tableParams.data, function (order) {
+                    if (order.$selected == true) {
+                        if (str != null && str != '') str += ',';
+                        str += order.id;
+                    }
+                });
+                if (str != null && str != '') {
+                    PurcOrder[state].call({}, {ids: '' + str}, function () {
+                        $scope.tableParams.reload();
+                    }, function () {
+                        toaster.pop('error', '错误', "设置失败");
+                    });
+                }
+            }
+        };
+    }]);
+})

+ 2 - 1
src/main/webapp/resources/js/usercenter/controllers/b2b/order/purcChangeListCtrl.js

@@ -6,7 +6,8 @@
  */
 
 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) {
+	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';

+ 367 - 0
src/main/webapp/resources/view/usercenter/b2b/Purc/change_detail.html

@@ -0,0 +1,367 @@
+<style>
+	#order-detail-list {
+		box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		-o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		border-radius: 5px;
+		/*min-height: 1066px;*/
+		background: #fff;
+		width: 1026px;
+		font-size: 14px;
+		float:right;
+	}
+	.pub-com_head, .com_head {
+		width: 100%;
+		height: 35px;
+		line-height: 35px;
+		background: #5078cb;
+		border-radius: 5px 5px 0 0;
+		/* background: url(../img/approvalFlow/comm_bg01.png) no-repeat left; */
+		/* background-color: #f5f5f5; */
+		/* background-size: 100% 100%; */
+	}
+	.pub-com_head span, .com_head span {
+		margin-left: 10px;
+		color: #fff;
+		font-size: 14px;
+		font-weight: bold;
+	}
+	.pub-com_head .p-right {
+		float: right;
+	}
+	.pane .pane-body {
+		/*padding: 15px!important;*/
+	}
+	com_title01, .title-div {
+		/*border-bottom: 1px dashed #3f84f6 !important;*/
+	}
+	.title-div {
+		color: #5078cb;
+		font-size: 14px;
+		font-weight: 600;
+		/*padding-left: 20px !important;*/
+		height: 50px;
+		padding-top: 11px;
+		position: relative;
+		padding-left:18px;
+	}
+	.f14 {
+		font-size: 14px !important;
+	}
+	#order-detail-list .row {
+		width: 96%;
+		margin: 0 auto;
+		line-height: 30px;
+	}
+	.base-info .item {
+		line-height: 26px;
+		/* border-bottom: 1px dotted #e8e8e8; */
+		padding: 5px 0;
+	}
+	#order-detail-list .title {
+		font-weight: inherit;
+	}
+	.base-info .title {
+		float: left;
+		width: 92px;
+		color: #333;
+		font-weight: bold;
+	}
+	#order-detail-list .content {
+		color: #666;
+	}
+	.base-info .content {
+		float: left;
+		white-space: nowrap;
+	}
+	.title-div .end {
+		position: absolute;
+		top: 10px;
+		right: 0;
+		line-height: 24px;
+		padding-left: 15px;
+		background: #fff;
+		z-index: 2;
+	}
+	.block {
+		background-color: #fff;
+		border-radius: 5px;
+		width: 100%;
+		position: relative;
+		margin-bottom: 0px;
+	}
+	#order-detail-list .table-default .header {
+		box-shadow: none;
+		border: none;
+		background: none;
+		background: #f9f9f9;
+	}
+	#order-detail-list .table-default .header th {
+		display: inline-block;
+		border-bottom: none;
+		font-weight: normal;
+		color: #999;
+		text-align: center;
+	}
+	#order-detail-list .table-default th, #order-detail-list .table-default td {
+		/*border-top: #ddd 1px dotted;*/
+	}
+	#order-detail-list .table-default tbody tr {
+		background: none;
+		position: relative;
+	}
+	#order-detail-list .table-default tbody tr td {
+		vertical-align: middle;
+		color: #323232;
+		min-height: 140px;
+		position: relative;
+		padding-top: 25px
+	}
+	[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {
+		display: none !important;
+	}
+	.text-bold {
+		font-weight: 700;
+	}
+
+	.text-num {
+		font-style: normal;
+		word-break: break-all;
+		font-size: 14px;
+	}
+	.text-muted {
+		color: #333;
+		font-size: 14px;
+	}
+	.bottomB {
+		border-bottom: 2px solid #f5f5f5;
+		padding: 15px 30px 15px 15px;
+	}
+
+	.title-div .f14{
+		border-left: 5px solid #5078cb;padding-left: 10px;
+	}
+
+	.order-number {
+		position: absolute;
+		top: -1px;
+		left: -1px;
+		width: 20px;
+		height: 20px;
+		line-height: 20px;
+		text-align: center;
+		background: #f9f9f9;
+		font-weight: 500;
+		border: solid 1px #d5d5d5;
+		border-radius: 0 0 10px 0;
+	}
+	#order-detail-list .table-default tbody tr td.product {
+		padding-left: 30px;
+	}
+	#order-detail-list .table-default tbody tr td{
+		border-right: 1px solid #e8e8e8;
+	}
+	.text-trans {
+		top: -20px;
+	}
+</style>
+<div class="pane base-info" id="order-detail-list">
+	<div class="pub-com_head">
+		<span class="b2b-com-head">采购变更单</span>
+		<div class="p-right">
+			<!-- <a href="#" class="pull-right text-simple"><i
+			class="fa fa-print fa-fw"></i>打印</a> -->
+		</div>
+	</div>
+	<div class="pane-body">
+		<div class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+			<span class="f14">单据信息</span>&nbsp;
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-3">
+				<span class="title">流水号</span>
+				<div class="content" ng-bind="::change.code"></div>
+			</div>
+			<div class="col-xs-3">
+				<span class="title">日期</span>
+				<div class="content" ng-bind="::change.date | date:'yyyy-MM-dd'"></div>
+			</div>
+			<div class="col-xs-6">
+				<span class="title">原供应商</span>
+				<div class="content" ng-bind="::change.apVendorName"></div>
+			</div>
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-3">
+				<span class="title">录单人</span>
+				<div class="content" ng-bind="::change.recorder"></div>
+			</div>
+			<div class="col-xs-9">
+				<span class="title">备注</span>
+				<div class="content" ng-bind="::change.remark"></div>
+			</div>
+		</div>
+		<div class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+			<span class="f14">原采购单</span>&nbsp;
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-3">
+				<span class="title">采购单号</span>
+				<div class="content">
+					<a ng-bind="::change.orderCode"
+						ui-sref="purc.order_detail({id:change.orderId})" target="_blank"></a>
+				</div>
+			</div>
+		</div>
+		<div class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+			<span class="f14">交易信息变更</span>&nbsp;
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-3">
+				<span class="title">币别</span>
+				<div class="content">
+					<span ng-class="{'text-inverse': change.newCurrency != change.oldCurrency}"
+						ng-bind="::change.newCurrency"></span>
+					<s ng-show="(change.newCurrency != change.oldCurrency)  && (change.newCurrency != null)"
+						class="text-muted" ng-bind="::change.oldCurrency"></s>
+					<span ng-show="(change.newCurrency != change.oldCurrency)  && (change.newCurrency == null)"
+					    ng-bind="::change.oldCurrency"></span>
+				</div>
+			</div>
+			<div class="col-xs-3">
+				<span class="title">汇率</span>
+				<div class="text-num content">
+					<span
+						ng-class="{'text-inverse': change.newRate != change.oldRate}"
+						ng-bind="::change.newRate"></span> <s
+						ng-show="(change.newRate != change.oldRate)  && (change.newRate != null)" class="text-muted"
+						ng-bind="::change.oldRate"></s> <span
+						ng-show="(change.newRate != change.oldRate)  && (change.newRate == null)"
+						ng-bind="::change.oldRate"></span>
+				</div>
+			</div>
+			<div class="col-xs-6">
+				<span class="title">付款方式</span>
+				<div class="content">
+					<span ng-class="{'text-inverse': change.newPayments != change.oldPayments}"
+						ng-bind="::change.newPayments"></span>
+					<s ng-show="change.newPayments != change.oldPayments && change.newPayments != null"
+						class="text-muted" ng-bind="::change.oldPayments"></s>
+					<span ng-show="change.newPayments != change.oldPayments && change.newPayments == null"
+					    ng-bind="::change.oldPayments"></span>
+				</div>
+			</div>
+			<div class="col-xs-12">
+				<span class="title" ng-if="change.newApVendorName">应付供应商</span>
+				<div class="content">
+				 	<span 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>
+				</div>
+			</div>
+		</div>
+		<div class="title-div" style="border-bottom: 1px dashed #3f84f6; position: relative;">
+			<span class="f14">产品变更详情</span>
+		</div>
+		<div class="block">
+			<table class="block table table-default table-striped table-hover" style="margin-bottom: 0;">
+				<thead>
+				<tr class="header">
+					<th width="380">产品</th>
+					<th width="100">单价</th>
+					<th width="60">数量</th>
+					<th width="120">交货日期</th>
+					<th width="140">变更内容</th>
+					<th width="70">操作</th>
+				</tr>
+				</thead>
+			</table>
+			<table class="block table table-default table-striped table-hover" ng-class="{'scoroll':order.orderItems.length>10}">
+				<tbody>
+					<tr ng-repeat="item in change.orderChangeItems track by item.id">
+						<td width="380">
+							<div>
+								<span class="text-num text-bold" ng-class="{'text-inverse'}" ng-bind="::item.oldProduct.code"></span><span class="text-muted">(型号)</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 ng-bind="::item.oldProduct.title"></span><span class="text-muted">(名称)</span>
+							</div>
+							<!--<div><span ng-bind="::item.oldProduct.title"></span></div>-->
+							<div>
+								<span ng-class="{'text-inverse'}" ng-bind="::item.oldProduct.spec"></span><span class="text-muted">(规格)</span>
+							</div>
+							<!--<div><span class="text-muted"  ng-bind="::item.oldProduct.spec"></span></div>-->
+						</td>
+						<td class="text-center" width="100">
+							<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" width="60">
+							<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" width="120">
+							<div class="text-num"
+								ng-class="{'text-inverse': item.newDelivery != item.oldDelivery}"
+								ng-bind="::item.newDelivery | date:'yyyy-MM-dd'" style="width: 100%"></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 colspan="2" width="210">
+							<div ng-bind="change.description"></div>
+							<div ng-if="change.agreed == 1" 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-if="change.unNeedReply == 1" class="block">
+								<span class="text-trans success">无需确认</span>
+							</div>
+							<div ng-show="change.agreed == null && change.unNeedReply == 0" class="block">
+								<span class="text-trans success">待供应商确认</span>
+							</div>
+
+						</td>
+					</tr>
+				</tbody>
+			</table>
+		</div>
+	</div>
+</div>

+ 477 - 0
src/main/webapp/resources/view/usercenter/b2b/Purc/change_new.html

@@ -0,0 +1,477 @@
+<style>
+	.width100 {
+		box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		-o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		border-radius: 5px;
+		/*min-height: 1066px;*/
+		background: #fff;
+		width: 1026px;
+		font-size: 14px;
+		padding-bottom:25px;
+		float:right;
+	}
+	.pub-com_head, .com_head {
+		width: 100%;
+		height: 35px;
+		line-height: 35px;
+		background: #5078cb;
+		border-radius: 5px 5px 0 0;
+		/* background: url(../img/approvalFlow/comm_bg01.png) no-repeat left; */
+		/* background-color: #f5f5f5; */
+		/* background-size: 100% 100%; */
+	}
+	.title-div {
+		color: #5078cb;
+		font-size: 14px;
+		font-weight: 600;
+		/*padding-left: 20px !important;*/
+		height: 50px;
+		padding-top: 11px;
+		position: relative;
+		padding-left:18px;
+	}
+	.pub-com_head span, .com_head span {
+		margin-left: 10px;
+		color: #fff;
+		font-size: 14px;
+		font-weight: bold;
+	}
+	.title-div .f14{
+		border-left: 5px solid #5078cb;
+		padding-left: 10px;
+		color: #5078cb;
+	}
+	.purchase_form01 ul li .input01 {
+		width: 255px;
+		border-bottom: #5d5d5d 1px solid !important;
+		height: 34px;
+		line-height: 34px;
+		border: none;
+		position: relative;
+		font-size: 14px;
+		top: -6px;
+		color: #666;
+	}
+
+	.purchase_form01 {
+		border: none;
+		border-bottom: #d0cfcf 1px solid;
+		width: 98%;
+		margin: 0 auto;
+		background: #fff;
+		margin-top: 10px;
+	}
+	.purchase_form01 ul {
+		width: 100%;
+		margin: 0 auto;
+	}
+	.purchase_form01 ul li {
+		width: 100%;
+		height: 40px;
+		line-height: 40px;
+		margin-bottom: 20px;
+	}
+	.purchase_form01 ul li div {
+		width: 50%;
+		float: left;
+		font-size: 14px;
+	}
+	.purchase_form01 ul li div em {
+		width: 147px;
+		float: left;
+		margin-left: 30px;
+		line-height: 40px;
+	}
+	.purchase_form01 ul li div span {
+		width: 255px;
+		float: left;
+		display: inline-block;
+		height: 40px;
+		line-height: 40px;
+		position: relative;
+		color: #666666;
+	}
+	.purchase_form01 ul li .input-group .form-control {
+		width: 200px;
+		background: #fff;
+		border: #bfbfbf 1px solid;
+		border-radius: 0px;
+	}
+	.purchase_form01 ul li .input-group .input-group-btn .btn-sm {
+		width: 37px;
+		height: 34px;
+		z-index: 3;
+		position: absolute;
+		background: #bfbfbf;
+		border: 1px solid #bfbfbf;
+		margin-left: 60px;
+	}
+
+	.purchase .savebtn {
+		width: 100%;
+		height: 36px;
+		margin: 20px 0 40px 0;
+	}
+
+	.purchase .savebtn button {
+		width: 94px;
+		height: 36px;
+		display: inline-block;
+		background: #5078cb;
+		text-align: center;
+		color: #fff;
+		font-size: 14px;
+		float: right;
+		line-height: 36px;
+		margin-right: 40px;
+		border: none;
+	}
+
+	.savebtn button[disabled] {
+		background-color: #A9A9A9;
+	}
+
+	.purchase .savebtn button:hover {
+		background: #1f4fb2;
+	}
+
+	.purchase_form01 ul li div span {
+		width: 255px;
+		float: left;
+		display: inline-block;
+		height: 40px;
+		line-height: 40px;
+		position: relative;
+		color: #666666;
+	}
+	.purchase_form01 ul li .select {
+		height: 34px;
+		line-height: 34px;
+		border: #bfbfbf 1px solid;
+		width: 146px;
+		position: relative;
+		font-size: 14px;
+		padding-left: 10px;
+		/*background: url(../../img/deputyOrder/select.png) no-repeat right;*/
+	}
+
+	/* 日期选择器 */
+	.date-picker span .btn-open {
+		color: #fff;
+		background-color: #5078cb;
+		border-radius: 0;
+		border: 1px solid #5078cb;
+		border-left: none;
+	}
+
+	/* 修改本页内btn的样式 及datepicker中的btn-success的样式 */
+	.date-picker .btn {
+		border-radius: 0;
+	}
+
+	.date-picker .btn-success {
+		background-color: #3f84f6;
+	}
+	.date-picker ul {
+		border-radius: 0;
+	}
+	.date-picker ul div:focus {
+		outline: none;
+		border-radius: 0;
+		border: none;
+	}
+	.purchase_form01 ul li .dropdown-menu {
+		width: 257px;
+		height: 300px;
+	}
+	.purchase_form01 ul li .dropdown-menu span{
+		width: 14px;
+		height: 16px;
+		line-height: 20px;
+	}
+	.purchase_form01 ul li.ng-scope{
+		margin-top: 210px
+	}
+	.purchase_form01 ul li.ng-scope span{
+		width: 120px;
+		height: 50px;
+	}
+
+	.purchase_form01 ul li .input-group .input-group-btn .btn-sm:focus{
+		background: #5078cb;
+	}
+	.purchase_form01 ul li .input-group .form-control {
+		width:200px;
+		background: #fff;
+		border: #bfbfbf 1px solid;
+	}
+	.purchase_form01 ul li .input-group .form-control:focus{
+		border: #5078cb 1px solid;
+	}
+	.purchase_form01 ul li .dropdown-menu li{
+		line-height: 30px;
+	}
+	.purchase_form01 ul li .dropdown-menu button{
+		position: relative;
+		widhth: 46px;
+		height: 30px;
+		border-color: #fff;
+	}
+	.purchase_form01 ul li .dropdown-menu div{
+		width: 255px;
+		height: 220px;
+	}
+
+	.purchase_form01 ul li .dropdown-menu span i{
+		color: white;
+	}
+
+	.purchase_xq dd input{
+		border: none;
+		border-bottom: 1px solid #333;
+		height: 35px;
+		width: 80px;
+		font-size: 14px;
+	}
+
+	.purchase_xq dd input:focus {
+		border-bottom: 1px solid blue;
+	}
+
+	.purchase .input-group .form-control{
+		border-radius: 0px;
+		border: 1px solid #5078cb;
+	}
+
+	.purchase .input-group .input-group-btn i{
+		color: #fff;
+	}
+
+	.purchase .input-group .input-group-btn {
+		width: 37px;
+		height: 34px;
+		position: absolute;
+		right: 74px;
+	}
+	.purchase_xq dl span.wid01{
+		width: 4% !important;
+	}
+	.purchase_xq dl span.wid02{
+		width: 13% !important;
+	}
+	.purchase_xq dl span{
+		width: 9.2% !important;
+	}
+	.purchase_xq dd input{
+		width: 92%;
+	}
+	.purchase_form01 b {
+		color: red;
+	}
+	.com_title01 span{
+		margin-left: 37px;
+	}
+	/*新增变更明细*/
+	.purchase_xq {
+		width: 948px;
+		overflow: auto;
+	}
+	.purchase_xq .table{
+		margin-bottom: 0;
+		table-layout: fixed;
+		border-collapse: collapse;
+		width: 100%;
+	}
+	.purchase_xq .table thead tr>th{
+		font-size: 14px;
+		height: 35px;
+		line-height: 35px;
+		color: #323232;
+		border-bottom: 1px solid #ddd;
+		font-weight: normal;
+		text-align: center;
+	}
+	.purchase_xq .table tbody tr td{
+		width: 100%;
+		text-align: center;
+		overflow: hidden;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		vertical-align: middle;
+	}
+	.purchase_xq .table tbody tr td input{
+		border: none;
+		height: 35px;
+		width: 80px;
+		font-size: 14px;
+	}
+	.purchase_xq .table tbody tr td input:focus {
+		border: #3578ba 1px solid !important;
+		outline: 0;
+		-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
+		box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
+	}
+	.purchase_xq .input-group .form-control {
+		width: 80px;
+		height: 30px;
+		line-height: 30px;
+		border: none;
+		border-radius: 5px;
+		background: #dcdcdc;
+	}
+	.purchase_xq .table tbody tr td input.form-control:focus{
+		border: none!important;
+	}
+	.purchase_xq .table tbody tr td ul.dropdown-menu{
+		min-width: auto !important;
+		display: block;
+		top: 712px;
+		left: 1100.5px!important;
+	}
+	.save button[disabled] {
+		background-color: #A9A9A9;
+	}
+</style>
+<form class="width100" name="orderChange" autocomplete="off" id="orderChange">
+	<div class="warp">
+		<div class="purchase pub-com_head">
+			<div class="com_head"><span>采购变更单</span></div>
+			<div class="purchase_form">
+				<!--基本信息-->
+				<div class="title-div"><span class="f14">基本信息</span></div>
+				<div class="purchase_form01 clearfix">
+					<ul>
+						<li>
+							<div class="fl">
+								<em>变更单号:</em>
+								<span ng-bind="change.code"></span>
+							</div>
+							<div class="fl">
+								<em>采购单号:</em>
+								<div class="input-group">
+                                    <span class="input-group-btn">
+                                        <button class="btn btn-sm" type="button" ng-click="getEnableOrders()"><i class="fa fa-search"></i></button>
+                                    </span>
+									<input type="text" ng-model="change.orderCode" class="form-control" ng-click="getEnableOrders()" readonly>
+								</div>
+							</div>
+						</li>
+						<li>
+							<div class="fr">
+								<em>录入人:</em>
+								<span ng-bind="change.recorder"></span>
+							</div>
+							<div class="fr">
+								<em>录入日期:</em>
+								<span class="has_time" ng-bind="change.date| date: 'yyyy-MM-dd'"></span>
+							</div>
+						</li>
+						<li>
+							<div class="fr">
+								<em>原付款方式:</em>
+								<span ng-bind="change.oldPayments || '无'"></span>
+							</div>
+							<div class="fr">
+								<em>新付款方式:</em>
+								<input ng-model="change.newPayments" list="newPayments" class="select"  placeholder="选择付款方式" />
+								<datalist id="newPayments">
+									<option value="月结30天">月结30天</option>
+									<option value="月结60天">月结60天</option>
+									<option value="现金支付">现金支付</option>
+								</datalist>
+								<!--<span><input type="text" class="input01" ng-model="change.newPayments"></span>-->
+							</div>
+						</li>
+						<li>
+							<div class="fr">
+								<em>原付款币种:</em>
+								<span ng-bind="change.oldCurrency || '无'"></span>
+							</div>
+							<div class="fr">
+								<em>新付款币种:</em>
+								<input ng-model="change.newCurrency" list="newCurrency" class="select"  placeholder="选择付款币种"/>
+								<datalist id="newCurrency">
+									<option value="RMB">RMB</option>
+									<option value="USD">USD</option>
+									<option value="HKD">HKD</option>
+								</datalist>
+							</div>
+						</li>
+						<li>
+							<div class="fr">
+								<em>备注:</em>
+								<span><input type="text" class="input01" ng-model="change.remark"></span>
+							</div>
+							<div class="fr">
+								<em>是否需要供应商确认:</em>
+								<select name="" class="select" ng-model="change.unNeedReply" required="true">
+									<option value="0">是</option>
+									<option value="1">否</option>
+								</select>
+							</div>
+						</li>
+					</ul>
+				</div>
+				<div class="title-div"><span class="f14">变更明细</span></div>
+				<div class="purchase_xq clearfix" scroll-table>
+					<table class="table">
+						<thead>
+						<tr>
+							<th width="60">序号</th>
+							<th width="160">产品名称</th>
+							<th width="160">型号</th>
+							<th width="160">品牌</th>
+							<th width="100">原数量</th>
+							<th width="100">新数量</th>
+							<th width="100">原单价</th>
+							<th width="100">新单价</th>
+							<th width="100">原税率</th>
+							<th width="100">新税率</th>
+							<th width="100">原交货日期</th>
+							<th width="100">新交货日期</th>
+							<th width="130">操作</th>
+						</tr>
+						</thead>
+						<tbody>
+						<tr ng-repeat="item in change.orderChangeItems">
+							<td>{{$index+1}}</td>
+							<td ng-bind="item.oldProduct.title || '-'" title="{{item.oldProduct.title}}"></td>
+							<td ng-bind="item.oldProduct.cmpCode || '-'" title="{{item.oldProduct.cmpCode}}"></td>
+							<td ng-bind="item.oldProduct.brand || '-'" title="{{item.oldProduct.brand}}"></td>
+							<td ng-bind="item.oldQty || '-'" title="{{item.oldQty}}"></td>
+							<td><input type="text" class="text-center" ng-model="item.newQty" placeholder="新数量"
+									   ng-pattern="/^(([0-9]+\.[0-9]{1,3})|([0-9]*[0-9][0-9]*\.[0-9]{1,3})|([0-9]*[0-9][0-9]*))$/" value="111"></td>
+							<td ng-bind="item.oldPrice || '-'" title="{{item.oldPrice}}"></td>
+							<td><input type="text" class="text-center" ng-model="item.newPrice" placeholder="新单价"
+									   ng-pattern="/^(([0-9]+\.[0-9]{1,6})|([0-9]*[0-9][0-9]*\.[0-9]{1,6})|([0-9]*[0-9][0-9]*))$/" ></td>
+							<td ng-bind="item.oldTaxrate || '-'" title="{{item.oldTaxrate}}"></td>
+							<td><input type="text" class="text-center" ng-model="item.newTaxrate" placeholder="新税率"
+									   ng-pattern="/^[0-9][0-9]{0,1}$/"></td>
+							<td ng-bind="item.oldDelivery | date: 'yyyy-MM-dd'" title="{{item.oldDelivery | date: 'yyyy-MM-dd'}}"></td>
+							<td style="overflow: visible;" id="delivery">
+								<input ng-model="item.newDelivery" type="text" class="editable"
+									   placeholder="点击选择时间" datepicker-popup="yyyy-MM-dd" is-open="item.$dateOpen"
+									   min-date="getMinDate()"
+									   current-text="今天" clear-text="清除" close-text="关闭"
+									   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+									   ng-focus="openDatePicker($event, $dateOpen)" readonly
+									   ng-click="openDatePicker($event, item.$dateOpen, $index)">
+							</td>
+							<td>
+								<!--<a ng-click="add($index)" style="color: #1f4fb2">添加</a>-->
+								<a ng-click="del($index)" style="color: #d32526"> 删除</a>
+							</td>
+						</tr>
+						</tbody>
+					</table>
+				</div>
+				<div class="savebtn">
+					<button ng-click="save()" ng-disabled="orderChange.$invalid">提交</button>
+				</div>
+			</div>
+
+		</div>
+	</div>
+</form>

+ 429 - 0
src/main/webapp/resources/view/usercenter/b2b/Purc/order_detail.html

@@ -0,0 +1,429 @@
+<style>
+	.block .product div.text-over {
+		width: 340px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+	.block .product div.text-flow b{
+		float: left;
+	}
+	.block .product div.text-flow span{
+		float: left;
+		display: inline-block;
+		width: 290px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+	.block .product div.text-overflow span{
+		float: left;
+		display: inline-block;
+		width: 340px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+</style>
+<style>
+	#order-detail-list {
+		box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		-o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+		border-radius: 5px;
+		/*min-height: 1066px;*/
+		background: #fff;
+		width: 1026px;
+		font-size: 14px;
+		float:right;
+	}
+	.pub-com_head, .com_head {
+		width: 100%;
+		height: 35px;
+		line-height: 35px;
+		background: #5078cb;
+		border-radius: 5px 5px 0 0;
+		/* background: url(../img/approvalFlow/comm_bg01.png) no-repeat left; */
+		/* background-color: #f5f5f5; */
+		/* background-size: 100% 100%; */
+	}
+	.pub-com_head span, .com_head span {
+		margin-left: 10px;
+		color: #fff;
+		font-size: 14px;
+		font-weight: bold;
+	}
+	.pub-com_head .p-right {
+		float: right;
+	}
+	.pane .pane-body {
+		/*padding: 15px!important;*/
+	}
+	com_title01, .title-div {
+		/*border-bottom: 1px dashed #3f84f6 !important;*/
+	}
+	.title-div {
+		color: #5078cb;
+		font-size: 14px;
+		font-weight: 600;
+		/*padding-left: 20px !important;*/
+		height: 50px;
+		padding-top: 11px;
+		position: relative;
+		padding-left:18px;
+	}
+	.f14 {
+		font-size: 14px !important;
+	}
+	#order-detail-list .row {
+		width: 96%;
+		margin: 0 auto;
+		line-height: 30px;
+	}
+	.base-info .item {
+		line-height: 26px;
+		/* border-bottom: 1px dotted #e8e8e8; */
+		padding: 5px 0;
+	}
+	#order-detail-list .title {
+		font-weight: inherit;
+	}
+	.base-info .title {
+		float: left;
+		width: 92px;
+		color: #333;
+		font-weight: bold;
+	}
+	#order-detail-list .content {
+		color: #666;
+	}
+	.base-info .content {
+		float: left;
+		white-space: nowrap;
+	}
+	.title-div .end {
+		position: absolute;
+		top: 10px;
+		right: 0;
+		line-height: 24px;
+		padding-left: 15px;
+		background: #fff;
+		z-index: 2;
+	}
+	.block {
+		background-color: #fff;
+		border-radius: 5px;
+		width: 100%;
+		position: relative;
+		margin-bottom: 0px;
+	}
+	#order-detail-list .table-default .header {
+		box-shadow: none;
+		border: none;
+		background: none;
+		background: #f9f9f9;
+	}
+	#order-detail-list .table-default .header th {
+		display: inline-block;
+		border-bottom: none;
+		font-weight: normal;
+		color: #999;
+		text-align: center;
+	}
+	#order-detail-list .table-default th, #order-detail-list .table-default td {
+		/*border-top: #ddd 1px dotted;*/
+	}
+	#order-detail-list .table-default tbody tr {
+		background: none;
+		position: relative;
+	}
+	#order-detail-list .table-default tbody tr td {
+		vertical-align: middle;
+		color: #323232;
+		min-height: 140px;
+		position: relative;
+		padding-top: 25px
+	}
+	[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {
+		display: none !important;
+	}
+	.text-bold {
+		font-weight: 700;
+	}
+
+	.text-num {
+		font-style: normal;
+		word-break: break-all;
+		font-size: 14px;
+	}
+	.text-muted {
+		color: #333;
+		font-size: 14px;
+	}
+	.bottomB {
+		border-bottom: 2px solid #f5f5f5;
+		padding: 15px 30px 15px 15px;
+	}
+
+	.title-div .f14{
+		border-left: 5px solid #5078cb;padding-left: 10px;
+	}
+
+	.order-number {
+		position: absolute;
+		top: -1px;
+		left: -1px;
+		width: 20px;
+		height: 20px;
+		line-height: 20px;
+		text-align: center;
+		background: #f9f9f9;
+		font-weight: 500;
+		border: solid 1px #d5d5d5;
+		border-radius: 0 0 10px 0;
+	}
+	#order-detail-list .table-default tbody tr td.product {
+		padding-left: 30px;
+	}
+	#order-detail-list .table-default tbody tr td{
+		border-right: 1px solid #e8e8e8;
+	}
+	.text-trans {
+		top: -20px;
+	}
+</style>
+<!--<div class="loading" ng-class="{'in': loading}">
+	<i></i>
+</div>-->
+<div class="pane base-info" id="order-detail-list">
+	<div class="pub-com_head">
+		<span>采购单</span>
+		<div class="p-right">
+			<!-- <a ng-click="print(order)" class="pull-right text-simple"><i
+				class="fa fa-print fa-fw"></i>打印</a> -->
+		</div>
+	</div>
+	<div class="pane-body">
+		<div class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+			<span class="f14">采购资料</span>&nbsp;
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-3">
+				<span class="title">采购单号</span>
+				<div class="content" ng-bind="::order.code"></div>
+			</div>
+			<div class="col-xs-3">
+				<span class="title">日期</span>
+				<div class="content" ng-bind="::order.date | date:'yyyy-MM-dd'"></div>
+			</div>
+			<div class="col-xs-6">
+				<span class="title">供应商</span>
+				<div class="content" ng-bind="::order.receiveName"></div>
+			</div>
+		</div>
+		<div class="row row-sm item">
+			<!--<div class="col-xs-3">
+				<span class="title">采购类型</span>
+				<div class="content" ng-bind="::order.type"></div>
+			</div>-->
+			<div class="col-xs-3">
+				<span class="title">录单人</span>
+				<div class="content" ng-bind="::order.recorder"></div>
+			</div>
+			<!--<div class="col-xs-3">
+				<span class="title">审批人</span>
+				<div class="content" ng-bind="::order.auditor"></div>
+			</div>
+			<div class="col-xs-3">
+				<span class="title">采购员</span>
+				<div class="content" ng-bind="::order.user.userName"></div>
+			</div>-->
+		</div>
+		<div class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+			<span class="f14">交易信息</span>&nbsp;
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-3">
+				<span class="title">币别</span>
+				<div class="content" ng-bind="::order.currency"></div>
+			</div>
+			<div class="col-xs-3">
+				<span class="title">金额</span>
+				<div ng-if="!isUser" class="content" ng-bind="::order.total | number:2"></div>
+			</div>
+			<div class="col-xs-6">
+				<span class="title">付款方式</span>
+				<div class="content" ng-bind="::order.payments"></div>
+			</div>
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-9">
+				<span class="title">交货地址</span>
+				<div class="content" ng-bind="::order.shipAddress"></div>
+			</div>
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-12">
+				<span class="title">备注</span>
+				<div class="content-hide content" ng-bind="::order.remark"></div>
+			</div>
+		</div>
+		<div class="title-div" style="border-bottom: 1px dashed #3f84f6;">
+			<span class="f14">物料清单</span>&nbsp;
+		</div>
+		<div class="block">
+			<table class="block table table-default table-striped table-hover" style="margin-bottom: 0;">
+				<thead>
+				<tr class="header">
+					<th width="50">序号</th>
+					<th width="270">物料</th>
+					<th width="110">单价</th>
+					<th width="100">数量</th>
+					<th width="120">交货日期</th>
+					<th width="160">回复状态</th>
+					<th width="100"></th>
+				</tr>
+				</thead>
+			</table>
+			<table class="block table table-default table-striped table-hover" ng-class="{'scoroll':order.orderItems.length>10}">
+				<tbody>
+				<tr ng-repeat="item in order.orderItems track by item.id">
+					<td class="text-center text-num f-16 text-success "  width="50">
+						<span ng-bind="::item.number"></span>
+					</td>
+					<td width="270" class="product">
+						<div class="text-num text-bold text-overflow" title="{{::item.product.code}}">
+							<span ng-bind="::item.product.code"></span>
+						</div>
+						<div class="text-overflow" title="{{::item.product.title}}">
+							<span ng-bind="::item.product.title"></span>
+						</div>
+						<div class="text-muted text-over" ng-bind="::item.product.spec" title="{{::item.product.spec}}"></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" width="110">
+						<div ng-if="!isUser" class="text-num" ng-bind="::item.price | number:6"></div>
+						<div class="text-muted">税率:{{::item.taxrate || 0}}%</div>
+					</td>
+					<td class="text-center"  width="100">
+						<div class="text-num" 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="text" 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" width="120">
+						<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"
+								   ng-init="item.reply.delivery=parseDate(item.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 width="160">
+						<div ng-show="!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}}{{::reply.date
+													| date:'yyyy-MM-dd HH:mm:ss'}}回复</div>
+												<div class="text-muted" ng-if="reply.remark != null">备注:{{::reply.remark}}</div>
+											</li>
+										</ul>
+									</div>
+								</div>
+							</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>
+						<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>
+					</td>
+					<td class="text-center" width="100">
+						<div ng-if="item.replyQty>=item.qty" class="block">
+							<span class="text-trans success">已回复</span>
+						</div>
+						<div ng-if="item.end" class="block">
+							<span class="text-trans warning">已结案</span>
+						</div>
+						<!-- <div
+                            ng-if="(!item.replyQty || item.replyQty<=item.qty) && !item.end">
+                            <br ng-if="item.replyQty>=item.qty">
+                            <br ng-if="item.replyQty>=item.qty">
+                            <div ng-show="!item.$editing">
+                                <a ng-click="item.$editing=!item.$editing">回复</a>
+                            </div>
+                            <div ng-if="item.$editing">
+                                <div>
+                                    <a ng-click="item.$editing=!item.$editing">取消</a>
+                                </div>
+                                <br>
+                                <div class="text-left">
+                                    <a ng-click="onReplyClick(item)" class="text-inverse">
+                                        <i class="fa fa-arrow-up"></i> 确认回复
+                                    </a>
+                                    <br>
+                                    <a ng-click="onReplyClick(item, -1)" class="text-muted" title="减去已回复数量">
+                                        <i class="fa fa-arrow-down"></i> 撤销回复</a>
+                                </div>
+                            </div>
+                        </div> -->
+					</td>
+				</tr>
+				</tbody>
+			</table>
+		</div>
+	</div>
+</div>

+ 315 - 0
src/main/webapp/resources/view/usercenter/b2b/modal/enableOrderList.html

@@ -0,0 +1,315 @@
+<style>
+    .pub-com_head, .com_head {
+        width: 100%;
+        height: 35px;
+        line-height: 35px;
+        background: #3f84f6;
+        border-radius: 5px 5px 0 0;
+        /* background: url(../img/approvalFlow/comm_bg01.png) no-repeat left; */
+        /* background-color: #f5f5f5; */
+        /* background-size: 100% 100%; */
+    }
+    .pub-com_head span, .com_head span {
+        margin-left: 10px;
+        color: #fff;
+        font-size: 14px;
+        font-weight: bold;
+    }
+    .pub-com_head .p-right {
+        float: right;
+    }
+    .pub-com_head .p-right a {
+        color: #fff !important;
+        font-size: 14px;
+        margin-right: 20px;
+    }
+
+    [ng-click] {
+        cursor: pointer;
+    }
+.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;
+}
+
+.toolbar label {
+	margin-right: 10px;
+	margin-bottom: 0;
+}
+
+.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-sum {
+	padding: 0 5px;
+}
+.order-table>tbody:hover{
+	border: #3f84f6 2px solid !important;
+}
+
+.order-table .operates i {
+	padding: 0 2px;
+}
+
+.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;
+}
+
+.buy-cart a{
+	color: #5078cb;
+	float: left;
+	margin-left: 15px;
+}
+.buy-cart a img{
+	margin-right: 3px;
+}
+.modal-body {
+    max-height: 350px;
+    overflow: auto;
+}
+</style>
+<link rel="stylesheet" href="static/css/public.css">
+<div class="block" id="public">
+    <div class="loading in" ng-class="{'in': loading}">
+        <div class="wrap">
+            <div class="outer"></div>
+        </div>
+        <!-- TODO 这里有点奇怪 -->
+    </div>
+    <div class="pub-com_head">
+        <span>采购订单</span>
+        <div class="p-right">
+            <a ng-click="close()" type="button">X</a>
+        </div>
+    </div>
+    <div class="condition block">
+        <div class="search-bg condition block" style="padding: 10px 15px;">
+            <div class="row">
+                <div id="topSearch" style="float: left">
+                    <a ng-click="changeDateZone(1);condition.$open=false" title="最近一个月"
+                       ng-class="{'active':condition.dateZone=='1'}">最近一个月</a>
+                    <a ng-click="changeDateZone(3);condition.$open=false" title="最近三个月"
+                       ng-class="{'active':condition.dateZone=='3'}">最近三个月</a>
+                    <a ng-click="changeDateZone(6);condition.$open=false" title="最近六个月"
+                       ng-class="{'active':condition.dateZone=='6'}">最近六个月</a>
+                    <a ng-click="condition.$open=!condition.$open;changeDateZone(-1)" title="自定义"
+                       ng-class="{'active':condition.dateZone=='-1'}">自定义</a>
+                </div>
+                <div class="col-xs-6" style="float: right;">
+                    <div class="search">
+                        <div class="form-group form-group-sm has-feedback" dropdown auto-close="outsideClick"
+                             on-toggle="searchAdvance=open">
+                            <input type="search" class="form-control input-sm" ng-model="keyword"
+                                   ng-search="onSearch(keyword)" placeholder="输入单据编号、客户名称、物料名称搜索" style="width: 100%"/>
+                            <a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="more-list more" ng-class="{'open': condition.$open}">
+                <form class="form-inline">
+                    <div class="form-group ">
+                        <label>日期:</label>
+                        <div class="btn-group btn-menu" dropdown is-open="condition.$dateZoneOpen">
+                            <ul class="dropdown-menu">
+                                <li><a ng-click="changeDateZone(1)">一个月内</a></li>
+                                <li><a ng-click="changeDateZone(6)">半年内</a></li>
+                                <li><a ng-click="changeDateZone()">半年前</a></li>
+                            </ul>
+                        </div>
+                        <div class="form-group input-group input-group-xs input-trigger">
+                            <input type="text" ng-model="condition.dateFrom"
+                                   class="form-control" placeholder="从"
+                                   datepicker-popup="yyyy-MM-dd" is-open="condition.$fromOpened"
+                                   ng-required="true" max-date="condition.dateTo"
+                                   current-text="今天" clear-text="清除" close-text="关闭"
+                                   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                                   ng-focus="openFilterDatePicker($event, condition, '$fromOpened')">
+                            <span class="input-group-btn">
+						<button type="button" class="btn btn-default"
+                                ng-click="openFilterDatePicker($event, condition, '$fromOpened')">
+							<i class="fa fa-calendar"></i>
+						</button>
+					</span>
+                        </div>
+                        <div class="form-group input-group input-group-xs input-trigger">
+                            <input type="text" ng-model="condition.dateTo"
+                                   class="form-control" placeholder="到"
+                                   datepicker-popup="yyyy-MM-dd" is-open="condition.$toOpened"
+                                   ng-required="true" min-date="condition.dateFrom"
+                                   current-text="今天" clear-text="清除" close-text="关闭"
+                                   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                                   ng-focus="openFilterDatePicker($event, condition, '$toOpened')">
+                            <span class="input-group-btn">
+						<button type="button" class="btn btn-default"
+                                ng-click="openFilterDatePicker($event, condition, '$toOpened')">
+							<i class="fa fa-calendar"></i>
+						</button>
+					</span>
+                        </div>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+    <div class="modal-body">
+        <table class="order-table block" ng-table="tableParams" style="width:100%;">
+            <thead>
+                <tr class="header">
+                    <th width="50">选择</th>
+                    <th>物料</th>
+                    <th width="80">含税单价</th>
+                    <th width="100">税率</th>
+                    <th width="100">数量</th>
+                    <th width="120">交货日期</th>
+                </tr>
+            </thead>
+            <tbody ng-if="tableParams.total() == 0">
+            <tr>
+                <td colspan="6">
+                    <div id="empty">
+                        <div class="left_img">
+                            <a href="http://www.ubtob.com/" target="_blank" title="优软云首页"><img
+                                    src="static/img/empty/uas_empty.png"></a>
+                            <a href="#/index" title="B2B商务首页">B2B 商务</a>
+                        </div>
+                        <div class="right_link">
+                            <p>当前没有对应的采购订单!</p>
+                        </div>
+                    </div>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="6">
+                    <div id="empty_info">
+                        <div class="f16 text-center empty_title">
+                            <p>为什么我没有采购订单?</p>
+                        </div>
+                        <div class="f14 empty_explain">
+                            <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" class="item-body">
+            <tr class="order-hd"
+                ng-class="{'text-bold': order.display>0}">
+                <td class="text-center">
+                    <input type="checkbox" ng-click="checkOne(order)" ng-model="!item.change && order.checked" >
+                </td>
+                <td class="first" colspan="4">
+                    <div class="order-main">
+					<span class="text-num text-bold"
+                          ng-bind="::order.date | date:'yyyy-MM-dd'"></span>
+                        <span>订单号:<a
+                                class="text-num" ng-bind="::order.code" target="_self"></a></span>
+                        <span ng-bind="::order.receiveName"></span>
+                    </div>
+                </td>
+                <td class="order-sum">{{::order.currency}}: <span
+                        ng-bind="getCartTotal(order.orderItems) | number : 2"
+                        class="text-num text-bold"></span>
+                </td>
+            </tr>
+            <tr class="order-bd" ng-repeat="item in order.orderItems">
+                <td class="text-center">
+                    <input type="checkbox" ng-click="checkItem(item, order, $index)" ng-model="!item.change && item.checked">
+                </td>
+                <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-bold">
+                        <span ng-bind="::item.product.code"></span>
+                    </div>
+                    <div>
+                        <span ng-bind="::item.product.title"></span>
+                    </div>
+                    <div class="text-muted"
+                         ng-bind="::item.product.spec"></div>
+                    <div class="text-muted text-bold" ng-if="item.vendspec"><span ng-bind="::item.vendspec"></span>
+                    </div>
+                    <div class="text-bold text-inverse" ng-if="item.factory">送货工厂:<span ng-bind="::item.factory"></span>
+                    </div>
+                    <div class="text-bold text-inverse" ng-if="item.remark">备注:<span ng-bind="::item.remark"></span>
+                    </div>
+                </td>
+                <td class="text-center">
+                    <div class="text-num" 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" ng-bind="::item.qty"></div>
+                    <div class="text-muted" ng-bind="::item.product.unit"></div>
+                </td>
+                <td class="text-center br-l">
+                    <div class="text-num" ng-bind="::item.delivery | date:'yyyy-MM-dd'"></div>
+                </td>
+            </tr>
+            </tbody>
+        </table>
+    </div>
+    <div class="modal-footer">
+        <a class="btn btn-success btn-sm" ng-click="choose()">确定</a>
+        <a class="btn btn-danger btn-sm" ng-click="close()"> 取消</a>
+    </div>
+</div>

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

@@ -124,7 +124,7 @@
 			<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>
+				<a class="tab_add" ui-sref="purc_change_new" 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>
@@ -248,11 +248,11 @@
 					<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"
+								 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>
+								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;">-->

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

@@ -371,7 +371,7 @@
 						  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"
+								 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>