Просмотр исходного кода

新增卖家中心, 应收,发票

shenjj 8 лет назад
Родитель
Сommit
f10502f096

+ 107 - 1
src/main/webapp/resources/js/common/b2bServices.js

@@ -2632,5 +2632,111 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
                 }
             }
         })
-    }]);
+    }])
+        .factory('B2bFaApBill', ['$resource',  'BaseService', function($resource, BaseService) {
+          var b2bUrl = BaseService.getB2bUrl();
+          return $resource(b2bUrl + 'sale/apBill/info/search', {}, {
+            getAll: {
+              url: b2bUrl + 'sale/apBill/:id/info',
+              method: 'GET'
+            },
+            exportXls: {
+              url: b2bUrl + 'sale/apBill/xls/permission',
+              method: 'GET'
+            }
+          });
+        }])
+        .factory('B2bFaApCheck', ['$resource', 'BaseService', function($resource, BaseService) {
+          var b2bUrl = BaseService.getB2bUrl();
+          return $resource(b2bUrl + 'sale/apCheck/info/search', {}, {
+            getItem: {
+              url: b2bUrl + 'sale/apCheck/:id/info',
+              method: 'GET',
+            },
+            getAll: {
+              url: b2bUrl + 'sale/apCheck/getAll',
+              method: 'GET',
+              isArray: true
+            },
+            getAllCustomers: {
+              url: b2bUrl + 'sale/apCheck/getAllCustomers',
+              method: 'GET',
+              isArray: true
+            },
+            getAllByKeywords: {
+              url:b2bUrl +  'sale/apCheck/getAllByKeywords',
+              method: 'GET',
+              isArray: true
+            },
+            saveApCheck: {
+              url : b2bUrl + 'sale/apCheck/operation/save',
+              method: 'POST'
+            },
+            update: {
+              url: b2bUrl + 'sale/apCheck/update',
+              method: 'POST'
+            },
+            deleteApCheck: {
+              url: b2bUrl + 'sale/apCheck/operation/deleteApCheck',
+              method: 'POST'
+            },
+            updateStatus: {
+              url: b2bUrl + 'sale/apCheck/operation/updateStatus',
+              method: 'POST'
+            },
+            printCount: {
+              url: b2bUrl + 'sale/apCheck/printCount/:id',
+              method: 'POST'
+            },
+            printPermission: {
+              url: b2bUrl + 'sale/apCheck/printCount/permission',
+              method: 'POST'
+            },
+    //			getTodoApCheck: {
+    //				url: 'sale/apCheck/',
+    //				params: {
+    //					_state: 'todo'
+    //				}
+    //			},
+            getTodo: {
+              params: {
+                _state: 'todo'
+              }
+            },
+            getDone: {
+              params: {
+                _state: 'done'
+              }
+            },
+            getEnd: {
+              params: {
+                _state: 'end'
+              }
+            },
+            cancel: {
+              url: b2bUrl + 'sale/apCheck/operation/cancel',
+              method: 'POST'
+            },
+            setRead:{
+              url: b2bUrl + 'sale/apCheck/setRead',
+              method: 'POST'
+            },
+            getUnreadIds:{
+              url: b2bUrl + 'sale/apCheck/getUnreadIds',
+              method: 'GET'
+            },
+            getUnreadCount:{
+              url: b2bUrl + 'sale/apCheck/unread',
+              method: 'GET'
+            },
+            getBilled: {
+              url: b2bUrl + 'sale/apCheck/getBilled',
+              method: 'GET',
+            },
+            exportXls: {
+              url: b2bUrl + 'sale/apCheck/xls/permission',
+              method: 'GET',
+            }
+          });
+        }])
 });

+ 29 - 1
src/main/webapp/resources/js/vendor/app.js

@@ -579,7 +579,35 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 			templateUrl: 'static/view/vendor/forstore/pay_center.html',
 			controller: 'vendorPayCenterCtrl',
 			controllerUrl: 'app/controllers/forstore/pay_center_ctrl'
