yangc 8 лет назад
Родитель
Сommit
73c58b80a6

+ 13 - 2
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_invoice_ctrl.js

@@ -104,7 +104,8 @@ define(['app/app'], function(app) {
                 validBillHead: true,
                 validBillName: true,
                 validBankName: true,
-                validDetailAddress: true
+                validDetailAddress: true,
+                validCompanyAddress: true
             }
 
             $scope.checkValidFrom = function () {
@@ -153,7 +154,17 @@ define(['app/app'], function(app) {
             if (len > 60) {
                 $scope.validForm.validDetailAddress = false;
             } else {
-                $scope.validForm.valiDetailAddress = true;
+                $scope.validForm.validDetailAddress = true;
+            }
+        }
+
+        //单位地址check
+        $scope.checkCompanyAddress = function () {
+            var len = getRealStringLen($scope.bill.companyAddress);
+            if (len > 100) {
+                $scope.validForm.validCompanyAddress = false;
+            } else {
+                $scope.validForm.validCompanyAddress = true;
             }
         }
             

+ 6 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_invoice_record_ctrl.js

@@ -68,5 +68,11 @@ define([ 'app/app' ], function(app) {
             $scope.param.keyword = $scope.keyword;
             initTable();
         }
+        $scope.enterEvent = function (e) {
+            var keycode = window.event?e.keyCode:e.which;
+            if(keycode==13){
+                $scope.searchByKey();
+            }
+        }
     }]);
 });

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

@@ -108,6 +108,12 @@ define([ 'app/app' ], function(app) {
             $scope.param.keyword = $scope.keyword;
             initTable();
         }
+        $scope.enterEvent = function (e) {
+            var keycode = window.event?e.keyCode:e.which;
+            if(keycode==13){
+                $scope.searchByKeyword();
+            }
+        }
 
         //全选状态
         $scope.isAllCheck = false;

+ 6 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_invoice_ctrl.js

@@ -97,6 +97,12 @@ define([ 'app/app' ], function(app) {
             $scope.param.keyword = k
             initTable();
         }
+        $scope.enterEvent = function (e) {
+            var keycode = window.event?e.keyCode:e.which;
+            if(keycode==13){
+                $scope.searchByKey();
+            }
+        }
 
         //全选状态
         $scope.isAllCheck = false

+ 19 - 10
src/main/webapp/resources/view/usercenter/forstore/buyer_invoice.html

@@ -11,6 +11,7 @@
     }
     .u_c_invoice .ticket_record_list {
         background: #fff;
+        min-height: 323px;
     }
     .u_c_invoice #add-invoice {
         width: 100%;
@@ -376,7 +377,7 @@
         width: 75px;
     }
     .ticket_record_list dl dd:last-child {
-        border-bottom: none;
+        background: #f1f5ff;
     }
     #bill-info .select-file-box input {
         display: none;
@@ -395,6 +396,14 @@
         left: -20px;
         border-radius: 2px;
     }
+    .cursor-not-allowed {
+        cursor: not-allowed!important;
+    }
+    .ticket_record_list .ticket_data dd {
+        border-left: #dae5fd 1px solid;
+        border-bottom: #dae5fd 1px solid!important;
+        border-right: #dae5fd 1px solid;
+    }
 </style>
 <!--右侧主体部分-->
 <div class="user_right fr u_c_invoice">
@@ -444,7 +453,7 @@
                         <span ng-cloak>{{invoice.telephone}}</span>
                         <span>
                             <!--<a  class="look" ng-click="viewInvoice(invoice)">查看/</a>-->
-                            <a  ng-click="modifyInvoice(invoice)">修改/</a>
+                            <a  ng-click="modifyInvoice(invoice)">修改</a> |
                             <a  ng-click="deleteInvoice(invoice)">删除</a>
                         </span>
                     </dd>
@@ -472,14 +481,14 @@
                             <label class="padding-top-5"><input type="radio" ng-click="setBillType(1205)" ng-model="billType" value="1205" ng-disabled="!isSpecial"></label>
                             <label ng-class="{'disable':!isSpecial, '':isSpecial}" class="padding-left-0">增值税专用发票(可抵扣) </label>
                         </label>-->
-                        <label for="1206" class="radio-inline radioLabel">
+                        <label for="1206" class="radio-inline radioLabel" ng-class="{'cursor-not-allowed':!isNormal}">
                             <input type="radio" name="bill" value="1206" ng-disabled="!isNormal" ng-click="setBillType(1206)" ng-model="billType" id="1206">
-                            <label for="1206" class="txtContact"></label>
+                            <label ng-class="{'cursor-not-allowed':!isNormal}" for="1206" class="txtContact"></label>
                             <span ng-class="{'disable':!isNormal, '':isNormal}">增值税普票(不可抵扣)</span>
                         </label>
-                        <label for="1205" class="radio-inline radioLabel">
+                        <label for="1205" class="radio-inline radioLabel" ng-class="{'cursor-not-allowed':!isSpecial}">
                             <input type="radio" name="bill" value="1205" ng-disabled="!isSpecial" ng-click="setBillType(1205)" ng-model="billType" id="1205">
