소스 검색

优先判断关联商品

DELL 3 년 전
부모
커밋
466d548fb8
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 5
      src/views/business/ticket/create.vue

+ 4 - 5
src/views/business/ticket/create.vue

@@ -415,6 +415,10 @@ export default {
       const subForm = this.$refs["form"];
       subForm.validate((valid) => {
         if (valid) {
+          if (this.form.type != "offline" && this.goodsList.length < 1) {
+            this.$message.error("关联商品不能为空");
+            return
+          }
           // let prizeIndex = this.awardsList.findIndex((item) => {
           //   return !item.prizeList.length;
           // });
@@ -496,11 +500,6 @@ export default {
             }
           }
 
-          if (this.form.type != "offline" && this.goodsList.length < 1) {
-            this.$message.error("关联商品不能为空");
-            return
-          }
-
           let data = {
             ...this.form,
             facePrice: accMul(this.form.facePrice, 100),