潘超林 4 weeks ago
parent
commit
dc7c89c157

+ 18 - 3
src/views/fullReturn/add.vue

@@ -51,7 +51,7 @@
               <el-radio :label="1">长期有效</el-radio>
             </el-radio-group>
           </el-form-item>
-          <el-form-item>
+          <el-form-item v-if="shopInfo.orderType == 0">
             <el-date-picker
               v-model="shopInfo.dateRange"
               type="datetimerange"
@@ -91,7 +91,7 @@
               <el-radio :label="1">长期有效</el-radio>
             </el-radio-group>
           </el-form-item>
-          <el-form-item>
+          <el-form-item v-if="shopInfo.useType == 0">
             <el-date-picker
               v-model="shopInfo.dateRange1"
               type="datetimerange"
@@ -103,7 +103,15 @@
             >
             </el-date-picker>
           </el-form-item>
-
+          <el-form-item label="下单满购物红包额度" prop="orderFullShopLimit">
+            <el-input
+              type="text"
+              style="width: 300px"
+              placeholder="请输入下单满购物红包额度"
+              v-model="shopInfo.orderFullShopLimit"
+              :show-word-limit="true"
+            ></el-input>
+          </el-form-item>
           <el-form-item
             label="参与活动商品"
             prop="sendAmount"
