gcz пре 4 година
родитељ
комит
b90e65812f

+ 2 - 0
src/views/pms/product/components/ProductDetail.vue

@@ -84,6 +84,7 @@
     //商品相关优选{prefrenceAreaId: 0}
     prefrenceAreaProductRelationList: [],
     productCategoryId: null,
+    productBigCategoryId:null,
     productCategoryName: '',
     productSn: '',
     promotionEndTime: '',
@@ -147,6 +148,7 @@
         }
       },
       finishCommit(isEdit) {
+        // console.log('this.productParam',JSON.parse(JSON.stringify(this.productParam)));
         this.$confirm('是否要提交该产品', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',

+ 5 - 1
src/views/pms/product/components/ProductInfoDetail.vue

@@ -1,7 +1,7 @@
 <template>
   <div style="margin-top: 50px">
     <el-form :model="value" :rules="rules" ref="productInfoForm" label-width="120px" style="width: 600px" size="small">
-      <el-form-item label="商品分类:" prop="productCategoryId">
+      <el-form-item label="商品分类:" prop="productCategoryId,productBigCategoryId">
         <el-cascader
           v-model="selectProductCateValue"
           :options="productCateOptions">
@@ -118,9 +118,13 @@
         if (newValue != null && newValue.length === 2) {
           this.value.productCategoryId = newValue[1];
           this.value.productCategoryName= this.getCateNameById(this.value.productCategoryId);
+          // 大类ID
+          this.value.productBigCategoryId = newValue[0];
         } else {
           this.value.productCategoryId = null;
           this.value.productCategoryName=null;
+
+          this.value.productBigCategoryId = null;
         }
       }
     },