Prechádzať zdrojové kódy

feat(商品成本管理):非新增禁用组合类型选项

snow 1 rok pred
rodič
commit
24f904f330

+ 1 - 0
src/views/goodStore/goodsCost/components/baseForm.vue

@@ -54,6 +54,7 @@
               <el-form-item prop="is_combind" label="组合类型" label-width="110px">
                 <el-select
                   style="width:100%"
+                  :disabled="type !== 'add'"
                   v-model="ruleForm.is_combind"
                   placeholder="是否组合商品"
                   @change="groupGoodChange"

+ 5 - 6
src/views/sellOut/combinedAdd/components/waitApproval.vue

@@ -19,7 +19,6 @@
   </el-form>
 </template>
 
-
 <script>
 export default {
   name: "waitApproval",
@@ -47,11 +46,11 @@ export default {
   },
   methods: {
     submit() {
-      const { status, remark } = this.ruleForm;
-      this.$emit("confirm", {
-        status,
-        remark
-      });
+      this.$refs.ruleForm.validate(isValid => {
+        if(!isValid) return
+        const { status, remark } = this.ruleForm;
+        this.$emit("confirm", { status, remark });
+      })
     }
   }
 };

+ 5 - 5
src/views/sellOut/combinedRemove/components/waitApproval.vue

@@ -47,11 +47,11 @@ export default {
   },
   methods: {
     submit() {
-      const { status, remark } = this.ruleForm;
-      this.$emit("confirm", {
-        status,
-        remark
-      });
+      this.$refs.ruleForm.validate(isValid => {
+        if(!isValid) return
+        const { status, remark } = this.ruleForm;
+        this.$emit("confirm", { status, remark });
+      })
     }
   }
 };