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

B2B采购回复每次写的数量不做叠加处理,仅仅只是更新,回复数量只写本次最新的回复数量。顺便提交开票js代码

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@10680 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
huangct 8 лет назад
Родитель
Сommit
c40dab604b
1 измененных файлов с 589 добавлено и 0 удалено
  1. 589 0
      src/main/webapp/resources/js/index/app.js

+ 589 - 0
src/main/webapp/resources/js/index/app.js

@@ -598,6 +598,21 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             url: "/apCheckList",
             templateUrl: "static/tpl/index/fa/apCheckList.html",
             controller: 'PurchaseApCheckListCtrl'
+        }).state('fa.apBillOut', {
+            url: "/apBillOut",
+            params:{
+                'id':null
+            },
+            templateUrl: "static/tpl/index/fa/apBillOut.html",
+            controller: 'PurchaseApBillOutCtrl'
+        }).state('fa.apBillOut_detail', {
+            url: "/apBillOut/:id",
+            templateUrl: "static/tpl/index/fa/apBillOut_detail.html",
+            controller: 'PurchaseApBillOutDetailCtrl'
+        }).state('fa.apBillOutList', {
+            url: "/apBillOutList",
+            templateUrl: "static/tpl/index/fa/apBillOutList.html",
+            controller: 'PurchaseApBillOutListCtrl'
         }).state('fa.adjustList', {
             url: "/adjustList",
             templateUrl: "static/tpl/index/fa/adjustList.html",
@@ -2893,6 +2908,16 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
                     $scope.loading = false;
                     if (page) {
+
+                        //获取每个明细单最新回复数
+                        angular.forEach(page.content, function(order){
+                            angular.forEach(order.orderItems, function(item){
+                                PurcOrderItem.getLatestReplyQty({orderItemId: item.id}, null, function (map) {
+                                    item.latestReplyQty = map.latestReplyQty;
+                                });
+                            });
+                        });
+
                         $defer.resolve(page.content);
                         params.total(page.totalElement);
                         $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
@@ -7963,6 +7988,570 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
     }]);
 
