Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dongbw 8 years ago
parent
commit
9e8004e047

+ 3 - 2
src/main/java/com/uas/platform/b2b/controller/SaleInquiryController.java

@@ -687,12 +687,13 @@ public class SaleInquiryController {
 	@RequestMapping(value = "/xls", params = RequestState.INVALID, method = RequestMethod.GET)
 	@RequestMapping(value = "/xls", params = RequestState.INVALID, method = RequestMethod.GET)
 	public ModelAndView exportInvalid(PageParams params, String searchFilter) {
 	public ModelAndView exportInvalid(PageParams params, String searchFilter) {
 		params.setPage(1);
 		params.setPage(1);
-		params.setCount(SearchConstants.TOP_NUM);
+		params.setCount(1000);
 		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
 		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
 		ModelAndView modelAndView = new ModelAndView();
 		ModelAndView modelAndView = new ModelAndView();
 		modelAndView.addObject("dateFormat", dateFormat);
 		modelAndView.addObject("dateFormat", dateFormat);
 		modelAndView.addObject("state", "已失效");
 		modelAndView.addObject("state", "已失效");
-		modelAndView.addObject("data", getInvalidInquiries(params, searchFilter).getContent());
+		//getPurchaseInquiriesInvalid getInvalidInquiries
+		modelAndView.addObject("data", getPurchaseInquiriesInvalid(params, searchFilter).getContent());
 		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/sale/saleInquiry", "客户询价单列表_已失效"));
 		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/sale/saleInquiry", "客户询价单列表_已失效"));
 		logger.log("客户询价单", "导出Excel列表", "导出已失效Excel列表");
 		logger.log("客户询价单", "导出Excel列表", "导出已失效Excel列表");
 		return modelAndView;
 		return modelAndView;

+ 13 - 0
src/main/java/com/uas/platform/b2b/controller/SaleNoticeController.java

@@ -7,6 +7,7 @@ import java.util.List;
 
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 
 
+import com.alibaba.fastjson.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.http.ResponseEntity;
@@ -871,4 +872,16 @@ public class SaleNoticeController {
 		modelMap.put("all", all);
 		modelMap.put("all", all);
 		return modelMap;
 		return modelMap;
 	}
 	}
+
+    /**
+     * 通过前端传输的id数组寻找发货单信息
+     * @param ids
+     * @return
+     */
+	@RequestMapping(value = "/findByIds", method = RequestMethod.GET)
+    @ResponseBody
+    public List<PurchaseNotice> findByIds(String ids) {
+        List<Long> idList = JSONObject.parseArray(ids, Long.class);
+        return purchaseNoticeService.findByIds(idList);
+    }
 }
 }

+ 8 - 0
src/main/java/com/uas/platform/b2b/service/PurchaseNoticeService.java

@@ -314,4 +314,12 @@ public interface PurchaseNoticeService {
     List<Object[]> getNoticeCount(String category);
     List<Object[]> getNoticeCount(String category);
 
 
 	SPage<PurchaseNotice> findDoneNoticesByPageInfo(PageInfo pageInfo, String keyword, SearchFilter filter);
 	SPage<PurchaseNotice> findDoneNoticesByPageInfo(PageInfo pageInfo, String keyword, SearchFilter filter);
+
+    /**
+     * 通过ids查询发货信息
+     *
+     * @param ids
+     * @return
+     */
+    List<PurchaseNotice> findByIds(List<Long> ids);
 }
 }

+ 6 - 1
src/main/java/com/uas/platform/b2b/service/impl/PurchaseNoticeServiceImpl.java

@@ -233,7 +233,12 @@ public class PurchaseNoticeServiceImpl implements PurchaseNoticeService {
 		return noticeSpage;
 		return noticeSpage;
 	}
 	}
 
 