-		})).state('vendor_deliveryRule', angularAMD.route({
+		})).state('fa_apCheck', angularAMD.route({
+      url: "/apCheck",
+      params: {
+        'id': null
+      },
+      templateUrl: 'static/view/vendor/b2b/apCheck.html',
+      controller: 'PurchaseApCheckCtrl',
+      controllerUrl: 'app/controllers/b2b/apCheck'
+    })).state('fa_apCheck_detail', angularAMD.route({
+      url: "/apCheck/:id",
+      templateUrl: 'static/view/vendor/b2b/apCheck_detail.html',
+      controller: 'PurchaseApCheckDetailCtrl',
+      controllerUrl: 'app/controllers/b2b/apCheck_detail'
+    })).state('fa_apCheckList', angularAMD.route({
+      url: "/apCheckList",
+      templateUrl: 'static/view/vendor/b2b/apCheckList.html',
+      controller: 'PurchaseApCheckListCtrl',
+      controllerUrl: 'app/controllers/b2b/apCheckList'
+    })).state('fa_apBill', angularAMD.route({
+      url: "/apBill",
+      templateUrl: 'static/view/vendor/b2b/apBill.html',
+      controller: 'SaleApBillCtrl',
+      controllerUrl: 'app/controllers/b2b/apBill'
+    })).state('fa_apBill_detail', angularAMD.route({
+      url: "/apBill/:id",
+      templateUrl: 'static/view/vendor/b2b/apBill_detail.html',
+      controller: 'SaleApBillDetailCtrl',
+      controllerUrl: 'app/controllers/b2b/apBill_detail'
+    })).state('vendor_deliveryRule', angularAMD.route({
 			title : '配送规则',
 			url: '/vendor_deliveryRule',
 			templateUrl : 'static/view/vendor/forstore/vendor_delivery_rule.html',

+ 228 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/apBill.js

@@ -0,0 +1,228 @@
+define(['app/app'], function (app) {
+  app.register.controller('SaleApBillCtrl',
+      ['$rootScope', '$scope', '$filter', 'B2bFaApBill', 'ngTableParams', 'toaster',
+        'BaseService', 'Symbol', 'B2bCurrentRole',
+        function ($rootScope, $scope, $filter, FaApBill, ngTableParams, toaster,
+            BaseService, Symbol, CurrentRole) {
+          $rootScope.active = 'vendor_invoice';
+          BaseService.scrollBackToTop();
+          // 获取当前用户是否为普通用户
+          CurrentRole.isUser({}, {}, function (data) {
+            $scope.isUser = data.isUser;
+          });
+          $scope.active = 'all';
+          $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.currency = Symbol.currency;//将币别转化为对应的符号
+          $scope.setActive = function (state) {
+            if ($scope.active != state) {
+              $scope.active = state;
+              if ($scope.tableParams.page() == 1)
+                $scope.tableParams.reload();
+              else
+                $scope.tableParams.page(1);
+            }
+          };
+          var getService = function () {
+            return FaApBill;
+          };
+
+          $scope.tableParams = new ngTableParams({
+            page: 1,
+            count: 20,
+            sorting: {
+              date: 'desc'
+            }
+          }, {
+            total: 0,
+            counts: [5, 10, 25, 50],
+            getData: function ($defer, params) {
+              $scope.loading = true;
+              var pageParams = params.url();
+              pageParams.searchFilter = { // 筛选条件
+                keyword: $scope.keyword,
+                fromDate: getDateTime($scope.condition.dateFrom),
+                endDate: getDateTime($scope.condition.dateTo)
+              };
+              getService()[getState($scope.active)].call(null,
+                  BaseService.parseParams(pageParams), function (page) {
+                    $scope.loading = false;
+                    if (page) {
+                      params.total(page.totalElement);
+                      $defer.resolve(page.content);
+                      $scope.infoCommon = page
+                      $scope.infoCommon.all = page.content.length
+                      $scope.searchFilterXls = angular.copy(
+                          pageParams.searchFilter);
+                      $scope.keywordXls = angular.copy($scope.keyword);//保存当前取值的关键词
+                      $scope.fromDateXls = angular.copy(
+                          $scope.condition.dateFrom
+                              ? $scope.condition.dateFrom.getTime() : null);//保存当前取值的起始日期
+                      $scope.endDateXls = angular.copy($scope.condition.dateTo
+                          ? $scope.condition.dateTo.getTime() : null);
+                    }
+                  }, function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '数据加载失败', response.data);
+                  });
+            }
+          });
+
+          $scope.openDatePicker = function ($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
+          };
+
+          $scope.openFilterDatePicker = function ($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
+            if ($scope.condition.dateFrom && $scope.condition.dateTo
+                && !item[openParam]) {
+              $scope.tableParams.reload();
+            }
+          };
+
+          $scope.parseDate = function (dateStr) {
+            if (dateStr)
+              return Date.parse(dateStr, 'yyyy-MM-dd');
+            return new Date();
+          };
+          // 搜索框回车
+          $scope.onSearch = function () {
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
+          };
+
+          // 选择查找日期
+          $scope.onDateCondition = function () {
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
+          };
+
+          // 导出
+          $scope.exportXls = function () {
+            FaApBill.exportXls({}, {}, function (data) {
+              if (data.success) {
+                window.location.href = 'sale/apBill/xls?_state=' + $scope.active
+                    + '&keyword=' + ($scope.keywordXls || "") + '&fromDate='
+                    + $scope.fromDateXls + '&endDate=' + $scope.endDateXls;
+              }
+            }, function (response) {
+              toaster.pop('error', '数据加载失败', response.data);
+            });
+          }
+          /**
+           * 将日期转化为整数日期
+           */
+          var getDateTime = function (date) {
+            if (angular.isDate(date)) {
+              return date.getTime();
+            } else {
+              return null;
+            }
+          };
+
+          /**
+           * 页面状态按钮过滤
+           */
+          var getState = function (active) {
+            var fn = 'get';
+            switch (active) {
+              case 'done':
+                fn = 'getDone';
+                break;
+              case 'todo':
+                fn = 'getTodo';
+                break;
+              case 'end':
+                fn = 'getEnd';
+                break;
+              case 'waiting':
+                fn = 'getWaiting';
+                break;
+              case 'received':
+                fn = 'getReceived';
+                break;
+              case 'invalid':
+                fn = 'getInvalid';
+                break;
+                // 已采纳
+              case 'agreed':
+                fn = 'getAgreed';
+                break;
+                // 未采纳
+              case 'refused':
+                fn = 'getRefused';
+                break;
+                // 个人
+              case 'personal':
+                fn = 'getPersonal';
+                break;
+                // 集体
+              case 'teams':
+                fn = 'getTeams';
+                break;
+                // 非标准
+              case 'nonstandard':
+                fn = 'getNonstandard';
+                break;
+                // 标准
+              case 'standard':
+                fn = 'getStandard';
+                break;
+                // 变更单无需确认
+              case 'unread':
+                fn = 'getUnread';
+                break;
+            }
+            return fn;
+          };
+
+          var getDateCondition = function (zone, condition) {
+            var fromDate = new Date();
+            var toDate = new Date();
+            //去除时分秒限制,dateFrom设置成0时0分0秒,dateTo设置成23时59分59秒
+            fromDate.setHours(0, 0, 0, 0);
+            toDate.setHours(23, 59, 59, 999);
+            if (zone == -1) { // 自定义时间,什么都不做
+
+            } else if (zone == 1) {
+              fromDate.setMonth(fromDate.getMonth() - 1);
+              condition.dateFrom = fromDate;
+              condition.dateTo = toDate;
+            } else if (zone == 3) {
+              fromDate.setMonth(fromDate.getMonth() - 3);
+              condition.dateFrom = fromDate;
+              condition.dateTo = toDate;
+            } else if (zone == 6) {
+              fromDate.setMonth(fromDate.getMonth() - 6);
+              condition.dateFrom = fromDate;
+              condition.dateTo = toDate;
+            } else {
+              condition.dateFrom = null;
+              condition.dateTo = null;
+            }
+          };
+        }]);
+})

+ 24 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/apBill_detail.js

@@ -0,0 +1,24 @@
+define(['app/app'], function (app) {
+  /**
+   * 客户应付发票详情
+   */
+  app.register.controller('SaleApBillDetailCtrl', ['$rootScope', '$scope', '$filter', 'B2bFaApBill', 'toaster', '$stateParams', 'BaseService', 'B2bCurrentRole', function ($rootScope, $scope, $filter, FaApBill, toaster, $stateParams, BaseService, CurrentRole) {
+    BaseService.scrollBackToTop();
+    $rootScope.active = 'vendor_invoice';
+    // 获取当前用户是否为普通用户
+    CurrentRole.isUser({}, {}, function (data) {
+      $scope.isUser = data.isUser;
+    });
+    var loadData = function () {
+      FaApBill.getAll({id: $stateParams.id}, function (data) {
+        $scope.bill = data;
+        $scope.loading = false;
+      }, function (response) {
+        toaster.pop('error', '', response.data);
+      });
+    };
+    loadData(); // 初始获取单据数据
+
+  }]);
+
+})

+ 270 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/apCheck.js

@@ -0,0 +1,270 @@
+define(['app/app'], function (app) {
+
+  //应收对账单列表
+  app.register.controller('PurchaseApCheckCtrl', ['$rootScope', '$scope', 'B2bFaApCheck', 'BaseService', 'ngTableParams', 'toaster', 'B2bReportService', 'Symbol', 'B2bCurrentRole', function ($rootScope, $scope, FaApCheck, BaseService, ngTableParams, toaster, ReportService, Symbol, CurrentRole) {
+    BaseService.scrollBackToTop();
+    $rootScope.active = 'vendor_pay_center';
+    // 获取当前用户是否为普通用户
+    CurrentRole.isUser({}, {}, function (data) {
+      $scope.isUser = data.isUser;
+    });
+    $scope.dateZoneText = '不限';
+    $scope.condition = {dateZone: 1};
+    $scope.currency = Symbol.currency;//将币别转化为对应的符号
+    $scope.active = 'todo';
+
+    /* 时间筛选初始化*/
+    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.print = function (check) {
+      var newPage = window.open("about:blank");
+      FaApCheck.printPermission({}, function () {
+        FaApCheck.printCount({id: check.id}, {});//增加打印此次
+        ReportService.print(check.custUu, 'PURCCHECK', 'where purc$apcheck.pa_id =' + check.id, newPage);
+      }, function (response) {
+        newPage.close();
+        toaster.pop('error', '打印失败', response.data);
+      });
+    };
+
+    //状态
+    $scope.setActive = function (state) {
+      if ($scope.active != state) {
+        $scope.active = state;
+        if ($scope.tableParams.page() == 1)
+          $scope.tableParams.reload();
+        else
+          $scope.tableParams.page(1);
+      }
+    };
+    $scope.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.tableParams = new ngTableParams({
+      page: 1,
+      count: 20,
+      sorting: {
+        recordDate: 'desc'
+      }
+    }, {
+      total: 0,
+      counts: [5, 10, 25, 50],
+      getData: function ($defer, params) {
+        $scope.loading = true;
+        var pageParams = params.url();
+        pageParams.searchFilter = { // 筛选条件
+          keyword: $scope.keyword,
+          fromDate: getDateTime($scope.condition.dateFrom),
+          endDate: getDateTime($scope.condition.dateTo)
+        };
+        FaApCheck[getState($scope.active)](BaseService.parseParams(pageParams), function (page) {
+          $scope.loading = false;
+          if (page) {
+            params.total(page.totalElement);
+            $scope.data = $defer.resolve(page.content);
+            $scope.infoCommon = page
+            $scope.infoCommon.all = page.content.length
+            $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
+          }
+        }, function (response) {
+          $scope.loading = false;
+          toaster.pop('error', '数据加载失败', response.data);
+        });
+      }
+    });
+
+    //获得各分类未阅读数量
+    var getUnreadCount = function () {
+      FaApCheck.getUnreadCount(null, function(data){
+        $scope.unread = data;
+      });
+    };
+    getUnreadCount();
+
+    //设置单据已读
+    $scope.setOrdersRead = function (id) {
+      // 如果单据本身已读,则不发送请求修改数据
+      if (!$scope.isUnread(id)){
+        return;
+      }
+      var sourceId = [];
+      sourceId.push(id);
+      FaApCheck.setRead({}, sourceId, function (message) {
+        getUnreadCount();
+      });
+    };
+
+    //获取未读单据id
+    var getUnreadIds = function (){
+      FaApCheck.getUnreadIds({}, "", function (message) {
+        $scope.unreadCode = message.content;
+      });
+    };
+    getUnreadIds();
+    //判断单据是否未读
+    $scope.isUnread = function (id){
+      for (var i in $scope.unreadCode) {
+        if (id == $scope.unreadCode[i]) {
+          return true;
+        }
+      }
+    };
+
+    $scope.openDatePicker = function ($event, item, openParam) {
+      $event.preventDefault();
+      $event.stopPropagation();
+      item[openParam] = !item[openParam];
+    };
+
+    $scope.openFilterDatePicker = function ($event, item, openParam) {
+      $event.preventDefault();
+      $event.stopPropagation();
+      item[openParam] = !item[openParam];
+      if ($scope.condition.dateFrom && $scope.condition.dateTo && !item[openParam]) {
+        $scope.tableParams.reload();
+      }
+    };
+
+    // 计算单据的商品总数
+    $scope.getTotalProd = function (check) {
+      var total = 0;
+      if (check.items) {
+        angular.forEach(check.items, function (value) {
+          total += value.checkQty;
+        });
+      }
+      return total;
+    };
+
+    // 搜索框回车
+    $scope.onSearch = function () {
+      $scope.tableParams.page(1);
+      $scope.tableParams.reload();
+    };
+
+    // 选择查找日期
+    $scope.onDateCondition = function () {
+      $scope.tableParams.page(1);
+      $scope.tableParams.reload();
+    };
+
+    // 导出
+    $scope.exportXls = function () {
+      FaApCheck.exportXls({}, {}, function (data) {
+        if (data.success){
+          window.location.href = 'sale/apCheck/xls/list?_state='+$scope.active+'&searchFilter='+encodeURIComponent(angular.toJson($scope.searchFilterXls));
+        }
+      }, function (response) {
+        toaster.pop('error', '数据加载失败', response.data);
+      });
+    }
+
+    /**
+     * 将日期转化为整数日期
+     */
+    var getDateTime = function (date) {
+      if (angular.isDate(date)) {
+        return date.getTime();
+      } else {
+        return null;
+      }
+    };
+
+    /**
+     * 页面状态按钮过滤
+     */
+    var getState = function (active) {
+      var fn = 'get';
+      switch (active) {
+        case 'done':
+          fn = 'getDone';
+          break;
+        case 'todo':
+          fn = 'getTodo';
+          break;
+        case 'end':
+          fn = 'getEnd';
+          break;
+        case 'waiting':
+          fn = 'getWaiting';
+          break;
+        case 'received':
+          fn = 'getReceived';
+          break;
+        case 'invalid':
+          fn = 'getInvalid';
+          break;
+          // 已采纳
+        case 'agreed':
+          fn = 'getAgreed';
+          break;
+          // 未采纳
+        case 'refused':
+          fn = 'getRefused';
+          break;
+          // 个人
+        case 'personal':
+          fn = 'getPersonal';
+          break;
+          // 集体
+        case 'teams':
+          fn = 'getTeams';
+          break;
+          // 非标准
+        case 'nonstandard':
+          fn = 'getNonstandard';
+          break;
+          // 标准
+        case 'standard':
+          fn = 'getStandard';
+          break;
+          // 变更单无需确认
+        case 'unread':
+          fn = 'getUnread';
+          break;
+      }
+      return fn;
+    };
+
+    var getDateCondition = function (zone, condition) {
+      var fromDate = new Date();
+      var toDate = new Date();
+      //去除时分秒限制,dateFrom设置成0时0分0秒,dateTo设置成23时59分59秒
+      fromDate.setHours(0, 0, 0, 0);
+      toDate.setHours(23, 59, 59, 999);
+      if (zone == -1) { // 自定义时间,什么都不做
+
+      } else if (zone == 1) {
+        fromDate.setMonth(fromDate.getMonth() - 1);
+        condition.dateFrom = fromDate;
+        condition.dateTo = toDate;
+      } else if (zone == 3) {
+        fromDate.setMonth(fromDate.getMonth() - 3);
+        condition.dateFrom = fromDate;
+        condition.dateTo = toDate;
+      } else if (zone == 6) {
+        fromDate.setMonth(fromDate.getMonth() - 6);
+        condition.dateFrom = fromDate;
+        condition.dateTo = toDate;
+      } else {
+        condition.dateFrom = null;
+        condition.dateTo = null;
+      }
+    };
+  }]);
+
+})

+ 439 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/apCheckList.js

@@ -0,0 +1,439 @@
+define(['app/app'], function (app) {
+  //未对账单据列表
+  app.register.controller('PurchaseApCheckListCtrl', ['$rootScope', '$scope', 'B2bFaApCheck', 'toaster', '$state', '$filter', '$modal', 'B2bVendor', 'B2bDecimalNumber', function ($rootScope, $scope, FaApCheck, toaster, $state, $filter, $modal, Vendor, DecimalNumber) {
+    $scope.data = [];// 列表数据
+    $rootScope.active = 'vendor_pay_center';
+    $scope.condition = {
+      $fromOpened: false
+    }
+
+    $scope.openDatePicker = function ($event, item, openParam) {
+      $event.preventDefault();
+      $event.stopPropagation();
+      item[openParam] = !item[openParam];
+    }
+
+    // 客户联想词
+    $scope.getSimilarCustomers = function (value) {
+      if (value) {
+        return Vendor.getSimilarCustomers({keyword: value}).$promise.then(function (data) {
+          return data.map(function (item) {
+            return item;
+          });
+        });
+      }
+    };
+
+    $scope.onAssociateCustomerClick = function (vendor) {
+      if (vendor.apcheck == 0) {
+        toaster.pop('info', '提示', '该客户暂未启用平台对账功能');
+        $scope.suuorname = '';
+      } else {
+        $scope.suuorname = vendor.custName;
+      }
+    }
+
+    //查找客户
+    $scope.searchCust = function (suuorname) {
+      angular.element('body').css({
+        'overflow': 'hidden'
+      })
+      var modalInstance = $modal.open({
+        animation: true,
+        templateUrl: 'static/view/vendor/b2b/modal/apcheck_customer.html',
+        controller: 'SearchCustInfoCtrl',
+        size: 'lg',
+        resolve: {
+          suuorname: function () {
+            return suuorname;
+          }
+        }
+      });
+      modalInstance.result.then(function (customer) {
+        angular.element('body').removeAttr('style')
+        $scope.suuorname = customer.myEnterprise.enName;
+      });
+
+    }
+
+    // 点击筛选根据条件选择数据
+    // 默认本月
+    $scope.sdateTo = new Date();
+    $scope.sdateFrom = new Date($scope.sdateTo.getFullYear(), $scope.sdateTo.getMonth(), 1);
+    $scope.condition.uuorname = '';
+    $scope.condition.dateFrom = '';
+    $scope.condition.dateTo = '';
+    $scope.condition.venduuorname = '';
+    $scope.condition.factory = '';
+    $scope.condition.prodtitle = '';
+    $scope.condition.prodspec = '';
+
+    $scope.searchOrder = function (check) {
+      $scope.data = [];
+      $scope.checkboxes.checked = false;
+      $scope.totalMoney = 0;
+      $scope.condition.uuorname = $scope.suuorname;
+      $scope.condition.factory = $scope.factory
+      $scope.condition.prodtitle = $scope.prodtitle;
+      $scope.condition.prodspec = $scope.prodspec;
+      $scope.condition.dateFrom = ($scope.sdateFrom || 0);
+      $scope.thisdatato = ($scope.sdateTo || 0);
+      if ($scope.thisdatato != 0) {
+        $scope.condition.dateTo = (new Date($scope.thisdatato.valueOf()) || 0);
+      } else {
+        $scope.condition.dateTo = ($scope.sdateTo || 0);
+      }
+      $scope.condition.venduuorname = $scope.vuuorname;
+      if ($scope.condition.dateFrom != null || $scope.condition.dateTo != null || $scope.keywordXls != null) {
+
+        $scope.fromDate = $scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null;
+        $scope.endDate = $scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null;
+        $scope.searchKeyWord = {
+          receiveName: $scope.receiveName,
+          factory: $scope.factory,
+          prodTitle: $scope.prodTitle,
+          prodSpec: $scope.prodSpec,
+          taxRate: $scope.taxRate,
+          suuorname: $scope.suuorname
+        }
+        $scope.exportKeywords = encodeURIComponent($scope.searchKeyWord);
+        $scope.fromDateXls = angular.copy($scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null);//保存当前取值的起始日期
+        $scope.endDateXls = angular.copy($scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null);//保存当前取值的截止日期
+        if (!$scope.suuorname) {
+          toaster.pop('warning', '提示', '请先选择客户');
+          document.getElementById('suuorname').focus();//光标默认在客户
+        } else {
+          $scope.loading = true;
+          FaApCheck.getAllByKeywords({
+            fromDate: $scope.fromDate,
+            endDate: $scope.endDate,
+            receiveName: $scope.receiveName,
+            factory: $scope.factory,
+            prodTitle: $scope.prodTitle,
+            prodSpec: $scope.prodSpec,
+            taxRate: $scope.taxRate,
+            suuorname: $scope.suuorname
+          }, function (data) {
+            if (data.length > 0) {
+              angular.forEach(data, function (item) {
+                item.$selected = true;
+              });
+              $scope.data = data;
+              $scope.checkboxes.checked = true;
+              $scope.getTotalMoney();
+            } else {
+              toaster.pop('info', '提示', '当前没有需要对账记录');
+            }
+            $scope.loading = false;
+          }, function (response) {
+            $scope.loading = false;
+            toaster.pop('error', '提示', response.data);
+          });
+        }
+      }
+
+    }
+
+    $scope.exportApcheckList = function() {
+      var url = 'sale/apCheck/xls?fromDate=' + $scope.fromDate + '&endDate=' + $scope.endDate;
+      if (angular.isDefined($scope.receiveName)) {
+        url = url + '&receiveName=' + $scope.receiveName;
+      }
+      if (angular.isDefined($scope.factory)) {
+        url = url + '&factory=' + $scope.factory;
+      }
+      if (angular.isDefined($scope.prodTitle)) {
+        url = url + '&prodTitle=' + $scope.prodTitle;
+      }
+      if (angular.isDefined($scope.prodSpec)) {
+        url = url + '&prodSpec=' + $scope.prodSpec;
+      }
+      if (angular.isDefined($scope.suuorname)) {
+        url = url + '&suuorname=' + $scope.suuorname;
+      }
+      if (angular.isDefined($scope.taxRate)) {
+        url = url + '&receiveName=' + $scope.taxRate;
+      }
+      window.location.href = url;
+    }
+
+    /**
+     * 点击勾选框,选中要转应收对账单的订单
+     * */
+    $scope.totalMoney = 0;
+    $scope.checkboxes = {
+      checked: false
+    };
+
+    // 点击勾选全部的复选框
+    $scope.checkAll = function () {
+      $scope.totalMoney = 0;
+      $scope.filteredData = $filter('filter')($scope.data, $scope.condition.prodtitle || $scope.condition.uuorname || $scope.condition.venduuorname || $scope.condition.prodspec || $scope.condition.factory);
+      var dateFrom = $scope.condition.dateFrom;
+      var dateTo = $scope.condition.dateTo;
+      angular.forEach($scope.filteredData, function (item) {
+        if ((item.pidate >= dateFrom || dateFrom == '') && (item.pidate < dateTo || dateTo == '')) {
+          item.$selected = $scope.checkboxes.checked;
+        }
+      });
+      $scope.getTotalMoney();
+    };
+
+    //获取已选单据总金额
+    $scope.getTotalMoney = function () {
+      $scope.totalMoney = 0;
+      angular.forEach($scope.data, function (check) {
+        if (check.$selected) {
+          var price = DecimalNumber.accMul((check.thischeckqty || 0), (check.orderprice || 0));
+          $scope.totalMoney += Math.round(price * 100) / 100;
+        } else {
+          $scope.totalMoney += 0;
+        }
+      });
+
+    }
+
+    // 点击其中一个明细的复选框
+    $scope.checkOne = function (check) {
+      var result = true;
+      angular.forEach($scope.data, function (item) {
+        if (item.$selected != true) {
+          result = false;
+          return;
+        }
+      });
+      $scope.checkboxes.checked = result;
+    };
+
+    $scope.haveSelected = false;
+
+    //生成应收对账单
+    $scope.createApCheck = function () {
+      //保存应收对账单主记录字段
+      $scope.apCheck = {
+        custUu: '',
+        custName: '',
+        enUu: '',
+        apDate: '',
+        beginDate: '',
+        endDate: '',
+        checkStatus: '未对账',
+        checkAmount: 0,
+        currency: '',
+        rate: '',
+        items: [],
+        taxrate: ''
+      };
+      //保存来源单据相关信息
+      var sourceInfos = [];
+
+
+      //所允许的本次对账最大最小数量
+      $scope.data.maxThisCheckQty = 0;
+      $scope.data.minThisCheckQty = 0;
+
+      $scope.sameCust = true;
+      $scope.validQty = true;
+      $scope.loading = true;
+
+      angular.forEach($scope.data, function (check) {
+        //保存应收对账单明细行数据
+        $scope.item = {
+          inoutno: '',
+          inoutnodetno: '',
+          orderCode: '',
+          orderClass: '',
+          orderDetno: '',
+          price: '',
+          checkQty: '',
+          amount: '',
+          sourceId: '',
+          sourceTable: '',
+          oldYCheckQty: '',
+          status: 0,
+          receiveCode: '',
+          receiveName: '',
+          prodCode: '',
+          prodTitle: '',
+          prodUnit: '',
+          prodSpec: '',
+          taxrate: '',
+          sendcode: '',
+          whname: '',
+        };
+
+        //应收对账单明细行来源表信息
+        $scope.sourceInfo = {
+          sourceId: '',
+          sourceTable: '',
+          newYCheckQty: ''
+        };
+
+        //此次对账后新的已转数
+        $scope.newYCheckQty = 0;
+        if (check.$selected == true) {
+          $scope.apCheck.custName = check.custname;
+          $scope.apCheck.enUu = check.enuu;
+          $scope.apCheck.checkAmount += (check.thischeckqty || 0) * (check.orderprice || 0);
+          $scope.apCheck.apDate = check.pidate;
+          $scope.apCheck.rate = check.rate;
+
+          //必须是同一家客户才能生成对账单,否则提示错误
+          if ($scope.apCheck.custUu == '') {
+            $scope.apCheck.custUu = check.custuu;
+          } else if ($scope.apCheck.custUu !== check.custuu) {
+            $scope.sameCust = false;
+            $scope.loading = false;
+            toaster.pop('error', '请选择同一家客户');
+          }
+
+          //必须是相同币别才能生成对账单,否则提示错误
+          if ($scope.apCheck.currency == '') {
+            $scope.apCheck.currency = check.currency;
+          } else if ($scope.apCheck.currency !== check.currency) {
+            $scope.sameCust = false;
+            $scope.loading = false;
+            toaster.pop('error', '请选择同一种币别');
+          }
+
+          //必须是相同税率才能生成对账单,否则提示错误
+          if (!angular.isNumber($scope.apCheck.taxrate)) {
+            $scope.apCheck.taxrate = check.taxrate;
+          } else if ($scope.apCheck.taxrate != check.taxrate) {
+            $scope.sameCust = false;
+            $scope.loading = false;
+            toaster.pop('error', '请选择相同的税率');
+          }
+
+          //本次对账数量必须小于总对账数量
+          if (check.qty > 0) {
+            $scope.data.maxThisCheckQty = check.qty;
+            $scope.data.minThisCheckQty = 0;
+            if (check.qty - (check.ycheckqty || 0) < check.thischeckqty || check.thischeckqty < 0 || check.thischeckqty == 0) {
+              $scope.validQty = false;
+              $scope.loading = false;
+              toaster.pop('error', '本次对账数量,填写有误!');
+            }
+          } else if (check.qty < 0) {
+            $scope.data.maxThisCheckQty = 0;
+            $scope.data.minThisCheckQty = check.qty;
+            if (((-check.qty) - (-check.ycheckqty) < (-check.thischeckqty)) || check.thischeckqty > 0 || check.thischeckqty == 0) {
+              $scope.validQty = false;
+              $scope.loading = false;
+              toaster.pop('error', '本次对账数量,填写有误!');
+            }
+          }
+
+          //获取筛选时间的开始时间为对账的开始时间
+          $scope.apCheck.beginDate = $scope.fromDate;
+
+          //获取筛选的截止时间为对账的截止时间
+          $scope.apCheck.endDate = $scope.endDate;
+
+          //应收对账单明细行数据
+          $scope.item.orderCode = check.ordercode;
+          $scope.item.orderClass = check.piclass;
+          $scope.item.orderDetno = check.orderdetno;
+          $scope.item.price = check.orderprice;
+          $scope.item.checkQty = check.thischeckqty;
+          $scope.item.amount = (check.thischeckqty || 0) * (check.orderprice || 0);
+          $scope.item.sourceId = check.sourceid;
+          $scope.item.sourceTable = check.sourcetable;
+          $scope.item.oldYCheckQty = check.ycheckqty;
+          $scope.item.prodCode = check.prodcode;
+          $scope.item.prodTitle = check.prodtitle;
+          $scope.item.prodSpec = check.prodspec;
+          $scope.item.prodUnit = check.produnit;
+          $scope.item.inoutno = check.inoutno;
+          $scope.item.inoutnodetno = check.detno;
+          $scope.item.taxrate = check.taxrate;
+          $scope.item.receiveCode = check.receivecode;
+          $scope.item.receiveName = check.receivename;
+          $scope.item.sendcode = check.sendcode;
+          $scope.item.whname = check.whname;
+
+          //来源表相关信息
+          $scope.sourceInfo.sourceid = check.sourceid;
+          $scope.sourceInfo.sourcetable = check.sourcetable;
+          $scope.sourceInfo.newYCheckQty = ((check.ycheckqty || 0) + check.thischeckqty);
+
+          sourceInfos.push($scope.sourceInfo);
+          $scope.apCheck.items.push($scope.item);
+          $scope.haveSelected = true;
+        }
+      });
+
+      //保存生成的应收对账单
+      $scope.saveApCheck = function () {
+        FaApCheck.saveApCheck({}, $scope.apCheck, function (data) {
+          $scope.loading = false;
+          toaster.pop('success', '成功', '生成应收对账成功');
+          $state.go('fa.apCheck_detail', {id: data.id}, {reload: true});
+        }, function (response) {
+          $scope.loading = false;
+          toaster.pop('error', '生成对账单失败', response.data);
+        })
+      };
+
+      //如果是同一家客户,生成对账单的同时,关闭模态框
+      if ($scope.sameCust && $scope.validQty) {
+        $scope.saveApCheck();
+      }
+    }
+  }]);
+  /**
+   * 财务对账时,企业进行筛选操作
+   */
+  app.register.controller('SearchCustInfoCtrl', ['$scope', '$modalInstance', 'suuorname', 'B2bFaApCheck', 'B2bVendorService', 'ngTableParams', 'BaseService', function ($scope, $modalInstance, suuorname, FaApCheck, VendorService, ngTableParams, BaseService) {
+    var getData = function () {
+      $scope.loading = true;
+      FaApCheck.getAllCustomers(function (data) {
+        $scope.custs = data;
+        $scope.loading = false;
+      });
+    };
+
+    getData();
+
+    $scope.customerParams = new ngTableParams({
+      page: 1,
+      count: 20
+    }, {
+      total: 0,
+      counts: [5, 10, 25, 50],
+      getData: function ($defer, params) {
+        $scope.loading = true;
+        var pageParams = params.url();
+        pageParams.keyword = $scope.keyword;
+        VendorService.customer.get(BaseService.parseParams(pageParams), function (page) {
+          $scope.loading = false;
+          if (page) {
+            params.total(page.totalElement);
+            $defer.resolve(page.content);
+          }
+          $scope.totalCount = page.totalElement;
+        }, function (response) {
+          $scope.loading = false;
+          toaster.pop('error', '数据加载失败', response.data);
+        });
+      }
+    });
+
+    // 搜索框回车
+    $scope.onSearch = function (keyword) {
+      $scope.customerParams.page(1);
+      $scope.customerParams.reload();
+      $scope.tip = keyword;
+    };
+    $scope.select = function (customer) {
+      if (customer.apcheck != 0) {
+        $modalInstance.close(customer);
+      }
+    }
+
+    $scope.close = function () {
+      $modalInstance.dismiss();
+    }
+  }]);
+
+})

+ 106 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/apCheck_detail.js

@@ -0,0 +1,106 @@
+define(['app/app'], function (app) {
+  //应收对账单详情
+  app.register.controller('PurchaseApCheckDetailCtrl', ['$rootScope', '$scope', 'toaster', 'B2bFaApCheck', '$stateParams', 'BaseService', 'B2bCurrentRole', function ($rootScope, $scope, toaster, FaApCheck, $stateParams, BaseService, CurrentRole) {
+    $rootScope.active = 'vendor_pay_center';
+    BaseService.scrollBackToTop();
+    // 获取当前用户是否为普通用户
+    CurrentRole.isUser({}, {}, function (data) {
+      $scope.isUser = data.isUser;
+    });
+    $scope.haveSelected = true;
+    $scope.data = {};
+    //控制提交和删除按钮的显示
+    $scope.ifShow = true;
+    var loadData = function () {
+      FaApCheck.getItem({id: $stateParams.id}, function (data) {
+        $scope.data = data;
+        if ($scope.data.status) {
+
+        } else {
+          $scope.ifShow = true;
+        }
+      }, function (response) {
+        toaster.pop('error', '', response.data);
+      })
+    };
+
+    if ($stateParams.id) {
+      loadData();
+    }
+
+    $scope.haveSource = false;
+    //提交应收对账单
+    $scope.submitApCheck = function () {
+      FaApCheck.updateStatus({id: $stateParams.id}, {}, function (data) {
+        if (data.result) {
+          toaster.pop('success', '提示', '提交成功');
+          $scope.haveSelected = false;
+          window.location.href = '#/fa/apCheck';
+        } else {
+          $scope.haveSource = true;
+          loadData();
+          toaster.pop('error', '提示', '单据被反过账,请立即作废本单据');
+          $scope.haveSelected = true;
+        }
+      }, function (response) {
+        $scope.loading = false;
+        toaster.pop('error', '更新已转数失败', response.data);
+      });
+    }
+
+    //删除应收对账单的同时更新来源表已转数
+    var updateYCheckQty = function () {
+      var sourceInfos = [];
+      angular.forEach($scope.data.items, function (item) {
+        $scope.sourceInfo = {
+          sourceId: '',
+          sourceTable: '',
+          newYCheckQty: ''
+        };
+        $scope.sourceInfo.sourceId = item.sourceId;
+        $scope.sourceInfo.sourceTable = item.sourceTable;
+        $scope.sourceInfo.newYCheckQty = item.oldYCheckQty;
+        sourceInfos.push($scope.sourceInfo);
+      });
+      FaApCheck.update({}, sourceInfos, function () {
+
+      }, function (response) {
+        $scope.loading = false;
+        toaster.pop('error', '更新已转数失败', response.data);
+      });
+
+    }
+
+    //删除应收对账单
+    $scope.deleteApCheck = function () {
+      FaApCheck.deleteApCheck({id: $stateParams.id}, {}, function (data) {
+        updateYCheckQty();
+        toaster.pop('success', '提示', '删除成功');
+      }, function (response) {
+        toaster.pop('error', '删除失败', response.data);
+      });
+      $scope.haveSelected = false;
+
+    }
+
+    //作废应收对账单
+    $scope.cancelApCheck = function (check) {
+      FaApCheck.cancel({id: check.id}, {}, function (data) {
+        $scope.checkResult = false;
+        if (data.result) {
+          $scope.checkResult = true;
+          toaster.pop('success', '提示', '作废成功');
+          $scope.tableParams.reload();
+        } else {
+          toaster.pop('error', '提示', '作废失败');
+        }
+      }, function (response) {
+        $scope.loading = false;
+        toaster.pop('error', '作废失败', response.data);
+      });
+
+    }
+
+  }]);
+
+})

+ 701 - 0
src/main/webapp/resources/view/vendor/b2b/apBill.html

@@ -0,0 +1,701 @@
+<style>
+  .order-table .header>th {
+    height: 38px;
+    text-align: center;
+    background: #f5f5f5;
+    border-top: 1px solid #e8e8e8;
+    border-bottom: 1px solid #e8e8e8;
+  }
+
+  .order-table .sep-row {
+    height: 10px;
+  }
+
+  .order-table .selector {
+    vertical-align: middle;
+    margin: 0 0 2px 0;
+  }
+
+  .toolbar label {
+    margin-right: 10px;
+    margin-bottom: 0;
+  }
+
+  .toolbar .select_all {
+    margin: 0 6px 0 10px;
+    line-height: 20px;
+  }
+
+  .toolbar .btn {
+    -moz-border-radius: 2px;
+    margin-right: 5px;
+    border: 1px solid #dcdcdc;
+    border-radius: 2px;
+    -webkit-border-radius: 2px;
+  }
+
+  .order-table .order-hd {
+    background: #f5f5f5;
+    height: 40px;
+    line-height: 40px;
+  }
+
+  .order-table .order-hd td.first {
+    padding-left: 20px;
+  }
+
+  .order-table .order-hd .order-main span {
+    margin-right: 8px;
+  }
+
+  .order-table .order-hd .order-code {
+    font-style: normal;
+    font-family: verdana;
+  }
+
+  .order-table .order-hd .order-sum {
+    padding: 0 5px;
+    font-size: 15px;
+    font-weight: bold;
+    color: #CC0000;
+  }
+
+  .order-table>tbody {
+    border: 1px solid transparent;
+  }
+
+  .order-table>tbody:hover {
+    border-color: #3c7cf5;
+    border-width: 2px;
+  }
+  .order-table>tbody:hover .order-bdd{
+    background: #f8fafe;
+  }
+  .order-table .operates {
+    display: none;
+  }
+
+  .order-table>tbody:hover .operates {
+    display: block;
+  }
+
+  .order-table .order-bd {
+    border-bottom: 1px solid #e6e6e6;
+  }
+
+  .order-table .order-bd>td {
+    padding: 10px 5px;
+    /*vertical-align: top;*/
+    position: relative;
+  }
+
+  .order-table .order-bd .product {
+    padding-left: 20px;
+  }
+
+  .input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
+  {
+    height: 26px;
+    padding: 0 5px;
+    font-size: 12px;
+    line-height: 1.5;
+    border-radius: 3px;
+  }
+
+  .input-group-xs .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0;
+  }
+
+</style>
+<style>
+  .com_tab {
+    height: 40px;
+    margin-bottom: 10px;
+  }
+  .com_tab ul {
+    width: 100%;
+    margin: 0 auto;
+    height: 40px;
+    line-height: 40px;
+    background: #fff;
+  }
+  .com_tab ul li {
+    height: 40px;
+    text-align: center;
+    float: left;
+    position: relative;
+    min-width: 110px;
+  }
+  .com_tab:nth-of-type(1) ul li.active > a {
+    border-bottom: #fff;
+    background: #5078cb;
+    color: #fff !important;
+  }
+  .com_tab ul li a {
+    min-width: 110px;
+  }
+  .com_tab ul li > a {
+    font-size: 14px;
+    height: 40px;
+    padding: 0 20px;
+    display: inline-block;
+  }
+  .com_tab:nth-of-type(1) ul li::after {
+    background:url('/static/img/vendor/images/downicon.png')
+    width: 11px;
+    height: 6px;
+    position: absolute;
+    bottom: 0px;
+    left: 50%;
+    content: ' ';
+    margin-left: -5px;
+    display: none;
+  }
+  .com_tab ul li::after {
+    background:url('/static/img/vendor/images/downicon.png');
+    width: 11px;
+    height: 6px;
+    position: absolute;
+    bottom: 0px;
+    left: 50%;
+    content: ' ';
+    margin-left: -5px;
+    display: none;
+  }
+  .com_tab ul li.active:after {
+    display: block;
+  }
+  .oder01 ul li.active a{
+    border-bottom: 1px solid #fff;
+    color: #f15601;
+  }
+  .oder01 ul li.active a em {
+    color: #f15601;
+  }
+  .oder01 ul li a em {
+    color: #323232
+  }
+  .screen {
+    background: #fff;
+    padding-top: 10px;
+    padding-right: 11px;
+    line-height: 32px;
+    padding-left: 22px;
+    width: 100%;
+    height: 50px;
+    position: relative;
+  }
+  .screen .sreach input {
+    border: #5078cb 1px solid;
+    height: 32px;
+    width: 280px;
+    box-shadow: none;
+    padding-left: 10px;
+    background: #fff;
+    float: left;
+    vertical-align: middle;
+    font-size: 14px;
+  }
+  .screen .sreach a.seek {
+    width: 58px;
+    height: 32px;
+    background: #5078cb;
+    color: #fff;
+    line-height: 32px;
+    float: none;
+    border-radius: 2px;
+    vertical-align: unset;
+  }
+  .order-table {
+    background: #fff;
+    width: 100%;
+  }
+  .order-table .header > th {
+    height: 38px;
+    text-align: center;
+    background: #fff;
+    border-top: 1px solid #e8e8e8;
+    border-bottom: 1px solid #e8e8e8;
+    font-size: 14px;
+  }
+
+  .order-table .sep-row {
+    height: 10px;
+  }
+
+  .order-table .selector {
+    vertical-align: middle;
+    margin: 0 0 2px 0;
+  }
+
+  .toolbar label {
+    margin-right: 10px;
+    margin-bottom: 0;
+  }
+
+  .toolbar .select_all {
+    margin: 0 6px 0 10px;
+    line-height: 20px;
+  }
+
+  .toolbar .btn {
+    -moz-border-radius: 2px;
+    margin-right: 5px;
+    border: 1px solid #dcdcdc;
+    border-radius: 2px;
+    -webkit-border-radius: 2px;
+  }
+
+  .order-table .order-hd {
+    background: #f5f5f5;
+    height: 40px;
+    line-height: 40px;
+  }
+
+  .order-table .order-hd td.first {
+    padding-left: 20px;
+  }
+
+  .order-table .order-hd .order-main span {
+    margin-right: 8px;
+  }
+
+  .order-table .order-hd .order-code {
+    font-style: normal;
+    font-family: verdana;
+  }
+
+  .order-table .order-hd .order-sum {
+    position: relative;
+    padding: 0 5px;
+  }
+
+  .order-table .order-hd .dropdown-toggle {
+    line-height: 40px;
+    display: block;
+    color: #5078cb;
+    /*padding: 0 10px;*/
+  }
+
+
+  .order-table .operates {
+    display: none;
+  }
+
+  .order-table > tbody:hover .operates {
+    display: block;
+  }
+
+  .order-table .order-bd {
+    border-bottom: 1px solid #e6e6e6;
+  }
+
+  .order-table .order-bd > td {
+    padding: 10px 5px;
+  }
+
+  .order-table .order-bd .product {
+    padding-left: 20px;
+  }
+
+  .input-xs, .input-group-xs > .form-control, .input-group-xs > .input-group-addon, .input-group-xs > .input-group-btn > .btn {
+    height: 26px;
+    padding: 0 5px;
+    font-size: 12px;
+    line-height: 1.5;
+    border-radius: 3px;
+  }
+  .order-table .order-hd .dropdown-toggle:hover + .order-snapshot {
+    display: block;
+  }
+  .order-table .order-hd .order-snapshot{
+    padding: 10px 15px;
+    display: none;
+    width: 250px;
+    position: absolute;
+    top: 32px;
+    left: 39px;
+    border: 1px solid rgba(0,0,0,0.15);
+    -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.3);
+    -moz-box-shadow: 0 0 5px rgba(0,0,0,0.3);
+    -o-box-shadow: 0 0 5px rgba(0,0,0,0.3);
+    box-shadow: 0 0 5px rgba(0,0,0,0.3);
+  }
+  .order-snapshot .title {
+    border-top: 1px dashed #ddd;
+  }
+
+  .order-snapshot .dl-horizontal dt {
+    width: 60px;
+    text-align: left;
+    font-weight: normal;
+    color: #999;
+    padding: 4px 0;
+  }
+
+  .order-snapshot .dl-horizontal dd {
+    margin-left: 80px;
+    padding: 4px 0;
+  }
+
+  /*arrow*/
+  .order-send {
+    position: relative;
+  }
+
+  .order-send.arrow-border:before, .arrow-border:after {
+    content: '';
+    position: absolute;
+    top: 20px;
+    width: 0;
+    height: 0;
+    border: 7px solid transparent;
+  }
+
+  .order-send.arrow-border.arrow-bottom-right:before {
+    content: '';
+    position: absolute;
+    left: -13px;
+    border-bottom-color: #fff;
+    border-right-color: #fff;
+    margin-top: -10px;
+  }
+
+  .menu .new-dot {
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    font-size: 12px;
+    color: #fff;
+    font-weight: inherit;
+    top: -2px;
+  }
+  .f14{
+    font-size:14px;
+  }
+  .screen .sreach input {
+    width: 288px
+  }
+  .modal {
+    position: fixed;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    z-index: 1050;
+    display: none;
+    overflow: hidden;
+    -webkit-overflow-scrolling: touch;
+    outline: 0;
+    margin: 0 !important;
+  }
+  .modal-open .modal {
+    overflow-x: hidden;
+    overflow-y: auto;
+  }
+  #empty {
+    padding: 70px 0;
+    margin: 0 auto;
+    text-align: center;
+  }
+  #empty .left_img {
+    display: inline-block;
+    color: #3f84f6;
+  }
+  #empty .left_img a {
+    font-size: 25px;
+    color: #3f84f6;
+  }
+  #empty .right_link p {
+    margin: 0;
+    font-size: 14px;
+    color: #666;
+  }
+  #empty_info .empty_title {
+    color: #3f84f6;
+    font-size: 18px;
+  }
+  #empty_info .empty_explain {
+    font-size: 16px;
+    color: #999;
+  }
+  #empty_info .empty_explain .info {
+    text-indent: -22px;
+  }
+  .f16 {
+    font-size: 16px !important;
+  }
+  .f14 {
+    font-size: 14px !important;
+  }
+  #empty_info {
+    padding-left: 60px;
+    padding-bottom: 40px;
+  }
+  table tbody tr td {
+    border-bottom: #e8e8e8 1px solid;
+    border-right: #e8e8e8 1px solid;
+    font-size: 14px;
+    color: #333;
+  }
+  .ng-table-pager::after {
+    clear: both;
+    content: ' ';
+    zoom: 1;
+    display: block;
+    visibility: hidden;
+  }
+  .ng-table-pager {
+    padding-right: 20px;
+    padding-top: 50px;
+    margin-right: 0 !important;
+  }
+  .text-mns {
+    padding-right: 15px;
+    position: absolute;
+    bottom: 64px;
+    right: 20px;
+    font-size: 12px;
+  }
+  .Boom18 {
+    bottom: 18px;
+  }
+  .fixed {
+    width: 40px;
+  }
+  .text-trans {
+    left: 50%;
+    right: auto;
+    top: 50%;
+    margin: -20px 0 0 -40px;
+  }
+  .oder01 ul li {
+    margin-left: 0px
+  }
+  .order-table .inquiry-bd .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;
+  }
+</style>
+<!--<link rel="stylesheet" href="static/css/public.css">-->
+<div class="user_right fr" style="position: relative">
+  <div class="com_tab" style="margin-bottom: 10px">
+    <ul class="fl" style="width: 100%">
+      <li><a ui-sref="vendorInvoice">优软商城</a></li>
+      <li class="active"><a>B2B</a></li>
+      <li class="down-purchase" style="margin-right: 20px;min-width: 80px">
+          <span ng-click="exportXls()">
+            <i class="fa fa-file-excel-o fa-fw"></i>导出Excel
+        </span>
+      </li>
+
+    </ul>
+  </div>
+  <!--<div class="oder01" style="margin-bottom: 10px">-->
+    <!--<ul>-->
+      <!--<li ng-class="{'active': active=='done'}" ng-click="setActive('done')"><a>已发布</a></li>-->
+      <!--<li ng-class="{'active': active=='todo'}" ng-click="setActive('todo')"><a>待发布</a></li>-->
+    <!--</ul>-->
+  <!--</div>-->
+  <div class="screen check-filter">
+    <div class="radio-block date-radio" style="width: 33%">
+      时间:
+      <label class="com-check-radio">
+        <input type="radio" id="oneMonth" name="date" ng-click="changeDateZone(1);condition.$open=false" checked>
+        <label for="oneMonth"></label>
+        30天
+      </label>
+      <label class="com-check-radio">
+        <input type="radio" id="threeMonth" name="date" ng-click="changeDateZone(3);condition.$open=false">
+        <label for="threeMonth"></label>
+        90天
+      </label>
+      <label class="com-check-radio">
+        <input type="radio" id="sixMonth" name="date" ng-click="changeDateZone(6);condition.$open=false">
+        <label for="sixMonth"></label>
+        180天
+      </label>
+      <label class="com-check-radio">
+        <input type="radio" id="autoMonth" name="date" ng-click="condition.$open=!condition.$open;changeDateZone(-1)">
+        <label for="autoMonth"></label>
+        自定义
+      </label>
+    </div>
+    <div class="sreach fr">
+      <div ng-show="condition.$open" class="date fl">
+        <div class="data-input">
+          <input type="text" ng-model="condition.dateFrom"
+                 class="form-control select-adder" placeholder="起始时间"
+                 datepicker-popup="yyyy-MM-dd"
+                 is-open="condition.$fromOpened"
+                 max-date="condition.dateTo" current-text="今天" clear-text="清除" close-text="关闭"
+                 ng-focus="openFilterDatePicker($event, condition, '$fromOpened')"
+                 datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                 style="width: 130px"
+          />
+          <button class="open" ng-click="openFilterDatePicker($event, condition, '$fromOpened')"></button>
+        </div>
+
+        <em>–</em>
+        <div class="data-input">
+          <input type="text" ng-model="condition.dateTo"
+                 class="form-control select-adder" placeholder="结束时间"
+                 datepicker-popup="yyyy-MM-dd"
+                 is-open="condition.$toOpened"
+                 min-date="condition.dateFrom" current-text="今天" clear-text="清除" close-text="关闭"
+                 ng-focus="openFilterDatePicker($event, condition, '$toOpened')"
+                 datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                 style="width: 130px"
+          />
+          <button class="open" ng-click="openFilterDatePicker($event, condition, '$toOpened')"></button>
+        </div>
+      </div>
+      <div class="sreach-input fr">
+        <input type="search" placeholder="单据编号/客户名称/物料名称" class="form-control" ng-model="keyword" ng-search="onSearch()"/>
+        <a class="seek" href="javascript:void(0)" ng-click="onSearch()">搜索</a>
+      </div>
+    </div>
+  </div>
+  <table class="order-table block" ng-table="tableParams">
+    <thead>
+    <tr class="header">
+      <th>商品</th>
+      <th width="120">单价</th>
+      <th width="100">发票数量</th>
+      <th width="120">发票金额</th>
+      <th width="140">单据信息</th>
+      <th width="70">操作</th>
+    </tr>
+    <!--<tr class="sep-row">-->
+      <!--<td colspan="6"></td>-->
+    <!--</tr>-->
+    </thead>
+    <tbody ng-if="$data.length === 0">
+    <tr>
+      <td colspan="6">
+        <div id="empty">
+          <div class="left_img">
+            <a href="http://www.ubtob.com/" target="_blank" title="优软云首页"><img src="static/img/empty/uas_empty.png"></a>
+            <a href="#/index" title="B2B商务首页">B2B 商务</a>
+          </div>
+          <div class="right_link">
+            <p>暂无对应的发票信息</p>
+          </div>
+        </div>
+      </td>
+    </tr>
+    </tbody>
+    <tbody ng-repeat="bill in $data">
+    <tr class="order-hd">
+      <td class="first" colspan="6">
+        <div class="order-main">
+          <!--<span> <input type="checkbox" class="selector"
+            ng-model="bill.$selected">
+          </span> -->
+          <span class="text-num text-bold" title="{{::bill.date | date: 'yyyy年MM月dd日 hh:mm'}}">
+            日期:{{bill.date | date:'yyyy-MM-dd'}}
+          </span>
+          <span>流水号:<a style="color: #5078cb;" ui-sref="fa_apBill_detail({id:bill.id})"><span
+            class="text-num" ng-bind="::bill.code"></span></a></span>
+          <span title="客户名称">
+            <img src="static/img/user/images/shop_home.png">{{::bill.enterprise.enName}}
+          </span>
+          <span ng-if="isUser" title="票据总额">
+            <span ng-bind="::bill.currency"></span>
+            <span ng-bind="::bill.apAmount"></span>
+          </span>
+          <div class="operates">
+            <!-- <a href="#" class="text-muted" title="打印">
+              <i class="fa fa-print fa-lg fa-fw"></i>
+            </a> -->
+          </div>
+        </div>
+
+      </td>
+      <!--<td colspan="3"></td>-->
+      <!--<td colspan="1" class="order-sum text-num">-->
+			<!---->
+      <!--</td>-->
+    </tr>
+    <tr class="order-bd order-bdd" ng-repeat="item in bill.items">
+      <td class="product">
+        <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" title="{{::item.product.spec}}"
+             ng-bind="::item.product.spec"></div>
+      </td>
+      <td class="text-center">
+        <div class="text-num" title="{{::item.price}}">
+          <span ng-if="!isUser" ng-bind="::bill.currency"></span>
+          <span ng-if="!isUser" ng-bind="::item.price"></span>
+          <span ng-if="isUser" ng-bind="'-'"></span>
+        </div>
+        <div>&nbsp;</div>
+        <div class="text-muted"
+             title="{{::'税率:' + item.taxrate + '%'}}">
+          税率:<span class="text-num" ng-bind="::item.taxrate"></span>%
+        </div>
+      </td>
+      <td class="text-center">
+        <div class="text-num"
+             title="{{::item.qty}}" ng-bind="::item.qty"></div>
+      </td>
+      <td class="text-center br-l">
+        <div class="text-num text-bold">
+          <span ng-if="!isUser" ng-bind="::bill.currency"></span>
+          <span ng-if="!isUser" ng-bind="::item.apAmount"></span>
+          <span ng-if="isUser" class="text-num" ng-bind="::'-'"></span>
+        </div>
+        <div>&nbsp;</div>
+        <div class="text-muted">
+          税金:
+          <span ng-if="!isUser" class="text-num" ng-bind="::bill.currency"></span>
+          <span ng-if="!isUser" class="text-num" ng-bind="::item.taxAmount"></span>
+          <span ng-if="isUser" class="text-num" ng-bind="::'-'"></span>
+        </div>
+      </td>
+      <td class="br-l" colspan="2" ng-if="item.orderCode">
+        <div>单据编号:<span ng-bind="::item.orderCode"></span></div>
+        <div>
+          第 <span ng-bind="::item.orderDetno"></span> 行
+          &nbsp;&nbsp;&nbsp;&nbsp;数量:<span ng-bind="::item.thisvoQty">
+				</span><span class="text-muted" ng-bind="::item.product.unit"></span>
+        </div>
+        <div class="text-muted">单据金额:
+          <span ng-if="!isUser" class="text-num" ng-bind="::bill.currency"></span>
+          <span ng-if="!isUser" class="text-num" ng-bind="::item.amount"></span>
+          <span ng-if="isUser" class="text-num" ng-bind="::'-'"></span>
+        </div>
+      </td>
+      <td class="br-l" colspan="2" ng-if="!item.orderCode">
+        <div>
+          &nbsp;&nbsp;&nbsp;&nbsp;数量:<span ng-bind="::item.thisvoQty">
+				</span><span class="text-muted" ng-bind="::item.product.unit"></span>
+        </div>
+        <div class="text-muted">单据金额:
+          <span ng-if="!isUser" class="text-num" ng-bind="::bill.currency"></span>
+          <span ng-if="!isUser" class="text-num" ng-bind="::item.amount"></span>
+          <span ng-if="isUser" class="text-num" ng-bind="::'-'"></span>
+        </div>
+      </td>
+    </tr>
+    </tbody>
+  </table>
+  <div ng-if="infoCommon.totalElement > 0" class="text-mns text-right" ng-class="infoCommon.totalElement >= 20 ? '': 'Boom18'">
+    显示&nbsp;{{(infoCommon .page - 1 ) * infoCommon.size + 1}}-{{infoCommon.all >= 20 ? infoCommon.page *  infoCommon.size: (infoCommon.page - 1 ) * infoCommon.size + infoCommon.all}}&nbsp;条,共&nbsp;{{infoCommon.totalElement}}&nbsp;条
+  </div>
+</div>

