Browse Source

全选按钮禁用,发票信息title,上传图片大小限制。

yangc 8 years ago
parent
commit
31ce82f05c

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

@@ -86,10 +86,15 @@ define(['app/app'], function(app) {
                 });
             }
 
+            $scope.isDoUpload = false;
             //上传发票许可证
             $scope.onUploadPermission = function () {
-                // console.log(event.target.files[0].name);
-                $scope.bill.attachUrl = event.target.files[0].name;
+                $scope.isDoUpload = true;
+                if (event.target.files[0].size < 3*1024*1024) {
+                    $scope.bill.attachUrl = event.target.files[0].name;
+                } else {
+                    $scope.bill.attachUrl = '';
+                }
             }
 
             //判断中文字符串的长度

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

@@ -475,10 +475,10 @@
                             <img ng-if="invoice.kind == 1206" src="static/img/user/images/ticket01.jpg"/>
                             <img ng-if="invoice.kind == 1205" src="static/img/user/images/ticket02.jpg"/>
                         </span>
-                        <span ng-cloak class="textmore">{{invoice.head}}</span>
-                        <span class="wd01 textmore" ng-cloak>{{invoice.name}}</span>
-                        <span class="textmore" ng-cloak>{{invoice.area}} {{invoice.detailAddress}}</span>
-                        <span ng-cloak>{{invoice.telephone}}</span>
+                        <span ng-cloak class="textmore" title="{{invoice.head}}">{{invoice.head}}</span>
+                        <span class="wd01 textmore" ng-cloak title="{{invoice.name}}">{{invoice.name}}</span>
+                        <span class="textmore" ng-cloak title="{{invoice.area+','+invoice.detailAddress}}">{{invoice.area}} {{invoice.detailAddress}}</span>
+                        <span ng-cloak title="{{invoice.telephone}}">{{invoice.telephone}}</span>
                         <span>
                             <!--<a  class="look" ng-click="viewInvoice(invoice)">查看/</a>-->
                             <a  ng-click="modifyInvoice(invoice)">修改</a> |
@@ -565,7 +565,7 @@
                         <div class="text-inverse error col-md-3" ng-show="form.account.$touched&&(form.account.$invalid)" ng-bind="form.account.$error.required?'请填写开户银行账号':'请填写30位以内的数字'"></div>
                     </div>
                     <div class="form-group"  ng-if="billType == 1205">
-                        <label class="col-md-2 control-label"><b class="text-inverse">*</b>上传开户许可证:</label>
+                        <label class="col-md-2 control-label"><b class="text-inverse">*</b>上传开户许可证:{{form.permissionUpload}}</label>
                         <div class="form-input-line file-line">
                             <input type="text" name="permission" required class="form-control" ng-model="bill.attachUrl" readonly style="background: #fff">
                         </div>
@@ -574,7 +574,7 @@
                                 <span>选择文件</span>
                                 <input class="input-file-default" type="file" ng-file-select ng-model="bill.billInfo" ng-change="onUploadPermission()" ng-multiple="false" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg,application/pdf,*.pdf">
                             </label></div>
-                        <div class="text-inverse error col-md-3" ng-show="(bill.attachUrl||form.permission.$touched)&&(form.permission.$invalid)">请上传开户许可证</div>
+                        <div class="text-inverse error col-md-3" ng-show="isDoUpload&&(form.permission.$error.required)">请勿超过3M</div>
                     </div>
                     <div class="form-group">
                         <label class="col-md-2 control-label"><b class="text-inverse">*</b>收票人:</label>

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

@@ -185,7 +185,7 @@ body div.ng-table-pager a.page-a {
                         <tr>
                             <th width="80">
                                 <lable class="check-act">
-                                    <input type="checkbox" id="checkAll" ng-click="onAllChecked()" ng-checked="isAllCheck"/>
+                                    <input type="checkbox" id="checkAll" ng-disabled="!orderData || orderData.length == 0" ng-click="onAllChecked()" ng-checked="isAllCheck"/>
                                     <label for="checkAll"></label>
                                 </lable>
                                 全选</th>

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

@@ -281,7 +281,7 @@
                 <tr>
                     <th width="45">
                         <lable class="check-act">
-                            <input type="checkbox" id="checkAll" ng-click="onAllChecked()" ng-checked="isAllCheck" />
+                            <input type="checkbox" id="checkAll" ng-disabled="!billData || billData.length == 0" ng-click="onAllChecked()" ng-checked="isAllCheck" />
                             <label for="checkAll"></label>
                         </lable>
                         全选</th>