Browse Source

新需求

潘超林 3 months ago
parent
commit
60bb6622d2

+ 7 - 0
src/api/manage/product.js

@@ -172,3 +172,10 @@ export function getRebateCouponsGoods(query) {
     })
 }
 
+export function batchEditCategory(query) {
+    return request({
+        url: '/system/goods/batchEditCategory',
+        method: 'post',
+        data: query
+    })
+}

+ 19 - 7
src/views/manage/order.vue

@@ -186,6 +186,7 @@
           placeholder="请选择订单状态"
           style="width: 180px"
         >
+          <el-option label="全部" value=""> </el-option>
           <el-option label="待发货" value="WAIT_DELIVERY"> </el-option>
           <el-option label="待收货" value="WAIT_RECEIVE"> </el-option>
           <el-option label="待付款" value="WAIT_PAY"> </el-option>
@@ -201,6 +202,7 @@
           placeholder="请选择售后状态"
           style="width: 180px"
         >
+          <el-option label="全部" value=""> </el-option>
           <el-option label="未申请" value="0"> </el-option>
           <el-option label="已申请" value="1"> </el-option>
           <el-option label="审核失败" value="2"> </el-option>
@@ -216,6 +218,7 @@
           placeholder="请选择支付方式"
           style="width: 180px"
         >
+          <el-option label="全部" value=""> </el-option>
           <el-option label="支付宝" value="alipay"> </el-option>
           <el-option label="微信支付" value="wechat"> </el-option>
         </el-select>
@@ -226,6 +229,7 @@
           placeholder="请选择支付方式"
           style="width: 180px"
         >
+          <el-option label="全部" value=""> </el-option>
           <el-option label="自提" value="0"> </el-option>
           <el-option label="同城下单" value="1"> </el-option>
           <el-option label="异地下单" value="2" v-if="activeName == 0"> </el-option>
