Browse Source

自测bug修复

刘洋 7 months ago
parent
commit
c6913a79f1

+ 15 - 0
src/views/work-hours/work-hours-manage/work-statistics/append-hours-dialog.vue

@@ -23,6 +23,7 @@
           theme="column"
           :step="0.1"
           :decimalPlaces="1"
+          :min="0.1"
         ></t-input-number>
         <span style="margin-left: 4px">{{
           params.type == '1' ? '天' : '小时'
@@ -67,6 +68,20 @@ const rules = {
       message: '请填写时长',
       type: 'error',
     },
+    {
+      validator: (val) => {
+        if (Number(val) <= 0) {
+          return {
+            result: false,
+            message: '时长必须大于0',
+          };
+        }
+        return {
+          result: true,
+          type: 'success',
+        };
+      },
+    },
   ],
   sopNo: [
     {