Browse Source

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

# Conflicts:
#	src/main/webapp/resources/view/vendor/forstore/vendor-invoice.html
yangc 8 years ago
parent
commit
479bc7da02

+ 0 - 28
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_no_invoice_ctrl.js

@@ -3,8 +3,6 @@ define([ 'app/app' ], function(app) {
     app.register.controller('NoInvoiceCtrl', ['$scope','$rootScope','$modal', 'Order', 'toaster','ngTableParams','BaseService','Bill', function ($scope, $rootScope, $modal, Order, toaster, ngTableParams, BaseService, Bill) {
         $scope.tab = 'buyer_no_invoice';
 
-    //    $scope.applyItem = []
-
         // 开票申请
         $scope.applyInvoice = function () {
             var applyItem = [];
@@ -13,7 +11,6 @@ define([ 'app/app' ], function(app) {
                     applyItem.push(item);
                 }
             })
-      //      console.log(applyItem)
             if (applyItem.length > 0) {
                 if ($scope.invoices.length > 0) {
                     $modal.open({
@@ -44,16 +41,7 @@ define([ 'app/app' ], function(app) {
                 sorting: {creattime : "DESC"},
                 keyword : ''
             };
-     //       $scope.pageparam = {};
             $scope.keyword = '';
-            // $scope.status = 520;
-            // $scope.pageparam.page = 1;
-            // $scope.pageparam.count = 10;
-            // $scope.pageparam.sorting = {createTime : "DESC"};
-
-            // $scope.param.pageParams = $scope.pageparam;
-            // $scope.param.keyword = $scope.keyword;
-            // $scope.param.status = $scope.status
 
             Bill.getListPersonal(null, function(data) {
                 $scope.invoices = data;
@@ -63,14 +51,6 @@ define([ 'app/app' ], function(app) {
         }
         initDataRule();
 
-        // var loadOrderData = function () {
-        //     Order.getOrderOnBillByPersonal($scope.param, {}, function (data) {
-        //         $scope.orderData = data
-        //     }, function (error) {
-        //         toaster.pop('error', '获取未开票订单信息失败')
-        //     });
-        // };
-        // loadOrderData();
         $scope.$$kdnData = {};
 
         var initTable = function () {
@@ -212,12 +192,9 @@ define([ 'app/app' ], function(app) {
                     }
                 })
             }
-      //      console.log($scope.invoiceData)
-       //     return {}
         }
 
         $scope.getInvoiceData();
-        // console.log($scope.invoiceData);
 
         //关闭模态框
         $scope.closeModal = function () {
@@ -226,11 +203,6 @@ define([ 'app/app' ], function(app) {
 
         //提交申请
         $scope.apply = function () {
-           /* var orderids = '';
-            angular.forEach($scope.submitInvoice, function (item) {
-                orderids += item.orderid + ',';
-            })
-            orderids = orderids.substring(0, orderids.length-1)*/
             BillSubmit.submitBillApply(null, {orderids: $scope.orderIdArr.join(','), invoiceid: $scope.invoiceData.id}, function (data) {
                 toaster.pop('success', '申请发票成功');
                 $scope.closeModal();

+ 11 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_invoice_ctrl.js

@@ -51,7 +51,7 @@ define([ 'app/app' ], function(app) {
                 getData : function ($defer, params) {
                     var param = BaseService.parseParams(params.url());
                 //    param.pageParams.sorting = {creattime : "DESC"};
-              //      param.keyword = $scope.keyword;
+                         param.keyword = $scope.keyword;
                     BillSubmit.getSubmitBillApply(param, function (page) {
                         $scope.$$kdnData.totalElements = page.totalElements;
                         if(Number(page.totalElements) > 0) {
@@ -94,7 +94,10 @@ define([ 'app/app' ], function(app) {
 
         $scope.searchByKey = function (k) {
         //    console.log($scope.keyword)
-            $scope.param.keyword = k
+        //     $scope.param.keyword = k;
+        //     console.log(k)
+        //     console.log($scope.param.keyword)
+            $scope.keyword = k;
             initTable();
         }
         $scope.enterEvent = function (e) {
@@ -104,6 +107,12 @@ define([ 'app/app' ], function(app) {
             }
         }
 
+        $scope.enterEvent = function(e, keyword) {
+            var keycode = window.event ? e.keyCode : e.which;
+            if(keycode==13){
+                $scope.searchByKey(keyword);
+            }
+        }
         //全选状态
         $scope.isAllCheck = false
         //全选