+ 343 - 0
src/main/webapp/resources/view/vendor/b2b/apBill_detail.html

@@ -0,0 +1,343 @@
+<style>
+  .pane {
+    font-size: 14px;
+  }
+  .icon-purc {
+    display: inline-block;
+    background: url(static/img/icon/purc.ico);
+    height: 26px;
+    width: 26px;
+  }
+  .badge-success {
+    background: #5cb85c;
+    color: #ffffff;
+  }
+  .badge-warning {
+    background: #f0ad4e;
+    color: #ffffff;
+  }
+  .badge-info {
+    background: #5bc0de;
+    color: #ffffff;
+  }
+  .badge-primary {
+    background: #337ab7;
+    color: #ffffff;
+  }
+  .badge-danger {
+    background: #d9534f;
+    color: #ffffff;
+  }
+</style>
+<style>
+  .base-info-content {
+    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;
+  }
+  #order-detail-list {
+    font-size: 14px;
+  }
+  .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;
+  }
+  .f14 {
+    font-size: 14px !important;
+  }
+  #order-detail-list .row {
+    /*width: 96%;*/
+    margin: 0 auto;
+    line-height: 30px;
+  }
+  .base-info-content .item {
+    line-height: 26px;
+    /* border-bottom: 1px dotted #e8e8e8; */
+    padding: 5px 0;
+  }
+  #order-detail-list .title {
+    font-weight: inherit;
+  }
+  .base-info-content .title {
+    float: left;
+    width: 92px;
+    color: #333;
+    font-weight: bold;
+  }
+  #order-detail-list .content {
+    color: #666;
+  }
+  .base-info-content .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;
+    padding: 8px 0;
+    text-align: center;
+  }
+  #order-detail-list .table-default th, #order-detail-list .table-default td {
+    /*border-top: #ddd 1px dotted;*/
+  }
+  #order-detail-list .table-default tbody tr {
+    background: none;
+    position: relative;
+  }
+  #order-detail-list table.table-default.pms tbody tr td {
+    vertical-align: middle;
+    color: #323232;
+    min-height: 140px;
+    position: relative;
+    padding: 15px 0;
+    font-size: 14px;
+  }
+  [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {
+    display: none !important;
+  }
+  .text-bold {
+    font-weight: 700;
+  }
+
+  .text-num {
+    font-style: normal;
+    word-break: break-all;
+    font-size: 14px;
+  }
+  .text-muted {
+    color: #333;
+    font-size: 14px;
+  }
+  .bottomB {
+    border-bottom: 2px solid #f5f5f5;
+    padding: 15px 30px 15px 15px;
+  }
+
+  .title-div .f14{
+    border-left: 5px solid #5078cb;padding-left: 10px;
+  }
+
+  .order-number {
+    position: absolute;
+    top: -1px;
+    left: -1px;
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    text-align: center;
+    background: #f9f9f9;
+    font-weight: 500;
+    border: solid 1px #d5d5d5;
+    border-radius: 0 0 10px 0;
+  }
+  #order-detail-list .table-default.pms tbody tr td.product {
+    padding-left: 30px;
+  }
+  #order-detail-list .table-default tbody tr td{
+    border-right: 1px solid #e8e8e8;
+  }
+  .text-trans {
+    top: 14px;
+    right: 20px;
+  }
+  .f14{
+    font-size: 14px;
+  }
+</style>
+<div class="pane base-info-content fr" 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="bottomB">
+    <div class="title-div">
+      <span class="f14">单据资料</span>&nbsp;
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-6">
+        <span class="title">客户名称</span>
+        <div class="content" ng-bind="::bill.enterprise.enName"></div>
+      </div>
+      <div class="col-xs-6">
+        <span class="title">单据编号</span>
+        <div class="content text-num" ng-bind="::bill.code"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-3">
+        <span class="title">录单日期</span>
+        <div class="content" ng-bind="::bill.indate | date:'yyyy/MM/dd'"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">录单人</span>
+        <div class="content" ng-bind="::bill.recorder"></div>
+      </div>
+      <div class="col-xs-6" ng-if="bill.remark">
+        <span class="title">备注</span>
+        <div class="content" ng-bind="::bill.remark"></div>
+      </div>
+    </div>
+    </div>
+    <div class="bottomB">
+    <div class="title-div">
+      <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="bill.date | date:'yyyy/MM/dd'"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">付款日期</span>
+        <div class="content" ng-bind="bill.paydate | date:'yyyy/MM/dd'"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">币别</span>
+        <div class="content" ng-bind="::bill.currency"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">汇率</span>
+        <div class="content text-num" ng-bind="::bill.rate"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-3">
+        <span class="title">账期</span>
+        <div class="content" ng-bind="bill.yearMouth"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">应付总额</span>
+        <div class="content text-num" ng-bind="::isUser?'-':(bill.apAmount | number:2 || 0)"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">付款金额</span>
+        <div class="content" ng-bind="isUser?'-':(bill.payAmount || 0)"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">税金合计</span>
+        <div class="content" ng-bind="isUser?'-':(bill.taxSum || 0)"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-3" ng-show="bill.refNo">
+        <span class="title">发票号</span>
+        <div class="content" ng-bind="bill.refNo || ''"></div>
+      </div>
+      <div class="col-xs-6">
+        <span class="title">付款方式</span>
+        <div class="content" ng-bind="bill.payments"></div>
+      </div>
+    </div>
+    </div>
+    <div class="bottomB">
+    <div class="title-div">
+      <span class="f14">明细清单</span>&nbsp;
+    </div>
+    </div>
+    <div class="block">
+      <table class="block table table-default table-striped table-hover">
+        <thead>
+        <tr class="header">
+          <th class="br-r">序号</th>
+          <th width="250">商品</th>
+          <th>采购单号</th>
+          <th>出入库单号</th>
+          <th>数量</th>
+          <th>单价</th>
+          <th>税率</th>
+          <th>单据金额</th>
+          <th>本次开票数量</th>
+          <th>本次开票金额</th>
+          <th>已开票数</th>
+          <th>已转开票记录数</th>
+          <th ng-if="item.remark">备注</th>
+        </tr>
+        </thead>
+        <tbody ng-repeat="item in bill.items" style="text-align: center;">
+        <tr>
+          <td ng-bind="item.number"></td>
+          <td style="text-align: left;">
+            <div>物料编号:{{item.product.code}}</div>
+            <div>物料信息:{{item.product.title}}-{{item.product.spec || ''}}</div>
+            <div>单位:{{item.product.unit}}</div>
+          </td>
+          <td ng-bind="item.orderCode"></td>
+          <td ng-bind="item.pdinoutNo"></td>
+          <td ng-bind="item.thisvoQty"></td>
+          <td ng-bind="isUser?'-':item.price"></td>
+          <td ng-bind="item.taxrate"></td>
+          <td ng-bind="isUser?'-':item.amount"></td>
+          <td ng-bind="item.qty"></td>
+          <td ng-bind="isUser?'-':item.apAmount"></td>
+          <td ng-bind="item.invoQty"></td>
+          <td ng-bind="item.yQty"></td>
+          <td ng-if="item.remark" ng-bind="item.remark"></td>
+        </tr>
+        </tbody>
+      </table>
+    </div>
+  </div>
+</div>

