Procházet zdrojové kódy

往来账款,授信金额格式限制

ch před 4 roky
rodič
revize
74ee460924

+ 9 - 5
front-vue/src/views/service/bill/addBill.vue

@@ -457,10 +457,10 @@
                     <el-input v-model="invoice.ziiSellerNo" maxlength="20" />
                   </el-form-item>
                   <el-form-item label="发票金额:">
-                    <el-input v-model="invoice.ziiTotalAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiTotalAmount)" />
+                    <el-input v-model="invoice.ziiTotalAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiTotalAmount,'0')" />
                   </el-form-item>
                   <el-form-item label="税价金额:">
-                    <el-input v-model="invoice.ziiAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiAmount)"/>
+                    <el-input v-model="invoice.ziiAmount" maxlength="16" @input.native="changeRates($event,invoice.ziiAmount,'1')"/>
                   </el-form-item>
                 </el-form>
               </el-main>
@@ -895,10 +895,14 @@ export default {
         });
     },
     //金额校验格式
-    changeRate(e,input){
+    changeRate(e,input,type){
       e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
-      this.input=e.target.value
-      input=this.input
+      this.input=e.target.value;
+      if("0"==type){
+        this.invoice.ziiTotalAmount = e.target.value;
+      }else if("1"==type){
+        this.invoice.ziiAmount = e.target.value;
+      }
     },
     //表格置灰
     tableRowClassName({ row, rowIndex }) {

+ 9 - 5
front-vue/src/views/service/bill/billAdd.vue

@@ -451,10 +451,10 @@
                     <el-input v-model="invoice.ziiSellerNo" maxlength="20" />
                   </el-form-item>
                  <el-form-item label="发票金额:">
-                    <el-input v-model="invoice.ziiTotalAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiTotalAmount)" />
+                    <el-input v-model="invoice.ziiTotalAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiTotalAmount,'0')" />
                   </el-form-item>
                   <el-form-item label="税价金额:">
-                    <el-input v-model="invoice.ziiAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiAmount)"/>
+                    <el-input v-model="invoice.ziiAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiAmount,'1')"/>
                   </el-form-item>
                 </el-form>
               </el-main>
@@ -882,10 +882,14 @@ export default {
         });
     },
     //金额校验格式
-    changeRate(e,input){
+    changeRate(e,input,type){
       e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
-      this.input=e.target.value
-      input=this.input
+      this.input=e.target.value;
+      if("0"==type){
+        this.invoice.ziiTotalAmount = e.target.value;
+      }else if("1"==type){
+        this.invoice.ziiAmount = e.target.value;
+      }
     },
     //表格置灰
     tableRowClassName({ row, rowIndex }) {

+ 9 - 5
front-vue/src/views/service/bill/billEdit.vue

@@ -503,10 +503,10 @@
                     <el-input v-model="invoice.ziiSellerNo" maxlength="20" />
                   </el-form-item>
                   <el-form-item label="发票金额:">
-                    <el-input v-model="invoice.ziiTotalAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiTotalAmount)" />
+                    <el-input v-model="invoice.ziiTotalAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiTotalAmount,'0')" />
                   </el-form-item>
                   <el-form-item label="税价金额:">
-                    <el-input v-model="invoice.ziiAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiAmount)"/>
+                    <el-input v-model="invoice.ziiAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiAmount,'1')"/>
                   </el-form-item>
                 </el-form>
               </el-main>
@@ -969,10 +969,14 @@ export default {
         });
     },
     //金额校验格式
