congxuesong hai 4 meses
pai
achega
5ffe5eb51b
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  1. 1 5
      src/views/ticketManagement/newVoucher.vue

+ 1 - 5
src/views/ticketManagement/newVoucher.vue

@@ -488,13 +488,9 @@ const rules = reactive({
     }
   ],
   singleQty: [
+    { required: true, message: "请输入库存数量" },
     {
       validator: (rule: any, value: any, callback: any) => {
-        // 非必填,如果为空则直接通过
-        if (!value || value.toString().trim() === "") {
-          callback();
-          return;
-        }
         // 先验证是否为正整数
         validatePositiveInteger("库存必须为正整数", { required: false })(rule, value, (error: any) => {
           if (error) {