潘超林 2 nedēļas atpakaļ
vecāks
revīzija
1c336f132f

+ 4 - 1
src/views/discount/add.vue

@@ -308,8 +308,11 @@ export default {
         return;
       }
       obj.orderSpuIds = `[${ids.toString()}]`;
+      for (let index = 0; index < obj.discountRule.length; index++) {
+        const e = obj.discountRule[index];
+          e.discountType=this.shopInfo.discountType
+      }
       obj.discountRule = JSON.stringify(obj.discountRule);
-
       this.$refs.form.validate((valid) => {
         if (valid) {
           saveOrUpdates(obj).then((res) => {

+ 4 - 0
src/views/discount/edit.vue

@@ -329,6 +329,10 @@ export default {
         return;
       }
       obj.orderSpuIds = `[${ids.toString()}]`;
+      for (let index = 0; index < obj.discountRule.length; index++) {
+        const e = obj.discountRule[index];
+          e.discountType=this.shopInfo.discountType
+      }
       obj.discountRule = JSON.stringify(obj.discountRule);
       this.$refs.form.validate((valid) => {
         if (valid) {

+ 1 - 1
src/views/manage/address/index.vue

@@ -86,7 +86,7 @@ export default {
       });
     },
     Mapaddress(data) {
-      console.log(data);
+      console.log('123123',data);
       this.$refs.mapOpen.closeMap();
       let params = {
         addr: data.map?.address || data.form?.address || "", // 地址,字符串类型,非必填

+ 3 - 1
src/views/manage/address/map.vue

@@ -202,6 +202,7 @@ export default {
           map: that.map, // 展现结果的地图实例
           // panel: "panel", // 结果列表将在此容器中进行展示。
           autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
+          searchOnAMap: false,
         });
         placeSearch.search(keywords);
         placeSearch.on("markerClick", function (e) {
@@ -217,7 +218,8 @@ export default {
             "" +
             e.data.name;
           e.data.cityCode = obj.adcode.substring(0, 4) + "00";
-          that.addressParams = obj;
+          that.addressParams = e.data;
+          console.log('11211',that.addressParams);
           that.address = obj.address;
           that.gethouse(e.data.cityCode);
         });

+ 95 - 11
src/views/material/addMaterial.vue

@@ -93,7 +93,7 @@
           :header-cell-style="{ 'text-align': 'center', background: '#eef1f6' }"
           border
         >
-          <el-table-column prop="receiveCityJson" label="送达地区" width="800">
+          <el-table-column prop="receiveCityJson" label="送达地区" width="600">
             <template slot-scope="scope">
               <span v-if="scope.row.isDefault == 0">
                 {{ scope.row.receiveCityJson }}
@@ -117,7 +117,6 @@
           </el-table-column>
           <el-table-column
             align="center"
-            width="180"
             :label="form.claType == 1 ? '首重件数' : '首重重量(kg)'"
           >
             <template slot-scope="scope">
@@ -131,7 +130,6 @@
           </el-table-column>
           <el-table-column
             align="center"
-            width="180"
             :label="form.claType == 1 ? '首件价格(元)' : '首重价格(元)'"
           >
             <template slot-scope="scope">
@@ -143,19 +141,58 @@
               ></el-input>
             </template>
           </el-table-column>
+
           <el-table-column
             align="center"
-            :label="form.claType == 1 ? '续件件数' : '续重重量(kg)'"
+            :label="form.claType == 1 ? '续件区间' : '续重区间(kg)'"
           >
             <template slot-scope="scope">
               <el-input
-                v-model="scope.row.lastWeight"
+                v-model="scope.row.secondStartWeight"
+                placeholder="开始"
+              ></el-input>
+              至
+              <el-input
+                v-model="scope.row.secondEndWeight"
+                placeholder="结束
+                "
+              ></el-input>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            align="center"
+            :label="form.claType == 1 ? '续件件数' : '续重价格(元)'"
+          >
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.secondWeightPrice"
                 :placeholder="
-                  form.claType == 1 ? '请输入续件件数' : '请输入续重重量'
+                  form.claType == 1 ? '请输入续件件数' : '请输入续重价格'
                 "
               ></el-input>
             </template>
           </el-table-column>
+
+          <el-table-column
+            align="center"
+            :label="form.claType == 1 ? '续件件数' : '续重重量(kg)'"
+            width="200"
+          >
+            <template slot-scope="scope">
+              <div
+                style="display: flex; flex-direction: row; align-items: center"
+              >
+                <el-input
+                  v-model="scope.row.lastWeight"
+                  :placeholder="
+                    form.claType == 1 ? '请输入续件件数' : '请输入续重重量'
+                  "
+                ></el-input>
+                <div style="width: 50px">以上</div>
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             :label="form.claType == 1 ? '续件价格' : '续重价格(元)'"
@@ -253,18 +290,23 @@
           <!-- <el-col :span="8" v-for="(item, index) in areaList" :key="index"> -->
           <el-tree
             @check="handleNodeClick"
-            ref="tree"
+            ref="areaTree"
             :data="areaList"
             show-checkbox
-            node-key="cityId"
-            :props="{ children: 'cityList', label: 'name' }"
+            node-key="code"
+            :props="{
+              children: 'cityList',
+              label: 'name',
+            }"
           >
           </el-tree>
           <!-- </el-col> -->
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="areaSubmit">确 定</el-button>
+        <el-button type="primary" @click="areaSubmit" :disabled="btnDisabled"
+          >确 定</el-button
+        >
         <el-button @click="areaOpen = false">取 消</el-button>
       </div>
     </el-dialog>
@@ -325,6 +367,8 @@ export default {
           { required: true, message: "请选择是否包邮", trigger: "blur" },
         ],
       },
+      treeKey: "",
+      btnDisabled: false,
     };
   },
   created() {
@@ -336,6 +380,7 @@ export default {
         if (valid) {
           let titleBoolean = false;
           this.form.detailList = this.tableData;
+          console.log(this.form);
           let title = "";
           if (titleBoolean) {
             title =
@@ -375,7 +420,28 @@ export default {
       });
     },
     handleNodeClick(node, item) {
-      console.log(item);
+      this.tableData.forEach((e) => {
+        if (e.receiveCityJson != "默认运费(未添加地区运费根据默认运费计算)") {
+          let json = JSON.parse(e.receiveCityJson);
+          console.log("json", json);
+          if (json) {
+            for (let i = 0; i < json.length; i++) {
+              const e = json[i];
+              for (let a = 0; a < e.cityList.length; a++) {
+                const c = e.cityList[a];
+                if (item.checkedKeys.includes(c.cityCode)) {
+                  this.$message.error("已选择过相同城市,不能再选择");
+                  this.btnDisabled = true;
+                  return false;
+                } else {
+                  this.btnDisabled = false;
+                }
+              }
+            }
+          }
+        }
+      });
+
       this.areaCheckList = [];
       item.checkedNodes.forEach((e) => {
         if (e.cityList) {
@@ -403,6 +469,24 @@ export default {
       this.areaCheckList = this.unique(this.areaCheckList);
     },
 
+    extractAllCodes(provinces) {
+      const codes = [];
+      // 遍历每个省份
+      provinces.forEach((province) => {
+        // 添加省份code
+        codes.push(province.code);
+
+        // 遍历该省份下的所有城市
+        if (Array.isArray(province.cityList)) {
+          province.cityList.forEach((city) => {
+            // 添加城市code
+            codes.push(city.code);
+          });
+        }
+      });
+
+      return codes;
+    },
     areaSubmit() {
       let aalist = [];
       this.areaCheckList.forEach((e) => {

+ 82 - 15
src/views/material/editMaterial.vue

@@ -117,7 +117,6 @@
           </el-table-column>
           <el-table-column
             align="center"
-            width="180"
             :label="form.claType == 1 ? '首重件数' : '首重重量(kg)'"
           >
             <template slot-scope="scope">
@@ -131,7 +130,6 @@
           </el-table-column>
           <el-table-column
             align="center"
-            width="180"
             :label="form.claType == 1 ? '首件价格(元)' : '首重价格(元)'"
           >
             <template slot-scope="scope">
@@ -143,17 +141,55 @@
               ></el-input>
             </template>
           </el-table-column>
+
+          <el-table-column
+            align="center"
+            :label="form.claType == 1 ? '续件区间' : '续重区间(kg)'"
+          >
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.secondStartWeight"
+                placeholder="开始"
+              ></el-input>
+              至
+              <el-input
+                v-model="scope.row.secondEndWeight"
+                placeholder="结束
+                "
+              ></el-input>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            align="center"
+            :label="form.claType == 1 ? '续件价格' : '续重价格(元)'"
+          >
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.secondWeightPrice"
+                :placeholder="
+                  form.claType == 1 ? '请输入续件价格' : '请输入续重价格'
+                "
+              ></el-input>
+            </template>
+          </el-table-column>
+
           <el-table-column
             align="center"
             :label="form.claType == 1 ? '续件件数' : '续重重量(kg)'"
           >
             <template slot-scope="scope">
+              <div
+                style="display: flex; flex-direction: row; align-items: center"
+              >
               <el-input
                 v-model="scope.row.lastWeight"
                 :placeholder="
                   form.claType == 1 ? '请输入续件件数' : '请输入续重重量'
                 "
               ></el-input>
+                <div style="width: 50px">以上</div>
+              </div>
             </template>
           </el-table-column>
           <el-table-column
@@ -169,6 +205,7 @@
               ></el-input>
             </template>
           </el-table-column>
+
           <el-table-column align="center" label="操作">
             <template slot-scope="scope">
               <el-button
@@ -182,7 +219,9 @@
           </el-table-column>
         </el-table>
 
-        <el-button type="text" @click="appoint">为指定城市设置运费</el-button>
+        <el-button type="text" @click="appoint" v-if="form.freeShipping == 0"
+          >为指定城市设置运费</el-button
+        >
         <!-- <span>为指定城市设置运费</span> -->
       </el-col>
       <div style="text-align: center">
@@ -256,7 +295,7 @@
             ref="tree"
             :data="areaList"
             show-checkbox
-            node-key="cityId"
+             node-key="code"
             :props="{ children: 'cityList', label: 'name' }"
           >
           </el-tree>
@@ -264,7 +303,9 @@
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="areaSubmit">确 定</el-button>
+        <el-button type="primary" @click="areaSubmit" :disabled="btnDisabled"
+          >确 定</el-button
+        >
         <el-button @click="areaOpen = false">取 消</el-button>
       </div>
     </el-dialog>
@@ -331,6 +372,7 @@ export default {
           { required: true, message: "请选择是否包邮", trigger: "blur" },
         ],
       },
+      btnDisabled: false,
     };
   },
   created() {},
@@ -387,22 +429,23 @@ export default {
     submitFormsz() {
       this.szopen = false;
     },
+
     submitTemplate() {
       this.$refs.queryForm.validate((valid) => {
         if (valid) {
           this.form.detailList = this.tableData;
           console.log(this.tableData);
           let titleBoolean = false;
-          this.tableData.forEach((e) => {
-            e.firstWeight = this.form.firstWeight;
-            e.secondEndWeight = this.form.secondEndWeight;
-            e.secondStartWeight = this.form.secondStartWeight;
-            for (const key in e) {
-              if (e[key] == "") {
-                titleBoolean = true;
-              }
-            }
-          });
+          // this.tableData.forEach((e) => {
+          //   e.firstWeight = this.form.firstWeight;
+          //   e.secondEndWeight = this.form.secondEndWeight;
+          //   e.secondStartWeight = this.form.secondStartWeight;
+          //   for (const key in e) {
+          //     if (e[key] == "") {
+          //       titleBoolean = true;
+          //     }
+          //   }
+          // });
           let title = "";
           if (titleBoolean) {
             title = "是否确认编辑保存?";
@@ -449,6 +492,30 @@ export default {
     },
     handleNodeClick(node, item) {
       console.log(item);
+      console.log(this.tableData);
+
+      this.tableData.forEach((e) => {
+        if (e.receiveCityJson != "默认运费(未添加地区运费根据默认运费计算)") {
+          let json = JSON.parse(e.receiveCityJson);
+          console.log("json", json);
+          if (json) {
+            for (let i = 0; i < json.length; i++) {
+              const e = json[i];
+              for (let a = 0; a < e.cityList.length; a++) {
+                const c = e.cityList[a];
+                if (item.checkedKeys.includes(c.cityCode)) {
+                  this.$message.error("已选择过相同城市,不能再选择");
+                  this.btnDisabled = true;
+                  return false;
+                } else {
+                  this.btnDisabled = false;
+                }
+              }
+            }
+          }
+        }
+      });
+
       this.areaCheckList = [];
       item.checkedNodes.forEach((e) => {
         if (e.cityList) {

+ 12 - 4
src/views/material/index.vue

@@ -118,11 +118,21 @@
                   {{ scope.row.firstWeightPrice }}
                 </template>
               </el-table-column>
-              <el-table-column align="center" label="首重价格(元)">
+
+              <el-table-column align="center" label="续重区间(元)">
                 <template slot-scope="scope">
-                  {{ scope.row.firstWeightPrice }}
+                  {{ scope.row.secondStartWeight }}-{{
+                    scope.row.secondEndWeight
+                  }}
                 </template>
               </el-table-column>
+
+              <el-table-column align="center" label="续重价格(元)">
+                <template slot-scope="scope">
+                  {{ scope.row.secondWeightPrice }}
+                </template>
+              </el-table-column>
+
               <el-table-column align="center" label="续重重量(kg)">
                 <template slot-scope="scope">
                   {{ scope.row.lastWeight }}
@@ -214,8 +224,6 @@ export default {
               });
             });
           }
-          console.log("res.data.records", res.data.records);
-
           this.tableData = res.data.records;
           this.total = res.data.total;
           console.log(this.tableData);

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

@@ -447,6 +447,7 @@ export default {
         merchantClassifyId: "",
         merchantClassifyIds: [],
         merchantClassifyName: "",
+        shippingAddrId: "",
       },
       addr: "",
       measure: [],

+ 1 - 26
src/views/productNationwide/createProduct.vue

@@ -262,19 +262,7 @@ export default {
       // if (this.form.bannerList?.length > 0) {
       //   this.form.bannerList.shift();
       // }
-      if (this.form.saleModel == 2) {
-        this.form.merchantClassifyId = "[217527]";
-        this.form.merchantClassifyName = "集采预售";
-      } else if (this.form.saleModel == 3) {
-        this.form.merchantClassifyId = "[217526]";
-        this.form.merchantClassifyName = "团批秒杀";
-      } else if (this.form.saleModel == 4) {
-        this.form.merchantClassifyId = "[217528]";
-        this.form.merchantClassifyName = "清库专区";
-      } else if (this.form.saleModel == 5) {
-        this.form.merchantClassifyId = "[217525]";
-        this.form.merchantClassifyName = "新店福利";
-      }
+
 
       saveGoodsDraft(this.form).then((res) => {
         if (res.code == 200) {
@@ -347,19 +335,6 @@ export default {
           this.form.presaleEndTime = moment(this.form.datePicker[1]).valueOf();
         }
       }
-      if (this.form.saleModel == 2) {
-        this.form.merchantClassifyId = "[217527]";
-        this.form.merchantClassifyName = "集采预售";
-      } else if (this.form.saleModel == 3) {
-        this.form.merchantClassifyId = "[217526]";
-        this.form.merchantClassifyName = "团批秒杀";
-      } else if (this.form.saleModel == 4) {
-        this.form.merchantClassifyId = "[217528]";
-        this.form.merchantClassifyName = "清库专区";
-      } else if (this.form.saleModel == 5) {
-        this.form.merchantClassifyId = "[217525]";
-        this.form.merchantClassifyName = "新店福利";
-      }
       this.btnLading = true;
       publishGoods(this.form).then((res) => {
         if (res.code == 200) {

+ 65 - 60
src/views/productNationwide/module/basic-info.vue

@@ -13,7 +13,7 @@
           <span slot="label">销售方式</span>
           <el-radio-group v-model="form.saleType" @change="passValue">
             <el-radio :label="0" :value="0">整车</el-radio>
-            <el-radio :label="2" :value="2">拼车</el-radio>
+            <!-- <el-radio :label="2" :value="2">拼车</el-radio> -->
           </el-radio-group>
         </el-form-item>
       </el-col>
@@ -21,27 +21,16 @@
       <el-col :span="24">
         <el-form-item prop="saleModel">
           <span slot="label">销售模式</span>
-          <el-radio-group v-model="form.saleModel" @change="passValue">
+          <el-radio-group
+            v-model="form.saleModel"
+            @change="passValue"
+            :disabled="actionType == 'edit'"
+          >
             <el-radio :label="1">现货</el-radio>
             <el-radio :label="2">预售</el-radio>
           </el-radio-group>
         </el-form-item>
       </el-col>
-      <!-- <el-col :span="24" v-if="form.saleModel == 2">
-        <el-form-item prop="datePicker">
-          <span slot="label">预售时间</span>
-          <el-date-picker
-            v-model="form.datePicker"
-            type="datetimerange"
-            range-separator="至"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            @change="pickerChange"
-          >
-          </el-date-picker>
-        </el-form-item>
-      </el-col> -->
 
       <el-col :span="24" v-if="form.saleModel == 2">
         <el-form-item prop="djzfPicker">
@@ -50,7 +39,7 @@
             v-model="form.djzfPicker"
             type="datetimerange"
             range-separator="至"
-            value-format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd HH:mm"
             start-placeholder="开始日期"
             end-placeholder="结束日期"
             @change="djzfChange"
@@ -59,15 +48,21 @@
         </el-form-item>
       </el-col>
       <el-col :span="24" v-if="form.saleModel == 2">
-        <el-form-item prop="wkzfPicker">
+        <el-form-item prop="balancePayEndTime">
           <span slot="label">尾款支付时间</span>
           <el-date-picker
-            v-model="form.wkzfPicker"
-            type="datetimerange"
-            range-separator="至"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
+            value-format="yyyy-MM-dd HH:mm"
+            v-model="form.balancePayStartTime1"
+            type="datetime"
+            placeholder="开始时间"
+          >
+          </el-date-picker>
+          至
+          <el-date-picker
+            value-format="yyyy-MM-dd HH:mm"
+            v-model="form.balancePayEndTime1"
+            type="datetime"
+            placeholder="结束时间"
             @change="wkzfChange"
           >
           </el-date-picker>
@@ -201,7 +196,7 @@ import { getToken } from "@/utils/auth";
 import axios from "axios";
 import moment from "moment";
 export default {
-  props: ["data"],
+  props: ["data", "type"],
   components: { draggable },
   data() {
     return {
@@ -209,7 +204,7 @@ export default {
         carpoolSuccessTime: "",
         scope: 0,
         saleType: 0,
-        saleModel: undefined,
+        saleModel: 1,
         categoryId: "",
         title: "",
         giftDesc: "",
@@ -221,6 +216,7 @@ export default {
         datePicker: [],
         presaleStartTime: "",
         presaleEndTime: "",
+        balancePayEndTime1: "",
       },
       bannerList: [],
       headers: {
@@ -266,7 +262,7 @@ export default {
         djzfPicker: [
           { required: true, message: "定金支付时间不能为空", trigger: "blur" },
         ],
-        wkzfPicker: [
+        balancePayEndTime1: [
           { required: true, message: "尾款支付时间不能为空", trigger: "blur" },
         ],
         presaleEndStatus: [
@@ -327,35 +323,31 @@ export default {
         pic,
         categoryName,
         presaleStartTime: presaleStartTime
-          ? moment(presaleStartTime).format("yyyy-MM-DD HH:mm:ss")
+          ? moment(presaleStartTime).format("yyyy-MM-DD HH:mm")
           : "",
         presaleEndTime: presaleEndTime
-          ? moment(presaleEndTime).format("yyyy-MM-DD HH:mm:ss")
+          ? moment(presaleEndTime).format("yyyy-MM-DD HH:mm")
           : "",
         downPayStartTime: downPayStartTime
-          ? moment(downPayStartTime).format("yyyy-MM-DD HH:mm:ss")
+          ? moment(downPayStartTime).format("yyyy-MM-DD HH:mm")
           : "",
         downPayEndTime: downPayEndTime
-          ? moment(downPayEndTime).format("yyyy-MM-DD HH:mm:ss")
+          ? moment(downPayEndTime).format("yyyy-MM-DD HH:mm")
           : "",
         balancePayStartTime: balancePayStartTime
-          ? moment(balancePayStartTime).format("yyyy-MM-DD HH:mm:ss")
+          ? moment(balancePayStartTime).format("yyyy-MM-DD HH:mm")
           : "",
         balancePayEndTime: balancePayEndTime
-          ? moment(balancePayEndTime).format("yyyy-MM-DD HH:mm:ss")
+          ? moment(balancePayEndTime).format("yyyy-MM-DD HH:mm")
+          : "",
+        balancePayEndTime1: balancePayEndTime
+          ? moment(balancePayEndTime).format("yyyy-MM-DD HH:mm")
+          : "",
+        balancePayStartTime1: balancePayStartTime
+          ? moment(balancePayStartTime).format("yyyy-MM-DD HH:mm")
           : "",
         presaleEndStatus,
       };
-
-      // // 更新日期选择器
-      // if (presaleStartTime && presaleEndTime) {
-      //   this.$nextTick(() => {
-      //     this.$set(this.form, "datePicker", [
-      //       this.form.presaleStartTime,
-      //       this.form.presaleEndTime,
-      //     ]);
-      //   });
-      // }
       if (downPayStartTime && downPayEndTime) {
         this.$nextTick(() => {
           this.$set(this.form, "djzfPicker", [
@@ -364,14 +356,14 @@ export default {
           ]);
         });
       }
-      if (balancePayStartTime && balancePayEndTime) {
-        this.$nextTick(() => {
-          this.$set(this.form, "wkzfPicker", [
-            this.form.balancePayStartTime,
-            this.form.balancePayEndTime,
-          ]);
-        });
-      }
+      // if (balancePayStartTime && balancePayEndTime) {
+      //   this.$nextTick(() => {
+      //     this.$set(this.form, "wkzfPicker", [
+      //       this.form.balancePayStartTime,
+      //       this.form.balancePayEndTime,
+      //     ]);
+      //   });
+      // }
       // 更新轮播图列表(优化添加逻辑)
       this.bannerList = [...bannerList];
       if (pic) {
@@ -420,19 +412,33 @@ export default {
       this.bannerList.splice(index, 1);
       this.passValue();
     },
-    // pickerChange(val) {
-    //   this.form.presaleStartTime = moment(this.form.datePicker[0]).valueOf();
-    //   this.form.presaleEndTime = moment(this.form.datePicker[1]).valueOf();
-    //   this.passValue();
-    // },
     djzfChange(val) {
       this.form.downPayStartTime = moment(val[0]).valueOf();
       this.form.downPayEndTime = moment(val[1]).valueOf();
+      this.form.balancePayStartTime = moment(val[1]).valueOf(); // 保存为时间戳
+      this.$set(this.form, "balancePayStartTime1", val[1]);
+
       this.passValue();
     },
     wkzfChange(val) {
-      this.form.balancePayStartTime = moment(val[0]).valueOf();
-      this.form.balancePayEndTime = moment(val[1]).valueOf();
+      // form.balancePayEndTime
+      this.form.balancePayEndTime = moment(val).valueOf();
+      console.log("1111", val);
+
+      // this.form.balancePayEndTime1 = val;
+
+      console.log("2222", this.form.balancePayEndTime1);
+
+      const startTime = this.form.balancePayStartTime;
+      const endTime = this.form.balancePayEndTime;
+      console.log(startTime);
+      console.log(endTime);
+      if (endTime < startTime) {
+        this.$message.error("结束时间不能小于开始时间");
+        this.form.balancePayEndTime = "";
+        this.form.balancePayEndTime1 = "";
+        return;
+      }
       this.passValue();
     },
     draggableChange() {
@@ -444,7 +450,6 @@ export default {
       this.form.presaleStartTime = moment(this.form.datePicker[0]).valueOf();
       this.form.presaleEndTime = moment(this.form.datePicker[1]).valueOf();
       if (this.bannerList.length > 0) {
-        console.log("bannerList", this.bannerList);
         for (let index = 0; index < this.bannerList.length; index++) {
           this.form.bannerList.push({
             fileUrl:

+ 9 - 7
src/views/productNationwide/module/sales-info.vue

@@ -19,7 +19,7 @@
           />
         </el-form-item>
       </el-col>
-      <el-col :span="24">
+      <!-- <el-col :span="24">
         <el-form-item prop="giftDesc" label="快递类型">
           <el-radio
             v-model="form.expressType"
@@ -43,7 +43,7 @@
             >京东标快</el-radio
           >
         </el-form-item>
-      </el-col>
+      </el-col> -->
       <el-col :span="24">
         <el-form-item prop="unit">
           <span slot="label">计量单位</span>
@@ -328,7 +328,7 @@
           </div>
         </el-form-item>
       </el-col>
-      <el-col :span="24" v-if="saleModel == 1">
+      <el-col :span="24">
         <el-form-item prop="merchantClassifyIds">
           <span slot="label">店铺内所属分类</span>
           <el-cascader
@@ -349,7 +349,11 @@
         <el-form-item prop="freeShipping">
           <span slot="label">运费</span>
           <div class="main1">
-            <el-radio-group v-model="form.freeShipping" class="radios">
+            <el-radio-group
+              v-model="form.freeShipping"
+              class="radios"
+              @change="passValue"
+            >
               <el-radio :label="0" :value="0"
                 >双方协商后卖家进行修改,买家和订单一起支付</el-radio
               >
@@ -589,9 +593,7 @@ export default {
         shippingAddr: addr,
         packing,
         shippingTimeDesc,
-        freeShipping: this.form.freeShipping
-          ? freeShipping
-          : this.form.freeShipping,
+        freeShipping: freeShipping,
         skuList,
         props, // 已默认处理空值情况
         shippingAddrBean: {

+ 32 - 1
src/views/productNationwide/updateProduct.vue

@@ -4,7 +4,11 @@
       <el-row style="padding-top: 20px">
         <el-col :span="24">
           <el-descriptions title="基本信息" column="1"> </el-descriptions>
-          <basicInfo ref="basicRefs" @updateValue="updateValue"></basicInfo>
+          <basicInfo
+            ref="basicRefs"
+            @updateValue="updateValue"
+            type="edit"
+          ></basicInfo>
           <el-descriptions title="销售信息" column="1"> </el-descriptions>
           <salesInfo
             ref="salesRefs"
@@ -461,6 +465,27 @@ export default {
           this.$message.error(`规格不能为空`);
           return;
         }
+
+        if (this.isString(this.form.balancePayEndTime)) {
+          this.form.balancePayEndTime = moment(
+            this.form.balancePayEndTime
+          ).valueOf();
+        }
+        if (this.isString(this.form.balancePayStartTime)) {
+          this.form.balancePayStartTime = moment(
+            this.form.balancePayStartTime
+          ).valueOf();
+        }
+        if (this.isString(this.form.downPayEndTime)) {
+          this.form.downPayEndTime = moment(this.form.downPayEndTime).valueOf();
+        }
+        if (this.isString(this.form.downPayStartTime)) {
+          this.form.downPayStartTime = moment(
+            this.form.downPayStartTime
+          ).valueOf();
+        }
+        console.log(this.form);
+
         updateGoods(this.form).then((res) => {
           if (res.code == 200) {
             this.btnLading = false;
@@ -484,6 +509,12 @@ export default {
         });
       }
     },
+    isString(value) {
+      return (
+        typeof value === "string" ||
+        Object.prototype.toString.call(value) === "[object String]"
+      );
+    },
     updateValue(val) {
       this.form = { ...this.form, ...val };
 

+ 5 - 4
src/views/shipping/createProduct.vue

@@ -250,6 +250,7 @@ import {
 import basicInfo from "./module/basic-info.vue";
 import productInfo from "@/views/product/module/product-info.vue";
 import salesInfo from "./module/sales-info.vue";
+// import salesInfo from "@/views/product/module/sales-info.vue";
 import phoneView from "@/components/phoneView/index.vue";
 import Amap from "@/components/Map/map.vue";
 import moment from "moment";
@@ -354,10 +355,10 @@ export default {
         this.$message.error(`商品规格不能为空`);
         return;
       }
-      if (!this.form.shippingAddrBean.provinceCode) {
-        this.$message.error(`请点击选择地址,选择发货地址的省市区!`);
-        return;
-      }
+      // if (!this.form.shippingAddrBean.provinceCode) {
+      //   this.$message.error(`请点击选择地址,选择发货地址的省市区!`);
+      //   return;
+      // }
       if (this.form.categoryId?.length > 0) {
         this.form.categoryId =
           this.form.categoryId[this.form.categoryId.length - 1];

+ 0 - 21
src/views/shipping/list/allProduct.vue

@@ -266,27 +266,6 @@
             >预览</el-button
           >
           <el-button
-            v-if="
-              scope.row.scope == 1 &&
-              !scope.row.promotionTitle &&
-              scope.row.scope != 3
-            "
-            size="mini"
-            type="text"
-            @click="handleBargain(scope.row)"
-            v-hasPermi="['manage:order:detail']"
-            >设置特价</el-button
-          >
-          <el-button
-            v-if="scope.row.scope == 2"
-            size="mini"
-            type="text"
-            style="color: green"
-            @click="handleCancal(scope.row)"
-            v-hasPermi="['manage:order:detail']"
-            >取消特价</el-button
-          >
-          <el-button
             size="mini"
             type="text"
             :style="scope.row.spuStatus == 1 ? 'color:green' : 'color:red'"

+ 6 - 85
src/views/shipping/module/sales-info.vue

@@ -19,7 +19,7 @@
           />
         </el-form-item>
       </el-col>
-      <el-col :span="24">
+      <!-- <el-col :span="24">
         <el-form-item prop="giftDesc" label="快递类型">
           <el-radio
             v-model="form.expressType"
@@ -43,7 +43,7 @@
             >京东标快</el-radio
           >
         </el-form-item>
-      </el-col>
+      </el-col> -->
       <el-col :span="24">
         <el-form-item prop="unit">
           <span slot="label">计量单位</span>
@@ -136,7 +136,7 @@
               </template>
             </el-table-column>
 
-            <el-table-column label="原价" width="160" v-if="saleType == 4">
+            <el-table-column label="原价" width="160" >
               <template slot-scope="scope">
                 <el-input-number
                   :controls="false"
@@ -149,7 +149,7 @@
                 </el-input-number>
               </template>
             </el-table-column>
-            <el-table-column label="现价" width="160" v-if="saleType == 4">
+            <el-table-column label="现价" width="160" >
               <template slot-scope="scope">
                 <el-input-number
                   :controls="false"
@@ -162,74 +162,8 @@
                 </el-input-number>
               </template>
             </el-table-column>
-            <el-table-column
-              v-if="saleType != 4"
-              width="160"
-              :label="
-                saleModel == 5
-                  ? '福利价'
-                  : saleModel == 3
-                  ? '秒杀价'
-                  : saleModel == 4
-                  ? '清库价'
-                  : saleModel == 2
-                  ? '预售价'
-                  : '原价'
-              "
-            >
-              <template slot-scope="scope">
-                <el-input-number
-                  :controls="false"
-                  v-model="scope.row.skuPriceList[0].price"
-                  :placeholder="
-                    saleModel == 5
-                      ? '福利价'
-                      : saleModel == 3
-                      ? '秒杀价'
-                      : saleModel == 4
-                      ? '清库价'
-                      : saleModel == 2
-                      ? '预售价'
-                      : '原价'
-                  "
-                  clearable
-                  @input="passValue"
-                >
-                  <template slot="suffix"> {{ form.unit }}/元 </template>
-                </el-input-number>
-              </template>
-            </el-table-column>
-
-            <el-table-column
-              label="批发价"
-              width="160"
-              v-if="saleType != 4 && saleModel != 1"
-            >
-              <template slot-scope="scope">
-                <el-input-number
-                  :controls="false"
-                  v-model="scope.row.skuPriceList[0].originalPrice"
-                  placeholder="批发价"
-                  clearable
-                  @input="passValue"
-                >
-                  <template slot="suffix"> {{ form.unit }}/元 </template>
-                </el-input-number>
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="address"
-              label="商品单价"
-              width="120"
-              v-if="saleType == 4"
-            >
-              <template slot-scope="scope">
-                {{ compilatePrice(scope.row.skuPriceList[0]) }}
-                元/{{ form.unit }}
-              </template>
-            </el-table-column>
 
-            <el-table-column prop="address" label="商品单价" width="120" v-else>
+            <el-table-column prop="address" label="商品单价" width="120">
               <template slot-scope="scope">
                 {{
                   scope.row.skuPriceList[0].price
@@ -411,7 +345,6 @@ import { getMerchantClassifyList } from "@/api/sort/index.js";
 import { getStoreInfo } from "@/api/common/index";
 import Amap from "@/components/Map/map.vue";
 import { getDict } from "@/api/common/index.js";
-import { dxAddressList } from "@/api/manage/address";
 export default {
   props: ["data", "saleType", "saleModels"],
   components: { Amap },
@@ -495,7 +428,6 @@ export default {
   mounted() {
     this.getInfo();
     this.getdictImpl();
-    this.getAreaList();
     this.getList();
   },
 
@@ -512,18 +444,7 @@ export default {
         }
       });
     },
-    getAreaList() {
-      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;
-        }
-      });
-    },
+
     areaAdd() {
       this.$router.push({ path: "/manage/manage/address/index" });
     },

+ 757 - 0
src/views/shipping/module/sales-info222.vue

@@ -0,0 +1,757 @@
+<template>
+  <el-form
+    :model="form"
+    ref="queryForm"
+    size="small"
+    :inline="true"
+    label-width="120px"
+    :rules="rules"
+  >
+    <el-row>
+      <el-col :span="24">
+        <el-form-item prop="lookSalesVolume">
+          <span slot="label">展示销量</span>
+          <el-input
+            v-model="form.lookSalesVolume"
+            placeholder="请输入展示销量"
+            clearable
+            @input="passValue"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item prop="freeShipping" label="是否包邮">
+          <el-radio
+            v-model="form.freeShipping"
+            :label="1"
+            :value="1"
+            @change="passValue"
+            >包邮</el-radio
+          >
+          <el-radio
+            v-model="form.freeShipping"
+            :label="0"
+            :value="0"
+            @change="passValue"
+            >不包邮</el-radio
+          >
+        </el-form-item>
+      </el-col>
+      <el-col :span="24" v-if="form.freeShipping == 0">
+        <el-form-item prop="giftDesc" label="快递类型">
+          <el-radio
+            v-model="form.expressType"
+            :label="0"
+            :value="0"
+            @change="passValue"
+            >水果特惠</el-radio
+          >
+          <el-radio
+            v-model="form.expressType"
+            :label="1"
+            :value="1"
+            @change="passValue"
+            >生鲜特快</el-radio
+          >
+          <el-radio
+            v-model="form.expressType"
+            :label="2"
+            :value="2"
+            @change="passValue"
+            >京东标快</el-radio
+          >
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item prop="unit">
+          <span slot="label">计量单位</span>
+          <el-select
+            v-model="form.unit"
+            placeholder="请选择"
+            @change="passValue"
+          >
+            <el-option
+              v-for="item in measure"
+              :key="item.dictLabel"
+              :label="item.dictLabel"
+              :value="item.dictLabel"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item>
+          <span slot="label"><span class="required">*</span> 商品规格</span>
+          <el-button @click="addSpecification" type="primary"
+            >添加规格</el-button
+          >
+          <el-table :data="form.skuList" style="width: 100%; margin-top: 20px">
+            <el-table-column prop="name" label="规格名称" width="160">
+              <template slot-scope="scope">
+                <el-input
+                  v-model="scope.row.skuSpecsList[0].specsName"
+                  placeholder="请输入规格名称"
+                  clearable
+                  maxlength="8"
+                  @input="passValue"
+                  show-word-limit
+                />
+              </template>
+            </el-table-column>
+            <el-table-column prop="address" label="规格内容" width="160">
+              <template slot-scope="scope">
+                <el-input
+                  v-model="scope.row.skuSpecsList[0].specsValue"
+                  placeholder="规格内容"
+                  clearable
+                  maxlength="8"
+                  @input="passValue"
+                  show-word-limit
+                />
+              </template>
+            </el-table-column>
+
+            <el-table-column prop="name" label="预计库存" width="160">
+              <template slot-scope="scope">
+                <el-input-number
+                  :controls="false"
+                  v-model="scope.row.predictStocks"
+                  placeholder="预计库存"
+                  clearable
+                  @input="passValue"
+                >
+                  <template slot="suffix"> {{ form.unit }} </template>
+                </el-input-number>
+              </template>
+            </el-table-column>
+            <el-table-column prop="name" label="实际库存" width="160">
+              <template slot-scope="scope">
+                <el-input-number
+                  :controls="false"
+                  v-model="scope.row.stock"
+                  placeholder="实际库存"
+                  clearable
+                  @input="passValue"
+                >
+                  <template slot="suffix"> {{ form.unit }} </template>
+                </el-input-number>
+              </template>
+            </el-table-column>
+            <el-table-column label="起批量" width="160">
+              <template slot-scope="scope">
+                <el-input-number
+                  :controls="false"
+                  v-model="scope.row.skuPriceList[0].minPurchase"
+                  placeholder="起批量"
+                  clearable
+                  @input="passValue"
+                >
+                  <template slot="suffix">
+                    {{ form.unit }}
+                  </template>
+                </el-input-number>
+              </template>
+            </el-table-column>
+
+            <el-table-column label="原价" width="160">
+              <template slot-scope="scope">
+                <el-input-number
+                  :controls="false"
+                  v-model="scope.row.skuPriceList[0].originalPrice"
+                  placeholder="原价"
+                  clearable
+                  @input="passValue"
+                >
+                  <template slot="suffix"> {{ form.unit }}/元 </template>
+                </el-input-number>
+              </template>
+            </el-table-column>
+            <el-table-column label="现价" width="160">
+              <template slot-scope="scope">
+                <el-input-number
+                  :controls="false"
+                  v-model="scope.row.skuPriceList[0].price"
+                  placeholder="现价"
+                  clearable
+                  @input="passValue"
+                >
+                  <template slot="suffix"> {{ form.unit }}/元 </template>
+                </el-input-number>
+              </template>
+            </el-table-column>
+
+            <el-table-column prop="address" label="商品单价" width="120">
+              <template slot-scope="scope">
+                {{
+                  scope.row.skuPriceList[0].price
+                    ? scope.row.skuPriceList[0].price.toFixed(2)
+                    : 0
+                }}
+                元/{{ form.unit }}
+              </template>
+            </el-table-column>
+
+            <el-table-column label="净重量(kg )" width="160">
+              <template slot-scope="scope">
+                <el-input-number
+                  :controls="false"
+                  v-model="scope.row.weight"
+                  placeholder="请输入净重量"
+                  clearable
+                  @input="passValue"
+                >
+                  <template slot="suffix"> /Kg </template>
+                </el-input-number>
+              </template>
+            </el-table-column>
+            <el-table-column prop="address" label="操作" width="160">
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  style="color: red"
+                  @click="removeSpecification(scope.row, scope.$index)"
+                  >删除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form-item>
+      </el-col>
+      <el-col :span="24" style="margin-top: 20px">
+        <el-form-item>
+          <span slot="label"><span class="required">*</span> 商品属性</span>
+          <div class="main">
+            <div style="padding-top: 20px">
+              <el-form-item label="包装方式" prop="packing">
+                <el-select
+                  v-model="form.packing"
+                  placeholder="请选择包装方式"
+                  @change="passValue"
+                >
+                  <el-option
+                    v-for="item in package"
+                    :key="item.dictLabel"
+                    :label="item.dictLabel"
+                    :value="item.dictLabel"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item prop="shippingTimeDesc">
+                <span slot="label">发货时间</span>
+                <el-select
+                  v-model="form.shippingTimeDesc"
+                  placeholder="请选择发货时间"
+                  @change="passValue"
+                >
+                  <el-option label="付款24小时之内" value="付款24小时之内" />
+                  <el-option label="付款36小时之内" value="付款36小时之内" />
+                  <el-option label="付款48小时之内" value="付款48小时之内" />
+                  <el-option label="付款72小时之内" value="付款72小时之内" />
+                </el-select>
+              </el-form-item>
+            </div>
+
+            <el-form-item
+              label="自定义属性"
+              v-if="form.props && form.props.length > 0"
+            >
+              <div
+                style="
+                  width: 100%;
+                  display: flex;
+                  flex-direction: row;
+                  flex-flow: wrap;
+                  justify-content: center;
+                "
+              >
+                <div
+                  class="item"
+                  v-for="(item, index) in form.props ? form.props : []"
+                  :key="index"
+                >
+                  <el-input
+                    v-model="item.name"
+                    placeholder="请输入属性名称"
+                    clearable
+                    maxlength="8"
+                    show-word-limit
+                    style="width: 200px"
+                  />
+                  <el-input
+                    v-model="item.value"
+                    placeholder="请输入属性值"
+                    clearable
+                    maxlength="8"
+                    show-word-limit
+                    @input="passValue"
+                    style="width: 200px"
+                  />
+                  <i
+                    class="el-icon-delete"
+                    size="22"
+                    style="color: red"
+                    @click="removeAttribute(item, index)"
+                  ></i>
+                </div>
+              </div>
+            </el-form-item>
+          </div>
+          <div class="item1" style="width: 180px">
+            <span @click="addattribute" style="cursor: pointer">
+              <i class="el-icon-plus" size="22"></i>自定义添加商品属性</span
+            >
+          </div>
+        </el-form-item>
+      </el-col>
+      <el-col :span="24" v-if="saleModel == 1">
+        <el-form-item prop="merchantClassifyIds">
+          <span slot="label">店铺内所属分类</span>
+          <el-cascader
+            :filterable="true"
+            v-model="form.merchantClassifyIds"
+            ref="formCascader"
+            :placeholder="
+              form.merchantClassifyName
+                ? form.merchantClassifyName
+                : '请选择分类'
+            "
+            :props="categoryprops"
+            @change="cascaderChange"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="24" style="margin-top: 20px">
+        <el-form-item prop="shippingAddrId">
+          <span slot="label"> 发货地址</span>
+          <el-select
+            v-model="form.shippingAddrId"
+            placeholder="请选择"
+            style="width: 300px"
+            @change="passValue"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.id"
+              :label="
+                item.defaultTag == 1 ? '默认-' + item.address : item.address
+              "
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+          <el-button type="text" @click="areaAdd" style="margin-left: 10px">
+            没有所需地址?前去添加</el-button
+          >
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item prop="shareRate">
+          <span slot="label">分享比例</span>
+          <el-input-number
+            v-model="form.shareRate"
+            :min="0"
+            :max="100"
+            placeholder="请输入分享比例"
+            :controls="false"
+            @change="passValue"
+          >
+          </el-input-number
+          >%
+        </el-form-item>
+      </el-col>
+    </el-row>
+    <Amap ref="mapOpen" @address="Mapaddress"></Amap>
+  </el-form>
+</template>
+
+<script>
+import { getMerchantClassifyList } from "@/api/sort/index.js";
+import { getStoreInfo } from "@/api/common/index";
+import Amap from "@/components/Map/map.vue";
+import { getDict } from "@/api/common/index.js";
+import { dxAddressList } from "@/api/manage/address";
+export default {
+  props: ["data", "saleType", "saleModels"],
+  components: { Amap },
+  data() {
+    return {
+      form: {
+        expressType: 0,
+        unit: "斤",
+        props: [],
+        freeShipping: 0,
+        lookSalesVolume: "",
+        shippingAddrBean: {
+          addr: "",
+          addrDetail: "",
+          cityCode: "",
+          countyCode: "",
+          latitude: "",
+          longitude: "",
+          provinceCode: "",
+        },
+        shippingAddr: "",
+        skuList: [],
+        packing: "",
+        shippingTimeDesc: "",
+        merchantClassifyId: "",
+        merchantClassifyIds: [],
+        merchantClassifyName: "",
+      },
+      addr: "",
+      measure: [],
+      package: [],
+      rules: {
+        freeShipping: [
+          { required: true, message: "请选择运费方式", trigger: "blur" },
+        ],
+        props: [
+          { required: true, message: "商品属性不能为空", trigger: "blur" },
+        ],
+        unit: [
+          { required: true, message: "计量单位不能为空", trigger: "blur" },
+        ],
+        shippingTimeDesc: [
+          { required: true, message: "发货时间不能为空", trigger: "blur" },
+        ],
+        skuList: [{ required: true, message: "规格不能为空", trigger: "blur" }],
+        packing: [
+          { required: true, message: "包装方式不能为空", trigger: "blur" },
+        ],
+        shippingAddrId: [
+          { required: true, message: "请选择地址", trigger: "blur" },
+        ],
+        merchantClassifyIds: [
+          { required: true, message: "店铺所属分类不能为空", trigger: "blur" },
+        ],
+      },
+
+      shopInfo: {},
+      saleType: undefined,
+      sj: true,
+      skuIds: [],
+      saleModel: 1,
+      options: [],
+      categoryprops: {
+        checkStrictly: true,
+        lazy: true,
+        lazyLoad: this.categoryLazyLoad,
+        label: "label",
+        value: "value",
+      },
+    };
+  },
+  watch: {
+    //监听文件url改变时重新赋值
+    saleModels(newVal, oldVal) {
+      this.saleModel = newVal;
+      this.$forceUpdate();
+    },
+  },
+  mounted() {
+    this.getInfo();
+    this.getdictImpl();
+    this.getAreaList();
+  },
+
+  methods: {
+    getAreaList() {
+      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;
+        }
+      });
+    },
+    areaAdd() {
+      this.$router.push({ path: "/manage/manage/address/index" });
+    },
+    categoryLazyLoad(node, resolve) {
+      let level = node.level;
+      if (!node.data) {
+        getMerchantClassifyList({ classifyType: 1, isDefault: 1 }).then(
+          (res) => {
+            //接口
+            const nodes = Array.from(res.data).map((item, index) => ({
+              value: item.id,
+              label: `${item.classifyName}`,
+              leaf: level >= 2,
+            }));
+            // 通过调用resolve将子节点数据返回,通知组件数据加载完成
+            resolve(nodes);
+          }
+        );
+      } else if (level == 1) {
+        getMerchantClassifyList({
+          parentId: node.data.value,
+          classifyType: 1,
+        }).then((res) => {
+          const nodes = Array.from(res.data).map((item) => ({
+            value: item.id,
+            label: `${item.classifyName}`,
+            leaf: level >= 2,
+            // level: 2,
+          }));
+          // 通过调用resolve将子节点数据返回,通知组件数据加载完成
+          resolve(nodes);
+        });
+      } else {
+        resolve({});
+      }
+    },
+    cascaderChange(val) {
+      const dom = document.getElementsByClassName("el-radio is-checked");
+      //这里我把dom打出来看了 最后一个选项才是我选中的节点 即[length-1] 有的博主写的是 第一个元素 即[0] 大家自行尝试
+      let radioDom = dom[dom.length - 1];
+      const brother = radioDom.nextElementSibling;
+      let nodes = this.$refs.formCascader.getCheckedNodes();
+      this.form.merchantClassifyName = nodes[0].label;
+      this.form.merchantClassifyIds = val;
+      this.form.merchantClassifyId = JSON.stringify(val);
+      brother.click();
+      // this.form.merchantClassifyId = `["${this.form.merchantClassifyId.join('')}"]`;
+      this.passValue();
+    },
+    getFormInfo(record) {
+      const {
+        merchantClassifyName,
+        saleModel,
+        shippingAddr,
+        expressType,
+        shareRate,
+        merchantClassifyId,
+        lookSalesVolume,
+        unit,
+        packing,
+        shippingTimeDesc,
+        freeShipping,
+        skuList,
+        props = [],
+        shippingAddrId,
+      } = record || {};
+
+      this.form = {
+        ...this.form,
+        shippingAddrId: JSON.stringify(shippingAddrId),
+        merchantClassifyName,
+        expressType,
+        shareRate,
+        merchantClassifyIds: merchantClassifyId,
+        merchantClassifyId,
+        lookSalesVolume,
+        unit,
+        shippingAddr,
+        packing,
+        shippingTimeDesc,
+        freeShipping:
+          this.form.freeShipping !== undefined
+            ? freeShipping
+            : this.form.freeShipping,
+        skuList,
+        props,
+        shippingAddrBean: {
+          addr: shippingAddr,
+          addrDetail: record?.shippingAddrBean?.addrDetail,
+          cityCode: record.cityCode,
+          countyCode: record.countyCode,
+          latitude: record.latitude,
+          longitude: record.longitude,
+          provinceCode: record.provinceCode,
+        },
+      };
+
+      console.log(this.form);
+
+      this.saleModel = saleModel;
+      this.addr = shippingAddr;
+    },
+
+    compilatePrice(data) {
+      if (data.price) {
+        return data.price.toFixed(2);
+      } else if (data.originalPrice) {
+        return data.originalPrice.toFixed(2);
+      } else if (data.originalPrice && data.price) {
+        return data.price.toFixed(2);
+      }
+    },
+    formvalidate() {
+      let that = this;
+      return new Promise((resolve) => {
+        that.$refs.queryForm.validate((valid, row) => {
+          if (valid) {
+            resolve(valid);
+          } else {
+            for (const key in row) {
+              for (let index = 0; index < row[key].length; index++) {
+                this.$message.error(row[key][index].message);
+                return;
+              }
+            }
+            resolve(valid);
+          }
+        });
+      });
+    },
+    getInfo() {
+      getStoreInfo().then((res) => {
+        if (res.code == 200) {
+          this.shopInfo = res.data;
+        }
+      });
+    },
+    getdictImpl() {
+      getDict("stockUnit").then((res) => {
+        if (res.code == 200) {
+          this.measure = res.data;
+        }
+      });
+      getDict("packType").then((res) => {
+        if (res.code == 200) {
+          this.package = res.data;
+        }
+      });
+    },
+    passValue() {
+      if (this.saleType == 4) {
+        this.form?.skuList.forEach((e) => {
+          e.skuPriceList.forEach((a) => {
+            a.price = a.originalPrice;
+          });
+        });
+      }
+      this.$emit("updateValue", this.form);
+    },
+
+    Mapaddress(data) {
+      this.form.shippingAddr = data.pname + data.cityname + data.adname;
+      this.form.shippingAddrBean.addr = data.address;
+      // this.form.shippingAddrBean.addrDetail = data.name ? data.name : undefined;
+      this.form.shippingAddrBean.cityCode = data.cityCode;
+      this.form.shippingAddrBean.countyCode = data.adcode;
+      if (data.location) {
+        this.form.shippingAddrBean.latitude = data.location.lat;
+        this.form.shippingAddrBean.longitude = data.location.lng;
+      }
+      this.form.shippingAddrBean.provinceCode = data.pcode;
+      this.addr = data.address;
+      this.$refs.mapOpen.closeMap();
+      // this.passValue();
+    },
+    selectAddr() {
+      this.$refs.mapOpen.loadMap();
+    },
+    addattribute() {
+      if (this.form.prop?.length > 0) {
+        this.form.props.push({
+          name: "",
+          id: "",
+          value: "",
+        });
+      } else {
+        this.form.prop = [];
+        this.form.props.push({
+          name: "",
+          id: "",
+          value: "",
+        });
+      }
+    },
+    removeAttribute(record, index) {
+      this.form.props.splice(index, 1);
+      this.passValue();
+    },
+    removeSpecification(record, index) {
+      console.log("record", record.id);
+      this.skuIds.push(record.id);
+      this.form.skuList.splice(index, 1);
+      this.$emit("skuRemove", this.skuIds);
+    },
+    addSpecification() {
+      if (!this.form.skuList) {
+        this.form.skuList = [];
+      }
+      this.form.skuList.push({
+        stock: undefined,
+        weight: undefined,
+        sj: true,
+        skuCost: {
+          purchaseFee: undefined,
+          laborFee: undefined,
+          agencyFee: undefined,
+          materialFee: undefined,
+        },
+        skuSpecsList: [
+          {
+            specsId: "0",
+            specsName: "",
+            specsValue: "",
+          },
+        ],
+        skuPriceList: [
+          {
+            minPurchase: undefined,
+            maxPurchase: undefined,
+            price: undefined,
+            originalPrice: undefined,
+            lowestPrice: 1,
+          },
+        ],
+      });
+    },
+  },
+};
+</script>
+<style>
+.el-upload-list__item {
+  transition: none !important;
+  -webkit-transition: nonne !important;
+}
+.el-upload-list__item-name {
+  transition: none !important;
+  -webkit-transition: nonne !important;
+}
+</style>
+<style scoped>
+/deep/ .el-radio-group {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-around;
+  height: 50px;
+}
+.item {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-bottom: 20px;
+  margin-right: 10px;
+}
+.main1 {
+  background: #f1f1f1;
+  min-height: 80px;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
+  align-items: center;
+  padding: 0px 20px;
+}
+.main {
+  width: 58vw;
+  background: #f1f1f1;
+  min-height: 80px;
+  display: flex;
+  flex-direction: column;
+  align-items: flex-start;
+  /* display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
+  align-items: center;
+  padding: 20px 20px 0px 20px; */
+}
+</style>

+ 1 - 4
src/views/shipping/updateProduct.vue

@@ -255,6 +255,7 @@ import {
 import basicInfo from "./module/basic-info.vue";
 import productInfo from "@/views/product/module/product-info.vue";
 import salesInfo from "./module/sales-info.vue";
+// import salesInfo from "@/views/product/module/sales-info.vue";
 import phoneView from "@/components/phoneView/index.vue";
 import Amap from "@/components/Map/map.vue";
 import moment from "moment";
@@ -432,10 +433,6 @@ export default {
         this.$message.error(`商品规格不能为空`);
         return;
       }
-      if (!this.form.shippingAddrBean.provinceCode) {
-        this.$message.error(`请选择发货地址的省市区!`);
-        return;
-      }
       this.btnLading = true;
       if (!this.form.presaleStartTime && !this.form.presaleEndTime) {
         if (this.form.datePicke) {