+ 675 - 0
src/main/webapp/resources/view/vendor/b2b/apCheck.html

@@ -0,0 +1,675 @@
+<style>
+  body{
+    font-family: "Microsoft YaHei", "微软雅黑" !important;
+  }
+  .text-num{
+
+  }
+  .append{
+    color: #5078cb;font-size:12px; margin-left: 10px
+  }
+  .order-table td {
+    padding-top: 10px;
+    margin-bottom: 20px;
+    border-bottom: solid 1px #ccc;
+    border-top: solid 1px #e8e8e8;
+  }
+
+  .order-table td.first {
+    padding-left: 20px;
+  }
+
+  .order-table td.last {
+    padding-right: 20px;
+  }
+
+  .order-table td .static p {
+    display: inline-block;
+    line-height: 30px;
+    padding-top: 5px;
+    padding-bottom: 0px;
+    width: 150px;
+    font-size: 14px;
+    color: #666;
+    padding-left: 15px;
+    border-left: solid 1px #e8e8e8;
+  }
+  .order-table td .static p:first-child{
+    border-left: none;
+    width: auto;
+    padding-left: 0;
+  }
+  .order-table td .static p:last-child{
+    /*margin-left: 22px;*/
+  }
+  .order-table td .static p:nth-of-type(3){
+    margin-left: 20px;
+  }
+  .order-table td .main {
+    margin-top: 5px;
+    margin-bottom: 20px;
+    color: #333;
+  }
+  .static{
+    margin: 12px 0;
+  }
+  .order-table td .main strong {
+    font-size: 14px;
+  }
+
+  .order-table td .static p strong {
+    font-size: 14px;
+    font-weight: bold;
+    color: #888;
+  }
+
+  .order-table td.status {
+    position: relative;
+    border-left: solid 1px #e8e8e8;
+    padding: 10px;
+    vertical-align: top;
+  }
+
+  .order-table td.status .operate {
+    position: absolute;
+    display: block;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    height: 0px;
+    color: #ffffff;
+    font-size: 14px;
+    font-weight: bold;
+    line-height: 40px;
+    opacity: 0.8;
+    transition: height ease-in-out 0.5s;
+    text-decoration: none;
+  }
+
+  .order-table td.status .operate-undo {
+    background: #428bca;
+  }
+
+  .order-table td.status .operate-done {
+    background: #cccccc;
+  }
+
+  .order-table td.status:hover  .operate {
+    height: 40px;
+  }
+
+  .unPrinted {
+    color: #56a022;
+  }
+  .order-table td .main strong{
+    font-weight: normal;
+  }
+  .order-table td{
+    font-size: 14px;
+  }
+  .order-table th{
+    text-align: center;
+  }
+  .order-table .text-trans{
+    margin-top: -17px;
+    margin-right: 14px;
+  }
+  .menu .new-dot{
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    font-size: 12px;
+    color: #fff;
+    font-weight: inherit;
+    top: -2px;
+  }
+  .block {
+    position: relative;
+  }
+</style>
+<style>
+  .com_tab {
+    height: 40px;
+    margin-bottom: 10px;
+  }
+  .com_tab ul {
+    width: 100%;
+    margin: 0 auto;
+    height: 40px;
+    line-height: 40px;
+    background: #fff;
+  }
+  .com_tab ul li {
+    height: 40px;
+    text-align: center;
+    float: left;
+    position: relative;
+    min-width: 110px;
+  }
+  .com_tab:nth-of-type(1) ul li.active > a {
+    border-bottom: #fff;
+    background: #5078cb;
+    color: #fff !important;
+  }
+  .com_tab ul li a {
+    min-width: 110px;
+  }
+  .com_tab ul li > a {
+    font-size: 14px;
+    height: 40px;
+    padding: 0 20px;
+    display: inline-block;
+  }
+  .com_tab:nth-of-type(1) ul li::after {
+    background:url('/static/img/vendor/images/downicon.png')
+    width: 11px;
+    height: 6px;
+    position: absolute;
+    bottom: 0px;
+    left: 50%;
+    content: ' ';
+    margin-left: -5px;
+    display: none;
+  }
+  .com_tab ul li::after {
+    background:url('/static/img/vendor/images/downicon.png');
+    width: 11px;
+    height: 6px;
+    position: absolute;
+    bottom: 0px;
+    left: 50%;
+    content: ' ';
+    margin-left: -5px;
+    display: none;
+  }
+  .com_tab ul li.active:after {
+    display: block;
+  }
+  .oder01 ul li.active a{
+    border-bottom: 1px solid #fff;
+    color: #f15601;
+  }
+  .oder01 ul li.active a em {
+    color: #f15601;
+  }
+  .oder01 ul li a em {
+    color: #323232
+  }
+  .screen {
+    background: #fff;
+    padding-top: 10px;
+    padding-right: 11px;
+    line-height: 32px;
+    padding-left: 22px;
+    width: 100%;
+    height: 50px;
+    position: relative;
+  }
+  .screen .sreach input {
+    border: #5078cb 1px solid;
+    height: 32px;
+    width: 280px;
+    box-shadow: none;
+    padding-left: 10px;
+    background: #fff;
+    float: left;
+    vertical-align: middle;
+    font-size: 14px;
+  }
+  .screen .sreach a.seek {
+    width: 58px;
+    height: 32px;
+    background: #5078cb;
+    color: #fff;
+    line-height: 32px;
+    float: none;
+    border-radius: 2px;
+    vertical-align: unset;
+  }
+  .order-table {
+    background: #fff;
+    width: 100%;
+  }
+  .order-table .header > th {
+    height: 38px;
+    text-align: center;
+    background: #fff;
+    border-top: 1px solid #e8e8e8;
+    border-bottom: 1px solid #e8e8e8;
+    font-size: 14px;
+  }
+
+  .order-table .sep-row {
+    height: 10px;
+  }
+
+  .order-table .selector {
+    vertical-align: middle;
+    margin: 0 0 2px 0;
+  }
+
+  .toolbar label {
+    margin-right: 10px;
+    margin-bottom: 0;
+  }
+
+  .toolbar .select_all {
+    margin: 0 6px 0 10px;
+    line-height: 20px;
+  }
+
+  .toolbar .btn {
+    -moz-border-radius: 2px;
+    margin-right: 5px;
+    border: 1px solid #dcdcdc;
+    border-radius: 2px;
+    -webkit-border-radius: 2px;
+  }
+
+  .order-table .order-hd {
+    background: #f5f5f5;
+    height: 40px;
+    line-height: 40px;
+  }
+
+  .order-table .order-hd td.first {
+    padding-left: 20px;
+  }
+
+  .order-table .order-hd .order-main span {
+    margin-right: 8px;
+  }
+
+  .order-table .order-hd .order-code {
+    font-style: normal;
+    font-family: verdana;
+  }
+
+  .order-table .order-hd .order-sum {
+    position: relative;
+    padding: 0 5px;
+  }
+
+  .order-table .order-hd .dropdown-toggle {
+    line-height: 40px;
+    display: block;
+    color: #5078cb;
+    /*padding: 0 10px;*/
+  }
+
+
+  .order-table .operates {
+    display: none;
+  }
+
+  .order-table > tbody:hover .operates {
+    display: block;
+  }
+
+  .order-table .order-bd {
+    border-bottom: 1px solid #e6e6e6;
+  }
+
+  .order-table .order-bd > td {
+    padding: 10px 5px;
+    text-align: center;
+  }
+
+  .order-table .order-bd .product {
+    padding-left: 20px;
+  }
+
+  .input-xs, .input-group-xs > .form-control, .input-group-xs > .input-group-addon, .input-group-xs > .input-group-btn > .btn {
+    height: 26px;
+    padding: 0 5px;
+    font-size: 12px;
+    line-height: 1.5;
+    border-radius: 3px;
+  }
+  .order-table .order-hd .dropdown-toggle:hover + .order-snapshot {
+    display: block;
+  }
+  .order-table .order-hd .order-snapshot{
+    padding: 10px 15px;
+    display: none;
+    width: 250px;
+    position: absolute;
+    top: 32px;
+    left: 39px;
+    border: 1px solid rgba(0,0,0,0.15);
+    -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.3);
+    -moz-box-shadow: 0 0 5px rgba(0,0,0,0.3);
+    -o-box-shadow: 0 0 5px rgba(0,0,0,0.3);
+    box-shadow: 0 0 5px rgba(0,0,0,0.3);
+  }
+  .order-snapshot .title {
+    border-top: 1px dashed #ddd;
+  }
+
+  .order-snapshot .dl-horizontal dt {
+    width: 60px;
+    text-align: left;
+    font-weight: normal;
+    color: #999;
+    padding: 4px 0;
+  }
+
+  .order-snapshot .dl-horizontal dd {
+    margin-left: 80px;
+    padding: 4px 0;
+  }
+
+  /*arrow*/
+  .order-send {
+    position: relative;
+  }
+
+  .order-send.arrow-border:before, .arrow-border:after {
+    content: '';
+    position: absolute;
+    top: 20px;
+    width: 0;
+    height: 0;
+    border: 7px solid transparent;
+  }
+
+  .order-send.arrow-border.arrow-bottom-right:before {
+    content: '';
+    position: absolute;
+    left: -13px;
+    border-bottom-color: #fff;
+    border-right-color: #fff;
+    margin-top: -10px;
+  }
+
+  .menu .new-dot {
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    font-size: 12px;
+    color: #fff;
+    font-weight: inherit;
+    top: -2px;
+  }
+  .f14{
+    font-size:14px;
+  }
+  .screen .sreach input {
+    width: 288px
+  }
+  .modal {
+    position: fixed;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    z-index: 1050;
+    display: none;
+    overflow: hidden;
+    -webkit-overflow-scrolling: touch;
+    outline: 0;
+    margin: 0 !important;
+  }
+  .modal-open .modal {
+    overflow-x: hidden;
+    overflow-y: auto;
+  }
+  #empty {
+    padding: 70px 0;
+    margin: 0 auto;
+    text-align: center;
+  }
+  #empty .left_img {
+    display: inline-block;
+    color: #3f84f6;
+  }
+  #empty .left_img a {
+    font-size: 25px;
+    color: #3f84f6;
+  }
+  #empty .right_link p {
+    margin: 0;
+    font-size: 14px;
+    color: #666;
+  }
+  #empty_info .empty_title {
+    color: #3f84f6;
+    font-size: 18px;
+  }
+  #empty_info .empty_explain {
+    font-size: 16px;
+    color: #999;
+  }
+  #empty_info .empty_explain .info {
+    text-indent: -22px;
+  }
+  .f16 {
+    font-size: 16px !important;
+  }
+  .f14 {
+    font-size: 14px !important;
+  }
+  #empty_info {
+    padding-left: 60px;
+    padding-bottom: 40px;
+  }
+  table tbody tr td {
+    border-bottom: #e8e8e8 1px solid;
+    border-right: #e8e8e8 1px solid;
+    font-size: 14px;
+    color: #666;
+  }
+  .ng-table-pager::after {
+    clear: both;
+    content: ' ';
+    zoom: 1;
+    display: block;
+    visibility: hidden;
+  }
+  .ng-table-pager {
+    padding-right: 20px;
+    padding-top: 50px;
+    margin-right: 0 !important;
+  }
+  .text-mns {
+    padding-right: 15px;
+    position: absolute;
+    bottom: 64px;
+    right: 20px;
+    font-size: 12px;
+  }
+  .Boom18 {
+    bottom: 18px;
+  }
+  .fixed {
+    position: absolute;
+    left: 0px;
+    top: 0px;
+    width: 40px;
+  }
+</style>
+<!--<link rel="stylesheet" href="static/css/public.css">-->
+<div class="user_right fr" style="position: relative">
+  <div class="com_tab" style="margin-bottom: 10px">
+    <ul class="fl" style="width: 100%">
+      <li><a ui-sref="pay_center" href="javascript:void(0)">优软商城</a></li>
+      <li class="active"><a  href="javascript:void(0)">B2B</a></li>
+      <li class="down-purchase" style="margin-right: 0;min-width: 80px">
+        <a href="#" style="min-width: 80px" ng-click="exportXls()" target="_self" title="导出Excel表格" class="blue f14"><i class="fa fa-file-text fa-fw"></i>导出</a>
+      </li>
+      <li class="down-purchase" style="margin-right: 0;min-width: 80px">
+        <a class="text-simple append" style="min-width: 80px" ui-sref="fa_apCheckList" title="新增对账单">
+          <i class="fa fa-plus-square fa-fw"></i>新增对账单
+        </a>
+      </li>
+
+    </ul>
+  </div>
+  <div class="oder01" style="margin-bottom: 0px">
+    <ul>
+      <li ng-class="{'active': active=='all'}" ng-click="setActive('all')"><a> 全部</a></li>
+      <li ng-class="{'active': active=='done'}" ng-click="setActive('done')"><a>已确认(<em ng-class="{'color-black': !unread.replied }" ng-bind="unread.replied || 0"></em>)</a></li>
+      <li ng-class="{'active': active=='todo'}" ng-click="setActive('todo')"><a>未对账</a></li>
+      <li ng-class="{'active': active=='end'}" ng-click="setActive('end')"><a>已作废(<em ng-class="{'color-black': !unread.cancelled }" ng-bind="unread.cancelled || 0"></em>)</a></li>
+    </ul>
+  </div>
+  <div class="screen check-filter">
+    <div class="radio-block date-radio" style="width: 33%">
+      时间:
+      <label class="com-check-radio">
+        <input type="radio" id="oneMonth" name="date" ng-click="changeDateZone(1);condition.$open=false" checked>
+        <label for="oneMonth"></label>
+        30天
+      </label>
+      <label class="com-check-radio">
+        <input type="radio" id="threeMonth" name="date" ng-click="changeDateZone(3);condition.$open=false">
+        <label for="threeMonth"></label>
+        90天
+      </label>
+      <label class="com-check-radio">
+        <input type="radio" id="sixMonth" name="date" ng-click="changeDateZone(6);condition.$open=false">
+        <label for="sixMonth"></label>
+        180天
+      </label>
+      <label class="com-check-radio">
+        <input type="radio" id="autoMonth" name="date" ng-click="condition.$open=!condition.$open;changeDateZone(-1)">
+        <label for="autoMonth"></label>
+        自定义
+      </label>
+    </div>
+    <div class="sreach fr">
+      <div ng-show="condition.$open" class="date fl">
+        <div class="data-input">
+          <input type="text" ng-model="condition.dateFrom"
+                 class="form-control select-adder" placeholder="起始时间"
+                 datepicker-popup="yyyy-MM-dd"
+                 is-open="condition.$fromOpened"
+                 max-date="condition.dateTo" current-text="今天" clear-text="清除" close-text="关闭"
+                 ng-focus="openFilterDatePicker($event, condition, '$fromOpened')"
+                 datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                 style="width: 130px"
+          />
+          <button class="open" ng-click="openFilterDatePicker($event, condition, '$fromOpened')"></button>
+        </div>
+
+        <em>–</em>
+        <div class="data-input">
+          <input type="text" ng-model="condition.dateTo"
+                 class="form-control select-adder" placeholder="结束时间"
+                 datepicker-popup="yyyy-MM-dd"
+                 is-open="condition.$toOpened"
+                 min-date="condition.dateFrom" current-text="今天" clear-text="清除" close-text="关闭"
+                 ng-focus="openFilterDatePicker($event, condition, '$toOpened')"
+                 datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                 style="width: 130px"
+          />
+          <button class="open" ng-click="openFilterDatePicker($event, condition, '$toOpened')"></button>
+        </div>
+      </div>
+      <div class="sreach-input fr">
+        <input type="search" placeholder="单据编号/客户名称/物料名称" class="form-control" ng-model="keyword" ng-search="onSearch()"/>
+        <a class="seek" href="javascript:void(0)" ng-click="onSearch()">搜索</a>
+      </div>
+    </div>
+  </div>
+  <table class="order-table block" ng-table="tableParams">
+    <thead>
+    <tr class="header">
+      <th width="230">对账期间</th>
+      <th width="180">对账总额</th>
+      <th width="180">明细条目</th>
+      <th width="100">商品总数</th>
+      <th width="100">对账结果</th>
+      <th width="100">操作</th>
+    </tr>
+    </thead>
+    <tbody ng-repeat="check in $data">
+    <tr class="order-bd">
+      <td colspan="6" style="text-align: left">
+        <a href="javascript:void(0)" ng-if="!isUnread(check.id)" class="circle-icon">
+          已读
+        </a>
+        <a href="javascript:void(0)" ng-if="isUnread(check.id)" class="no-circle-icon">
+          未读
+        </a>
+        <span class="text-num text-bold;font-weight:bold" title="录单时间">日期:{{::check.recordDate | date:'MM月dd日 HH:mm'}}</span>
+        &nbsp;&nbsp;&nbsp;
+        <span>
+          <!--<i class="fa fa-star" ng-class="{'text-default':check.status==201}"></i>-->
+          <img src="static/img/user/images/shop_home.png" style="margin-right: 5px">{{::check.custName}}</span>
+        <span style="margin-left: 100px;">单据编号:</span>
+        <span class="text-num"><a ui-sref="fa_apCheck_detail({id:check.id})" title="点击查看详情" ng-click="setOrdersRead(check.id)" style="color: #5078cb">{{::check.code}}</a></span>
+      </td>
+    </tr>
+    <tr class="order-bd" style="padding: 15px 0 ">
+      <td class="first info" colspan="1" style="text-align: left">
+        <div class="static">
+          <p><span class="f14 text-num">{{::check.beginDate | date:'yyyy/MM/dd'}} - {{::check.endDate | date:'yyyy/MM/dd'}}</span></p>
+        </div>
+      </td>
+      <td>
+        <p>
+          <strong class="text-num">{{::(isUser?'-':(check.checkAmount | number:2))}}</strong>
+          <span ng-if="!isUser" class="text-number">{{::check.currency}}</span>
+        </p>
+      </td>
+      <td>
+        <p>
+          <strong class="text-num">{{::check.items.length}}</strong> 条<br>
+        </p>
+      </td>
+      <td>
+        <p>
+          <strong class="text-num">{{getTotalProd(check) | number}}</strong> <i class="fa fa-cubes"></i>
+        </p>
+      </td>
+      <td class="status">
+        <div ng-if="check.checkStatus == '未对账'" class="text-center text-muted f14"><br>未对账!</div>
+        <div></div>
+        <div ng-if="check.checkStatus == '已确认'" class="text-center text-muted f14">
+          <br> <i class="fa fa-check-square-o"></i> 已确认
+        </div>
+        <div ng-if="check.checkStatus == '不同意'" class="text-center text-muted f14">
+          <br> <i class="fa fa-check-square-o"></i> 不同意
+        </div>
+        <div ng-if="check.checkStatus == '已作废'" class="text-center text-muted f14">
+          <br> <i class="fa fa-check-square-o"></i> 已作废
+        </div>
+      </td>
+      <td>
+        <div ng-hide="check.status" class="block">
+          <span class="text-trans error">未提交</span>
+        </div>
+        <div ng-show="check.status" class="block">
+          <span class="text-trans success">已提交</span>
+        </div>
+        <div class="" style="margin-top: 33px;margin-right: 20px;">
+          <a ng-click="print(check)" class="pull-right" title="打印{{check.print? '(已打印)':'(未打印)'}}" ng-class="{'unPrinted' : !check.print, 'text-muted': check.print}"><i class="fa fa-print fa-lg"></i>&nbsp;打印</a>
+        </div>
+        <!-- <a ui-sref="fa.apCheck_detail({id:check.id})" class="operate operate-undo text-center"
+           target="_blank">查看详情</a>	 -->
+      </td>
+    </tr>
+    </tbody>
+    <tbody ng-if="tableParams.total() == 0">
+    <tr>
+      <td colspan="6">
+        <div id="empty">
+          <div class="left_img">
+            <a href="http://www.ubtob.com/" target="_blank" title="优软云首页"><img src="static/img/empty/uas_empty.png"></a>
+            <a href="#/index" title="B2B商务首页">B2B 商务</a>
+          </div>
+          <div class="right_link">
+            <p ng-if="active != 'all'">暂无对账信息!</p>
+            <p ng-if="active == 'all'">您还未生成对账单,请立即新增对账!</p>
+            <a ng-if="active == 'all'" ui-sref="fa_apCheckList"><i class="fa fa-plus-square fa-fw"></i> 新增对账单</a>
+          </div>
+        </div>
+      </td>
+    </tr>
+    </tbody>
+  </table>
+  <div ng-if="infoCommon.totalElement > 0" class="text-mns text-right" ng-class="infoCommon.totalElement >= 20 ? '': 'Boom18'">
+    显示&nbsp;{{(infoCommon .page - 1 ) * infoCommon.size + 1}}-{{infoCommon.all >= 20 ? infoCommon.page *  infoCommon.size: (infoCommon.page - 1 ) * infoCommon.size + infoCommon.all}}&nbsp;条,共&nbsp;{{infoCommon.totalElement}}&nbsp;条
+  </div>
+</div>