-    changeRate(e,input){
+    changeRate(e,input,type){
       e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
-      this.input=e.target.value
-      input=this.input
+      this.input=e.target.value;
+      if("0"==type){
+        this.invoice.ziiTotalAmount = e.target.value;
+      }else if("1"==type){
+        this.invoice.ziiAmount = e.target.value;
+      }
     },
     //表格置灰
     tableRowClassName({ row, rowIndex }) {

+ 9 - 5
front-vue/src/views/service/bill/editBill.vue

@@ -507,10 +507,10 @@
                     <el-input v-model="invoice.ziiSellerNo" maxlength="20" />
                   </el-form-item>
                   <el-form-item label="发票金额:">
-                    <el-input v-model="invoice.ziiTotalAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiTotalAmount)" />
+                    <el-input v-model="invoice.ziiTotalAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiTotalAmount,'0')" />
                   </el-form-item>
                   <el-form-item label="税价金额:">
-                    <el-input v-model="invoice.ziiAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiAmount)"/>
+                    <el-input v-model="invoice.ziiAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiAmount,'1')"/>
                   </el-form-item>
                 </el-form>
               </el-main>
@@ -982,10 +982,14 @@ export default {
         });
     },
     //金额校验格式
-    changeRate(e,input){
+    changeRate(e,input,type){
       e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
-      this.input=e.target.value
-      input=this.input
+      this.input=e.target.value;
+      if("0"==type){
+        this.invoice.ziiTotalAmount = e.target.value;
+      }else if("1"==type){
+        this.invoice.ziiAmount = e.target.value;
+      }
     },
     //表格置灰
     tableRowClassName({ row, rowIndex }) {

+ 5 - 5
front-vue/src/views/service/creditLine/detailCreditLine.vue

@@ -261,11 +261,11 @@
         <el-button size="mini" type="primary" @click="closeTicket">确认</el-button>
       </span>
     </el-dialog>
-      <div class="footer" style="margin-top: 100px; float: right">
-      <el-button type="info" @click="cancel">取消</el-button>
-      <!-- <el-button type="success" @click="submitForm"
-        >提交</el-button> -->
-    </div>
+       <div style="margin-top: 100px; margin-left:45%">
+        <el-button type="info" @click="cancel">取消</el-button>
+        <!-- <el-button type="success" @click="submitForm"
+            >提交</el-button> --> 
+      </div>
     <el-dialog :title="title" :visible.sync="openWord" width="1000px" append-to-body>
       <iframe :src="wordUrl" width='700px' height='500px' frameborder='1' />
     </el-dialog>

+ 7 - 7
front-vue/src/views/service/creditLine/supplierCreditLine.vue

@@ -159,7 +159,7 @@
           <el-input v-model="form.zfsqAccountBank"  placeholder="请输入还款账户开户行" style="width:300px" maxlength="30"/>
         </el-form-item>
         <el-form-item label="授信额度:" prop="zfsqAmount">
-            <el-input v-model="form.zfsqAmount" placeholder="请输入授信额度"  style="width:300px">
+            <el-input v-model="form.zfsqAmount" @input.native="changeRate($event,form.zfsqAmount)" placeholder="请输入授信额度"  style="width:300px">
               <template slot="append">元</template>
             </el-input>
         </el-form-item>
@@ -308,18 +308,13 @@ export default {
         zfsqAccountBank: [
           { required: true, message: "还款账户开户行不能为空", trigger: ["blur", "change"] },
           {
-            pattern: /^[u4e00-u9fa5]$/,
+            pattern: /[\u4e00-\u9fa5]/,
             message: "请输入正确的账户开户行",
             trigger: ["blur", "change"],
           },
         ],
         zfsqAmount: [
           { required: true, message: "授信额度不能为空", trigger: ["blur", "change"] },
-          {
-            pattern: /^[0-9][0-9]{0,7}$|^[1-9][0-9]{0,7}[.]\d{1,2}$/,
-            message: "请输入正确的额度",
-            trigger: ["blur", "change"],
-          },
         ],
       }
     };
@@ -432,6 +427,11 @@ export default {
         this.title = "修改供应商授信额度";
       });
     },
+    changeRate(e,input){
+      e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
+      this.input=e.target.value
+      this.form.zfsqAmount=this.input
+    },
     /** 冻结/解冻按钮操作 */
     handleUpdate(row) {
       let text = row.zfsqStatus === "0" ? "解冻" : "冻结";