-                            <label for="1205" class="txtContact"></label>
+                            <label ng-class="{'cursor-not-allowed':!isSpecial}" for="1205" class="txtContact"></label>
                             <span ng-class="{'disable':!isSpecial, '':isSpecial}">增值税专票(可抵扣)</span>
                         </label>
                     </div>
@@ -495,16 +504,16 @@
                     <div class="form-group" ng-if="billType == 1205">
                         <label class="col-md-2 control-label"><b class="text-inverse">*</b>单位地址:</label>
                         <div class="col-md-5">
-                            <input type="text" class="form-control" ng-model="bill.companyAddress" ng-focus="form.companyAddr.$touched = false" ng-blur="form.companyAddr.$touched = true" name="companyAddr" ng-maxlength="100" required="required" placeholder="请输入单位地址">
+                            <input type="text" class="form-control" ng-model="bill.companyAddress" ng-focus="form.companyAddr.$touched = false" ng-blur="form.companyAddr.$touched = true; checkCompanyAddress()" name="companyAddr" required="required" placeholder="请输入单位地址">
                         </div>
-                        <div class="text-inverse error col-md-3" ng-show="form.companyAddr.$touched&&form.companyAddr.$invalid" ng-bind="form.companyAddr.$error.required?'请填写单位地址':'请勿超过50个字'"></div>
+                        <div class="text-inverse error col-md-3" ng-show="form.companyAddr.$touched&&(form.companyAddr.$invalid || !validForm.validCompanyAddress)" ng-bind="form.companyAddr.$error.required?'请填写单位地址':'请勿超过50个字'"></div>
                     </div>
                     <div class="form-group"  ng-if="billType == 1205">
                         <label class="col-md-2 control-label"><b class="text-inverse">*</b>单位电话:</label>
                         <div class="col-md-5">
-                            <input type="text" class="form-control" ng-focus="form.companyPhone.$touched = false" ng-blur="form.companyPhone.$touched = true" placeholder="区号和号码使用 '-' 隔开,或者不填区号" name="companyPhone" ng-model="bill.companyPhone" ng-maxlength="20" ng-pattern="/^0\d{2,3}-[1-9]\d{6,7}$/" required="required">
+                            <input type="text" class="form-control" ng-focus="form.companyPhone.$touched = false" ng-blur="form.companyPhone.$touched = true" placeholder="区号和号码使用 '-' 隔开" name="companyPhone" ng-model="bill.companyPhone" ng-pattern="/^0\d{2,3}-[1-9]\d{6,7}$/" ng-maxlength="20" required="required">
                         </div>
-                        <div class="text-inverse error col-md-3" ng-show="form.companyPhone.$touched&&form.companyPhone.$invalid" ng-bind="form.companyPhone.$error.required?'请填写单位电话':'请勿超过20个字符'"></div>
+                        <div class="text-inverse error col-md-3" ng-show="form.companyPhone.$touched&&form.companyPhone.$invalid" ng-bind="form.companyPhone.$error.required?'请填写单位电话':form.companyPhone.$error.maxlength?'请勿超过20个字符':'请填写正确的电话号码,用-隔开'"></div>
                     </div>
                     <div class="form-group"  ng-if="billType == 1205">
                         <label class="col-md-2 control-label"><b class="text-inverse">*</b>税务登记号:</label>

+ 13 - 3
src/main/webapp/resources/view/usercenter/forstore/buyer_invoice_record.html

@@ -16,6 +16,7 @@
         box-sizing: border-box;
         border: #dae5fd 1px solid;
         border-bottom: none;
+        margin-bottom: 0!important;
     }
     .invoice-com-tab thead{
         height: 40px;
@@ -114,6 +115,13 @@
         color: #fff;
         float: right;
     }
+    body div.ng-table-pager a.page-a {
+        float: right;
+        background: #5078cb!important;
+    }
+    .ng-table-pagination .page-a:hover {
+        background: #5078cb!important;
+    }
 </style>
 <!--右侧主体部分-->
 <div class="user_right fr u_c_invoice">
@@ -130,7 +138,7 @@
         <div class="invoice-record">
             <div class="invoice-search">
                 <div class="fr">
-                    <input type="text" class="form-control" ng-model="keyword" placeholder="商家名称/订单号/发票抬头/收票人/联系电话"/>
+                    <input type="text" ng-keydown="enterEvent($event)" class="form-control" ng-model="keyword" placeholder="商家名称/订单号/发票抬头/收票人/联系电话"/>
                     <button ng-click="searchByKey()">搜索</button>
                 </div>
             </div>
@@ -138,7 +146,7 @@
                 <table class="invoice-com-tab table" ng-table="billRecordTableParam">
                     <thead>
                         <tr>
-                            <th width="80">申请时间</th>
+                            <th width="88">申请时间</th>
                             <th width="130">商家名称</th>
                             <th width="80">订单号</th>
                             <th width="100">可开票金额(¥)</th>
