panhui 7 ani în urmă
părinte
comite
07dfab4a9e
2 a modificat fișierele cu 11 adăugiri și 11 ștergeri
  1. 5 4
      WebRoot/form_yh.html
  2. 6 7
      WebRoot/form_zf.html

+ 5 - 4
WebRoot/form_yh.html

@@ -374,7 +374,7 @@
             <el-input v-model="form.submitter"></el-input>
         </el-form-item>
         <el-form-item>
-            <el-button type="primary" @click.native="onSave">提交</el-button>
+            <el-button type="primary" :loading="loading"  @click.native="onSave">提交</el-button>
             <el-button @click.native="reback()">取消</el-button>
         </el-form-item>
         <!--         <el-form-item class="skip">
@@ -391,6 +391,7 @@
     var app = new Vue({
         el: '#app',
         data: {
+            loading:false,
             alipay: true,
             bankCard: false,
             idCardPhotoA: '',
@@ -496,7 +497,7 @@
                 ],
                 idCard: [
                     {required: true, message: '请输入身份证号', trigger: 'blur'},
-                    {metersValley: 18, metersPeak: 18, message: '请输入有效的身份证号', trigger: 'blur'}
+                    // {metersValley: 18, metersPeak: 18, message: '请输入有效的身份证号', trigger: 'blur'}
                 ],
                 idCardPhotoA: [
                     {required: true, message: '请上传身份证照片', trigger: 'change'}
@@ -553,12 +554,12 @@
             onSubmit: function () {
 
                 var data = JSON.parse(JSON.stringify(this.form));
-
+                this.loading=true
                 $.post({
                     url: 'rentInfo/postOne',
                     data: data
                 }).then(function (res) {
-
+                    this.loading=false
 
                     if (res.success == true) {
 

+ 6 - 7
WebRoot/form_zf.html

@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="css/style.css">
 </head>
 <body>
-<div id="app">
+<div id="app" >
     <el-row>
         <template>
             <!--  <el-carousel :interval="5000" arrow="always" height="150px">
@@ -144,7 +144,7 @@
             <el-upload class="avatar-uploader" action="assets/uploadFile"
                        @click.native="clickAvatar('waterMetersValuePhoto')" :show-file-list="false"
                        :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
-                <img v-if="waterMetersValuePhoto" :src="waterMetersNumPhoto" class="avatar">
+                <img v-if="waterMetersValuePhoto" :src="waterMetersValuePhoto" class="avatar">
                 <i v-if="!waterMetersValuePhoto" class="el-icon-plus"></i>
             </el-upload>
         </el-form-item>
@@ -272,7 +272,7 @@
             <el-input v-model="form.submitter"></el-input>
         </el-form-item>
         <el-form-item>
-            <el-button type="primary" @click.native="onSave">提交</el-button>
+            <el-button type="primary" :loading="loading"  @click.native="onSave">提交</el-button>
             <el-button @click.native="reback()">取消</el-button>
         </el-form-item>
 
@@ -287,6 +287,7 @@
     var app = new Vue({
         el: '#app',
         data: {
+            loading:false,
             idCardPhotoA: '',
             idCardPhotoB: '',
             idCardPhotoAa: '',
@@ -376,8 +377,6 @@
                 ],
                 idCard: [
                     {required: true, message: '请输入身份证号', trigger: 'blur'},
-                    {min: 16, max: 18, message: '请输入有效的身份证号', trigger: 'blur'},
-                    {metersValley: 18, metersPeak: 18, message: '请输入有效的身份证号', trigger: 'blur'}
                 ],
                 idCardPhotoA: [
                     {required: true, message: '请上传身份证照片', trigger: 'change'}
@@ -418,7 +417,7 @@
             onSubmit: function (form) {
 
                 var data = JSON.parse(JSON.stringify(this.form));
-
+                this.loading=true
                 $.get({
                     url: 'rentInfo/getOne',
                     data: {
@@ -427,7 +426,7 @@
                         type: 2
                     }
                 }).then(function (res) {
-
+                    this.loading=false
 
                     if (res.success == true) {