lilei 2 年之前
父节点
当前提交
e2e34aeff8
共有 3 个文件被更改,包括 10 次插入5 次删除
  1. 1 1
      public/version.json
  2. 7 4
      src/libs/tools.js
  3. 2 0
      src/views/financialManagement/collectionDetailStatic/plInvoiceModal.vue

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.2.3",
+    "version": "2.2.1",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 7 - 4
src/libs/tools.js

@@ -483,8 +483,11 @@ export const checkIdNumberValid = (tex) => {
 }
 // 清除空格和特殊字符
 export const removeEmptyStr = function(str){
-  var strs=str.toString()
-  strs= strs.replace(/^\s+|\s+$/gm,'');
-  strs=strs.replace(/[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/im,'');
-  return strs;
+  if(str){
+    var strs=str.toString()
+    strs= strs.replace(/^\s+|\s+$/gm,'');
+    strs=strs.replace(/[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/im,'');
+    return strs;
+  }
+  return '';
 }

+ 2 - 0
src/views/financialManagement/collectionDetailStatic/plInvoiceModal.vue

@@ -137,6 +137,8 @@
       cancel () {
         this.opened = false
         this.$emit('cancel')
+        this.form.invoiceDate = undefined
+        this.form.remarks = ''
         this.$refs.ruleForm.resetFields()
       }
     },