Преглед изворни кода

Merge branch 'dev' of http://www.baoxianzhanggui.com:8090/sxzgd/vue-insagent-pc into dev

lihongxiao пре 2 година
родитељ
комит
e229d30b0c
2 измењених фајлова са 12 додато и 10 уклоњено
  1. 10 8
      src/views/AgreementManage/CarInsurance/AgreementEntry.vue
  2. 2 2
      src/views/Letter/Letter.vue

+ 10 - 8
src/views/AgreementManage/CarInsurance/AgreementEntry.vue

@@ -1320,8 +1320,8 @@ export default {
         jqCostsProportion: [
           { required: true, message: "请输入总费用比例", trigger: "blur" },
           {
-            pattern: /^([0-9]{1,2}|100)$/,
-            message: "请输入0-100的整数",
+            pattern: /^100$|^[1-9]?\d(\.\d+)?$|^0(\.\d+)?$/,
+            message: "请输入0-100数",
             trigger: "blur",
           },
         ],
@@ -1345,8 +1345,8 @@ export default {
         syCostsProportion: [
           { required: true, message: "请输入总费用比例", trigger: "blur" },
           {
-            pattern: /^([0-9]{1,2}|100)$/,
-            message: "请输入0-100的数",
+            pattern: /^100$|^[1-9]?\d(\.\d+)?$|^0(\.\d+)?$/,
+            message: "请输入0-100的数",
             trigger: "blur",
           },
         ],
@@ -1361,8 +1361,8 @@ export default {
         costsProportion: [
           { required: true, message: "请输入总共费用比例", trigger: "blur" },
           {
-            pattern: /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/,
-            message: "只能是正数",
+            pattern: /^100$|^[1-9]?\d(\.\d+)?$|^0(\.\d+)?$/,
+            message: "请输入0-100的数",
             trigger: "blur",
           },
         ],
@@ -2104,7 +2104,8 @@ export default {
       let pay2 = this.productCostForm[partial]; //费用
       if (pay1) {
         if (Number(pay1) >= Number(pay2)) {
-          this.productCostForm[other] = pay1 - pay2;
+          var otherPay = pay1 - pay2;
+          this.productCostForm[other] = Math.round(otherPay * 100) / 100;
         } else {
           //如果总比例不够扣减,则置空重新填
           this.productCostForm[total] = null;
@@ -2122,7 +2123,8 @@ export default {
       let pay2 = this.productCostForm[partial]; //费用
       if (pay1) {
         if (Number(pay2) <= Number(pay1)) {
-          this.productCostForm[other] = pay1 - pay2;
+          var otherPay = pay1 - pay2;
+          this.productCostForm[other] = Math.round(otherPay * 100) / 100;
         } else {
           //如果总比例不够扣减,则置空重新填
           this.productCostForm[total] = null;

+ 2 - 2
src/views/Letter/Letter.vue

@@ -8334,7 +8334,7 @@ else{
         this.carform.unladenMass = carInfo.unladenMass; //整备质量
         this.carform.limitLoad = carInfo.limitLoad; //核定载质量
         this.carform.category = carInfo.category; //车辆类型
-        this.carform.useNature = carInfo.useNature; //使用性质
+        this.carform.carnature = carInfo.useNature; //使用性质
         this.carform.vehicleUse = carInfo.vehicleUse; //车辆用途
         this.carform.plateType = carInfo.plateType; //车辆种类
         this.carform.approvedPassengersCapacity =
@@ -8356,7 +8356,7 @@ else{
       this.carInfo.completeKerbMass = this.carform.unladenMass; //整备质量
       this.carInfo.limitLoad = this.carform.limitLoad; //核定载质量
       this.carInfo.cartype = this.carform.category; //车辆类型
-      this.carInfo.useNature = this.carform.useNature; //使用性质
+      this.carInfo.carnature = this.carform.carnature; //使用性质
       this.carInfo.vehicleUse = this.carform.vehicleUse; //车辆用途
       this.carInfo.cimodelclass = this.carform.plateType; //车辆种类
       if (this.timeformat(this.carform.registerDate) != 'NaN-NaN-NaN') {