浏览代码

审核流程配置-子表增加数字校验

jingbb 2 月之前
父节点
当前提交
98792a2560

+ 7 - 3
src/views/system/approvalProcessConfig/approvalProcessConfigForm.data.ts

@@ -29,7 +29,7 @@ export const SonTableColumns: JVxeColumn[] = [
       type: JVxeTypes.select,
       options: personOption.value,
       allowSearch:true,
-      validateRules: [{ required: true}],
+      validateRules: [{ required: true,message: ''}],
     },
     {
       title: '次序(indexNum)',
@@ -37,7 +37,10 @@ export const SonTableColumns: JVxeColumn[] = [
       type: JVxeTypes.inputNumber,
       placeholder: '请输入${title}',
       defaultValue:'',
-      validateRules: [{ required: true}],
+      validateRules: [
+        { required: true, message: ''},
+        { pattern: /^[1-9]\d*$/, message: '请输入零以上的正整数' },
+      ],
     },
     {
       title: '执行条件(execution)',
@@ -54,6 +57,7 @@ export const SonTableColumns: JVxeColumn[] = [
       stringToNumber: true,
       placeholder: '请输入${title}',
       defaultValue:'1',
+      validateRules: [{ required: true,message: ''}],
     },
     {
       title: '仅查看(isView)',
@@ -63,7 +67,7 @@ export const SonTableColumns: JVxeColumn[] = [
       dictCode: 'yes_or_no',
       stringToNumber: true,
       defaultValue:'1',
-      validateRules: [{ required: true}],
+      validateRules: [{ required: true,message: ''}],
     },
     {
       title: '审批说明(notes)',

+ 1 - 1
src/views/system/approvalProcessConfig/components/approvalProcessConfigForm.vue

@@ -297,7 +297,7 @@
     margin-bottom: 8px !important;
   }
   /deep/.vxe-cell--valid-error-msg{
-    color: white !important;
+    color: red !important;
     background-color: white !important;
   }
   /deep/.ant-select{