+ 471 - 0
src/main/webapp/resources/view/vendor/b2b/apCheckList.html

@@ -0,0 +1,471 @@
+<style>
+  .form-horizontal .form-group-inline, .form-horizontal .form-group-inline .form-group {
+    margin-left: 0;
+    margin-right: 0;}
+  .add-apCheckList {
+    background: #fff
+  }
+
+  .add-apCheckList input[type="checkbox"] {
+    /*width: 16px;
+    height: 16px*/
+  }
+
+  .add-apCheckList .table-wrap {
+    overflow: hidden
+  }
+
+  .add-apCheckList .table-header-wrap {
+    background: #f9f9f9;
+    overflow-x: hidden;
+    overflow-y: scroll;
+  }
+
+  .add-apCheckList .table-header-wrap table,.add-apCheckList .table-body-wrap table
+  {
+    width: 100%;
+    table-layout: fixed;
+    border-collapse: collapse;
+    border-spacing: 0;
+    margin-bottom: 0
+  }
+
+  .add-apCheckList .table-header-wrap th {
+    text-align: center;
+  }
+
+  .add-apCheckList .table-body-wrap {
+    max-height: 600px;
+    overflow-x: auto;
+    overflow-y: scroll;
+  }
+
+  .add-apCheckList td {
+    word-break: break-all;
+    text-align: center;
+  }
+
+  .add-apCheckList tbody {
+    overflow: auto;
+  }
+
+  #order-detail-list .input-sm {
+    border: #ccc 1px solid;
+  }
+
+  .has-feedback input[type="search"] {
+    padding-right: 0 !important;
+  }
+  .table>tbody>tr>td{
+    vertical-align: middle;
+  }
+  .form-horizontal .form-group-sm .control-label{
+    font-size: 14px;
+  }
+  .form-group .form-control{
+    font-size: 14px;
+  }
+  .modal-open .modal {
+    overflow-y: auto;
+  }
+</style>
+<style>
+  .base-info-content {
+    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;
+  }
+  #order-detail-list {
+    font-size: 14px;
+  }
+  .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;
+  }
+  .f14 {
+    font-size: 14px !important;
+  }
+  #order-detail-list .row {
+    /*width: 96%;*/
+    margin: 0 auto;
+    line-height: 30px;
+  }
+  .base-info-content .item {
+    line-height: 26px;
+    /* border-bottom: 1px dotted #e8e8e8; */
+    padding: 5px 0;
+  }
+  #order-detail-list .title {
+    font-weight: inherit;
+  }
+  .base-info-content .title {
+    float: left;
+    width: 92px;
+    color: #969595;
+    font-weight: bold;
+  }
+  #order-detail-list .content {
+    /*color: #666;*/
+  }
+  .base-info-content .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;
+    padding: 8px 0;
+    text-align: center;
+  }
+  #order-detail-list .table-default th, #order-detail-list .table-default td {
+    /*border-top: #ddd 1px dotted;*/
+  }
+  #order-detail-list .table-default tbody tr {
+    background: none;
+    position: relative;
+  }
+  #order-detail-list table.table-default.pms tbody tr td {
+    vertical-align: middle;
+    color: #323232;
+    min-height: 140px;
+    position: relative;
+    padding: 15px 0;
+    font-size: 14px;
+  }
+  [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {
+    display: none !important;
+  }
+  .text-bold {
+    font-weight: 700;
+  }
+
+  .text-num {
+    font-style: normal;
+    word-break: break-all;
+    font-size: 14px;
+  }
+  .text-muted {
+    color: #333;
+    font-size: 14px;
+  }
+  .bottomB {
+    border-bottom: 2px solid #f5f5f5;
+    padding: 15px 30px 15px 15px;
+  }
+
+  .title-div .f14{
+    border-left: 5px solid #5078cb;padding-left: 10px;
+  }
+
+  .order-number {
+    position: absolute;
+    top: -1px;
+    left: -1px;
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    text-align: center;
+    background: #f9f9f9;
+    font-weight: 500;
+    border: solid 1px #d5d5d5;
+    border-radius: 0 0 10px 0;
+  }
+  #order-detail-list .table-default.pms tbody tr td.product {
+    padding-left: 30px;
+  }
+  #order-detail-list .table-default tbody tr td{
+    border-right: 1px solid #e8e8e8;
+  }
+  .text-trans {
+    top: 14px;
+    right: 20px;
+  }
+  .f14{
+    font-size: 14px;
+  }
+</style>
+
+<div class="pane base-info-content fr" id="order-detail-list">
+<div class="add-apCheckList">
+    <div class="pub-com_head">
+      <span>新增对账单</span>
+      <div class="p-right"></div>
+    </div>
+    <form class="form-horizontal"
+          style="padding-top: 10px; padding-bottom: 20px;">
+      <div class="loading" ng-class="{'in': loading}">
+        <!--<i></i>-->
+        <div class="wrap">
+          <div class="outer"></div>
+        </div>
+      </div>
+      <div class="form-group form-group-sm form-group-inline">
+        <label class="col-sm-2 control-label">客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户:</label>
+        <div class="col-sm-4">
+          <div class="form-group form-group-sm input-group input-group-sm input-trigger">
+            <input type="text" class="form-control input-sm" id="suuorname"
+                   ng-model="suuorname" placeholder="选择对账客户"
+                   ng-change="getSimilarCustomers(suuorname)" name="suuorname"
+                   ng-focus="onFocus('suuorname')"
+                   typeahead="vendor.custName for vendor in getSimilarCustomers($viewValue)"
+                   autocomplete="off"
+                   typeahead-on-select="onAssociateCustomerClick($item)"
+                   spellcheck="false"
+                   autofocus />
+            <span class="input-group-btn">
+							<button class="btn btn-default" ng-click="searchCust(suuorname)">
+								<i class="fa fa-search" aria-hidden="true"></i>
+							</button>
+						</span>
+          </div>
+        </div>
+        <label class="col-sm-2 control-label">单据日期:</label>
+        <div class="col-sm-2" style="padding-right: 5px">
+          <div
+              class="form-group form-group-sm input-group input-group-sm input-trigger">
+            <input type="text" ng-model="sdateFrom" class="form-control"
+                   placeholder="起始日期" datepicker-popup="yyyy-MM-dd"
+                   is-open="condition.$fromOpened" max-date="condition.dateTo"
+                   current-text="今天" clear-text="清除" close-text="关闭"
+                   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                   ng-click="openDatePicker($event, condition, '$fromOpened')"
+                   ng-change="onDateCondition()" readonly> <span
+              class="input-group-btn">
+							<button type="button" class="btn btn-default"
+                      ng-click="openDatePicker($event, condition, '$fromOpened')">
+								<i class="fa fa-calendar"></i>
+							</button>
+						</span>
+          </div>
+        </div>
+        <div class="col-sm-2" style="padding-left: 5px">
+          <div
+              class="form-group form-group-sm input-group input-group-sm input-trigger">
+            <input type="text" ng-model="sdateTo" class="form-control"
+                   placeholder="截止日期" datepicker-popup="yyyy-MM-dd"
+                   is-open="condition.$toOpened" min-date="condition.dateFrom"
+                   current-text="今天" clear-text="清除" close-text="关闭"
+                   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                   ng-click="openDatePicker($event, condition, '$toOpened')"
+                   ng-change="onDateCondition()" readonly> <span
+              class="input-group-btn">
+							<button type="button" class="btn btn-default"
+                      ng-click="openDatePicker($event, condition, '$toOpened')">
+								<i class="fa fa-calendar"></i>
+							</button>
+						</span>
+          </div>
+        </div>
+      </div>
+      <div class="form-group form-group-sm form-group-inline">
+        <div class="col-sm-12 text-right">
+          <a ng-click="condition.$open=!condition.$open" class="text-simple"><span
+              ng-bind="condition.$open ? '收起筛选条件' : '更多筛选条件'"></span><i
+              class="fa fa-fw"
+              ng-class="{'fa-angle-up': condition.$open, 'fa-angle-down': !condition.$open}"></i></a>
+          <div class="btn-group btn-group-sm">
+            <a class="btn btn-default" ng-click="searchOrder()" title="筛选"><i class="fa fa-search fa-fw btn-icon-left"></i>筛选</a>
+            <a class="btn btn-default" ng-click="createApCheck(check.$selected)" ng-disabled="!data || data.length==0"><i class="fa fa-check-circle-o fa-fw btn-icon-left"></i>对账</a>
+            <a class="btn btn-default" ng-click="exportApcheckList()" title="导出Excel" ng-disabled="!data || data.length==0"><i class="fa fa-file-text fa-fw btn-icon-left"></i>导出</a>
+          </div>
+        </div>
+      </div>
+      <div class="form-group form-group-sm form-group-inline"
+           ng-show="condition.$open">
+        <label class="col-sm-2 control-label">应付供应商:</label>
+        <div class="col-sm-4">
+          <div class="form-group form-group-sm has-feedback">
+            <input type="search" class="form-control input-sm"
+                   ng-model="receiveName" placeholder="可用应付供应商名称筛选" /><span
+              class="form-control-feedback text-simple"><i
+              class="fa fa-search"></i></span>
+          </div>
+        </div>
+        <label class="col-sm-2 control-label">送货工厂:</label>
+        <div class="col-sm-4">
+          <div class="form-group form-group-sm has-feedback">
+            <input type="search" class="form-control input-sm"
+                   ng-model="factory" placeholder="请输入送货工厂名称" /><span
+              class="form-control-feedback text-simple"><i
+              class="fa fa-search"></i></span>
+          </div>
+        </div>
+      </div>
+      <div class="form-group form-group-sm form-group-inline"
+           ng-show="condition.$open">
+        <label class="col-sm-2 control-label">物料名称:</label>
+        <div class="col-sm-4">
+          <div class="form-group form-group-sm has-feedback">
+            <input type="search" class="form-control input-sm"
+                   ng-model="prodTitle" placeholder="请输入物料名称" /><span
+              class="form-control-feedback text-simple"><i
+              class="fa fa-search"></i></span>
+          </div>
+        </div>
+        <label class="col-sm-2 control-label">规&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格:</label>
+        <div class="col-sm-4">
+          <div class="form-group form-group-sm has-feedback">
+            <input type="search" class="form-control input-sm"
+                   ng-model="prodSpec" placeholder="请输入物料规格" /><span
+              class="form-control-feedback text-simple"><i
+              class="fa fa-search"></i></span>
+          </div>
+        </div>
+      </div>
+      <div class="form-group form-group-sm form-group-inline"
+           ng-show="condition.$open">
+        <label class="col-sm-2 control-label">税率:</label>
+        <div class="col-sm-4">
+          <div class="form-group form-group-sm has-feedback">
+            <input type="search" class="form-control input-sm"
+                   ng-model="taxRate" placeholder="请输入税率" /><span
+              class="form-control-feedback text-simple"><i
+              class="fa fa-search"></i></span>
+          </div>
+        </div>
+      </div>
+    </form>
+    <!-- 标签scroll-table用于表头滚动 -->
+    <div class="table-wrap" id="order-detail-list" scroll-table>
+      <div class="table-header-wrap">
+        <table class="table table-bordered">
+          <tr>
+            <th width="36" style="vertical-align: middle;"><input type="checkbox" name="checkbox"
+                                                                  ng-model="checkboxes.checked" ng-click="checkAll()"></th>
+            <th width="100">本次<br>对账数</th>
+            <th width="70">客户<br>名称</th>
+            <th width="60">单据<br>编号</th>
+            <th width = "60">发货<br>单号</th>
+            <th width="35">序号</th>
+            <th width="60">类型</th>
+            <th width="60">单据<br>日期</th>
+            <th width="90">应付<br>供应商</th>
+            <th width="70">客户<br>采购单</th>
+            <th width="65">客户<br>料号</th>
+            <th width="70">客户物<br>料名称</th>
+            <th width="70">客户规<br>格型号</th>
+            <th width="65">送货<br>工厂</th>
+            <th width="55">数量</th>
+            <th width="40">单价</th>
+            <th width="30">币别</th>
+            <th width="40">税率</th>
+            <th width="60">金额</th>
+            <th width="70">本次对<br>账金额
+            </th>
+          </tr>
+        </table>
+      </div>
+      <div class="table-body-wrap">
+        <table class="table table-bordered">
+          <tr ng-repeat="check in data"
+              ng-if="((condition.dateFrom == '') || ((condition.dateFrom !== '') && (condition.dateFrom <= check.pidate))) && ((condition.dateTo == '') || ((condition.dateTo !== '') && (condition.dateTo >= check.pidate)))"
+              class="thAlign" style="height: 40px;">
+            <td width="36" style="text-align: center;vertical-align: middle;"><input
+                ng-model="check.$selected" name="checkbox"
+                ng-click="checkOne(check)" ng-change="getTotalMoney()"
+                type="checkbox"></td>
+            <td width="100"><input ng-model="check.thischeckqty"
+                                   type="number" max="data.maxThisCheckQty"
+                                   min="data.minThisCheckQty" ng-change="getTotalMoney()"
+                                   style="width: 75px;" class=" input-sm text-center"></td>
+            <td width="70" title="{{check.custname}}"><div
+                style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.custname}}</div></td>
+            <td width="60">{{::check.inoutno}}</td>
+            <td width="60">{{::check.sendcode}}</td>
+            <td width="35" align="center">{{::check.detno}}</td>
+            <td width="60">{{::check.piclass}}</td>
+            <td width="60">{{::check.pidate | date:'yyyy-MM-dd' }}</td>
+            <td width="90" title="{{check.receivename}}">
+              <div
+                  style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.receivename}}</div>
+            </td>
+            <td width="70">{{::check.ordercode}}</td>
+            <td width="65">{{::check.prodcode}}</td>
+            <td width="70" title="{{check.prodtitle}}">
+              <div
+                  style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.prodtitle}}</div>
+            </td>
+            <td width="70" title="{{check.prodspec}}"><div
+                style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.prodspec}}</div></td>
+            <td width="65">{{::check.factory}}</td>
+            <td width="55">{{::check.qty}}</td>
+            <td width="40">{{::check.orderprice}}</td>
+            <td width="30">{{::check.currency}}</td>
+            <td width="40" align="center">{{::check.taxrate}}</td>
+            <td width="60">{{::(check.qty || 0)*(check.orderprice || 0) |
+              number:2}}</td>
+            <td width="60">{{::(check.orderprice || 0)*(check.thischeckqty || 0) | number:2}}</td>
+          </tr>
+          <tr ng-if="!data || data.length==0">
+            <td colspan="19">
+              <div class="empty-block">
+                <i class="fa fa-exclamation-circle"></i>
+                <p class="text-muted">没有对账数据,请先筛选</p>
+              </div>
+            </td>
+          </tr>
+        </table>
+      </div>
+      <div style="padding: 10px 20px">总金额合计:{{totalMoney | number:2 || 0}}</div>
+    </div>
+  </div>
+</div>

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

