Procházet zdrojové kódy

开票表单radio和文件上传样式

yangc před 8 roky
rodič
revize
1376ba112a

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

@@ -107,12 +107,13 @@ define(['app/app'], function(app) {
             }
 
             $scope.checkValidFrom = function () {
+                var flag = true
                 angular.forEach($scope.validForm, function (item) {
                     if (!item) {
-                        return false;
+                        flag = false;
                     }
                 })
-                return true;
+                return flag;
             }
         $scope.checkValidFrom();
             //发票抬头check

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

@@ -212,7 +212,7 @@
         line-height: 1.429;
         font-weight: normal;
     }
-    #bill-info label.disable {
+    #bill-info span.disable {
         color: rgb(153, 153, 153);
     }
     .base-line {
@@ -236,6 +236,11 @@
 
     div.radio {
         margin-top: 0px;
+        margin-bottom: 0;
+        height: 27px;
+        line-height: 27px;
+        padding-top: 6px;
+        padding-left: 0;
     }
 
     .padding-top-5 {
@@ -337,28 +342,34 @@
         font-weight: normal;
     }
     /*radio*/
-    .radioLabel {
+    #bill-info .radioLabel {
         line-height: 20px;
         cursor: pointer;
         color: #666;
     }
-    .radioLabel label{
-        width: 16px;
-        height: 16px;
-        background: url(static/img/user/images/radio.png);
-        background-position: 0 -1px;
-        margin-right: 2px;
+    #bill-info .radio-inline {
+        padding-left: 0;
+        margin: 0 26px;
+    }
+    #bill-info .radioLabel label{
+        width: 12px;
+        height: 12px;
+        background: url(static/img/icon/check-rule.png);
+        background-position: 0 0px;
         vertical-align: middle;
         margin-bottom: 0 !important;
-        margin-right: 0 !important;
+        margin-right: 0px !important;
+        padding: 0;
+        min-height: 12px;
+        left: -7px;
     }
-    .radioLabel input[type="radio"]:checked + label {
-        background-position: -19px -1px;
+    #bill-info .radioLabel input[type="radio"]:checked + label {
+        background-position: -15px -12px;
     }
-    .radioLabel input[type="radio"]:checked + label + span{
+    #bill-info .radioLabel input[type="radio"]:checked + label{
         color: #5078cb;
     }
-    .radioLabel input[type="radio"]{
+    #bill-info .radioLabel input[type="radio"]{
         display: none;
     }
     #bill-info .form-area .input-file-default {
@@ -367,6 +378,23 @@
     .ticket_record_list dl dd:last-child {
         border-bottom: none;
     }
+    #bill-info .select-file-box input {
+        display: none;
+    }
+    #bill-info .select-file-box span {
+        width: 76px;
+        display: block;
+        text-align: center;
+        height: 24px;
+        line-height: 24px;
+        background: #ff8522;
+        font-size: 12px;
+        color: #fff;
+        margin-top: 5px;
+        position: relative;
+        left: -20px;
+        border-radius: 2px;
+    }
 </style>
 <!--右侧主体部分-->
 <div class="user_right fr u_c_invoice">
@@ -436,24 +464,24 @@
                 <div class="row" ng-if="isAdd">
                     <label class="col-md-2 normal-control-label"><b class="text-inverse">*</b>发票类型:</label>
                     <div class="radio col-md-10">
-                        <label class="radio-inline">
+                      <!--  <label class="radio-inline">
                             <label class="padding-top-5"><input type="radio" ng-click="setBillType(1206)" ng-model="billType" value="1206" ng-disabled="!isNormal"></label>
                             <label ng-class="{'disable':!isNormal, '':isNormal}" class="padding-left-0">增值税普通发票(不可抵扣)</label>
                         </label>
                         <label class="radio-inline">
                             <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">
-                            <input type="radio" name="bill" value="1206" ng-click="setBillType(1206)" ng-model="billType" id="1206">
+                        </label>-->
+                        <label for="1206" class="radio-inline radioLabel">
+                            <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>
-                            <span ng-class="{'disable':!isNormal, '':isNormal}">增值税普通发票(不可抵扣)</span>
+                            <span ng-class="{'disable':!isNormal, '':isNormal}">增值税普票(不可抵扣)</span>
                         </label>
                         <label for="1205" class="radio-inline radioLabel">
-                            <input type="radio" name="bill" value="1205" ng-click="setBillType(1205)" ng-model="billType" id="1205">
+                            <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>
-                            <span ng-class="{'disable':!isNormal, '':isNormal}">增值税专用发票(可抵扣)</span>
-                        </label>-->
+                            <span ng-class="{'disable':!isSpecial, '':isSpecial}">增值税专票(可抵扣)</span>
+                        </label>
                     </div>
                 </div>
                 <form class="form-horizontal" novalidate="novalidate" name="form">
@@ -504,7 +532,11 @@
                         <div class="col-md-4">
                             <input type="text" name="permission" required class="form-control" ng-model="bill.attachUrl" readonly style="background: #fff">
                         </div>
-                        <div class="col-md-1"><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"></div>
+                        <div class="col-md-1">
+                            <label class="select-file-box">
+                                <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>
                     <div class="form-group">