-	@Override
+    @Override
+    public List<PurchaseNotice> findByIds(List<Long> ids) {
+        return purchaseNoticeDao.findAll(ids);
+    }
+
+    @Override
 	public Page<PurchaseNotice> findDoneByPageInfo(final PageInfo pageInfo, final String keyword, final Long fromDate,
 	public Page<PurchaseNotice> findDoneByPageInfo(final PageInfo pageInfo, final String keyword, final Long fromDate,
 			final Long endDate) {
 			final Long endDate) {
 		return purchaseNoticeDao.findAll(new Specification<PurchaseNotice>() {
 		return purchaseNoticeDao.findAll(new Specification<PurchaseNotice>() {

+ 102 - 46
src/main/webapp/resources/js/index/app.js

@@ -2042,7 +2042,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             VendorService.exportXls.get({}, {}, function (data) {
             VendorService.exportXls.get({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + 'vendor/customer/xls?keyword='+ ($scope.keywordXls || '');
+                    window.location.href = 'vendor/customer/xls?keyword='+ ($scope.keywordXls || '');
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -2845,7 +2845,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             $scope.exportXls = function () {
             $scope.exportXls = function () {
                 PurcOrders.exportXls({}, {}, function (data) {
                 PurcOrders.exportXls({}, {}, function (data) {
                     if (data.success){
                     if (data.success){
-                        window.location.href = window.location.origin + window.location.pathname + '/sale/orders/purc/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                        window.location.href = 'sale/orders/purc/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                     }
                     }
                 }, function (response) {
                 }, function (response) {
                     toaster.pop('error', '数据加载失败', response.data);
                     toaster.pop('error', '数据加载失败', response.data);
@@ -3273,8 +3273,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcOrderItem.exportXls({}, {}, function (data) {
             PurcOrderItem.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/orders/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'sale/orders/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -3560,7 +3559,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcChange.exportXls({}, {}, function (data) {
             PurcChange.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/changes/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'sale/changes/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -3946,7 +3945,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcInquiry.exportXls({}, {}, function (data) {
             PurcInquiry.exportXls({}, {}, function (data) {
                 if (data.success) {
                 if (data.success) {
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/inquiry/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'sale/inquiry/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -4918,7 +4917,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurchaseInquiry.exportXls({}, {}, function (data) {
             PurchaseInquiry.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/purc/inquiry/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'purc/inquiry/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -5743,7 +5742,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcInquiryMould.exportXls({}, {}, function (data) {
             PurcInquiryMould.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/mould/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'sale/mould/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -6078,7 +6077,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             Quotation.exportXls({}, {}, function (data) {
             Quotation.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/quotation/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'sale/quotation/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -6503,6 +6502,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             $scope.isUser = data.isUser;
             $scope.isUser = data.isUser;
         });
         });
 
 
+        // 用来记录已经选择的id
+        $rootScope.ids = [];
+
         $scope.active = 'todo';
         $scope.active = 'todo';
         $scope.currency = Symbol.currency;
         $scope.currency = Symbol.currency;
         $scope.dateZoneText = '不限';
         $scope.dateZoneText = '不限';
@@ -6564,6 +6566,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                         $scope.keywordXls = angular.copy($scope.keyword);//保存当前取值的关键词
                         $scope.keywordXls = angular.copy($scope.keyword);//保存当前取值的关键词
                         $scope.fromDateXls = angular.copy($scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null);//保存当前取值的起始日期
                         $scope.fromDateXls = angular.copy($scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null);//保存当前取值的起始日期
                         $scope.endDateXls = angular.copy($scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null);//保存当前取值的截止日期
                         $scope.endDateXls = angular.copy($scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null);//保存当前取值的截止日期
+
+                        angular.forEach(page.content, function (notice) {
+                            if ($rootScope.ids.indexOf(notice.id) > -1) {
+                                notice.$selected = true;
+                            }
+                        });
                     }
                     }
                 }, function (response) {
                 }, function (response) {
                     $scope.loading = false;
                     $scope.loading = false;
@@ -6699,13 +6707,47 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.checkboxes = {
         $scope.checkboxes = {
             checked: false
             checked: false
         };
         };
+        angular.forEach($scope.tableParams.data, function (item) {
+            $scope.checkboxes.checked = false;
+            if($rootScope.ids.in_array(item.id)) {
+                $rootScope.ids.remove(item.id);
+                $scope.checkboxes.checked = true;
+            }
+        });
 
 
         // 点击勾选全部的复选框
         // 点击勾选全部的复选框
         $scope.checkAll = function () {
         $scope.checkAll = function () {
             angular.forEach($scope.tableParams.data, function (item) {
             angular.forEach($scope.tableParams.data, function (item) {
-                if (!item.waiting)
+                if (!item.waiting) {
                     item.$selected = $scope.checkboxes.checked;
                     item.$selected = $scope.checkboxes.checked;
+                    if(item.$selected) {
+                        if(!$rootScope.ids.in_array(item.id)) {
+                            $rootScope.ids.push(item.id);
+                        }
+                    } else {
+                       if($rootScope.ids.in_array(item.id)) {
+                           $rootScope.ids.remove(item.id);
+                       }
+                    }
+
+                }
             });
             });
+            console.log($rootScope.ids);
+        };
+
+        // 判断数组中是否存在某个对象
+        Array.prototype.S = String.fromCharCode(2);
+        Array.prototype.in_array = function(e) {
+            var r = new RegExp(this.S + e + this.S);
+            return (r.test(this.S + this.join(this.S) + this.S));
+        }
+
+        // 从数组中移除某个对象
+        Array.prototype.remove = function(val) {
+            var index = this.indexOf(val);
+            if (index > -1) {
+                this.splice(index, 1);
+            }
         };
         };
 
 
         // 点击其中一个明细的复选框
         // 点击其中一个明细的复选框
@@ -6717,7 +6759,15 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                     return;
                     return;
                 }
                 }
             });
             });
-            $scope.checkboxes.checked = result;
+            if(order.$selected) {
+                if(!$rootScope.ids.in_array(order.id)) {
+                    $rootScope.ids.push(order.id);
+                }
+            } else {
+                if($rootScope.ids.in_array(order.id)) {
+                    $rootScope.ids.remove(order.id);
+                }
+            }
         };
         };
 
 
         // 打开批量发货模态框
         // 打开批量发货模态框
@@ -6733,7 +6783,10 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
     				},
     				},
     				token: function() {
     				token: function() {
     					return $scope.token;
     					return $scope.token;
-    				}
+    				},
+                    ids: function() {
+                        return $rootScope.ids;
+                    }
     			}
     			}
     		});
     		});
 			 modalInstance.result.then(function () {
 			 modalInstance.result.then(function () {
@@ -6820,7 +6873,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcNotice.exportXls({}, {}, function (data) {
             PurcNotice.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/notice/xls?_state='+$scope.active+
+                    window.location.href = 'sale/notice/xls?_state='+$scope.active+
                         '&keyword='+($scope.keywordXls || '')+'&fromDate='+$scope.fromDateXls+'&endDate='+$scope.endDateXls;
                         '&keyword='+($scope.keywordXls || '')+'&fromDate='+$scope.fromDateXls+'&endDate='+$scope.endDateXls;
                 }
                 }
             }, function (response) {
             }, function (response) {
@@ -6829,8 +6882,13 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         }
         }
     }]);
     }]);
 
 