@@ -0,0 +1,323 @@
+<style>
+  .pane {
+    font-size: 14px;
+  }
+  .table>tbody+tbody{
+    border-top: 0;
+  }
+  #order-detail-list .table-default>tbody td {
+    border-top: #ddd 1px solid;
+  }
+</style>
+<style>
+  .base-info-content {
+    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;
+  }
+  #order-detail-list {
+    font-size: 14px;
+  }
+  .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;
+  }
+  .f14 {
+    font-size: 14px !important;
+  }
+  #order-detail-list .row {
+    /*width: 96%;*/
+    margin: 0 auto;
+    line-height: 30px;
+  }
+  .base-info-content .item {
+    line-height: 26px;
+    /* border-bottom: 1px dotted #e8e8e8; */
+    padding: 5px 0;
+  }
+  #order-detail-list .title {
+    font-weight: inherit;
+  }
+  .base-info-content .title {
+    float: left;
+    width: 92px;
+    color: #969595;
+    font-weight: bold;
+  }
+  #order-detail-list .content {
+    /*color: #666;*/
+  }
+  .base-info-content .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;
+    padding: 8px 0;
+    text-align: center;
+  }
+  #order-detail-list .table-default th, #order-detail-list .table-default td {
+    /*border-top: #ddd 1px dotted;*/
+  }
+  #order-detail-list .table-default tbody tr {
+    background: none;
+    position: relative;
+  }
+  #order-detail-list table.table-default.pms tbody tr td {
+    vertical-align: middle;
+    color: #323232;
+    min-height: 140px;
+    position: relative;
+    padding: 15px 0;
+    font-size: 14px;
+  }
+  [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {
+    display: none !important;
+  }
+  .text-bold {
+    font-weight: 700;
+  }
+
+  .text-num {
+    font-style: normal;
+    word-break: break-all;
+    font-size: 14px;
+  }
+  .text-muted {
+    color: #333;
+    font-size: 14px;
+  }
+  .bottomB {
+    border-bottom: 2px solid #f5f5f5;
+    padding: 15px 30px 15px 15px;
+  }
+
+  .title-div .f14{
+    border-left: 5px solid #5078cb;padding-left: 10px;
+  }
+
+  .order-number {
+    position: absolute;
+    top: -1px;
+    left: -1px;
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    text-align: center;
+    background: #f9f9f9;
+    font-weight: 500;
+    border: solid 1px #d5d5d5;
+    border-radius: 0 0 10px 0;
+  }
+  #order-detail-list .table-default.pms tbody tr td.product {
+    padding-left: 30px;
+  }
+  #order-detail-list .table-default tbody tr td{
+    border-right: 1px solid #e8e8e8;
+  }
+  .text-trans {
+    top: 14px;
+    right: 20px;
+  }
+  .f14{
+    font-size: 14px;
+  }
+</style>
+
+<div class="pane base-info-content fr" id="order-detail-list"  ng-if="haveSelected">
+  <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="bottomB">
+    <div class="title-div">
+      <span class="f14">单据资料</span>&nbsp;
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-6">
+        <span class="title">客户名称</span>
+        <div class="content" ng-bind="::data.custName"></div>
+      </div>
+      <div class="col-xs-6">
+        <span class="title">应付供应商</span>
+        <div class="content" ng-bind="::data.items[0].receiveName"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-6">
+        <span class="title">对账期间</span>
+        <div class="content text-num">{{::data.beginDate | date:'yyyy/MM/dd'}} - {{::data.endDate | date:'yyyy/MM/dd'}}</div>
+      </div>
+      <div class="col-xs-6">
+        <span class="title">单据编号</span>
+        <div class="content text-num" ng-bind="::data.code"></div>
+      </div>
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-6">
+        <span class="title">录单日期</span>
+        <div class="content" ng-bind="::data.recordDate | date:'MM月dd日 HH:mm'"></div>
+      </div>
+      <div class="col-xs-6">
+        <span class="title">录单人</span>
+        <div class="content" ng-bind="::data.recorder"></div>
+      </div>
+
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-6">
+        <span class="title">对账状态</span>
+        <div class="content" ng-bind="::data.checkStatus"></div>
+      </div>
+      <div ng-if="data.custreply" class="col-xs-6">
+        <span class="title">不同意原因</span>
+        <div class="content" ng-bind="data.custreply"></div>
+      </div>
+    </div>
+    <div class="row row-sm item" ng-if="data.remark">
+      <div class="col-xs-9">
+        <span class="title">备注</span>
+        <div class="content" ng-bind="::data.remark"></div>
+      </div>
+    </div>
+    </div>
+    <div class="bottomB">
+    <div class="title-div">
+      <span class="f14">财务信息</span>&nbsp;
+    </div>
+    <div class="row row-sm item">
+      <div class="col-xs-3">
+        <span class="title">对账总额</span>
+        <div class="content text-num" ng-bind="::(isUser?'-':(data.checkAmount | number:2))"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">币别</span>
+        <div class="content" ng-bind="::data.currency"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">汇率</span>
+        <div class="content text-num" ng-bind="::data.rate"></div>
+      </div>
+      <div class="col-xs-3">
+        <span class="title">日期</span>
+        <div class="content" ng-bind="data.apDate | date:'yyyy/MM/dd'"></div>
+      </div>
+    </div>
+    </div>
+    <div class="bottomB">
+    <div class="title-div">
+      <span class="f14">对账清单</span>&nbsp;
+    </div>
+    </div>
+    <div class="block" style="margin-bottom: 40px;    border-bottom: 1px solid #e8e8e8;">
+      <table class="block table table-default table-striped table-hover">
+        <thead>
+        <tr class="header">
+          <th width="30" style="padding:8px 0;">行号</th>
+          <th width="120">商品</th>
+          <th width="100">单据编号</th>
+          <th width="80">单据类型</th>
+          <th>序号</th>
+          <th>单价</th>
+          <th>税率</th>
+          <th>对账数量</th>
+          <th>对账金额</th>
+          <th width="40">采购单号</th>
+          <th>采购序号</th>
+        </tr>
+        </thead>
+        <tbody ng-repeat="item in data.items" style="text-align: center;">
+        <tr>
+          <td ng-bind="item.number" style="padding:8px 0;"></td>
+          <td style="max-width: 250px;" class="text-left">
+            <div>编号: <span ng-bind="item.prodCode"></span></div>
+            <div>规格: <span ng-bind="item.prodSpec"></span></div>
+          </td>
+          <td ng-bind="item.inoutno"></td>
+          <td ng-bind="item.orderClass"></td>
+          <td ng-bind="item.inoutnodetno"></td>
+          <td ng-bind="isUser?'-':item.price"></td>
+          <td ng-bind="item.taxrate"></td>
+          <td ng-bind="item.checkQty"></td>
+          <td ng-bind="isUser?'-':(item.amount | number:2)"></td>
+          <td ng-bind="item.orderCode"></td>
+          <td ng-bind="item.orderDetno"></td>
+        </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="row" style="margin: 0 auto 30px;">
+      <div ng-hide="data.status || !data.code" class="col-xs-1 col-xs-offset-5"><button class="btn btn-success" ng-click="submitApCheck()">提交</button></div>
+      <div ng-hide="data.status || !data.code"  class="col-xs-1"><button class="btn btn-info" ui-sref="fa.apCheck" ng-click="deleteApCheck()">删除</button></div>
+      <div ng-if="data.checkStatus == '不同意'" class="col-xs-1 col-xs-offset-5"><button class="btn btn-warning" ui-sref="fa.apCheck" ng-click="cancelApCheck(data)">作废</button></div>
+      <div ng-show="data.status == 314 && data.checkStatus != '已作废'" class="col-xs-1 col-xs-offset-5"><button class="btn btn-warning" ui-sref="fa.apCheck" ng-click="cancelApCheck(data)">作废</button></div>
+      <div class="col-xs-7 col-xs-offset-2" ng-show="data.status == 314" style="margin-top:5px">
+        <span class="text-muted">对账单的来源表,已被客户ERP反过账(删除失效),因此本对账单只能作废</span>
+      </div>
+    </div>
+  </div>
+</div>

