Explorar el Código

金额只能小数点2位

xuefy hace 4 años
padre
commit
ea8b7bce9a

+ 6 - 1
front-vue/src/views/service/credit/addCredit.vue

@@ -71,7 +71,7 @@
             <el-row>
                 <el-col :span="8">
                     <el-form-item label="签发金额" prop="zfiAmount">
-                        <el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall" />
+                        <el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall"  @input.native="changeRate($event,form.zfiAmount)" />
                     </el-form-item>
                 </el-col>
                 <el-col :span="8">
@@ -937,6 +937,11 @@ export default {
             }
             this.openFile = true;
         },
+        changeRate(e,input){
+          e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
+          this.input=e.target.value
+          this.form.zfiAmount=this.input
+        },
         //新增应付
         addPay(){
 

+ 6 - 2
front-vue/src/views/service/credit/applyCreditEdit.vue

@@ -106,7 +106,7 @@
             <el-row>
                 <el-col :span="8">
                     <el-form-item label="签发金额" prop="zfiAmount"> 
-                         <el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall" />
+                         <el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall" @input.native="changeRate($event,form.zfiAmount)" />
                     </el-form-item>
                 </el-col>
                  <el-col :span="8">
@@ -808,7 +808,11 @@ export default {
         }
         this.openFile = true;
     },
-       
+    changeRate(e,input){
+      e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
+      this.input=e.target.value
+      this.form.zfiAmount=this.input
+    },
     }
 };
 </script>

+ 6 - 1
front-vue/src/views/service/credit/creditApply.vue

@@ -34,7 +34,7 @@
                
                 <el-col :span="8">
                     <el-form-item label="签发金额" prop="zfiAmount"> 
-                         <el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall" />
+                         <el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall"  @input.native="changeRate($event,form.zfiAmount)"  />
                     </el-form-item>
                 </el-col>
                  <el-col :span="8">
@@ -728,6 +728,11 @@ export default {
         }
         this.openFile = true;
     },
+    changeRate(e,input){
+      e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
+      this.input=e.target.value
+      this.form.zfiAmount=this.input
+    },
        
     }
 };

+ 1 - 2
front-vue/src/views/service/credit/creditSeal.vue

@@ -153,7 +153,7 @@
             margin-bottom:2px;">
             <el-button type="success" @click="getContractFile">预览文件</el-button>
             <el-button type="info" @click="refuse">拒签</el-button>
-            <el-button type="primary" @click="selectType">签署</el-button>
+            <el-button type="primary" @click="selectType">盖章</el-button>
             <el-button @click="cancel">取消</el-button>
         </div>
         <el-dialog
@@ -686,7 +686,6 @@ export default {
     //盖章
     contractSigning(){
          contractSigning(this.form).then((response) => {
-
                 this.msgSuccess("盖章成功");
                 if(this.zfpAuthType == '02'){
                     //关闭短信验证

+ 6 - 1
front-vue/src/views/service/credit/creditUpdate.vue

@@ -124,7 +124,7 @@
             <el-row>
                 <el-col :span="8">
                     <el-form-item label="签发金额" prop="zfiAmount"> 
-                         <el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall"/>
+                         <el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall"  @input.native="changeRate($event,form.zfiAmount)" />
                     </el-form-item>
                 </el-col> 
              
@@ -893,6 +893,11 @@ export default {
         }
         this.openFile = true;
     },
+    changeRate(e,input){
+      e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
+      this.input=e.target.value
+      this.form.zfiAmount=this.input
+    },
     
   }
 };

+ 6 - 1
front-vue/src/views/service/credit/financeOpen.vue

@@ -96,7 +96,7 @@
             <el-row>
                 <el-col :span="8">
                     <el-form-item label="签发金额" prop="zfiAmount"> 
-                         <el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall" />
+                         <el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall" @input.native="changeRate($event,form.zfiAmount)"/>
                     </el-form-item>
                 </el-col>
                 <!--  <el-col :span="8">
@@ -897,6 +897,11 @@ export default {
         }
         this.openFile = true;
     },
+    changeRate(e,input){
+      e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
+      this.input=e.target.value
+      this.form.zfiAmount=this.input
+    },
        
     }
 };

+ 6 - 1
front-vue/src/views/service/credit/financeOpenUpdate.vue

@@ -113,7 +113,7 @@
             <el-row>
                 <el-col :span="8">
                     <el-form-item label="签发金额" prop="zfiAmount"> 
-                         <el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall" />
+                         <el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall" @input.native="changeRate($event,form.zfiAmount)" />
                     </el-form-item>
                 </el-col>
                 <!--  <el-col :span="8">
@@ -931,6 +931,11 @@ export default {
         }
         this.openFile = true;
     },
+    changeRate(e,input){
+      e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
+      this.input=e.target.value
+      this.form.zfiAmount=this.input
+    },
        
     }
 };