瀏覽代碼

修改应收对账

shenjunjie 7 年之前
父節點
當前提交
92bb221191

二進制
src/main/webapp/resources/css/font/iconfont.woff


文件差異過大導致無法顯示
+ 0 - 0
src/main/webapp/resources/css/wui.min.css


+ 431 - 15
src/main/webapp/resources/js/index/app.js

@@ -1,6 +1,6 @@
-define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives', 'service/Purc', 'service/Make', 'service/Fa', 'service/Account', 'service/Alert', 'service/CheckTel', 'ui.router', 'ui.bootstrap', 'file-upload', 'ngSanitize', 'service/BaseInfo', 'service/Cart', 'service/ApprovalFlow', 'service/DeputyOrder', 'service/Product', 'service/Token', 'service/ProductUsers', 'service/File', 'service/PublicInquiry', 'service/Customer', 'service/PurcChange', 'angularTreeview'], function () {
+define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives', 'service/Purc', 'service/Make', 'service/Fa', 'service/Account', 'service/Alert', 'service/CheckTel', 'ui.router', 'ui.bootstrap', 'file-upload', 'ngSanitize', 'service/BaseInfo', 'service/Cart', 'service/ApprovalFlow', 'service/DeputyOrder', 'service/Product', 'service/Token', 'service/ProductUsers', 'service/File', 'service/PublicInquiry', 'service/Customer', 'service/PurcChange', 'angularTreeview', 'wui.date'], function () {
     'use strict';
-    var app = angular.module('myApp', ['toaster', 'angularCharts', 'ngTable', 'ui.router', 'common.services', 'common.directives', 'PurcServices', 'MakeServices', 'FaServices', 'AccountServices', 'AlertServices', 'ui.bootstrap', 'angularFileUpload', 'ngSanitize', 'CheckTelModule', 'ProductServices', 'CartServices', 'ApprvoalFlowService', 'DeputyOrderService', 'ProductInfoServices', 'TokenService', 'ProductUserService', 'ui.tour', 'FileService', 'publicInquiryService', 'CustomerService', 'changeService', 'angularTreeview']);
+    var app = angular.module('myApp', ['toaster', 'angularCharts', 'ngTable', 'ui.router', 'common.services', 'common.directives', 'PurcServices', 'MakeServices', 'FaServices', 'AccountServices', 'AlertServices', 'ui.bootstrap', 'angularFileUpload', 'ngSanitize', 'CheckTelModule', 'ProductServices', 'CartServices', 'ApprvoalFlowService', 'DeputyOrderService', 'ProductInfoServices', 'TokenService', 'ProductUserService', 'ui.tour', 'FileService', 'publicInquiryService', 'CustomerService', 'changeService', 'angularTreeview', 'wui.date']);
     app.init = function () {
         angular.bootstrap(document, ['myApp']);
     };
@@ -680,6 +680,10 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             },
             templateUrl: "static/tpl/index/fa/apCheck.html",
             controller: 'PurchaseApCheckCtrl'
+        }).state('fa.apCheck_not', {
+            url: "/apChecknot/:id",
+            templateUrl: "static/tpl/index/fa/apChecknot.html",
+            controller: 'PurchaseApCheckNotCtrl'
         }).state('fa.apCheck_detail', {
             url: "/apCheck/:id",
             templateUrl: "static/tpl/index/fa/apCheck_detail.html",
@@ -9464,7 +9468,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
 
     //应收对账单列表
-    app.controller('PurchaseApCheckCtrl', ['$scope', 'FaApCheck', 'BaseService', 'ngTableParams', 'toaster', 'ReportService', 'Symbol', 'CurrentRole', function ($scope, FaApCheck, BaseService, ngTableParams, toaster, ReportService, Symbol, CurrentRole) {
+    app.controller('PurchaseApCheckCtrl', ['$scope', 'FaApCheck', 'BaseService', 'ngTableParams', 'toaster', 'ReportService', 'Symbol', 'CurrentRole', 'DecimalNumber', function ($scope, FaApCheck, BaseService, ngTableParams, toaster, ReportService, Symbol, CurrentRole, DecimalNumber) {
         BaseService.scrollBackToTop();
         // 获取当前用户是否为普通用户
         CurrentRole.isUser({}, {}, function (data) {
@@ -9473,7 +9477,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.dateZoneText = '不限';
         $scope.condition = {dateZone: 1};
         $scope.currency = Symbol.currency;//将币别转化为对应的符号
-        $scope.active = 'todo';
+        $scope.active = 'all';
 
         /* 时间筛选初始化*/
         var fromDate = new Date();
@@ -9504,6 +9508,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                     $scope.tableParams.reload();
                 else
                     $scope.tableParams.page(1);
+                $scope.showNotCheck = false
             }
         };
         $scope.changeDateZone = function (zone) {
@@ -9533,17 +9538,33 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                     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.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
-                    }
-                }, function (response) {
-                    $scope.loading = false;
-                    toaster.pop('error', '数据加载失败', response.data);
-                });
+                if ($scope.active === 'all') {
+                    FaApCheck.customer(BaseService.parseParams(pageParams), function (page) {
+                        $scope.loading = false;
+                        if (page) {
+                            params.total(page.totalElement);
+                            $defer.resolve(page.content);
+                        }
+                        $scope.ALLList = page.content
+                        $scope.totalCount = page.totalElement;
+                    }, function (response) {
+                        $scope.loading = false;
+                        toaster.pop('error', '数据加载失败', response.data);
+                    });
+                } else {
+                    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.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
+                        }
+                    }, function (response) {
+                        $scope.loading = false;
+                        toaster.pop('error', '数据加载失败', response.data);
+                    });
+                }
             }
         });
 
@@ -9632,8 +9653,403 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 toaster.pop('error', '数据加载失败', response.data);
             });
         }
