瀏覽代碼

往来账款、首页禅道问题修改

dudm 4 年之前
父節點
當前提交
d74af203f0

+ 3 - 3
front-vue/src/views/home.vue

@@ -12,7 +12,7 @@
             </el-card>
             <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
                 <div slot="header" class="clearfix">
-                    <span style="color: #666ee8; font-weight: bold;">已融资/供应商入数量</span>
+                    <span style="color: #666ee8; font-weight: bold;">已融资/供应商入数量</span>
                 </div>
                 <div class="text item" style="height:100px">
                     <span style="color: #666ee8; font-weight: bold;">{{financeSupplierNum + '/' + supplierNum}}</span>
@@ -287,7 +287,7 @@
                     <span style="color: #666ee8; font-weight: bold;">持有融信额度</span>
                 </div>
                 <div class="text item" style="height:100px">
-                    <span style="color: #666ee8; font-weight: bold;">{{handleInput(getEffectBalance())}}</span>
+                    <span style="color: #666ee8; font-weight: bold;">{{handleInput(effectBalance)}}</span>
                 </div>
             </el-card>
             <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
@@ -371,7 +371,7 @@
                     <span style="color: #666ee8; font-weight: bold;">持有融信额度</span>
                 </div>
                 <div class="text item" style="height:100px">
-                    <span style="color: #666ee8; font-weight: bold;">{{handleInput(getEffectBalance())}}</span>
+                    <span style="color: #666ee8; font-weight: bold;">{{handleInput(effectBalance)}}</span>
                 </div>
             </el-card>
             <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">

+ 20 - 0
front-vue/src/views/service/bill/addBill.vue

@@ -305,6 +305,8 @@
             :http-request="httpRequest"
             :before-remove="beforeRemove"
             :on-remove="invoiceRemove"
+            :before-upload="beforeAvatarUpload"
+            accept=".jpg,.jpeg,.png"
             action=""
             multiple
           >
@@ -646,6 +648,11 @@ export default {
             message: "合同编号不能为空",
             trigger: ["blur", "change"],
           },
+          {
+            pattern:/^[a-zA-Z0-9]+$/,
+            message: "请输入数字或英文",
+            trigger: ["blur", "change"],
+          }
         ],
       },
       //类型
@@ -844,6 +851,19 @@ export default {
       }
       return extension || extension2 || extension3 || extension4;
     },
+    //上传前校验
+    beforeAvatarUpload(file) {
+      const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
+      const isLt2M = file.size / 1024 / 1024 < 2;
+
+      if (!isJPG) {
+        this.$message.error('上传图片只能是 JPG/PNG 格式');
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片大小不能超过 2MB');
+      }
+      return isJPG && isLt2M;
+    },
     //上传合同
     submitUploadContract() {
       this.$refs.contractUpload.submit();

+ 4 - 4
front-vue/src/views/service/bill/bill.vue

@@ -18,7 +18,7 @@
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
-          maxlength="10"
+          maxlength="30"
         />
       </el-form-item>
   
@@ -29,7 +29,7 @@
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
-          maxlength="10"
+          maxlength="20"
         />
       </el-form-item>
   
@@ -55,7 +55,7 @@
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
-          maxlength="10"
+          maxlength="40"
         />
       </el-form-item>
   
@@ -66,7 +66,7 @@
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
-          maxlength="10"
+          maxlength="40"
         />
       </el-form-item>
   

+ 20 - 0
front-vue/src/views/service/bill/billAdd.vue

@@ -305,6 +305,8 @@
             :http-request="httpRequest"
             :before-remove="beforeRemove"
             :on-remove="invoiceRemove"
+            :before-upload="beforeAvatarUpload"
+            accept=".jpg,.jpeg,.png"
             action=""
             multiple
           >
@@ -630,6 +632,11 @@ export default {
             message: "合同编号不能为空",
             trigger: ["blur", "change"],
           },
+          {
+            pattern:/^[a-zA-Z0-9]+$/,
+            message: "请输入数字或英文",
+            trigger: ["blur", "change"],
+          }
         ],
       },
       //类型
@@ -837,6 +844,19 @@ export default {
       }
       return extension || extension2 || extension3 || extension4;
     },
+    //上传前校验
+    beforeAvatarUpload(file) {
+      const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
+      const isLt2M = file.size / 1024 / 1024 < 2;
+
+      if (!isJPG) {
+        this.$message.error('上传图片只能是 JPG/PNG 格式');
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片大小不能超过 2MB');
+      }
+      return isJPG && isLt2M;
+    },
     //上传合同
     submitUploadContract() {
       this.$refs.contractUpload.submit();

+ 20 - 0
front-vue/src/views/service/bill/billEdit.vue

@@ -349,6 +349,8 @@
             :http-request="httpRequest"
             :before-remove="beforeRemove"
             :on-remove="invoiceRemove"
+            :before-upload="beforeAvatarUpload"
+            accept=".jpg,.jpeg,.png"
             action=""
             multiple
           >
@@ -676,6 +678,11 @@ export default {
             message: "合同编号不能为空",
             trigger: ["blur", "change"],
           },
+          {
+            pattern:/^[a-zA-Z0-9]+$/,
+            message: "请输入数字或英文",
+            trigger: ["blur", "change"],
+          }
         ],
       },
       //类型
@@ -918,6 +925,19 @@ export default {
       }
       return extension || extension2 || extension3 || extension4;
     },
+    //上传前校验
+    beforeAvatarUpload(file) {
+      const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
+      const isLt2M = file.size / 1024 / 1024 < 2;
+
+      if (!isJPG) {
+        this.$message.error('上传图片只能是 JPG/PNG 格式');
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片大小不能超过 2MB');
+      }
+      return isJPG && isLt2M;
+    },
     //上传合同
     submitUploadContract() {
       this.$refs.contractUpload.submit();