潘超林 2 months ago
parent
commit
59ddc297e1

+ 8 - 8
src/views/product/createProduct.vue

@@ -281,16 +281,16 @@ export default {
       //   this.form.bannerList.shift();
       // }
       if (this.form.saleModel == 2) {
-        this.form.merchantClassifyId = "217527";
+        this.form.merchantClassifyId = "[217527]";
         this.form.merchantClassifyName = "集采预售";
       } else if (this.form.saleModel == 3) {
-        this.form.merchantClassifyId = "217526";
+        this.form.merchantClassifyId = "[217526]";
         this.form.merchantClassifyName = "团批秒杀";
       } else if (this.form.saleModel == 4) {
-        this.form.merchantClassifyId = "217528";
+        this.form.merchantClassifyId = "[217528]";
         this.form.merchantClassifyName = "清库专区";
       } else if (this.form.saleModel == 5) {
-        this.form.merchantClassifyId = "217525";
+        this.form.merchantClassifyId = "[217525]";
         this.form.merchantClassifyName = "新店福利";
       }
 
@@ -362,16 +362,16 @@ export default {
         }
       }
       if (this.form.saleModel == 2) {
-        this.form.merchantClassifyId = "217527";
+        this.form.merchantClassifyId = "[217527]";
         this.form.merchantClassifyName = "集采预售";
       } else if (this.form.saleModel == 3) {
-        this.form.merchantClassifyId = "217526";
+        this.form.merchantClassifyId = "[217526]";
         this.form.merchantClassifyName = "团批秒杀";
       } else if (this.form.saleModel == 4) {
-        this.form.merchantClassifyId = "217528";
+        this.form.merchantClassifyId = "[217528]";
         this.form.merchantClassifyName = "清库专区";
       } else if (this.form.saleModel == 5) {
-        this.form.merchantClassifyId = "217525";
+        this.form.merchantClassifyId = "[217525]";
         this.form.merchantClassifyName = "新店福利";
       }
       this.btnLading = true;

+ 42 - 19
src/views/transmission/createProduct.vue

@@ -13,7 +13,10 @@
             :saleModels="form.saleModel"
           ></salesInfo>
           <el-descriptions title="商品详情" column="1"> </el-descriptions>
-          <productInfo @updateValue="updateValue" ref="productRefs"></productInfo>
+          <productInfo
+            @updateValue="updateValue"
+            ref="productRefs"
+          ></productInfo>
 
           <div class="dialog-footer" style="text-align: center">
             <el-button @click="submitCancel">取 消</el-button>
@@ -21,7 +24,9 @@
               >发 布</el-button
             >
 
-            <el-button type="primary" @click="submitFormDraft">存入草稿箱</el-button>
+            <el-button type="primary" @click="submitFormDraft"
+              >存入草稿箱</el-button
+            >
           </div>
         </el-col>
         <phoneView style="position: absolute; bottom: -80px; right: 50px">
@@ -63,7 +68,9 @@
                     class="price"
                     :key="item"
                     v-for="item in form.skuList ? form.skuList.slice(0, 1) : []"
-                    >{{ item.skuPriceList ? item.skuPriceList[0].price : 0 }}元</span
+                    >{{
+                      item.skuPriceList ? item.skuPriceList[0].price : 0
+                    }}元</span
                   >
 
                   <span>/{{ form.unit }}</span>
@@ -76,7 +83,9 @@
               <div v-for="(item, index) in form.skuList" :key="index">
                 <div class="price_info">
                   <span
-                    >{{ item.skuSpecsList[0] ? item.skuSpecsList[0].specsName : "" }}
+                    >{{
+                      item.skuSpecsList[0] ? item.skuSpecsList[0].specsName : ""
+                    }}
                     {{
                       item.skuSpecsList[0].specsValue
                         ? item.skuSpecsList[0].specsValue
@@ -113,7 +122,8 @@
                     }}/{{ form.unit }}起购</span
                   >
                   <span style="font-size: 14px"
-                    >库存:{{ item.stock + item.predictStocks }}{{ form.unit }}</span
+                    >库存:{{ item.stock + item.predictStocks
+                    }}{{ form.unit }}</span
                   >
                 </div>
               </div>
@@ -131,7 +141,11 @@
                   <el-col :span="24">
                     <el-form-item label="发货地" prop="spuName">
                       <div style="width: 185px">