-    app.controller('SaleNoticeSendByBatchCtrl', ['$scope', '$modalInstance', 'Symbol', 'selectedNotices', 'PurcNotice', 'toaster', '$state', '$timeout', 'token', function ($scope, $modalInstance, Symbol, selectedNotices, PurcNotice, toaster, $state, $timeout, token) {
-        $scope.notices = angular.copy(selectedNotices);
+    app.controller('SaleNoticeSendByBatchCtrl', ['$scope', '$modalInstance', 'Symbol', 'selectedNotices', 'PurcNotice', 'toaster', '$state', '$timeout', 'token', 'ids', '$rootScope', function ($scope, $modalInstance, Symbol, selectedNotices, PurcNotice, toaster, $state, $timeout, token, ids, $rootScope) {
+        // $scope.notices = angular.copy(selectedNotices);
+        PurcNotice.findByIds({ids : angular.toJson(ids)},  function(data) {
+            $scope.notices = angular.copy(data);
+        }, function(res) {
+            toaster.pop('error', '提示', '发货提醒查询失败');
+        });
         $scope.currency = Symbol.currency;//将币别转化为对应的符号
         $scope.currency = Symbol.currency;//将币别转化为对应的符号
         $scope.saleSend = {
         $scope.saleSend = {
             code: '',
             code: '',
@@ -6898,21 +6956,19 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             var num = 1;
             var num = 1;
             var valid = true;
             var valid = true;
             angular.forEach($scope.notices, function (item, key) {
             angular.forEach($scope.notices, function (item, key) {
-                if (item.$selected) {
-                    if (a == 0) {//第一次
-                        $scope.saleSend.currency = item.orderItem.order.currency;
-                        $scope.saleSend.custUU = item.enUU;
-                        $scope.saleSend.payments = item.orderItem.order.payments;
-                        a = 1;
-                    } else {//其他
-                        if ($scope.saleSend.currency != item.orderItem.order.currency) valid = false;
-                        if ($scope.saleSend.custUU != item.enUU) valid = false;
-                        if ($scope.saleSend.payments != item.orderItem.order.payments) valid = false;
-                    }
-                    $scope.saleSend.sendItems.push({
-                        noticeId: item.id, qty: item.thisSendQty, price: item.orderItem.price, number: num++
-                    });
+                if (a == 0) {//第一次
+                    $scope.saleSend.currency = item.orderItem.order.currency;
+                    $scope.saleSend.custUU = item.enUU;
+                    $scope.saleSend.payments = item.orderItem.order.payments;
+                    a = 1;
+                } else {//其他
+                    if ($scope.saleSend.currency != item.orderItem.order.currency) valid = false;
+                    if ($scope.saleSend.custUU != item.enUU) valid = false;
+                    if ($scope.saleSend.payments != item.orderItem.order.payments) valid = false;
                 }
                 }
+                $scope.saleSend.sendItems.push({
+                    noticeId: item.id, qty: item.thisSendQty, price: item.orderItem.price, number: num++
+                });
             });
             });
             if (!valid) {
             if (!valid) {
                 toaster.pop('error', '错误', '只有客户一致、币别一致、付款方式一致才能一起发货。');
                 toaster.pop('error', '错误', '只有客户一致、币别一致、付款方式一致才能一起发货。');
@@ -7052,7 +7108,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             SaleSend.exportXls({}, {}, function (data) {
             SaleSend.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/notice/sends/xls?_state='+$scope.active+'&keyword='+($scope.keywordXls || '')+'&fromDate='+$scope.fromDateXls+'&endDate='+$scope.endDateXls;
+                    window.location.href = 'sale/notice/sends/xls?_state='+$scope.active+'&keyword='+($scope.keywordXls || '')+'&fromDate='+$scope.fromDateXls+'&endDate='+$scope.endDateXls;
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -7791,7 +7847,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcSample.exportXls({}, {}, function (data) {
             PurcSample.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/sample/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'sale/sample/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -7960,7 +8016,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcApproval.exportXls({}, {}, function (data) {
             PurcApproval.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/sample/approval/xls?_state='+$scope.active+'&keyword='+($scope.keywordXls || "")+'&fromDate='+$scope.fromDateXls+'&endDate='+$scope.endDateXls;
+                    window.location.href = 'sale/sample/approval/xls?_state='+$scope.active+'&keyword='+($scope.keywordXls || "")+'&fromDate='+$scope.fromDateXls+'&endDate='+$scope.endDateXls;
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -8161,7 +8217,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcAccept.exportXls({}, {}, function (data) {
             PurcAccept.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/accept/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'sale/accept/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -8307,7 +8363,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcReturn.exportXls({}, {}, function (data) {
             PurcReturn.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/return/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'sale/return/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -8446,7 +8502,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcBadIn.exportXls({}, {}, function (data) {
             PurcBadIn.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/badIn/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'sale/badIn/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -8559,7 +8615,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcBadOut.exportXls({}, {}, function (data) {
             PurcBadOut.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/badOut/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'sale/badOut/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -8668,7 +8724,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcMRB.exportXls({}, {}, function (data) {
             PurcMRB.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/MRB/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'sale/MRB/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -9349,7 +9405,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             FaApBill.exportXls({}, {}, function (data) {
             FaApBill.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/apBill/xls?_state='+$scope.active+'&keyword='+($scope.keywordXls || "")+'&fromDate='+$scope.fromDateXls+'&endDate='+$scope.endDateXls;
+                    window.location.href = 'sale/apBill/xls?_state='+$scope.active+'&keyword='+($scope.keywordXls || "")+'&fromDate='+$scope.fromDateXls+'&endDate='+$scope.endDateXls;
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -9698,7 +9754,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             FaApCheck.exportXls({}, {}, function (data) {
             FaApCheck.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/sale/apCheck/xls/list?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'sale/apCheck/xls/list?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -11796,7 +11852,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             $scope.exportXls = function () {
             $scope.exportXls = function () {
                 MakeOrder.exportXls({}, {}, function (data) {
                 MakeOrder.exportXls({}, {}, function (data) {
                     if (data.success){
                     if (data.success){
-                        window.location.href = window.location.origin + window.location.pathname + '/make/orders/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                        window.location.href = 'make/orders/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                     }
                     }
                 }, function (response) {
                 }, function (response) {
                     toaster.pop('error', '数据加载失败', response.data);
                     toaster.pop('error', '数据加载失败', response.data);
@@ -12001,7 +12057,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             MakeAccept.exportXls({}, {}, function (data) {
             MakeAccept.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/make/accept/xls?_state='+$scope.active+'&keyword='+($scope.keywordXls || "")+'&fromDate='+$scope.fromDateXls+'&endDate='+$scope.endDateXls;
+                    window.location.href = 'make/accept/xls?_state='+$scope.active+'&keyword='+($scope.keywordXls || "")+'&fromDate='+$scope.fromDateXls+'&endDate='+$scope.endDateXls;
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -12122,7 +12178,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             MakeReturn.exportXls({}, {}, function (data) {
             MakeReturn.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/make/return/xls?_state='+$scope.active+'&keyword='+($scope.keywordXls || "")+'&fromDate='+$scope.fromDateXls+'&endDate='+$scope.endDateXls;
+                    window.location.href = 'make/return/xls?_state='+$scope.active+'&keyword='+($scope.keywordXls || "")+'&fromDate='+$scope.fromDateXls+'&endDate='+$scope.endDateXls;
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -12265,7 +12321,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             MakeChange.exportXls({}, {}, function (data) {
             MakeChange.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/make/changes/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'make/changes/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -12440,7 +12496,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             MakeOutOrder.exportXls({}, {}, function (data) {
             MakeOutOrder.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/make/outorders/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+                    window.location.href = 'make/outorders/xls?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -12927,7 +12983,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             GetProductInfo.exportXls({},{}, function (data) {
             GetProductInfo.exportXls({},{}, function (data) {
                 if (data.success) {
                 if (data.success) {
-                    window.location.href = window.location.origin + window.location.pathname + '/product/baseInfo/xls?_state='+$scope.active+'&keyword='+ ($scope.keywordXls || "");
+                    window.location.href = 'product/baseInfo/xls?_state='+$scope.active+'&keyword='+ ($scope.keywordXls || "");
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);
@@ -21437,7 +21493,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.exportXls = function () {
         $scope.exportXls = function () {
             PurcProduct.exportXls({}, {}, function (data) {
             PurcProduct.exportXls({}, {}, function (data) {
                 if (data.success){
                 if (data.success){
-                    window.location.href = window.location.origin + window.location.pathname + '/purcProduct/xls?_state='+$scope.active+'&keyword='+ ($scope.keywordXls || "");
+                    window.location.href = 'purcProduct/xls?_state='+$scope.active+'&keyword='+ ($scope.keywordXls || "");
                 }
                 }
             }, function (response) {
             }, function (response) {
                 toaster.pop('error', '数据加载失败', response.data);
                 toaster.pop('error', '数据加载失败', response.data);

+ 6 - 1
src/main/webapp/resources/js/index/services/Purc.js

@@ -856,7 +856,12 @@ define([ 'ngResource'], function() {
 			exportXls: {
 			exportXls: {
 				url: 'sale/notice/xls/permission',
 				url: 'sale/notice/xls/permission',
 				method: 'GET'
 				method: 'GET'
-			}
+			},
+            findByIds: {
+			    url: 'sale/notice/findByIds',
+                method: 'GET',
+                isArray: true
+            }
 		});
 		});
     }]).factory('PurcNoticeInfo', ['$resource', function($resource) {
     }]).factory('PurcNoticeInfo', ['$resource', function($resource) {
         return $resource('sale/notice/info/search', {}, {
         return $resource('sale/notice/info/search', {}, {

+ 2 - 1
src/main/webapp/resources/tpl/index/purc/deputyOrder.html

@@ -326,7 +326,8 @@
                             <div>录入日期:<span ng-bind="order.entrydate| date: 'yyyy-MM-dd'"></span></div>
                             <div>录入日期:<span ng-bind="order.entrydate| date: 'yyyy-MM-dd'"></span></div>
                             <div>提交日期:<span ng-bind="order.date| date: 'yyyy-MM-dd'"></span></div>
                             <div>提交日期:<span ng-bind="order.date| date: 'yyyy-MM-dd'"></span></div>
                             <div>终端供应商:<span ng-bind="order.tervendor"></span></div>
                             <div>终端供应商:<span ng-bind="order.tervendor"></span></div>
-                            <div>订单金额:<span ng-if="!isUser" ng-bind="order.totalamount | number"></span><span ng-if="isUser">-</span></div>
+                            <div>订单金额: <span ng-if="!isUser" ng-bind="order.totalamount | number"></span><span ng-if="isUser">-</span></div>
+                            <div>订单状态:<span ng-bind="order.entrystatus"></span></div>
                         </div>
                         </div>
                         <div class="col-md-3">
                         <div class="col-md-3">
                             <div>订单编号:<a ng-bind="order.salecode" ui-sref="purc.deputydetail({id:order.id})"></a></div>
                             <div>订单编号:<a ng-bind="order.salecode" ui-sref="purc.deputydetail({id:order.id})"></a></div>

+ 2 - 3
src/main/webapp/resources/tpl/index/sale/notice.html

@@ -338,7 +338,7 @@
             <td class="first" colspan="3">
             <td class="first" colspan="3">
                 <div class="order-main">
                 <div class="order-main">
 					<span> <input type="checkbox" ng-disabled="notice.waiting" class="selector"
 					<span> <input type="checkbox" ng-disabled="notice.waiting" class="selector"
-                                         ng-model="notice.$selected" ng-click="checkOne(notice)">
+                              ng-model="notice.$selected" ng-click="checkOne(notice)">
 					</span>
 					</span>
                     <a href="javascript:void(0)" ng-if="!isUnread(notice.id)">
                     <a href="javascript:void(0)" ng-if="!isUnread(notice.id)">
                         <i class="fa fa-circle-thin"></i>
                         <i class="fa fa-circle-thin"></i>
@@ -348,8 +348,7 @@
                     </a>&nbsp;&nbsp;
                     </a>&nbsp;&nbsp;
                     <span class="text-num text-bold"
                     <span class="text-num text-bold"
                           ng-bind="::notice.date | date:'yyyy-MM-dd'"></span>
                           ng-bind="::notice.date | date:'yyyy-MM-dd'"></span>
-                    <span
-                            ng-bind="notice.orderItem.order.enterprise.enName"></span>
+                    <span ng-bind="notice.orderItem.order.enterprise.enName"></span>
                 </div>
                 </div>
             </td>
             </td>
             <td class="text-right" colspan="2" class="order-sum"><a title="查看采购单详情"
             <td class="text-right" colspan="2" class="order-sum"><a title="查看采购单详情"

+ 1 - 2
src/main/webapp/resources/tpl/index/sale/sendByBatch.html

@@ -38,8 +38,7 @@
 				</tbody>
 				</tbody>
 				<tbody>
 				<tbody>
 					<tr class="repeat"
 					<tr class="repeat"
-						ng-repeat="notice in notices | orderBy: 'notice.orderItem.product.code'"
-						ng-if="notice.$selected">
+						ng-repeat="notice in notices | orderBy: 'notice.orderItem.product.code'">
 						<td>
 						<td>
 							<div ng-bind="::notice.orderItem.product.code"></div>
 							<div ng-bind="::notice.orderItem.product.code"></div>
 							<div ng-bind="::notice.orderItem.product.title"></div>
 							<div ng-bind="::notice.orderItem.product.title"></div>