+    //客户航天开票
+    app.controller('PurchaseApBillOutCtrl',['$scope', 'FaApBillOut', 'BaseService', 'ngTableParams', 'toaster','ReportService', 'Symbol', function ($scope, FaApBillOut, BaseService, ngTableParams, toaster, ReportService , Symbol) {
+        BaseService.scrollBackToTop();
+        $scope.dateZoneText = '不限';
+        $scope.condition = {dateZone: 1};
+        $scope.currency = Symbol.currency;//将币别转化为对应的符号
+        $scope.active = 'all';
+
+        /* 时间筛选初始化*/
+        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 (billOut) {
+            FaApBillOut.printCount({id: billOut.id},function (data) {
+                if(!data.error) {
+                    toaster.pop('success', '提示', '打印成功');
+                    //$scope.tableParams.reload();
+                }else{
+                    toaster.pop('error', '提示', '打印失败');
+                }
+            });
+            //ReportService.print(billOut.custUu, 'PURCBILLOUT', 'where purc$apbillout.pabo_id =' + billOut.id);
+        };
+
+        //状态
+        $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)
+                };
+                FaApBillOut[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);
+                });
+            }
+        });
+
+        $scope.openDatePicker = 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 (billOut) {
+            var total = 0;
+            if(billOut.items) {
+                angular.forEach(billOut.items, function (value) {
+                    total += value.NowQty;
+                });
+            }
+            return total;
+        };
+
+        // 搜索框回车
+        $scope.onSearch = function () {
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
+        };
+
+        // 选择查找日期
+        $scope.onDateCondition = function () {
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
+        };
+    }]);
+
+    //开票单详情
+    app.controller('PurchaseApBillOutDetailCtrl',['$scope', 'toaster', 'FaApBillOut', 'FaApCheck', '$stateParams', 'BaseService', function ($scope, toaster, FaApBillOut, FaApCheck, $stateParams, BaseService) {
+        BaseService.scrollBackToTop();
+        $scope.haveSelected = true;
+        $scope.data = {};
+        //控制提交和删除按钮的显示
+        $scope.ifShow = true;
+        var loadData = function () {
+            FaApBillOut.get({id:$stateParams.id},function (data) {
+                $scope.data = data;
+                console.log(data);
+                if($scope.data.status){
+
+                }else{
+                    $scope.ifShow = true;
+                }
+            })
+        };
+
+        if($stateParams.id){
+            loadData();
+        }
+
+
+        $scope.haveSource = false;
+        //TODO 提交开票单
+        $scope.invoiceIssued = function (apBillOut) {
+            $scope.loading = true;
+            FaApBillOut.invoiceIssued({id:apBillOut.id},function (data) {
+                $scope.loading = false;
+                if(data.apBillOut) {
+                    $scope.haveSelected = false;
+                    window.location.href = '#/fa/apBillOut';
+                    toaster.pop('success', '提示', '提交成功');
+                }else {
+                    /*$scope.haveSource = true;
+                     loadData();
+                     toaster.pop('error', '提示', '单据被反过账,请立即作废本单据');
+                     $scope.haveSelected = true;*/
+
+                    $scope.loading = false;
+                    toaster.pop('error', '提示', data.error);
+                }
+            }/*,function(){
+             $scope.loading = false;
+             toaster.pop('error', '提示', '更新已转数失败');
+             }*/);
+        }
+
+        //删除开票单(后台同时更新对账单明细表已开票数)
+        $scope.deleteApBillOut = function () {
+            FaApBillOut.deleteApBillOut({id:$stateParams.id},function (data) {
+                window.location.href = '#/fa/apBillOut';
+                toaster.pop('success','提示','删除成功');
+            },function () {
+                toaster.pop('error','提示','删除失败');
+            });
+            $scope.haveSelected = false;
+
+        }
+
+        //TODO 作废开票单
+        $scope.InvoiceCancel = function () {
+            $scope.loading = true;
+            FaApBillOut.InvoiceCancel({id:$stateParams.id},function (data) {
+                $scope.loading = false;
+                if(!data.error) {
+                    toaster.pop('success', '提示', '作废成功');
+                    window.location.href = '#/fa/apBillOut';
+                    $scope.tableParams.reload();
+                }else{
+                    toaster.pop('error', '提示', data.error);
+                }
+            },function (response) {
+                $scope.loading = false;
+                toaster.pop('error', '提示', response.data);
+            });
+
+        }
+
+    }]);
+
+    //航天开票单据列表
+    app.controller('PurchaseApBillOutListCtrl',['$scope', 'FaApCheck', 'FaApBillOut', 'toaster', '$state','$filter', '$modal', function ($scope, FaApCheck, FaApBillOut, toaster, $state, $filter, $modal) {
+        $scope.data = [];// 列表数据
+
+        $scope.condition = {
+            $fromOpened: false
+        }
+
+        $scope.openDatePicker = function ($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
+        }
+
+        //查找客户
+        $scope.searchCust = function (suuorname) {
+            var modalInstance = $modal.open({
+                animation: true,
+                templateUrl: 'static/tpl/index/fa/custInfo.html',
+                controller: 'SearchCustInfoCtrl',
+                resolve: {
+                    suuorname: function () {
+                        return suuorname;
+                    }
+                }
+            });
+            modalInstance.result.then(function (suuorname) {
+                $scope.suuorname = suuorname;
+            });
+
+        }
+
+        // 点击筛选根据条件选择数据
+        $scope.suuorname = '';
+        // 默认本月
+        $scope.sdateTo = new Date();
+        $scope.sdateFrom = new Date($scope.sdateTo.getFullYear(), $scope.sdateTo.getMonth(), 1);
+        $scope.vuuorname = '';
+        $scope.factory = '';
+        $scope.prodTitle = '';
+        $scope.prodSpec = '';
+        $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() + 3600 * 12 * 1000) || 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.keywordXls = angular.copy(($scope.condition.uuorname == null ? "" : $scope.condition.uuorname)
+                    + "|"+ ($scope.condition.venduuorname == null ? "" : $scope.condition.venduuorname)
+                    + "|"+ ($scope.condition.factory == null ? "" : $scope.condition.factory)
+                    + "|"+ ($scope.condition.prodTitle == null ? "" : $scope.condition.prodTitle)
+                    + "|"+ ($scope.condition.prodSpec == null ? "" : $scope.condition.prodSpec));//保存当前取值的关键词
+                $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;
+                    FaApBillOut.getDoneApCheckByKeywords({fromDate: $scope.fromDate, endDate: $scope.endDate, keyword:$scope.keywordXls}, function(data) {
+                        if(data.length > 0) {
+                            angular.forEach(data, function (checkItem) {
+                                checkItem.$selected = true;
+                                if(checkItem.billed) {
+                                    checkItem.thisBilledQty = checkItem.checkQty - checkItem.billed;
+                                    //$filter('number')(checkItem.thisBilledQty, 2);
+                                } else {
+                                    checkItem.billed = 0;
+                                    checkItem.thisBilledQty = checkItem.checkQty;
+                                }
+
+                                //最大最小开票数
+                                checkItem.maxThisBilledQty = checkItem.thisBilledQty;
+                                checkItem.minThisBilledQty = 0;
+
+                            });
+                            $scope.data = data;
+                            console.log($scope.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.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);
+            console.log($scope.filteredData );
+            var uuorname = $scope.suuorname;
+            var venduuorname = $scope.venduuorname;
+            var dateFrom = $scope.condition.dateFrom;
+            var dateTo = $scope.condition.dateTo;
+            var prodTitle = $scope.condition.prodTitle;
+            var prodSpec = $scope.condition.prodSpec;
+            var factory = $scope.condition.factory;
+            angular.forEach($scope.filteredData, function (item) {
+                if((item.apCheck.apDate >= dateFrom  || dateFrom == '') && (item.apCheck.apDate < dateTo  || dateTo == '')){
+                    item.$selected = $scope.checkboxes.checked;
+                }
+            });
+            $scope.getTotalMoney();
+        };
+
+        //获取已选单据总金额
+        var total = true;
+        $scope.getTotalMoney = function () {
+            $scope.totalMoney = 0;
+            angular.forEach($scope.data, function (check) {
+                if(check.$selected){
+                    $scope.totalMoney += (check.CheckQty || 0)*(check.orderPrice || 0);
+                }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.createApBillOut = function () {
+            //保存应收对账单主记录字段
+            $scope.apBillOut = {
+                custUu: '',
+                custName: '',
+                beginDate: '',
+                endDate: '',
+                enUu: '',
+                recordDate: '',
+                checkStatus: '未开票',
+                currency: '',
+                rate: '',
+                //billed:'',
+                //apBillOutItemId:'',
+                items: [],
+                sourceInfos: []
+            };
+            //保存来源单据相关信息
+            //var sourceInfos = [];
+
+
+            //所允许的本次对账最大最小数量
+            //$scope.data.maxThisCheckQty = 0;
+            //$scope.data.minThisCheckQty = 0;
+
+            $scope.sameCust = true;
+            $scope.validQty = true;
+            $scope.loading = true;
+            angular.forEach($scope.data, function (checkItem) {
+                //保存开票单明细行数据
+                $scope.item = {
+                    inoutno: '',
+                    inoutnodetno: '',
+                    orderCode: '',
+                    orderClass: '',
+                    orderDetno: '',
+
+                    price: '',
+                    NowQty: '',
+                    //amount: '',
+                    sourceId:'',
+                    sourceTable:'',
+                    //oldYCheckQty:'',
+                    status: 0,
+                    //receiveCode:'',
+                    //receiveName:'',
+                    prodCode:'',
+                    //prodSpec:'',
+                    taxrate: '',
+                    //sendcode: '',
+                    //whname: '',
+                };
+
+                //开票单明细行来源表信息(新的已开票数)
+                $scope.sourceInfo = {
+                    sourceId: '',
+                    sourceTable: '',
+                    newBilledQty: 0
+                };
+
+                //本次开票新的开票数
+                //$scope.thisBilledQty = 0;
+                if(checkItem.$selected == true) {
+                    console.log(checkItem);
+                    $scope.apBillOut.custName = checkItem.apCheck.custName;
+                    $scope.apBillOut.enUu = checkItem.apCheck.enUu;
+
+                    $scope.item.inoutno = checkItem.inoutno;
+                    $scope.item.inoutnodetno = checkItem.inoutnodetno;
+                    $scope.item.orderCode = checkItem.orderCode;
+                    $scope.item.orderClass = checkItem.orderClass;
+                    $scope.item.orderDetno = checkItem.orderDetno;
+
+                    $scope.item.NowQty = checkItem.thisBilledQty;
+                    if (typeof(checkItem.billed) == "undefined") {
+                        checkItem.billed = 0;
+                        $scope.sourceInfo.newBilledQty =checkItem.thisBilledQty;
+
+                    } else {
+                        //TODO 变成了字符串相加?
+                        $scope.sourceInfo.newBilledQty = checkItem.thisBilledQty + checkItem.billed;
+                    }
+
+                    //$scope.apBillOut.apBillOutItemId = check.id;
+                    $scope.apBillOut.recordDate = checkItem.recordDate;
+                    $scope.apBillOut.rate = checkItem.apCheck.rate;
+
+                    //必须是同一家客户才能生成对账单,否则提示错误
+                    if($scope.apBillOut.custUu == ''){
+                        $scope.apBillOut.custUu = checkItem.apCheck.custUu;
+                    }else if($scope.apBillOut.custUu !== checkItem.apCheck.custUu){
+                        $scope.sameCust = false;
+                        $scope.loading = false;
+                        toaster.pop('error', '请选择同一家客户');
+                    }
+
+                    //必须是相同币别才能生成对账单,否则提示错误
+                    if($scope.apBillOut.currency == ''){
+                        $scope.apBillOut.currency = checkItem.apCheck.currency;
+                    }else if($scope.apBillOut.currency !== checkItem.apCheck.currency){
+                        $scope.sameCust = false;
+                        $scope.loading = false;
+                        toaster.pop('error', '请选择同一种币别');
+                    }
+
+                    //本次对账数量必须小于总对账数量
+                    if(checkItem.checkQty > 0){
+                        //$scope.data.maxThisCheckQty = checkItem.CheckQty - checkItem.billed;
+                        //$scope.data.minThisCheckQty = 0;
+                        //if(checkItem.qty - (checkItem.yCheckQty || 0) < checkItem.CheckQty  || checkItem.CheckQty < 0 || checkItem.CheckQty == 0){
+                        if(checkItem.minThisBilledQty >checkItem.thisBilledQty || checkItem.maxThisBilledQty <checkItem.thisBilledQty) {
+                            $scope.validQty = false;
+                            $scope.loading = false;
+                            toaster.pop('error','本次开票数量,填写有误!');
+                        }
+                    }else if(check.qty < 0){
+                        $scope.data.maxCheckQty = 0;
+                        $scope.data.minCheckQty = check.qty;
+                        if(((-check.qty)-(-check.yCheckQty) < (-check.CheckQty)) || check.CheckQty > 0 || check.CheckQty == 0){
+                            $scope.validQty = false;
+                            $scope.loading = false;
+                            toaster.pop('error','本次开票数量,填写有误!');
+                        }
+                    }
+
+                    //TODO
+                    //获取最小时间作为对账区间的起始时间
+                    if($scope.apBillOut.beginDate == ''){
+                        $scope.apBillOut.beginDate = checkItem.apCheck.apDate;
+                    }else{
+                        $scope.apBillOut.beginDate = $scope.apBillOut.beginDate>checkItem.apCheck.apDate? checkItem.apCheck.apDate : checkItem.apCheck.beginDate;
+                    }
+
+                    //获取最大时间作为对账区间的截止时间
+                    if($scope.apBillOut.endDate == ''){
+                        $scope.apBillOut.endDate = checkItem.apCheck.apDate;
+                    }else{
+                        $scope.apBillOut.endDate = $scope.apBillOut.endDate<checkItem.apCheck.apDate? checkItem.apCheck.apDate : checkItem.apCheck.endDate;
+                    }
+
+                    //应收开票单明细行数据
+                    console.log(checkItem);
+                    //$scope.item.orderCode = check.orderCode;
+                    //$scope.item.orderClass = check.piClass;
+                    //$scope.item.orderDetno = check.orderDetno;
+                    $scope.item.price = checkItem.price;
+                    //$scope.item.price = check.orderPrice;
+                    //$scope.item.NowQty = check.checkQty;
+                    //$scope.item.amount = (check.CheckQty || 0)*(check.orderPrice || 0);
+                    $scope.item.sourceId = checkItem.id;
+                    $scope.item.sourceTable = 'PURC$APCHECKITEM';//瑕疵
+                    $scope.item.NowQty = checkItem.thisBilledQty;
+                    //$scope.item.oldYCheckQty = check.yCheckQty;
+                    $scope.item.prodCode = checkItem.prodCode;
+                    //$scope.item.prodTitle = check.prodTitle;
+                    ////$scope.item.prodSpec = check.prodSpec;
+                    //$scope.item.inoutno = check.inOutNo;
+                    //$scope.item.inoutnodetno = check.detno;
+                    $scope.item.taxrate = checkItem.taxrate;
+                    //$scope.item.receiveCode = check.receiveCode;
+                    //$scope.item.receiveName = check.receiveName;
+                    //$scope.item.sendcode = check.sendcode;
+                    //$scope.item.whname = check.whname;
+
+                    //来源表相关信息
+                    $scope.sourceInfo.sourceId = checkItem.id;
+                    $scope.sourceInfo.sourceTable = 'PURC$APCHECKITEM';//瑕疵
+                    $scope.sourceInfo.newBilledQty = ((checkItem.billed || 0) + checkItem.thisBilledQty);
+
+                    //sourceInfos.push($scope.sourceInfo);
+                    $scope.apBillOut.items.push($scope.item);
+                    $scope.apBillOut.sourceInfos.push($scope.sourceInfo);
+                    $scope.haveSelected = true;
+                }
+            });
+
+            //保存生成的开票单,后台同时更新对账单明细表中已开票数
+            $scope.saveApBillOut = function () {
+                FaApBillOut.saveApBillOut({}, $scope.apBillOut, function (data) {
+                    $scope.loading = false;
+                    toaster.pop('success', '成功', '生成开票单成功');
+                    $state.go('fa.apBillOut_detail', {id: data.id}, {reload:true});
+                }, function (response) {
+                    toaster.pop('error', '生成开票单失败', response.data);
+                });
+            };
+
+            //如果是同一家客户,生成对账单的同时,关闭模态框
+            if($scope.sameCust && $scope.validQty) {
+                $scope.saveApBillOut();
+            }
+
+        }
+    }]);
+
+
     /**
      * 客户应付发票
      */