+
+        $scope.data = [];// 列表数据
+
+        $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) {
+            var modalInstance = $modal.open({
+                animation: true,
+                templateUrl: 'static/tpl/index/fa/apcheck_customer.html',
+                controller: 'SearchCustInfoCtrl',
+                size: 'lg',
+                resolve: {
+                    suuorname: function () {
+                        return suuorname;
+                    }
+                }
+            });
+            modalInstance.result.then(function (customer) {
+                $scope.suuorname = customer.myEnterprise.enName;
+            });
+
+        }
+
+        $scope.showNotCheck = false
+        $scope.goToMNs = function(item) {
+            $scope.chooseItem = item;
+            $scope.showNotCheck = true
+            $scope.suuorname = item.myEnterprise.enName
+            this.searchOrder()
+        }
+
+        // 点击筛选根据条件选择数据
+        // 默认本月
+        $scope.sdateTo = new Date();
+        $scope.sdateFrom = new Date($scope.sdateTo.getFullYear(), $scope.sdateTo.getMonth(), 1);
+        $scope.thisMouth = $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.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,
+                        checkDate: $scope.thisMouth,
+                        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: '',
+                    custUserUU: ''
+                };
+
+                //应收对账单明细行来源表信息
+                $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.item.custUserUU = check.custuseruu;
+
+                    //来源表相关信息
+                    $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 () {
+                if ($scope.apCheck.items.length == 0) {
+                    $scope.loading = false;
+                    toaster.pop('error', '请先选择需要对账的数据');
+                } else {
+                    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.controller('PurchaseApCheckDetailCtrl', ['$scope', 'toaster', 'FaApCheck', '$stateParams', 'BaseService', 'CurrentRole', function ($scope, toaster, FaApCheck, $stateParams, BaseService, CurrentRole) {
         BaseService.scrollBackToTop();

+ 4 - 2
src/main/webapp/resources/js/index/main.js

@@ -20,7 +20,8 @@ require.config({
 		'ngSanitize': 'lib/angular/angular-sanitize.min',
 		'jquery' : 'lib/jquery/jquery.min',
 		'big' : 'lib/decimal/big.min',
-		'angularTreeview' : 'lib/treeview/js/angular.treeview'
+		'angularTreeview' : 'lib/treeview/js/angular.treeview',
+        'wui.date' : 'lib/wui/wui-date'
 	},
 	shim : {
 		'angular' : {
@@ -40,7 +41,8 @@ require.config({
 			'exports' : 'ngTable',
 			'deps' : [ 'angular' ]
 		},
-		'angularTreeview' : ['angular']
+		'angularTreeview' : ['angular'],
+        'wui.date' : ['angular']
 	}
 });
 require([ 'app/app' ], function(app) {

+ 653 - 0
src/main/webapp/resources/lib/wui/wui-date.js

@@ -0,0 +1,653 @@
+angular.module('wui.date',[]).directive('wuiDate', function() {
+	return {
+		// Restrict to elements and attributes
+		restrict: 'EA',
+
+		// Assign the angular link function
+		compile: fieldCompile,
+
+		// Assign the angular directive template HTML
+		template: fieldTemplate,
+		// templateUrl: "pageTemplate.html",
+
+		// Assign the angular scope attribute formatting
+		scope: {
+			id: '@?', // 时间插件主键 默认scope.$id
+			name: '@?', // 绑定表单验证input的name属性
+			format: '@?', // 定义时间格式 默认yyyy-mm-dd
+			interval: '@?', // 定义time时间间隔 默认30minutes
+			placeholder: '@?', // 选择框提示语 默认 '选择时间'
+			position: '@?', // 定义选择框浮动位置 默认left
+			ngModel: '=', // 父scope绑定的时间的属性
+			btns: '@', // 按钮信息 空则不显示任何按钮
+			dateClass: '@?', // 自定义样式
+			width: '@?', // 输入框宽度 支持px及百分比
+			size: '@?' // 插件大小 默认为迷你型  large、L、l表示大型窗
+		}
+
+	};
+
+	function fieldCompile(scope, element, attr) {
+		return {
+			pre: function(scope, element, attr) {
+
+				scope.id = scope.id || 'date' + scope.$id; // 生成插件唯一id
+				var position = scope.position || 'left', // 面板浮动
+					iptWidth = parseInt(scope.width); // 输入框宽度
+					iptWidthU = scope.width?scope.width.search('%') == -1 ? 'px' : '%':null,
+					size = scope.size != 'large' && scope.size != 'l' && scope.size != 'L' ? 'small' : null;
+				angular.element(element).find('.wui-date').addClass('wui-date-' + scope.id);
+				if(scope.name != '' && typeof scope.name != 'undefined') {
+					angular.element(element).find('.wui-date input').attr('name', scope.name);
+				}
+				if(size) {
+					angular.element(element).find('.wui-date').addClass(size); // 大小
+				}
+				angular.element(element).find('.wui-date .wui-date-picker').addClass(position); // 面板添加浮动
+				scope.dateClass ? angular.element(element).find('.wui-date').addClass(scope.dateClass) : null; // 插件外部样式
+				iptWidth ? angular.element(element).find('.wui-date').css('width', iptWidth + iptWidthU) : null; // 输入框宽度
+			},
+			post: function(scope, element, attr) {
+				fieldLink(scope, element, attr);
+			}
+		}
+	}
+
+	function fieldLink(scope, element, attr) {
+		// 初始化
+		var GMTDate, // GMT格式时间
+			format = (scope.format || 'yyyy-mm-dd').toLowerCase(), // 时间格式
+			interval = parseInt(scope.interval) || 30, // time间隔
+			interval = (60 % interval === 0 || interval % 60 === 0) && interval <= 12 * 60 ? interval : 30,
+			placeholder = scope.placeholder || "选择时间",
+			maxYear = parseInt(new Date().getFullYear()) + 100, // 插件最大year
+			minYear = 1900, // 插件最小year
+			SPECIAL_DATE_RULES = ['至今'], // 特殊字符串规则
+			DATE_RULES = ['yyyy-mm-dd hh:mm:ss', 'yyyy-mm-dd hh:mm', 'yyyy-mm-dd', 'yyyy-mm']; // 内置的日期格式
+
+		// angular对象初始化
+		scope.date = {
+			year: '0000',
+			month: '00',
+			date: '00',
+			hours: '00',
+			minutes: '00',
+			seconds: '00',
+			dateList: [],
+			timeList: [],
+			yearList: {},
+			showPicker: false,
+			showTimePicker: false,
+			showTimeList: true,
+			showClearIcon: false,
+			selector: 1,
+			btns: scope.btns ? JSON.parse(scope.btns.replace(/'/g, '"')) : {}, // btns字符串转对象
+			showBtn: false,
+		};
+
+		// 初始化GMT时间
+		function GMTDateInit(date) {
+			date = dateFormat(date);
+			if(date) {
+				if(!SPECIAL_DATE_RULES.includes(date)) {
+					GMTDate = StrDateToGMT(date);
+				} else {
+					GMTDate = new Date();
+				}
+			} else {
+				GMTDate = new Date();
+			}
+		}
+
+		// 加载dom
+		function domBootstrap(format) {
+			if(Object.keys(scope.date.btns).length) {
+				scope.date.showBtn = true;
+			}
+			switch(format) {
+				case 'yyyy-mm-dd hh:mm:ss':
+				case 'yyyy-mm-dd hh:mm':
+					scope.date.showTimePicker = true; // 
+					scope.date.selector = 1;
+					angular.element(element).find('.wui-date .wui-date-picker').removeClass('no_timer');
+					break;
+				case 'yyyy-mm-dd':
+					scope.date.showTimePicker = false;
+					angular.element(element).find('.wui-date .wui-date-picker').addClass('no_timer');
+					scope.date.selector = 1;
+					break;
+				case 'yyyy-mm':
+					scope.date.showTimePicker = false;
+					scope.date.selector = 2;
+					angular.element(element).find('.wui-date .wui-date-picker').addClass('no_timer');
+					break;
+				default:
+					break;
+			}
+		}
+
+		// 时间格式化
+		function dateFormat(date) {
+			if(!date) {
+				return null;
+			}
+			if(SPECIAL_DATE_RULES.includes(date)) { // 特殊字符串
+				return date;
+			}
+			date = date.toString().replace(/[\D]/g, ""); // 清除时间除数字外字符
+			var len = format.replace(/\W/g, "").length; // 默认格式长度
+			var str = date.length >= len ? date.slice(0, len) : '';
+			if(date && str) {
+				switch(format) {
+					case 'yyyy-mm-dd hh:mm:ss':
+						date = str.replace(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/, "$1-$2-$3 $4:$5:$6");
+						break;
+					case 'yyyy-mm-dd hh:mm':
+						date = str.replace(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/, "$1-$2-$3 $4:$5");
+						break;
+					case 'yyyy-mm-dd':
+						date = str.replace(/(\d{4})(\d{2})(\d{2})/, "$1-$2-$3");
+						break;
+					case 'yyyy-mm':
+						date = str.replace(/(\d{4})(\d{2})/, "$1-$2");
+						break;
+					default:
+						break;
+				}
+				return str !== date ? date : null; // 正则替换失败后返回原字符串  替换成功则 str != date 
+			}
+			return null;
+		}
+		// 字符串时间格式化为标准时间
+		function StrDateToGMT(date) {
+			if(date && new Date(date) != 'Invalid Date') {
+				return new Date(date);
+			}
+			return null;
+		}
+		// 标准时间格式化为字符串时间
+		function GMTToStrDate(date) {
+			date = new Date(date);
+			if(date && toString.call(date) == '[object Date]') {
+				return date.getFullYear() + '/' + getDoubleDigit(date.getMonth() + 1) + '/' + getDoubleDigit(date.getDate()) + ' ' + getDoubleDigit(date.getHours()) + ':' + getDoubleDigit(date.getMinutes()) + ':' + getDoubleDigit(date.getSeconds());
+			}
+			return null;
+		}
+		// 生成两位月、日
+		function getDoubleDigit(num) {
+			num = '0' + num;
+			return num.slice(-2);
+		}
+
+		// 显示的年月日时分秒数据 
+		function getAllDate() {
+			scope.date.year = GMTDate.getFullYear(); // 初始化年份
+			scope.date.month = getDoubleDigit(GMTDate.getMonth() + 1); // 两位月份
+			scope.date.day = getDoubleDigit(GMTDate.getDate()); // 两位日期
+			scope.date.hours = getDoubleDigit(GMTDate.getHours()); // 两位时
+			scope.date.minutes = getDoubleDigit(GMTDate.getMinutes()); // 两位分
+			scope.date.seconds = getDoubleDigit(GMTDate.getSeconds()); // 两位秒
+		}
+		// 生成日期数据
+		function getDateList(date) {
+			date = date || new Date();
+			if(date.getFullYear() <= maxYear && date.getFullYear() >= minYear) { // 判断年份上下限
+				// 初始化数据
+				var dateList = [], // 属性type:1 表示上月的日期 2表示当月日期 3表示下月日期, 属性date:当天是几号
+					weekOfFirstDay, // 当月第一天是周几
+					endDayOfMonth, // 当前月份最后一天
+					endDayOfLastMonth, // 上月最后一天
+					modelDate = StrDateToGMT(scope.ngModel);
+
+				getAllDate();
+
+				weekOfFirstDay = new Date(scope.date.year, scope.date.month - 1, 1).getDay();
+				endDayOfMonth = new Date(scope.date.year, scope.date.month, 0).getDate();
+				endDayOfLastMonth = new Date(scope.date.year, scope.date.month - 1, 0).getDate();
+
+				// 当月日期列表
+				for(var i = 1; i <= endDayOfMonth; i++) {
+					// 面板显示日期与输入框日期相同返回 true
+					if(modelDate) {
+						var condition1 = modelDate.getFullYear() == scope.date.year && (modelDate.getMonth() + 1) == scope.date.month && modelDate.getDate() == i;
+					}
+					// 面板日期为系统当天日期返回 true
+					var condition2 = new Date().getFullYear() == GMTDate.getFullYear() && new Date().getMonth() == GMTDate.getMonth() && new Date().getDate() == i;
+					var dateObj = {
+						'type': 2,
+						'date': i
+					};
+					if(condition1) {
+						dateObj.current = true; // currently picked
+					}
+					if(condition2) {
+						dateObj.today = true; // today
+					}
+					dateList.push(dateObj);
+				}
+
+				// 根据week生成填充上月日期
+				var prevLen = 0; // the length of prev month day
+				prevLen = weekOfFirstDay || 7;
+				for(var j = 0; j < prevLen; j++) {
+					dateList.unshift({
+						'type': 1,
+						'date': endDayOfLastMonth--
+					});
+				}
+
+				// 每个面板最多显示42天  计算剩余下月显示的天数
+				var nextLen = 42 - prevLen - endDayOfMonth;
+				for(var k = 1; k <= nextLen; k++) {
+					dateList.push({
+						'type': 3,
+						'date': k
+					});
+				}
+
+				// 按每行显示7天分割数组
+				var count = 0,
+					arr = [],
+					resList = [];
+				for(var l = 0; l < dateList.length; l++) {
+					count++;
+					arr.push(dateList[l]);
+					if(count >= 7) {
+						resList.push(arr);
+						count = 0;
+						arr = [];
+					}
+				}
+				return resList;
+			}
+		}
+
+		// 生成时间选择列表数据
+		function createTimeList() {
+			var h = 8,
+				m = 0,
+				resList = [{
+					'time': '08:00'
+				}];
+			// fill time list
+			for(var i = 1; i < 24 * 60 / interval; i++) {
+				m = m + interval;
+				if(m >= 60) {
+					h = h + (m / 60);
+					m = 0;
+				}
+				if(h >= 24) {
+					h = h - 24;
+				}
+				var timeObj = {
+					'time': getDoubleDigit(h) + ":" + getDoubleDigit(m)
+				};
+				resList.push(timeObj);
+			}
+			return resList;
+		}
+
+		// 生成年份选择列表数据
+		function createYearList(year) {
+			year = parseInt(year) || GMTDate.getFullYear();
+			if(year) {
+				var yearList = {};
+				yearList.startYear = year;
+				yearList.endYear = yearList.startYear + 10;
+				yearList.y1 = [];
+				yearList.y2 = [];
+				yearList.y3 = [];
+
+				for(var i = 0; i < 4; i++) {
+					yearList.y1.push(year + i);
+					yearList.y2.push(year + i + 4);
+					if(yearList.y3.length <= 2) {
+						yearList.y3.push(year + i + 8);
+					}
+				}
+				return yearList;
+			}
+			return null;
+		}
+
+		// 输出时间
+		function outputDate() {
+			scope.ngModel = dateFormat(GMTToStrDate(GMTDate));
+		}
+
+		// 点击某天关闭弹窗的规则
+		var DATE_PICK_CLOSE = (format == DATE_RULES[2]);
+
+		// Pick Date
+		scope.pickDate = function(item, e) {
+			if(item.type == 2) {
+				GMTDate.setDate(item.date);
+				if(DATE_PICK_CLOSE) {
+					scope.date.showPicker = false;
+				}
+			} else if(item.type == 1) {
+				GMTDate.setDate(item.date);
+				GMTDate.setMonth(scope.date.month - 2);
+			} else if(item.type == 3) {
+				GMTDate.setDate(item.date);
+				GMTDate.setMonth(scope.date.month);
+			}
+			outputDate();
+			scope.date.dateList = getDateList(GMTDate); // 生成年月日数据
+		}
+
+		// Pick Time
+		scope.pickTime = function(time) {
+			GMTDate.setHours(time.slice(0, 2));
+			GMTDate.setMinutes(time.slice(3, 5));
+			outputDate();
+			getAllDate();
+		}
+
+		// Prev Year
+		scope.prevYear = function() {
+			var y = scope.date.year - 1;
+			if(y >= minYear) {
+				GMTDate.setFullYear(y);
+				scope.date.dateList = getDateList(GMTDate); // 生成年月日数据
+			}
+		}
+
+		// Next Year
+		scope.nextYear = function() {
+			var y = scope.date.year + 1;
+			if(y <= maxYear) {
+				GMTDate.setFullYear(y);
+				scope.date.dateList = getDateList(GMTDate); // 生成年月日数据
+			}
+		}
+
+		// Prev Year
+		scope.prevYearByMonth = function() {
+			var y = scope.date.year - 1;
+			if(y >= minYear) {
+				GMTDate.setFullYear(y);
+				getAllDate();
+			}
+		}
+
+		// Next Year
+		scope.nextYearByMonth = function() {
+			var y = scope.date.year + 1;
+			if(y <= maxYear) {
+				GMTDate.setFullYear(y);
+				getAllDate();
+			}
+		}
+
+		// Prev Month
+		scope.prevMonth = function() {
+			var m = scope.date.month - 2;
+			GMTDate.setMonth(m);
+			scope.date.dateList = getDateList(GMTDate); // 生成年月日数据
+		}
+
+		// Next Month
+		scope.nextMonth = function() {
+			var m = scope.date.month;
+			GMTDate.setMonth(m);
+			scope.date.dateList = getDateList(GMTDate); // 生成年月日数据
+		}
+
+		// 打开年份选择列表
+		scope.openYearPicker = function(year) {
+			scope.date.selector = 3;
+			scope.date.yearList = createYearList(year);
+		}
+
+		// Pick Year
+		scope.selectYear = function(year) {
+			GMTDate.setFullYear(year);
+			scope.date.selector = 2;
+			getAllDate();
+			outputDate();
+		}
+
+		scope.pickPrevYear = function() {
+			var year = scope.date.yearList.startYear - 11;
+			if(year >= minYear) {
+				scope.openYearPicker(year);
+			}
+		}
+
+		scope.pickNextYear = function() {
+			var year = scope.date.yearList.startYear + 11;
+			if(year <= maxYear) {
+				scope.openYearPicker(year);
+			}
+		}
+
+		// 打开月份选择列表
+		scope.openMonthPicker = function() {
+			scope.date.selector = 2;
+		}
+
+		// 点击某月关闭弹窗的规则
+		var MONTH_PICK_CLOSE = (format == DATE_RULES[3]);
+
+		// Select Month
+		scope.selectMonth = function(m) {
+			GMTDate.setMonth(m - 1);
+			scope.date.dateList = getDateList(GMTDate); // 生成年月日数据
+			scope.date.selector = 1;
+			outputDate();
+			if(MONTH_PICK_CLOSE) {
+				scope.date.showPicker = false;
+			}
+		}
+
+		// 选择至今
+		scope.hitherto = function() {
+			scope.ngModel = '至今';
+			scope.date.showPicker = false;
+		}
+
+		// Picker open
+		scope.openPicker = function() {
+			domBootstrap(format); // 打开日期面板更新样式
+			angular.element(".wui-date .wui-date-picker").hide();
+			angular.element(".wui-date-" + scope.id + " .wui-date-picker").show();
+			GMTDateInit(scope.ngModel);
+			scope.date.dateList = getDateList(GMTDate); // 生成年月日数据
+			scope.date.showPicker = true;
+		}
+
+		// 确定按钮
+		scope.confirm = function() {
+			outputDate();
+			scope.date.showPicker = false;
+		}
+
+		// 此刻按钮
+		scope.moment = function() {
+			GMTDate = new Date();
+			outputDate();
+			scope.date.showPicker = false;
+		}
+
+		// 格式化input的date
+		scope.checkDateFormat = function() {
+			scope.ngModel = dateFormat(scope.ngModel);
+		}
+
+		// date init
+		scope.dateInit = function() {
+			domBootstrap(format);
+			GMTDateInit(scope.ngModel);
+			scope.date.dateList = getDateList(GMTDate); // 生成年月日数据
+			scope.date.timeList = createTimeList();
+		}
+
+		scope.$watch('date.showPicker', function() {
+			if(scope.date.showPicker) {
+				scope.dateInit();
+			}
+		});
+
+		// Close by click blank
+		element.on('click', function(e) {
+			//阻止底层冒泡
+			e.stopPropagation();
+		});
+
+		angular.element('body').on('click', ':not(.wui-date)', function() {
+			angular.element(element).find('.wui-date-picker').hide();
+		});
+
+	}
+
+	function fieldTemplate(scope, element, attr) {
+		return(
+			'<div class="wui-date wui-date" ng-app="wui.date">' +
+			'<div class="wui-date-editor" ng-click="openPicker()">' +
+			'<input class="wui-input wui-input-block wui-date-input" type="text" placeholder="{{placeholder}}" ng-model="ngModel" autocomplete="off" ng-blur=checkDateFormat()>' +
+			'<i class="iconfont icon1">&#xe807;</i>' +
+			'</div>' +
+			'<br/>' +
+			'<div class="wui-date-picker" ng-show="date.showPicker">' +
+			'<div class="wui-date-picker_body">' +
+			'<div class="wui-date-picker_panel" ng-show="date.selector == 1">' +
+			'<div class="wui-date-panel_header">' +
+			'<i class="iconfont" ng-click="prevYear()">&#xe809;</i>' +
+			'<i class="iconfont" ng-click="prevMonth()">&#xe808;</i>' +
+			'<span class="title">' +
+			'<span class="txt" ng-click="openYearPicker()"><span>{{date.year}}</span> 年 </span>' +
+			'<span class="txt" ng-click="openMonthPicker()"><span>{{date.month}}</span> 月</span>' +
+			'</span>' +
+			'<i class="iconfont" ng-click="nextMonth()">&#xe886;</i>' +
+			'<i class="iconfont" ng-click="nextYear()">&#xe640;</i>' +
+			'</div>' +
+			'<div class="wui-date-picker_content">' +
+			'<table class="wui-data-table">' +
+			'<tr>' +
+			'<th>日</th>' +
+			'<th>一</th>' +
+			'<th>二</th>' +
+			'<th>三</th>' +
+			'<th>四</th>' +
+			'<th>五</th>' +
+			'<th>六</th>' +
+			'</tr>' +
+			'<tr ng-repeat="item in date.dateList track by $index">' +
+			'<td ng-repeat="subItem in date.dateList[$index]"><div ng-class="{&apos;prev-date&apos;:subItem.type==1,&apos;date&apos;:subItem.type==2,&apos;next-date&apos;:subItem.type==3}"><span ng-click="pickDate(subItem,$event)" ng-class="{&apos;today&apos;:subItem.today,&apos;current&apos;:subItem.current}">{{subItem.date}}</span></div></td>' +
+			'</tr>' +
+			'</table>' +
+			'</div>' +
+			'</div>' +
+			'<div class="wui-date-picker_panel month_panel" ng-show="date.selector == 2">' +
+			'<div class="wui-date-panel_header">' +
+			'<i class="iconfont" ng-click="prevYearByMonth()">&#xe809;</i>' +
+			'<span class="title">' +
+			'<span class="txt" ng-click="openYearPicker()"><span>{{date.year}}</span> 年</span>' +
+			'</span>' +
+			'<i class="iconfont" ng-click="nextYearByMonth()">&#xe640;</i>' +
+			'</div>	' +
+			'<div class="wui-date-picker_content">' +
+			'<table class="wui-data-table">' +
+			'<tr>' +
+			'<td>' +
+			'<a class="cell" ng-click="selectMonth(1)">一月</a>' +
+			'</td>' +
+			'<td>' +
+			'<a class="cell" ng-click="selectMonth(2)">二月</a>' +
+			'</td>' +
+			'<td>' +
+			'<a class="cell" ng-click="selectMonth(3)">三月</a>' +
+			'</td>' +
+			'<td>' +
+			'<a class="cell" ng-click="selectMonth(4)">四月</a>' +
+			'</td>' +
+			'</tr>' +
+			'<tr>' +
+			'<td>' +
+			'<a class="cell" ng-click="selectMonth(5)">五月</a>' +
+			'</td>' +
+			'<td>' +
+			'<a class="cell" ng-click="selectMonth(6)">六月</a>' +
+			'</td>' +
+			'<td>' +
+			'<a class="cell" ng-click="selectMonth(7)">七月</a>' +
+			'</td>' +
+			'<td>' +
+			'<a class="cell" ng-click="selectMonth(8)">八月</a>' +
+			'</td>' +
+			'</tr>' +
+			'<tr>' +
+			'<td>' +
+			'<a class="cell" ng-click="selectMonth(9)">九月</a>' +
+			'</td>' +
+			'<td>' +
+			'<a class="cell" ng-click="selectMonth(10)">十月</a>' +
+			'</td>' +
+			'<td>' +
+			'<a class="cell" ng-click="selectMonth(11)">十一月</a>' +
+			'</td>' +
+			'<td>' +
+			'<a class="cell" ng-click="selectMonth(12)">十二月</a>' +
+			'</td>' +
+			'</tr>' +
+			'</table>' +
+			'</div>	' +
+			'</div>' +
+			'<div class="wui-date-picker_panel year_panel" ng-show="date.selector == 3 ">' +
+			'<div class="wui-date-panel_header">' +
+			'<i class="iconfont" ng-click="pickPrevYear()">&#xe809;</i>' +
+			'<span class="title">' +
+			'<span class="txt"><span>{{date.yearList.startYear}}</span> 年 - <span>{{date.yearList.endYear}}</span> 年</span>' +
+			'</span>' +
+			'<i class="iconfont" ng-click="pickNextYear()">&#xe640;</i>' +
+			'</div>' +
+			'<div class="wui-date-picker_content">' +
+			'<table class="wui-data-table">' +
+			'<tr>' +
+			'<td ng-repeat="item in date.yearList.y1 track by $index">' +
+			'<a class="cell" ng-click="selectYear(item)">{{item}}</a>' +
+			'</td>' +
+			'</tr>' +
+			'<tr>' +
+			'<td ng-repeat="item in date.yearList.y2 track by $index">' +
+			'<a class="cell" ng-click="selectYear(item)">{{item}}</a>' +
+			'</td>' +
+			'</tr>' +
+			'<tr>' +
+			'<td ng-repeat="item in date.yearList.y3 track by $index">' +
+			'<a class="cell" ng-click="selectYear(item)">{{item}}</a>' +
+			'</td>' +
+			'</tr>' +
+			'</table>' +
+			'</div>' +
+			'</div>' +
+			'<div class="wui-date-picker_aside" ng-show="date.showTimePicker">' +
+			'<div class="wui-date-aside_header">' +
+			'<div class="wui-select wui-select-block time-select" id="time">' +
+			'<div class="wui-select-selection time-selection">' +
+			'<input type="hidden" name="" value="" >' +
+			'<span class="wui-select-icon iconfont time-icon">&#xe887;</span>' +
+			'<span class="wui-select-placeholder placeholder">{{date.hours}}:{{date.minutes}}</span>' +
+			'<span class="wui-select-selected-value value"></span>' +
+			'</div>' +
+			'<div class="wui-select-menu time-menu" ng-show="date.showTimeList">' +
+			'<ul>' +
+			'<li class="wui-select-item time-menu-item" ng-repeat="item in date.timeList" ng-click="pickTime(item.time)">{{item.time}}</li>' +
+			'</ul>' +
+			'</div>' +
+			'</div>' +
+			'</div>' +
+			'</div>' +
+			'</div>' +
+			'<div class="wui-date-picker_footer" ng-show="date.showBtn">' +
+			'<button type="button" class="wui-btn wui-btn-white wui-btn-xsmall" ng-click="moment()" ng-if="date.btns.now">{{date.btns.now}}</button>' +
+			'<button type="button" class="wui-btn wui-btn-primary wui-btn-xsmall" ng-click="confirm()" ng-if="date.btns.ok">{{date.btns.ok}}</button>' +
+			'<button type="button" class="wui-btn wui-btn-white wui-btn-xsmall" ng-click="hitherto()" ng-if="date.btns.hitherto">至今</button>' +
+			'</div>' +
+			'</div>' +
+			'</div>'
+		);
+	}
+
+});

+ 447 - 153
src/main/webapp/resources/tpl/index/fa/apCheck.html

@@ -123,8 +123,12 @@
 		font-weight: inherit;
 		top: -2px;
 	}
+	.wui-date.small .wui-date-picker {
+		width: 260px
+	}
 </style>
 <link rel="stylesheet" href="static/css/public.css">
+<link rel="stylesheet" href="static/css/wui.min.css">
 <div class="block" id="public">
  	<div class="loading in" ng-class="{'in': loading}">
 		<!--<i></i>-->
@@ -148,24 +152,46 @@
 						<button type="button" class="btn btn-default btn-line"
 							ng-class="{'btn-info':active=='all'}" ng-click="setActive('all')">未对账</button>
 					</div>
-                    <div class="btn-group btn-group-sm">
-                        <button type="button" class="btn btn-default btn-line"
-                                ng-class="{'btn-info':active=='todo'}"
-                                ng-click="setActive('todo')">待确认</button>
-                    </div>
+					<div class="btn-group btn-group-sm">
+						<button type="button" class="btn btn-default btn-line"
+								ng-class="{'btn-info':active=='todo'}"
+								ng-click="setActive('todo')">待确认</button>
+					</div>
 					<div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
 								ng-class="{'btn-info':active=='done'}"
 								ng-click="setActive('done')">已确认
-							<b class="new-dot" ng-if="unread.replied > 0">{{unread.replied>99?'99+':unread.replied}}</b>
+							<!--<b class="new-dot" ng-if="unread.replied > 0">{{unread.replied>99?'99+':unread.replied}}</b>-->
 						</button>
 					</div>
 					<div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
 							ng-class="{'btn-info':active=='end'}" ng-click="setActive('end')">已作废
-							<b class="new-dot" ng-if="unread.cancelled > 0">{{unread.cancelled > 99 ? '99+' : unread.cancelled}}</b>
+							<!--<b class="new-dot" ng-if="unread.cancelled > 0">{{unread.cancelled > 99 ? '99+' : unread.cancelled}}</b>-->
 						</button>
 					</div>
+					<!--<div class="btn-group btn-group-sm">-->
+					<!--<button type="button" class="btn btn-default btn-line"-->
+					<!--ng-class="{'btn-info':active=='all'}" ng-click="setActive('all')">全部</button>-->
+					<!--</div>-->
+					<!--<div class="btn-group btn-group-sm">-->
+					<!--<button type="button" class="btn btn-default btn-line"-->
+					<!--ng-class="{'btn-info':active=='done'}"-->
+					<!--ng-click="setActive('done')">已确认-->
+					<!--<b class="new-dot" ng-if="unread.replied > 0">{{unread.replied>99?'99+':unread.replied}}</b>-->
+					<!--</button>-->
+					<!--</div>-->
+					<!--<div class="btn-group btn-group-sm">-->
+					<!--<button type="button" class="btn btn-default btn-line"-->
+					<!--ng-class="{'btn-info':active=='todo'}"-->
+					<!--ng-click="setActive('todo')">未对账</button>-->
+					<!--</div>-->
+					<!--<div class="btn-group btn-group-sm">-->
+					<!--<button type="button" class="btn btn-default btn-line"-->
+					<!--ng-class="{'btn-info':active=='end'}" ng-click="setActive('end')">已作废-->
+					<!--<b class="new-dot" ng-if="unread.cancelled > 0">{{unread.cancelled > 99 ? '99+' : unread.cancelled}}</b>-->
+					<!--</button>-->
+					<!--</div>-->
 				</div>
 			</div>
 			<div class="col-xs-4 f12" style="text-align: right;height: 40px;line-height: 40px; margin-right: 20px; float: right;">
@@ -173,168 +199,436 @@
 			</div>
 		</div>
 	</div>
-	<!--<div class="height10">&nbsp;</div>-->
-	<div class="condition block">
-		<div class="search-bg condition block" style="padding: 10px 15px;">
-			<div class="row">
-				<div id="topSearch" style="float: left">
-					<a ng-click="changeDateZone(1);condition.$open=false" title="最近一个月" ng-class="{'active':condition.dateZone=='1'}">最近一个月</a>
-					<a ng-click="changeDateZone(3);condition.$open=false" title="最近三个月" ng-class="{'active':condition.dateZone=='3'}">最近三个月</a>
-					<a ng-click="changeDateZone(6);condition.$open=false" title="最近六个月" ng-class="{'active':condition.dateZone=='6'}">最近六个月</a>
-					<a ng-click="condition.$open=!condition.$open;changeDateZone(-1)" title="自定义" ng-class="{'active':condition.dateZone=='-1'}" >自定义</a>
-				</div>
-				<div class="col-xs-6" style="float: right;">
-					<div class="search">
-						<div class="form-group form-group-sm has-feedback" dropdown auto-close="outsideClick"
-							 on-toggle="searchAdvance=open">
-							<input type="search" class="form-control input-sm" ng-model="keyword"
-								   ng-search="onSearch()" placeholder="输入单据编号、客户名称、物料名称搜索" style="width: 100%"/>
-							<a class="btn input-group-addon" ng-click="onSearch()">搜索</a>
+
+	<div ng-hide="showNotCheck">
+		<div class="condition block" >
+			<div class="search-bg condition block" style="padding: 10px 15px;">
+				<div class="row">
+					<div id="topSearch" ng-if="active !== 'all'" style="float: left">
+						<a ng-click="changeDateZone(1);condition.$open=false" title="最近一个月" ng-class="{'active':condition.dateZone=='1'}">最近一个月</a>
+						<a ng-click="changeDateZone(3);condition.$open=false" title="最近三个月" ng-class="{'active':condition.dateZone=='3'}">最近三个月</a>
+						<a ng-click="changeDateZone(6);condition.$open=false" title="最近六个月" ng-class="{'active':condition.dateZone=='6'}">最近六个月</a>
+						<a ng-click="condition.$open=!condition.$open;changeDateZone(-1)" title="自定义" ng-class="{'active':condition.dateZone=='-1'}" >自定义</a>
+					</div>
+					<div class="col-xs-6" style="float: right;">
+						<div class="search">
+							<div class="form-group form-group-sm has-feedback" dropdown auto-close="outsideClick"
+								 on-toggle="searchAdvance=open">
+								<input type="search" class="form-control input-sm" ng-model="keyword"
+									   ng-search="onSearch()" placeholder="输入单据编号、客户名称、物料名称搜索" style="width: 100%"/>
+								<a class="btn input-group-addon" ng-click="onSearch()">搜索</a>
+							</div>
 						</div>
 					</div>
 				</div>
-			</div>
-			<div class="more-list more" ng-class="{'open': condition.$open}">
-				<form class="form-inline">
-					<div class="form-group ">
-						<label>日期:</label>
-						<div class="btn-group btn-menu" dropdown is-open="condition.$dateZoneOpen">
-							<ul class="dropdown-menu">
-								<li><a ng-click="changeDateZone(1)">一个月内</a></li>
-								<li><a ng-click="changeDateZone(6)">半年内</a></li>
-								<li><a ng-click="changeDateZone()">半年前</a></li>
-							</ul>
-						</div>
-						<div class="form-group input-group input-group-xs input-trigger">
-							<input type="text" ng-model="condition.dateFrom"
-								   class="form-control" placeholder="从"
-								   datepicker-popup="yyyy-MM-dd" is-open="condition.$fromOpened"
-								   ng-required="true" max-date = "condition.dateTo"
-								   current-text="今天" clear-text="清除" close-text="关闭"
-								   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-								   ng-focus="openFilterDatePicker($event, condition, '$fromOpened')">
-							<span class="input-group-btn">
-							<button type="button" class="btn btn-default"
-									ng-click="openFilterDatePicker($event, condition, '$fromOpened')">
-								<i class="fa fa-calendar"></i>
-							</button>
-						</span>
-						</div>
-						<div class="form-group input-group input-group-xs input-trigger">
-							<input type="text" ng-model="condition.dateTo"
-								   class="form-control" placeholder="到"
-								   datepicker-popup="yyyy-MM-dd" is-open="condition.$toOpened"
-								   ng-required="true" min-date = "condition.dateFrom"
-								   current-text="今天" clear-text="清除" close-text="关闭"
-								   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-								   ng-focus="openFilterDatePicker($event, condition, '$toOpened')">
-							<span class="input-group-btn">
+				<div class="more-list more" ng-class="{'open': condition.$open}">
+					<form class="form-inline">
+						<div class="form-group ">
+							<label>日期:</label>
+							<div class="btn-group btn-menu" dropdown is-open="condition.$dateZoneOpen">
+								<ul class="dropdown-menu">
+									<li><a ng-click="changeDateZone(1)">一个月内</a></li>
+									<li><a ng-click="changeDateZone(6)">半年内</a></li>
+									<li><a ng-click="changeDateZone()">半年前</a></li>
+								</ul>
+							</div>
+							<div class="form-group input-group input-group-xs input-trigger">
+								<input type="text" ng-model="condition.dateFrom"
+									   class="form-control" placeholder="从"
+									   datepicker-popup="yyyy-MM-dd" is-open="condition.$fromOpened"
+									   ng-required="true" max-date = "condition.dateTo"
+									   current-text="今天" clear-text="清除" close-text="关闭"
+									   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+									   ng-focus="openFilterDatePicker($event, condition, '$fromOpened')">
+								<span class="input-group-btn">
+								<button type="button" class="btn btn-default"
+										ng-click="openFilterDatePicker($event, condition, '$fromOpened')">
+									<i class="fa fa-calendar"></i>
+								</button>
+							</span>
+							</div>
+							<div class="form-group input-group input-group-xs input-trigger">
+								<input type="text" ng-model="condition.dateTo"
+									   class="form-control" placeholder="到"
+									   datepicker-popup="yyyy-MM-dd" is-open="condition.$toOpened"
+									   ng-required="true" min-date = "condition.dateFrom"
+									   current-text="今天" clear-text="清除" close-text="关闭"
+									   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+									   ng-focus="openFilterDatePicker($event, condition, '$toOpened')">
+								<span class="input-group-btn">
 							<button type="button" class="btn btn-default"
 									ng-click="openFilterDatePicker($event, condition, '$toOpened')">
 								<i class="fa fa-calendar"></i>
 							</button>
 						</span>
+							</div>
 						</div>
-					</div>
-				</form>
+					</form>
+				</div>
 			</div>
 		</div>
+		<div ng-show="active === 'all'">
+			<table class="order-table block order-table2" ng-table="tableParams" width="100%" style="table-layout:fixed">
+				<thead>
+					<tr class="header">
+						<th width="313">客户名称</th>
+						<th width="250">上次对账时间</th>
+						<th width="250">未对账总额</th>
+						<th width="160">操作</th>
+					</tr>
+				</thead>
+				<tbody ng-repeat="check in ALLList">
+					<tr >
+						<td style="color: #3f84f6">{{::check.myEnterprise.enName}}</td>
+						<td ng-if="check.lastCheckDate">{{::check.lastCheckDate | date : 'MM月dd日 HH:mm'}}</td>
+						<td ng-if="!check.lastCheckDate">-</td>
+						<td>{{::check.uncheckedCount || '-'}}</td>
+						<td style="color: #3f84f6;cursor: pointer" ng-click="goToMNs(check)">立即对账</td>
+					</tr>
+				</tbody>
+			</table>
+		</div>
+		<div ng-show="active !== 'all'">
+			<table class="order-table block" ng-table="tableParams">
+				<thead>
+					<tr class="header">
+						<th width="150">对账期间</th>
+						<th width="180">对账总额</th>
+						<th width="180">明细条目</th>
+						<th width="180">商品总数</th>
+						<th width="100">对账结果</th>
+						<th width="100">操作</th>
+					</tr>
+				</thead>
+				<tbody ng-repeat="check in $data">
+					<tr>
+						<td class="first info" colspan="4">
+							<div class="">
+								<a href="javascript:void(0)" ng-if="!isUnread(check.id)">
+									<i class="fa fa-circle-thin"></i>
+								</a>
+								<a href="javascript:void(0)" ng-if="isUnread(check.id)">
+									<i class="fa fa-circle" style="color: #f40;"></i>
+								</a>&nbsp;&nbsp;
+								<span class="text-num" title="录单时间">{{::check.recordDate | date:'MM月dd日 HH:mm'}} <i class="fa fa-clock-o"></i></span>&nbsp;&nbsp;&nbsp;
+								<span><i class="fa fa-star" ng-class="{'text-default':check.status==201}"></i> {{::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>
+							</div>
+							<div class="static">
+								<p><span class="f14 text-num">{{::check.beginDate | date:'yyyy/MM/dd'}} - {{::check.endDate | date:'yyyy/MM/dd'}}</span></p>
+								<p>
+									<strong class="text-num">{{::(isUser?'-':(check.checkAmount | number:2))}}</strong>
+									<span ng-if="!isUser" class="text-number">{{::check.currency}}</span>
+								</p>
+								<p>
+									<strong class="text-num">{{::check.items.length}}</strong> 条<br>
+								</p>
+								<p>
+									<strong class="text-num">{{getTotalProd(check) | number}}</strong> <i class="fa fa-cubes"></i>
+								</p>
+							</div>
+						</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 ng-if="check.checkStatus == '未对账'" class="text-center text-muted f14">
+								<div class="" style="margin-top: 33px;margin-right: 20px;">
+									<div class="pull-right" title="等待客户确认"><a>&nbsp;客户正在确认</a></div>
+								</div>
+							</div>
+							<div ng-if="check.checkStatus == '不同意'" class="text-center text-muted f14">
+								<div class="" style="margin-top: 33px;margin-right: 20px;">
+									<div class="pull-right" title="客户不同意"><a>&nbsp;客户不同意</a></div>
+								</div>
+							</div>
+							<div ng-if="check.checkStatus == '已确认'" class="text-center text-muted f14">
+								<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>
+							</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><img src="static/img/empty/uas_empty.png"></a>
+								<a>B2B 商务</a>
+							</div>
+							<div class="right_link">
+								<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>
 	</div>
-	<table class="order-table block" ng-table="tableParams">
-		<thead>
-			<tr class="header">
-				<th width="150">对账期间</th>
-				<th width="180">对账总额</th>
-				<th width="180">明细条目</th>
-				<th width="180">商品总数</th>
-				<th width="100">对账结果</th>
-				<th width="100">操作</th>
-			</tr>
-		</thead>
-		<tbody ng-repeat="check in $data">
-			<tr>
-				<td class="first info" colspan="4">
-					<div class="">
-						<a href="javascript:void(0)" ng-if="!isUnread(check.id)">
-							<i class="fa fa-circle-thin"></i>
-						</a>
-						<a href="javascript:void(0)" ng-if="isUnread(check.id)">
-							<i class="fa fa-circle" style="color: #f40;"></i>
-						</a>&nbsp;&nbsp;
-						<span class="text-num" title="录单时间">{{::check.recordDate | date:'MM月dd日 HH:mm'}} <i class="fa fa-clock-o"></i></span>&nbsp;&nbsp;&nbsp;
-						<span><i class="fa fa-star" ng-class="{'text-default':check.status==201}"></i> {{::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>
-					</div>
-					<div class="static">
-						<p><span class="f14 text-num">{{::check.beginDate | date:'yyyy/MM/dd'}} - {{::check.endDate | date:'yyyy/MM/dd'}}</span></p>
-						<p>
-							<strong class="text-num">{{::(isUser?'-':(check.checkAmount | number:2))}}</strong>
-							<span ng-if="!isUser" class="text-number">{{::check.currency}}</span>
-						</p>
-						<p>
-							<strong class="text-num">{{::check.items.length}}</strong> 条<br>
-						</p>
-						<p>
-							<strong class="text-num">{{getTotalProd(check) | number}}</strong> <i class="fa fa-cubes"></i>
-						</p>
-					</div>
-				</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 ng-hide="!showNotCheck" class="infoms add-apCheckList"  >
+		<form class="form-horizontal"
+			  style="padding-top: 10px; padding-bottom: 20px;">
+			<div class="form-group form-group-sm form-group-inline">
+				<label class="col-sm-1 control-label">客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户:</label>
+				<div class="col-sm-7 control-label" style="text-align:left">
+					{{suuorname}}
+				</div>
+				<label class="col-sm-2 control-label">请选择月份:</label>
+				<div class="col-sm-2" style="padding-right: 5px">
+					<wui-date
+							format="yyyy-mm"
+							placeholder="请选择或输入日期"
+							id="date4"
+							btns="{'ok':'确定','now':'此刻'}"
+							ng-model="thisMouth"
+					>
+					</wui-date>
+				</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 ng-if="check.checkStatus == '未对账'" class="text-center text-muted f14">
-						<div class="" style="margin-top: 33px;margin-right: 20px;">
-							<div class="pull-right" title="等待客户确认"><a>&nbsp;客户正在确认</a></div>
-						</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 ng-if="check.checkStatus == '不同意'" class="text-center text-muted f14">
-						<div class="" style="margin-top: 33px;margin-right: 20px;">
-							<div class="pull-right" title="客户不同意"><a>&nbsp;客户不同意</a></div>
-						</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 ng-if="check.checkStatus == '已确认'" class="text-center text-muted f14">
-						<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>
+				</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>
-					<!-- <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><img src="static/img/empty/uas_empty.png"></a>
-						<a>B2B 商务</a>
+				</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 class="right_link">
-						<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>
+			<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>
-			</td>
-		</tr>
-		</tbody>
-	</table>
-</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"
+						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>
+<style>
+	.order-table2 tbody td {
+		text-align: center;
+		padding: 20px 0
+	}
+</style>
+<style>
+	.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;
+	}
+
+	.infoms .has-feedback input[type="search"] {
+		padding-right: 0 !important;
+	}
+	.infoms .table>tbody>tr>td{
+		vertical-align: middle;
+	}
+	.infoms .form-horizontal .form-group-sm .control-label{
+		font-size: 14px;
+	}
+	.infoms .form-group .form-control{
+		font-size: 14px;
+	}
+	.wui-date.small .wui-date-picker {
+		width: 260px
+	}
+</style>

+ 247 - 0
src/main/webapp/resources/tpl/index/fa/apChecknot.html

@@ -0,0 +1,247 @@
+<style>
+    .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;
+    }
+    .wui-date.small .wui-date-picker {
+        width: 260px
+    }
+</style>
+<link rel="stylesheet" href="static/css/wui.min.css">
+<div>
+    <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="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-6 control-label" style="text-align:left">
+                   优软商城公司
+                </div>
+                <label class="col-sm-2 control-label">请选择月份:</label>
+                <div class="col-sm-2" style="padding-right: 5px">
+                    <wui-date
+                            format="yyyy-mm"
+                            placeholder="请选择或输入日期"
+                            id="date4"
+                            btns="{'ok':'确定','now':'此刻'}"
+                            ng-model="date4"
+                    >
+                    </wui-date>
+                </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>

部分文件因文件數量過多而無法顯示