+ 91 - 0
src/main/webapp/resources/view/vendor/b2b/modal/apcheck_customer.html

@@ -0,0 +1,91 @@
+<style>
+.headerline .content {
+	width: 200px;
+	font-size: 14px;
+}
+.modal-body {
+	min-height: 350px;
+}
+.modal-body .form-horizontal .form-control{
+	border: #3578ba 1px solid;
+	height: 36px;
+	line-height: 36px;
+}
+.modal-header h3 i.fa-close{
+	display: inline-block;
+	float: right;
+	line-height: 19px;
+	color: #666;
+	position: relative;
+	left: 6px;
+	}
+.modal-content{
+	margin-top: 10%;
+}
+.ng-table-pager{
+	padding: 0;
+}
+.form-group .input-group-addon {
+	width: 76px;
+	height: 34px;
+	display: inline-block;
+	line-height: 34px;
+	padding: 0;
+	background: #5078cb;
+	color: #fff;
+	font-size: 14px;
+}
+.form-group input {
+	width: 600px;
+	height: 34px;
+	border: 1px solid #ccc;
+	font-size: 12px;
+	display: inline-block;
+}
+</style>
+<div class="modal-body" style="padding-top: 0;">
+	<div class="modal-header" style="margin-bottom: 10px;">
+		<h3 class="modal-title">
+			<span>对账 - 选择客户</span>
+			<i class="fa fa-close fa-lg" ng-click="close()"></i>
+		</h3>
+	</div>
+	<form class="form-horizontal">
+		<div class="form-group" id="window-search">
+			<div class="col-md-12 col-sm-12">
+				<input type="text" class="form-control input-sm"
+					required placeholder="输入客户名称关键字查询" autofocus ng-model="keyword" ng-search="onSearch(keyword)">
+				<a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
+			</div>
+		</div>
+	</form>
+	<table class="block table table-default table-striped table-bordered"
+		ng-table="customerParams">
+		<thead>
+			<tr class="header">
+				<th>UU</th>
+				<th>客户名称</th>
+				<th>地址</th>
+				<td>启用对账</td>
+				<!--<th>操作</th>-->
+			</tr>
+		</thead>
+		<tbody>
+			<tr ng-repeat="customer in $data" ng-click="select(customer)" style="text-decoration: none;" ng-disabled = "customer.apcheck == 0" title="点击选择该客户">
+				<td class="text-center" >
+					<span ng-bind="::customer.myEnterprise.uu"></span>
+				</td>
+				<td class="text-center" >
+					<span ng-bind="::customer.myEnterprise.enName"></span>
+				</td>
+				<td class="text-center" >
+					<span ng-bind="::customer.myEnterprise.enAddress"></span>
+				</td>
+				<td class="text-center"><span ng-if="customer.apcheck != 0">启用</span>
+					<span ng-if="customer.apcheck == 0">未启用</span>
+				</td>
+				<!--<td class="text-center"><a class="btn btn-sm" title="选择" href="javascript:void(0)" ng-click="select(customer)" style="text-decoration: none;" ng-disabled = "customer.apcheck == 0">选择</a></td>-->
+			</tr>
+		</tbody>
+	</table>
+</div>