@@ -165,7 +173,9 @@
                         <tr ng-repeat="item in billData">
                             <td ng-bind="item.createTime | date : 'yyyy-MM-dd'"></td>
                             <td ng-bind="item.sellername"></td>
-                            <td ng-bind="item.orderids"></td>
+                            <td>
+                                <span style="display: block" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid"></span>
+                            </td>
                             <td ng-bind="item.price"></td>
                             <td ng-bind="item.invoicetype==1206?'普票':'专票'"></td>
                             <td ng-bind="item.invoicetitle"></td>

+ 12 - 3
src/main/webapp/resources/view/usercenter/forstore/buyer_no_invoice.html

@@ -33,7 +33,7 @@
 .invoice-com-tab{
     box-sizing: border-box;
     border: #dae5fd 1px solid;
-    border-bottom: none;
+    border-bottom: none!important;
 }
 .invoice-com-tab thead{
     height: 40px;
@@ -145,6 +145,13 @@
     color: #fff;
     float: right;
 }
+body div.ng-table-pager a.page-a {
+    float: right;
+    background: #5078cb!important;
+}
+.ng-table-pagination .page-a:hover {
+    background: #5078cb!important;
+}
 </style>
 <!--右侧主体部分-->
 <div class="user_right fr u_c_invoice">
@@ -168,7 +175,7 @@
             </div>
             <div class="invoice-search">
                 <div class="fr">
-                    <input type="text" class="form-control" ng-model="keyword" placeholder="商家名称/订单号"/>
+                    <input type="text" ng-keydown="enterEvent($event)" class="form-control" ng-model="keyword" placeholder="商家名称/订单号"/>
                     <button ng-click="searchByKeyword()">搜索</button>
                 </div>
             </div>
@@ -196,7 +203,9 @@
                                 </lable>
                             </td>
                             <td ng-bind="item.storeName"></td>
-                            <td ng-bind="item.orderid"></td>
+                            <td>
+                                <span style="display: block" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid"></span>
+                            </td>
                             <td ng-bind="item.price"></td>
                         </tr>
                         <tr class="record-num" ng-if="orderData.length > 0">

+ 16 - 4
src/main/webapp/resources/view/vendor/forstore/vendor-invoice.html

@@ -33,6 +33,7 @@
         box-sizing: border-box;
         border: #dae5fd 1px solid;
         border-bottom: none;
+        margin-bottom: 0!important;
     }
     .invoice-com-tab thead{
         height: 40px;
@@ -236,6 +237,13 @@
         color: #fff;
         float: right;
     }
+    body div.ng-table-pager a.page-a {
+        float: right;
+        background: #5078cb!important;
+    }
+    .ng-table-pagination .page-a:hover {
+        background: #5078cb!important;
+    }
 </style>
 <div class="count user_right fr">
     <div class="count_center">
@@ -256,7 +264,7 @@
         </div>
         <div class="invoice-search">
             <div class="fr">
-                <input type="text" class="form-control" ng-model="keyword" placeholder="商家名称/订单号/发票抬头/收票人/联系电话"/>
+                <input type="text" ng-keydown="enterEvent($event)"  class="form-control" ng-model="keyword" placeholder="订单号/发票抬头/收票人/联系电话"/>
                 <button ng-click="searchByKey(keyword)">搜索</button>
             </div>
         </div>
@@ -295,7 +303,9 @@
                             </lable>
                         </td>
                         <td ng-bind="item.createTime | date : 'yyyy-MM-dd'"></td>
-                        <td ng-bind="item.orderids"></td>
+                        <td>
+                            <span style="display: block" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid"></span>
+                        </td>
                         <td ng-bind="item.price"></td>
                         <td ng-bind="item.invoicetype==1206?'普票':'专票'"></td>
                         <td ng-bind="item.invoicetitle"></td>
@@ -327,7 +337,7 @@
     <div class="vendor-invoice" ng-if="active == 'apply_record'">
         <div class="invoice-search" style="margin-top: 5px;margin-bottom: 16px; width: 100%">
             <div class="fr">
-                <input type="text" class="form-control" ng-model="keyword" placeholder="商家名称/订单号/发票抬头/收票人/联系电话"/>
+                <input type="text" ng-keydown="enterEvent($event)"  class="form-control" ng-model="keyword" placeholder="订单号/发票抬头/收票人/联系电话"/>
                 <button ng-click="searchByKey(keyword)">搜索</button>
             </div>
         </div>
@@ -354,7 +364,9 @@
                 <tbody>
                 <tr ng-repeat="item in billData track by $index">
                     <td ng-bind="item.createTime | date : 'yyyy-MM-dd'"></td>
-                    <td ng-bind="item.orderids"></td>
+                    <td>
+                        <span style="display: block" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid"></span>
+                    </td>
                     <td ng-bind="item.price"></td>
                     <td ng-bind="item.invoicetype==1206?'普票':'专票'"></td>
                     <td ng-bind="item.invoicetitle"></td>