-                        {{ form.shippingAddrBean ? form.shippingAddrBean.addr : "" }}
+                        {{
+                          form.shippingAddrBean
+                            ? form.shippingAddrBean.addr
+                            : ""
+                        }}
                         {{
                           form.shippingAddrBean
                             ? form.shippingAddrBean.addrDetail
@@ -229,7 +243,10 @@
 <script>
 import { getStoreInfo } from "@/api/common/index";
 import { publishGoods } from "@/api/publish/index";
-import { saveGoodsDraft, queryUserRelevanceTemplate } from "@/api/manage/product";
+import {
+  saveGoodsDraft,
+  queryUserRelevanceTemplate,
+} from "@/api/manage/product";
 import basicInfo from "./module/basic-info.vue";
 import productInfo from "./module/product-info.vue";
 import salesInfo from "./module/sales-info.vue";
@@ -266,28 +283,31 @@ export default {
     },
     submitFormDraft() {
       if (this.form.categoryId?.length > 0) {
-        this.form.categoryId = this.form.categoryId[this.form.categoryId.length - 1];
+        this.form.categoryId =
+          this.form.categoryId[this.form.categoryId.length - 1];
       }
       if (this.form.categoryIds.length < 1) {
         this.form.categoryIds = "";
       }
       if (!this.form.presaleStartTime && !this.form.presaleEndTime) {
         if (this.form.datePicke) {
-          this.form.presaleStartTime = moment(this.form.datePicker[0]).valueOf();
+          this.form.presaleStartTime = moment(
+            this.form.datePicker[0]
+          ).valueOf();
           this.form.presaleEndTime = moment(this.form.datePicker[1]).valueOf();
         }
       }
       if (this.form.saleModel == 2) {
-        this.form.merchantClassifyId = "217524";
+        this.form.merchantClassifyId = "[217524]";
         this.form.merchantClassifyName = "预售专区";
       } else if (this.form.saleModel == 3) {
-        this.form.merchantClassifyId = "217522";
+        this.form.merchantClassifyId = "[217522]";
         this.form.merchantClassifyName = "团购秒杀";
       } else if (this.form.saleModel == 4) {
-        this.form.merchantClassifyId = "217523";
+        this.form.merchantClassifyId = "[217523]";
         this.form.merchantClassifyName = "特价卖场";
       } else if (this.form.saleModel == 5) {
-        this.form.merchantClassifyId = "217521";
+        this.form.merchantClassifyId = "[217521]";
         this.form.merchantClassifyName = "新人福利";
       }
 
@@ -350,25 +370,28 @@ export default {
         return;
       }
       if (this.form.categoryId?.length > 0) {
-        this.form.categoryId = this.form.categoryId[this.form.categoryId.length - 1];
+        this.form.categoryId =
+          this.form.categoryId[this.form.categoryId.length - 1];
       }
       if (!this.form.presaleStartTime && !this.form.presaleEndTime) {
         if (this.form.datePicke) {
-          this.form.presaleStartTime = moment(this.form.datePicker[0]).valueOf();
+          this.form.presaleStartTime = moment(
+            this.form.datePicker[0]
+          ).valueOf();
           this.form.presaleEndTime = moment(this.form.datePicker[1]).valueOf();
         }
       }
       if (this.form.saleModel == 2) {
-        this.form.merchantClassifyId = "217524";
+        this.form.merchantClassifyId = "[217524]";
         this.form.merchantClassifyName = "预售专区";
       } else if (this.form.saleModel == 3) {
-        this.form.merchantClassifyId = "217522";
+        this.form.merchantClassifyId = "[217522]";
         this.form.merchantClassifyName = "团购秒杀";
       } else if (this.form.saleModel == 4) {
-        this.form.merchantClassifyId = "217523";
+        this.form.merchantClassifyId = "[217523]";
         this.form.merchantClassifyName = "特价卖场";
       } else if (this.form.saleModel == 5) {
-        this.form.merchantClassifyId = "217521";
+        this.form.merchantClassifyId = "[217521]";
         this.form.merchantClassifyName = "新人福利";
       }
 

+ 3 - 0
src/views/transmission/module/sales-info.vue

@@ -391,6 +391,9 @@ export default {
       this.form.merchantClassifyName = nodes[0].label;
       this.form.merchantClassifyIds = val;
       this.form.merchantClassifyId = JSON.stringify(val);
+
+      console.log('this.form.merchantClassifyId',this.form.merchantClassifyId);
+
       // this.form.merchantClassifyId = `["${this.form.merchantClassifyId.join('", "')}"]`;
       this.passValue();
     },