+ 6 - 1
src/main/webapp/resources/view/vendor/forstore/pay_center.html

@@ -628,8 +628,12 @@
     .oder01 ul li.active a{
         border-bottom: #fff;
         background: #5078cb;
+        border: 0px;
         color: #fff;
     }
+    .oder01 ul {
+        border-bottom: 0px
+    }
     .oder01 ul li::after{
         background: url('static/img/vendor/images/downicon.png');
         width: 11px;
@@ -679,7 +683,8 @@
     <div class="pay_record oder">
         <div class="oder01">
             <ul>
-                <li ng-if="tab != 'accountTab'" ng-class="{'active' : tab == 'paymentRecord'}"><a href="javascript:void(0)">应收对帐</a></li>
+                <li ng-if="tab != 'accountTab'" ng-class="{'active' : tab == 'paymentRecord'}"><a href="javascript:void(0)">优软商城</a></li>
+                <li ng-if="tab != 'accountTab'"><a ui-sref="fa_apCheck" href="javascript:void(0)">B2B</a></li>
                 <li ng-if="tab == 'accountTab'" ng-class="{'active' : tab == 'accountTab'}"><a href="javascript:void(0)">收款帐户</a></li>
             </ul>
         </div>

+ 1 - 0
src/main/webapp/resources/view/vendor/forstore/vendor-invoice.html

@@ -379,6 +379,7 @@
             <ul class="fl">
                 <li ng-class="{'active': active == 'apply_invoice'}" ng-click="toggleTab('apply_invoice')"><a>待开票</a></li>
                 <li ng-class="{'active': active == 'apply_record'}" ng-click="toggleTab('apply_record')"><a>已开票</a></li>
+                <li ><a ui-sref="fa_apBill">B2B发票</a></li>
             </ul>
         </div>
     </div>