suxinf 4 år sedan
förälder
incheckning
8d864ed5f3

+ 1 - 1
src/App.vue

@@ -36,7 +36,7 @@ export default {
     return {
       navTitle1: ' > 数据管理',
       navTitle2: '',
-      isManufacturer: 'distributor', // distributor 经销商 manufacturer 厂商
+      isManufacturer: 'manufacturer', // distributor 经销商 manufacturer 厂商
     }
   },
   methods: {

+ 1 - 1
src/views/data/UploadInfor.vue

@@ -240,7 +240,7 @@ export default {
       let dataObj = {
         queryParams: this.addByCustomize,
       };
-      console.log(this,dataObj, '自定义添加入参');
+      console.log(dataObj, '自定义添加入参');
       this.getAllDlr(dataObj);
     },
     // 按小组添加,增加小组

+ 9 - 5
src/views/parameter/LinkUpload.vue

@@ -113,14 +113,16 @@ export default {
     // 点击编辑
     edit(index, newCount) {
       let id = this.tableData[index]['id'];
-      this.updateGroupInfo(id, newCount).then(() => {
+      let publishPlatformId = this.optionList[index]['id'];
+      this.updateGroupInfo(id, newCount, publishPlatformId).then(() => {
         this.selectMediaPublishList();
       })
     },
     // 点击删除
     deleteData(index) {
       let id = this.tableData[index]['id'];
-      this.deleteGroupInfo(id).then(() => {
+      let publishPlatformId = this.optionList[index]['id'];
+      this.deleteGroupInfo(id, publishPlatformId).then(() => {
         this.selectMediaPublishList();
       })
     },
@@ -134,7 +136,7 @@ export default {
     slectPlatForm: function (e) {
       let index = e.target.options.selectedIndex;
       this.selectedplateForm = this.optionList[index];
-      let id = this.optionList[0]['id'];
+      let id = this.optionList[index]['id'];
       let req = { id };
       this.selectMediaPublishList(req);
     },
@@ -194,7 +196,7 @@ export default {
         });
     },
     // 编辑,接口
-    updateGroupInfo: function (id, publishCount) {
+    updateGroupInfo: function (id, publishCount, publishPlatformId) {
       return new Promise((resolve, reject) => {
         this.$http({
           method: "post",
@@ -202,6 +204,7 @@ export default {
           data: {
             id,
             publishCount,
+            publishPlatformId
           },
         })
           .then((res) => {
@@ -221,13 +224,14 @@ export default {
       });
     },
     // 删除 接口
-    deleteGroupInfo: function (id) {
+    deleteGroupInfo: function (id, publishPlatformId) {
       return new Promise((resolve, reject) => {
         this.$http({
           method: "post",
           url: "/sys/group/deleteGroupInfo",
           data: {
             id,
+            publishPlatformId
           },
         })
           .then((res) => {

+ 9 - 46
src/views/parameter/components/Grouping/GroupMemberModal.vue

@@ -7,10 +7,10 @@
           <div v-for="(item, index) in areaList" :key="index">
             <input
               type="checkbox"
-              :value="item.area"
+              :value="item"
               v-model="checkedBoxList"
               @click="clickCheckbox(index)"
-            /><span>{{ item.area }}</span>
+            /><span>{{ item }}</span>
           </div>
           <button @click.prevent="addByArea">添加</button>
         </div>
@@ -98,28 +98,7 @@ export default {
       sum: 0,
       pageSize: 10,
       currentPage: 1,
-      areaList: [
-        {
-          sign: "all",
-          area: "全区",
-        },
-        {
-          sign: "n",
-          area: "北区",
-        },
-        {
-          sign: "s",
-          area: "南区",
-        },
-        {
-          sign: "e",
-          area: "东区",
-        },
-        {
-          sign: "self",
-          area: "自定义分组",
-        },
-      ], // 按区域添加
+      areaList: [], // 按区域添加
       checkedBoxList: [],
       addByCustomize: "",
       tableData: [],
@@ -154,7 +133,7 @@ export default {
         localArea: this.checkedBoxList,
       };
       console.log(req);
-      this.getDataByArea(req);
+      this.getDlrData(req);
     },
     // 自定义添加
     addBySelf: function () {
@@ -249,34 +228,17 @@ export default {
         });
     },
     // 按区域查找进销商信息  接口
-    getDataByArea: function (data) {
+    getAreaList: function (data) {
       this.$http({
         method: "post",
         url: "/sys/agent/selectAgentAreaInfoList",
         data: data,
       })
         .then((res) => {
-          this.tableData = [];
-          this.AllDlr = [];
+          console.log(res);
           if (res.data && res.data.code === 200) {
-            // 整合数据, 主要目的是加一个 flag,在用户点击筛选的时候,好判断
-            res.data.data.forEach((item) => {
-              this.AllDlr.push({
-                id: item.id,
-                dlrCode: item.dlrCode,
-                dlrName: item.dlrName,
-                localArea: item.localArea,
-                flag: true,
-              });
-            });
-            this.sum = res.data.count;
-            this.tableData = this.AllDlr.slice(0, this.pageSize);
-            // 获取自定义添加datalist下拉框的值
-            this.dlrList = [];
-            this.AllDlr.forEach((item) => {
-              this.dlrList.push(item.dlrName);
-              this.dlrList.push(item.dlrCode);
-            });
+            this.areaList = res.data.data;
+            console.log(this.areaList);
           } else {
             console.log(res);
           }
@@ -288,6 +250,7 @@ export default {
   },
   created() {
     this.getDlrData();
+    this.getAreaList();
   },
 };
 </script>