@@ -261,6 +269,13 @@ export default {
         orderTopNum: [
           { required: true, message: "请选择下单条件", trigger: "blur " },
         ],
+        orderFullShopLimit: [
+          {
+            required: true,
+            message: "请输入下单满购物红包额度",
+            trigger: "blur ",
+          },
+        ],
         useType: [
           {
             required: true,

+ 14 - 3
src/views/fullReturn/edit.vue

@@ -51,7 +51,7 @@
               <el-radio :label="1">长期有效</el-radio>
             </el-radio-group>
           </el-form-item>
-          <el-form-item>
+          <el-form-item v-if="shopInfo.orderType == 0">
             <el-date-picker
               v-model="shopInfo.dateRange"
               type="datetimerange"
@@ -91,7 +91,7 @@
               <el-radio :label="1">长期有效</el-radio>
             </el-radio-group>
           </el-form-item>
-          <el-form-item>
+          <el-form-item v-if="shopInfo.useType == 0">
             <el-date-picker
               v-model="shopInfo.dateRange1"
               type="datetimerange"
@@ -103,7 +103,15 @@
             >
             </el-date-picker>
           </el-form-item>
-
+          <el-form-item label="下单满购物红包额度" prop="orderFullShopLimit">
+            <el-input
+              type="text"
+              style="width: 300px"
+              placeholder="请输入下单满购物红包额度"
+              v-model="shopInfo.orderFullShopLimit"
+              :show-word-limit="true"
+            ></el-input>
+          </el-form-item>
           <el-form-item
             label="参与活动商品"
             prop="sendAmount"
@@ -258,6 +266,9 @@ export default {
         fullAmount: [
           { required: true, message: "请输入满减条件", trigger: "blur " },
         ],
+        orderFullShopLimit: [
+          { required: true, message: "请输入下单满购物红包额度", trigger: "blur " },
+        ],
       },
       shopInfo: {
         type: 1,

+ 8 - 5
src/views/manage/address/map.vue

@@ -153,11 +153,14 @@ export default {
       const selectedHouse = this.houseList.find(
         (item) => item.id === this.form.storeHouseId
       );
-      let params = {
-        name: selectedHouse.name,
-        id: selectedHouse.id,
-      };
-      this.form.storeHouse = params;
+      if (selectedHouse) {
+        let params = {
+          name: selectedHouse.name || "",
+          id: selectedHouse.id || "",
+        };
+        this.form.storeHouse = params;
+      }
+
       if (!this.address) {
         this.$message.error("请先在地图选择省市区!");
         return;

+ 8 - 1
src/views/member/module/sales-info.vue

@@ -308,7 +308,9 @@
             <el-option
               v-for="item in options"
               :key="item.id"
-              :label="item.address"
+              :label="
+                item.defaultTag == 1 ? '默认-' + item.address : item.address
+              "
               :value="item.id"
             >
             </el-option>
@@ -421,6 +423,11 @@ export default {
       dxAddressList().then((res) => {
         if (res.code == 200) {
           this.options = res.data;
+          let defaults = this.options.filter((item) => {
+            // 根据搜索文本过滤,不区分大小写
+            return item.defaultTag == 1;
+          });
+          this.form.shippingAddrId = defaults[0].id;
         }
       });
     },

+ 8 - 1
src/views/product/module/sales-info.vue

@@ -382,7 +382,9 @@
             <el-option
               v-for="item in options"
               :key="item.id"
-              :label="item.address"
+              :label="
+                item.defaultTag == 1 ? '默认-' + item.address : item.address
+              "
               :value="item.id"
             >
             </el-option>
@@ -507,6 +509,11 @@ export default {
       dxAddressList().then((res) => {
         if (res.code == 200) {
           this.options = res.data;
+          let defaults = this.options.filter((item) => {
+            // 根据搜索文本过滤,不区分大小写
+            return item.defaultTag == 1;
+          });
+          this.form.shippingAddrId = defaults[0].id;
         }
       });
     },

+ 8 - 1
src/views/productNationwide/module/sales-info.vue

@@ -372,7 +372,9 @@
             <el-option
               v-for="item in options"
               :key="item.id"
-              :label="item.address"
+              :label="
+                item.defaultTag == 1 ? '默认-' + item.address : item.address
+              "
               :value="item.id"
             >
             </el-option>
@@ -500,6 +502,11 @@ export default {
       dxAddressList().then((res) => {
         if (res.code == 200) {
           this.options = res.data;
+          let defaults = this.options.filter((item) => {
+            // 根据搜索文本过滤,不区分大小写
+            return item.defaultTag == 1;
+          });
+          this.form.shippingAddrId = defaults[0].id;
         }
       });
     },

+ 13 - 9
src/views/transmission/createProduct.vue

@@ -400,16 +400,20 @@ export default {
       }
 
       this.btnLading = true;
-      publishGoods(this.form).then((res) => {
-        if (res.code == 200) {
-          this.btnLading = false;
-          this.$message.success(`发布成功!`);
-          this.$store.dispatch("tagsView/delView", this.$route); //关闭当前页
-          this.$router.replace({ path: "/product/transmission/index" });
-        } else {
+      publishGoods(this.form)
+        .then((res) => {
+          if (res.code == 200) {
+            this.btnLading = false;
+            this.$message.success(`发布成功!`);
+            this.$store.dispatch("tagsView/delView", this.$route); //关闭当前页
+            this.$router.replace({ path: "/product/transmission/index" });
+          } else {
+            this.btnLading = false;
+          }
+        })
+        .catch(() => {
           this.btnLading = false;
-        }
-      });
+        });
     },
     updateValue(val) {
       this.form = { ...this.form, ...val };

+ 24 - 20
src/views/transmission/updateProduct.vue

@@ -69,7 +69,9 @@
                   <span
                     class="price"
                     :key="index"
-                    v-for="(item,index) in form.skuList ? form.skuList.slice(0, 1) : []"
+                    v-for="(item, index) in form.skuList
+                      ? form.skuList.slice(0, 1)
+                      : []"
                     >{{
                       item.skuPriceList ? item.skuPriceList[0].price : 0
                     }}元</span
@@ -278,7 +280,6 @@ export default {
     });
   },
   mounted() {
-
     if (
       (this.$route.query.params != "[object Object]" &&
         this.$route.query.params) ||
@@ -435,16 +436,16 @@ export default {
           this.form.categoryId[this.form.categoryId.length - 1];
       }
       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 = "新人福利";
       }
 
@@ -512,19 +513,18 @@ export default {
         //   return;
         // }
         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 = "新人福利";
         }
-
         updateGoods(this.form).then((res) => {
           if (res.code == 200) {
             this.btnLading = false;
@@ -536,16 +536,20 @@ export default {
           }
         });
       } else {
-        publishGoods(this.form).then((res) => {
-          if (res.code == 200) {
-            this.btnLading = false;
-            this.$message.success(`发布成功!`);
-            this.$store.dispatch("tagsView/delView", this.$route); //关闭当前页
-            this.$router.replace({ path: "/product/transmission/index" });
-          } else {
+        publishGoods(this.form)
+          .then((res) => {
+            if (res.code == 200) {
+              this.btnLading = false;
+              this.$message.success(`发布成功!`);
+              this.$store.dispatch("tagsView/delView", this.$route); //关闭当前页
+              this.$router.replace({ path: "/product/transmission/index" });
+            } else {
+              this.btnLading = false;
+            }
+          })
+          .catch(() => {
             this.btnLading = false;
-          }
-        });
+          });
       }
     },
     updateValue(val) {

+ 1 - 1
vue.config.js

@@ -36,7 +36,7 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://192.168.3.107:30023/merchant`,
+        target: `http://192.168.0.8:30023/merchant`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''