@@ -659,6 +663,7 @@ export default {
         orderStatusKey: "",
         afterSaleStatus: "",
         paymentType: "",
+        deliveryType: "",
       },
       printForm: {
         sn: "",
@@ -793,10 +798,14 @@ export default {
             let infoList = [];
             for (let index = 0; index < list.length; index++) {
               let e = list[index];
-              for (let i = 0; i < e.dxUserOrderVOList.length; i++) {
-                let a = e.dxUserOrderVOList[i];
-                let c = { ...e, ...a };
-                infoList.push(c);
+              if (e.dxUserOrderVOList) {
+                for (let i = 0; i < e.dxUserOrderVOList.length; i++) {
+                  let a = e.dxUserOrderVOList[i];
+                  let c = { ...e, ...a };
+                  infoList.push(c);
+                }
+              } else {
+                infoList.push(e);
               }
             }
             let totalList = [];
@@ -806,10 +815,13 @@ export default {
                 var goods = JSON.parse(e.goodsInfo);
                 e = { ...e, ...goods[0] };
               }
-              for (let i = 0; i < e.specsValue.length; i++) {
-                let a = e.specsValue[i];
-                e = { ...e, ...a };
+              if (e.specsValue) {
+                for (let i = 0; i < e.specsValue.length; i++) {
+                  let a = e.specsValue[i];
+                  e = { ...e, ...a };
+                }
               }
+
               console.log("1231231", e);
               totalList.push(e);
             }

+ 173 - 23
src/views/product/list/allProduct.vue

@@ -17,7 +17,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="分类" prop="categoryId">
+      <el-form-item label="商品分类" prop="categoryId">
         <el-cascader
           v-model="queryParams.categoryId"
           ref="formCascader"
@@ -28,6 +28,17 @@
         />
       </el-form-item>
 
+      <el-form-item label="店铺分类" prop="merchantClassifyId">
+        <el-cascader
+          v-model="queryParams.merchantClassifyId"
+          ref="formCascader"
+          placeholder="请选择分类"
+          :props="categorypropsmerchant"
+          style="width: 240px"
+          @change="cascadermerchantChange"
+        />
+      </el-form-item>
+
       <el-form-item label="商品状态" prop="spuStatus">
         <el-select
           v-model="queryParams.spuStatus"
@@ -54,17 +65,6 @@
         </el-select>
       </el-form-item>
 
-      <!-- <el-form-item label="商品类型" prop="scope" v-if="shopInfo.scope == 1">
-        <el-select
-          v-model="queryParams.scope"
-          placeholder="请选择商品类型"
-          style="width: 240px"
-        >
-          <el-option label="全部" value=""> </el-option>
-          <el-option label="同城秒送" value="3"> </el-option>
-        </el-select>
-      </el-form-item> -->
-
       <el-form-item label="关联活动商品" prop="promotionTag">
         <el-select
           v-model="queryParams.promotionTag"
@@ -128,6 +128,9 @@
             >
             <el-dropdown-item @click.native="handleExport">批量导出</el-dropdown-item>
             <el-dropdown-item @click.native="handleDelist">批量下架</el-dropdown-item>
+            <el-dropdown-item @click.native="handleSort"
+              >批量加入店铺分类</el-dropdown-item
+            >
           </el-dropdown-menu>
         </el-dropdown>
       </template>
@@ -157,6 +160,9 @@
         :show-overflow-tooltip="true"
       />
       <el-table-column label="分类" align="center" prop="categoryName" />
+
+      <el-table-column label="店铺所属分类" align="center" prop="merchantClassifyName" />
+
       <el-table-column label="价格" align="center" width="120">
         <template slot-scope="scope">
           {{ scope.row.lowestPrice.toFixed(2) }}/{{ scope.row.unit }}
@@ -541,6 +547,36 @@
         <el-button type="primary" @click="bargainSubmit">确 定</el-button>
       </span>
     </el-dialog>
+
+    <el-dialog
+      title="设置店铺分类"
+      :visible.sync="sortDialog"
+      :before-close="sortDialog == false"
+      :width="200"
+    >
+      <el-form
+        :model="sort"
+        :rules="sortrules"
+        ref="ruleSort"
+        label-width="100px"
+        class="demo-ruleForm"
+      >
+        <el-form-item label="店铺分类" prop="merchantClassifyId">
+          <el-cascader
+            v-model="sort.merchantClassifyId"
+            ref="sortCascader"
+            placeholder="请选择分类"
+            :props="updatemerchange"
+            style="width: 240px"
+            @change="sortChange"
+          />
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="sortDialog = false">取 消</el-button>
+        <el-button type="primary" @click="sortSubmit">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -554,8 +590,9 @@ import {
   goodsRemove,
   setLowPrice,
   cancelLowPrice,
+  batchEditCategory,
 } from "@/api/manage/product";
-
+import { getMerchantClassifyList } from "@/api/sort/index.js";
 import { promotionList, promotionSku } from "@/api/active/index";
 import { getClassificationListPage } from "@/api/common/index";
 import lookProduct from "../lookProduct.vue";
@@ -565,6 +602,10 @@ export default {
   name: "product",
   data() {
     return {
+      sort: {
+        merchantClassifyId: "",
+      },
+      sortDialog: false,
       // 遮罩层
       bargainVisible: false,
       loading: true,
@@ -596,6 +637,16 @@ export default {
         lazy: true,
         lazyLoad: this.categoryLazyLoad,
       },
+      updatemerchange: {
+        checkStrictly: true,
+        lazy: true,
+        lazyLoad: this.categoryLazyLoadUpdate,
+      },
+      categorypropsmerchant: {
+        checkStrictly: true,
+        lazy: true,
+        lazyLoad: this.categoryLazyLoadmerchant,
+      },
       activeShowBtn: true,
       multipleSelection: [],
       toggle: true,
@@ -607,6 +658,11 @@ export default {
       shopInfo: {},
       speList: {},
       speRecord: {},
+      sortrules: {
+        merchantClassifyId: [
+          { required: true, message: "店铺所属分类不能为空", trigger: "blur" },
+        ],
+      },
     };
   },
   mounted() {
@@ -725,7 +781,6 @@ export default {
       });
     },
     eventsChange(val) {
-      console.log(val);
       this.radioId = val.id;
     },
     /**
@@ -791,8 +846,6 @@ export default {
     },
 
     submitGg() {
-      console.log(this.dataTable);
-      console.log(this.dataTable.skuList);
       let params = {
         spuId: this.skuId,
         skuList: this.dataTable.skuList,
@@ -804,7 +857,6 @@ export default {
           this.getList();
         }
       });
-      console.log(params);
     },
 
     handRef(type, scope) {
@@ -821,6 +873,56 @@ export default {
     handleSelectionChange(val) {
       this.multipleSelection = val;
     },
+    sortSubmit() {
+      this.$refs["ruleSort"].validate((valid) => {
+        if (valid) {
+          let ids = [];
+          this.multipleSelection.forEach((e) => {
+            ids.push(e.id);
+          });
+          this.$confirm("是否批量添加店铺分类?", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          })
+            .then(() => {
+              batchEditCategory({
+                ids: ids.toString(),
+                merchantClassifyId: JSON.stringify(this.sort.merchantClassifyId),
+                merchantClassifyName: this.sort.merchantClassifyName,
+              }).then((res) => {
+                if (res.code == 200) {
+                  this.$message.success(`操作成功!`);
+                  this.getList();
+                  this.sortDialog = false;
+                }
+              });
+            })
+            .catch(() => {
+              this.$message({
+                type: "info",
+                message: "已取消操作",
+              });
+            });
+        } else {
+          return false;
+        }
+      });
+    },
+    handleSort() {
+      if (this.multipleSelection.length < 1) {
+        this.$message.error("请选择要添加的商品!");
+        return;
+      }
+      for (let index = 0; index < this.multipleSelection.length; index++) {
+        if (this.multipleSelection[index].saleModel != 1) {
+          this.$message.error("所选商品的销售模式必须为普通商品!");
+          return;
+        }
+      }
+      this.sortDialog = true;
+    },
+
     handleDelist() {
       if (this.multipleSelection.length < 1) {
         this.$message.error("请选择要下架的商品!");
@@ -888,7 +990,6 @@ export default {
       );
     },
     BatchRemove() {
-      console.log(this.multipleSelection);
       if (this.multipleSelection.length < 1) {
         this.$message.error("请选择要删除的商品!");
         return;
@@ -991,14 +1092,11 @@ export default {
           this.dataTable = params;
           this.dataTable = JSON.parse(JSON.stringify(this.dataTable));
           this.unit = record.unit;
-          console.log("1321231", this.dataTable);
           this.dialogVisible = true;
         }
       });
     },
     handleUpdate(record) {
-      console.log("1231231", record);
-
       if (record.scope == 2) {
         this.$message.error("特价商品不能编辑商品,请先取消特价!");
         return false;
@@ -1049,7 +1147,6 @@ export default {
     },
     categoryLazyLoad(node, resolve) {
       let level = node.level;
-      console.log(node);
       if (!node.data) {
         getClassificationListPage({ parentId: 0 }).then((res) => {
           //接口
@@ -1058,7 +1155,6 @@ export default {
             label: `${item.className}`,
             leaf: level >= 2,
           }));
-          console.log("111", node);
           // 通过调用resolve将子节点数据返回,通知组件数据加载完成
           resolve(nodes);
         });
@@ -1088,6 +1184,60 @@ export default {
         resolve({});
       }
     },
+    sortChange(val) {
+      let nodes = this.$refs["sortCascader"].getCheckedNodes();
+      this.sort.merchantClassifyName = nodes[0].label;
+    },
+
+    cascadermerchantChange(val) {
+      if (val.length == 1) {
+        this.queryParams.merchantClassifyId = val[0];
+      } else if (val.length == 2) {
+        this.queryParams.merchantClassifyId = val[1];
+      } else if (val.length == 3) {
+        this.queryParams.merchantClassifyId = val[2];
+      }
+    },
+    categoryLazyLoadUpdate(node, resolve) {
+      this.categoryLazyLoadmerchant(node, resolve, 1);
+    },
+
+    categoryLazyLoadmerchant(node, resolve, sortType) {
+      let params = {
+        classifyType: 1,
+      };
+      if (sortType) {
+        params.isDefault = 1;
+      }
+      let level = node.level;
+      if (!node.data) {
+        getMerchantClassifyList(params).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({});
+      }
+    },
   },
 };
 </script>

+ 15 - 5
src/views/product/module/basic-info.vue

@@ -29,7 +29,11 @@
       <el-col :span="24" v-if="form.saleType != 4 && shopInfo.scope == 1">
         <el-form-item prop="saleType">
           <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" :value="1">普通商品</el-radio>
             <el-radio :label="5" :value="5">新店福利</el-radio>
             <el-radio :label="3" :value="3">团批秒杀</el-radio>
@@ -38,7 +42,7 @@
           </el-radio-group>
         </el-form-item>
       </el-col>
-      <el-col :span="24" v-if="shopInfo.scope == 0 ">
+      <el-col :span="24" v-if="shopInfo.scope == 0">
         <el-form-item prop="saleModel">
           <span slot="label">销售模式</span>
           <el-radio-group v-model="form.saleModel" @change="passValue">
@@ -244,6 +248,7 @@ export default {
       shopInfo: {},
       categoryName: "",
       radio: "",
+      actionType: "",
     };
   },
   created() {
@@ -251,7 +256,12 @@ export default {
   },
 
   methods: {
-    getFormInfo(record) {
+    getFormInfo(record, type) {
+      if (type != "cg") {
+        this.actionType = "edit";
+      } else {
+        this.actionType = "";
+      }
       this.form.datePicker = [];
       this.form.categoryId = record.categoryId;
       this.form.categoryIds = record.categoryIds;
@@ -466,14 +476,14 @@ export default {
 </script>
 
 <style>
-.el-cascader-panel
+/* .el-cascader-panel
   > .el-scrollbar:first-child
   > .el-cascader-menu__wrap
   > .el-cascader-menu__list
   > .el-cascader-node
   > .el-radio {
   display: none;
-}
+} */
 /* .el-cascader-menu__wrap > .el-cascader-menu__list > .el-cascader-node > .el-radio {
     display: none;
   } */

+ 3 - 3
src/views/product/module/sales-info.vue

@@ -628,7 +628,7 @@ export default {
     categoryLazyLoad(node, resolve) {
       let level = node.level;
       if (!node.data) {
-        getMerchantClassifyList({ classifyType: 1 }).then((res) => {
+        getMerchantClassifyList({ classifyType: 1, isDefault: 1 }).then((res) => {
           //接口
           const nodes = Array.from(res.data).map((item, index) => ({
             value: item.id,
@@ -664,8 +664,8 @@ export default {
       let nodes = this.$refs.formCascader.getCheckedNodes();
       this.form.merchantClassifyName = nodes[0].label;
       this.form.merchantClassifyIds = val;
-      this.form.merchantClassifyId = val;
-      this.form.merchantClassifyId = `["${this.form.merchantClassifyId.join('", "')}"]`;
+      this.form.merchantClassifyId = JSON.stringify(val);
+      // this.form.merchantClassifyId = `["${this.form.merchantClassifyId.join('')}"]`;
       this.passValue();
     },
     getFormInfo(record) {

+ 3 - 3
src/views/product/updateProduct.vue

@@ -10,7 +10,7 @@
             ref="salesRefs"
             @updateValue="updateValue"
             @skuRemove="skuRemove"
-                 :saleModels="form.saleModel"
+            :saleModels="form.saleModel"
           ></salesInfo>
           <el-descriptions title="商品详情" column="1"> </el-descriptions>
           <productInfo ref="productRefs" @updateValue="updateValue"></productInfo>
@@ -315,7 +315,7 @@ export default {
             } else {
               this.$refs.salesRefs.setShowCom(true);
             }
-            this.$refs.basicRefs.getFormInfo(this.form);
+            this.$refs.basicRefs.getFormInfo(this.form, this.$route.query.type);
             this.$refs.salesRefs.getFormInfo(this.form);
             this.$refs.productRefs.getFormInfo(this.form);
           }
@@ -357,7 +357,7 @@ export default {
             } else {
               this.$refs.salesRefs.setShowCom(true);
             }
-            this.$refs.basicRefs.getFormInfo(this.form);
+            this.$refs.basicRefs.getFormInfo(this.form, this.$route.query.type);
             this.$refs.salesRefs.getFormInfo(this.form);
             this.$refs.productRefs.getFormInfo(this.form);
           }

+ 174 - 12
src/views/transmission/list/allProduct.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      label-width="140px"
     >
       <el-form-item label="商品名称" prop="spuName">
         <el-input
@@ -17,7 +17,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="分类" prop="categoryId">
+      <el-form-item label="商品分类" prop="categoryId">
         <el-cascader
           v-model="queryParams.categoryId"
           ref="formCascader"
@@ -28,6 +28,17 @@
         />
       </el-form-item>
 
+      <el-form-item label="店铺分类" prop="merchantClassifyId">
+        <el-cascader
+          v-model="queryParams.merchantClassifyId"
+          ref="formCascader"
+          placeholder="请选择分类"
+          :props="categorypropsmerchant"
+          style="width: 240px"
+          @change="cascadermerchantChange"
+        />
+      </el-form-item>
+
       <el-form-item label="商品状态" prop="spuStatus">
         <el-select
           v-model="queryParams.spuStatus"
@@ -92,6 +103,9 @@
             <el-dropdown-item @click.native="BatchRemove">批量删除</el-dropdown-item>
             <el-dropdown-item @click.native="handleExport">批量导出</el-dropdown-item>
             <el-dropdown-item @click.native="handleDelist">批量下架</el-dropdown-item>
+            <el-dropdown-item @click.native="handleSort"
+              >批量加入店铺分类</el-dropdown-item
+            >
           </el-dropdown-menu>
         </el-dropdown>
       </template>
@@ -121,10 +135,12 @@
         :show-overflow-tooltip="true"
       />
       <el-table-column label="分类" align="center" prop="categoryName" />
+      <el-table-column label="店铺所属分类" align="center" prop="merchantClassifyName" />
+
       <el-table-column label="价格" align="center" width="120">
         <template slot-scope="scope">
           {{ scope.row.lowestPrice.toFixed(2) }}/{{ scope.row.unit }}
-        </template> 
+        </template>
       </el-table-column>
 
       <el-table-column label="起批量" align="center">
@@ -382,6 +398,36 @@
         <el-button type="primary" @click="bargainSubmit">确 定</el-button>
       </span>
     </el-dialog>
+
+    <el-dialog
+      title="设置店铺分类"
+      :visible.sync="sortDialog"
+      :before-close="sortDialog == false"
+      :width="200"
+    >
+      <el-form
+        :model="sort"
+        :rules="sortrules"
+        ref="ruleSort"
+        label-width="100px"
+        class="demo-ruleForm"
+      >
+        <el-form-item label="店铺分类" prop="merchantClassifyId">
+          <el-cascader
+            v-model="sort.merchantClassifyId"
+            ref="sortCascader"
+            placeholder="请选择分类"
+            :props="updatemerchange"
+            style="width: 240px"
+            @change="sortChange"
+          />
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="sortDialog = false">取 消</el-button>
+        <el-button type="primary" @click="sortSubmit">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -395,8 +441,9 @@ import {
   goodsRemove,
   setLowPrice,
   cancelLowPrice,
+  batchEditCategory,
 } from "@/api/manage/product";
-
+import { getMerchantClassifyList } from "@/api/sort/index.js";
 import { promotionList, promotionSku } from "@/api/active/index";
 import { getClassificationListPage } from "@/api/common/index";
 import lookProduct from "../lookProduct.vue";
@@ -406,6 +453,10 @@ export default {
   name: "product",
   data() {
     return {
+      sort: {
+        merchantClassifyId: "",
+      },
+      sortDialog: false,
       // 遮罩层
       bargainVisible: false,
       loading: true,
@@ -437,6 +488,16 @@ export default {
         lazy: true,
         lazyLoad: this.categoryLazyLoad,
       },
+      updatemerchange: {
+        checkStrictly: true,
+        lazy: true,
+        lazyLoad: this.categoryLazyLoadUpdate,
+      },
+      categorypropsmerchant: {
+        checkStrictly: true,
+        lazy: true,
+        lazyLoad: this.categoryLazyLoadmerchant,
+      },
       activeShowBtn: true,
       multipleSelection: [],
       toggle: true,
@@ -448,6 +509,11 @@ export default {
       shopInfo: {},
       speList: {},
       speRecord: {},
+      sortrules: {
+        merchantClassifyId: [
+          { required: true, message: "店铺所属分类不能为空", trigger: "blur" },
+        ],
+      },
     };
   },
   mounted() {
@@ -566,7 +632,6 @@ export default {
       });
     },
     eventsChange(val) {
-      console.log(val);
       this.radioId = val.id;
     },
     /**
@@ -632,8 +697,6 @@ export default {
     },
 
     submitGg() {
-      console.log(this.dataTable);
-      console.log(this.dataTable.skuList);
       let params = {
         spuId: this.skuId,
         skuList: this.dataTable.skuList,
@@ -645,7 +708,6 @@ export default {
           this.getList();
         }
       });
-      console.log(params);
     },
 
     handRef(type, scope) {
@@ -662,6 +724,56 @@ export default {
     handleSelectionChange(val) {
       this.multipleSelection = val;
     },
+    sortSubmit() {
+      this.$refs["ruleSort"].validate((valid) => {
+        if (valid) {
+          let ids = [];
+          this.multipleSelection.forEach((e) => {
+            ids.push(e.id);
+          });
+          this.$confirm("是否批量添加店铺分类?", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          })
+            .then(() => {
+              batchEditCategory({
+                ids: ids.toString(),
+                merchantClassifyId: JSON.stringify(this.sort.merchantClassifyId),
+                merchantClassifyName: this.sort.merchantClassifyName,
+              }).then((res) => {
+                if (res.code == 200) {
+                  this.$message.success(`操作成功!`);
+                  this.getList();
+                  this.sortDialog = false;
+                }
+              });
+            })
+            .catch(() => {
+              this.$message({
+                type: "info",
+                message: "已取消操作",
+              });
+            });
+        } else {
+          return false;
+        }
+      });
+    },
+    handleSort() {
+      if (this.multipleSelection.length < 1) {
+        this.$message.error("请选择要添加的商品!");
+        return;
+      }
+      for (let index = 0; index < this.multipleSelection.length; index++) {
+        if (this.multipleSelection[index].saleModel != 1) {
+          this.$message.error("所选商品的销售方式必须为普通商品!");
+          return;
+        }
+      }
+      this.sortDialog = true;
+    },
+
     handleDelist() {
       if (this.multipleSelection.length < 1) {
         this.$message.error("请选择要下架的商品!");
@@ -729,7 +841,6 @@ export default {
       );
     },
     BatchRemove() {
-      console.log(this.multipleSelection);
       if (this.multipleSelection.length < 1) {
         this.$message.error("请选择要删除的商品!");
         return;
@@ -832,7 +943,6 @@ export default {
           this.dataTable = params;
           this.dataTable = JSON.parse(JSON.stringify(this.dataTable));
           this.unit = record.unit;
-          console.log("1321231", this.dataTable);
           this.dialogVisible = true;
         }
       });
@@ -888,7 +998,6 @@ export default {
     },
     categoryLazyLoad(node, resolve) {
       let level = node.level;
-      console.log(node);
       if (!node.data) {
         getClassificationListPage({ parentId: 0 }).then((res) => {
           //接口
@@ -897,7 +1006,6 @@ export default {
             label: `${item.className}`,
             leaf: level >= 2,
           }));
-          console.log("111", node);
           // 通过调用resolve将子节点数据返回,通知组件数据加载完成
           resolve(nodes);
         });
@@ -927,6 +1035,60 @@ export default {
         resolve({});
       }
     },
+    sortChange(val) {
+      let nodes = this.$refs["sortCascader"].getCheckedNodes();
+      this.sort.merchantClassifyName = nodes[0].label;
+    },
+
+    cascadermerchantChange(val) {
+      if (val.length == 1) {
+        this.queryParams.merchantClassifyId = val[0];
+      } else if (val.length == 2) {
+        this.queryParams.merchantClassifyId = val[1];
+      } else if (val.length == 3) {
+        this.queryParams.merchantClassifyId = val[2];
+      }
+    },
+    categoryLazyLoadUpdate(node, resolve) {
+      this.categoryLazyLoadmerchant(node, resolve, 1);
+    },
+
+    categoryLazyLoadmerchant(node, resolve, sortType) {
+      let params = {
+        classifyType: 1,
+      };
+      if (sortType) {
+        params.isDefault = 1;
+      }
+      let level = node.level;
+      if (!node.data) {
+        getMerchantClassifyList(params).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({});
+      }
+    },
   },
 };
 </script>

+ 2 - 2
src/views/transmission/module/basic-info.vue

@@ -387,14 +387,14 @@ export default {
 </style>
 
 <style scoped>
-.el-cascader-panel
+/* .el-cascader-panel
   > .el-scrollbar:first-child
   > .el-cascader-menu__wrap
   > .el-cascader-menu__list
   > .el-cascader-node
   > .el-radio {
   display: none;
-}
+} */
 .item {
   position: relative;
   margin-right: 10px;

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

@@ -358,15 +358,15 @@ export default {
       let nodes = this.$refs.formCascader.getCheckedNodes();
       this.form.merchantClassifyName = nodes[0].label;
       this.form.merchantClassifyIds = val;
-      this.form.merchantClassifyId = val;
-      this.form.merchantClassifyId = `["${this.form.merchantClassifyId.join('", "')}"]`;
+      this.form.merchantClassifyId = JSON.stringify(val);
+      // this.form.merchantClassifyId = `["${this.form.merchantClassifyId.join('", "')}"]`;
       this.passValue();
     },
 
     categoryLazyLoad(node, resolve) {
       let level = node.level;
       if (!node.data) {
-        getMerchantClassifyList({ classifyType: 0 }).then((res) => {
+        getMerchantClassifyList({ classifyType: 0, isDefault: 1 }).then((res) => {
           //接口
           const nodes = Array.from(res.data).map((item, index) => ({
             value: item.id,