浏览代码

渠道人员家庭成员信息管理 设置时不能多选bug

wangguangping 3 年之前
父节点
当前提交
a8c9be4071
共有 1 个文件被更改,包括 45 次插入32 次删除
  1. 45 32
      src/pages/main/memberFamily/haveInHand.vue

+ 45 - 32
src/pages/main/memberFamily/haveInHand.vue

@@ -202,7 +202,7 @@
                     param.time ? param.endTime = this.$formatDate(param.time[1], "YYYY-MM-DD") : '';
                     param.dutyList = [];
                     for (let i = 0; i < this.treeListp.length; i++) {
-                        console.log(this.treeListp[i].loginNoStr)
+                        
                         if(this.treeListp[i].loginNoStr){
                             param.dutyList.push({
                                 dutyNo: this.treeListp[i].loginNoStr,
@@ -219,17 +219,30 @@
                             fillName: this.treeList[i].label,
                         })
                     }
-                    for (let i = 0; i < this.treeList.length; i++) {
-                        for (let ii = 0; ii < this.treeListp.length; ii++) {
-                            if (this.treeListp[i].loginNoStr == this.treeList[ii].receiveNo) {
+                    // for (let i = 0; i < this.treeList.length; i++) {
+                    //     for (let ii = 0; ii < this.treeListp.length; ii++) {
+                    //         console.log(this.treeList);
+                    //         if (this.treeListp[i].loginNoStr == this.treeList[ii].receiveNo) {
+                    //             this.$message({
+                    //                 message: '负责人和填报人重复!',
+                    //                 type: 'error'
+                    //             });
+                    //             return
+                    //         }
+                    //     }
+                    // }
+                    this.treeList.forEach(item=>{
+                        this.treeListp.forEach(n=>{
+                            if(n.loginNoStr == item.receiveNo){
                                 this.$message({
                                     message: '负责人和填报人重复!',
                                     type: 'error'
                                 });
                                 return
                             }
-                        }
-                    }
+                        })
+                    })
+
                     let url = '';
                     if (this.companyFlag == 0) {
                         url = '/market/cMemberWo/saveMkMemberWoByProv';
@@ -242,31 +255,31 @@
                         // param.initiatorName = this.choone.receiverName;
                         // param.initiatorNo = this.choone.receiverNo;
                     }
-                    this.$http({
-                        url: url,
-                        method: "post",
-                        headers: {
-                            "Content-Type": "application/json",
-                        },
-                        data: param,
-                    }).then((res) => {
-                        if (res.data.result === 1) {
-                            _this.$message({
-                                message: res.data.desc,
-                                type: 'error'
-                            });
-                        } else {
-                            _this.$message({
-                                message: '成功',
-                                type: 'success'
-                            });
-                            _this.infolist = {};
-                            _this.treeList = [];
-                            _this.treeListp = [];
-                            _this.dialogStatus = false;
-                            _this.getList({}, 1);
-                        }
-                    });
+                    // this.$http({
+                    //     url: url,
+                    //     method: "post",
+                    //     headers: {
+                    //         "Content-Type": "application/json",
+                    //     },
+                    //     data: param,
+                    // }).then((res) => {
+                    //     if (res.data.result === 1) {
+                    //         _this.$message({
+                    //             message: res.data.desc,
+                    //             type: 'error'
+                    //         });
+                    //     } else {
+                    //         _this.$message({
+                    //             message: '成功',
+                    //             type: 'success'
+                    //         });
+                    //         _this.infolist = {};
+                    //         _this.treeList = [];
+                    //         _this.treeListp = [];
+                    //         _this.dialogStatus = false;
+                    //         _this.getList({}, 1);
+                    //     }
+                    // });
                 } else if (v === 2) {
                     this.infolist = {};
                     this.treeList = [];
@@ -346,7 +359,7 @@
                     this.treeListp.splice(x, 1)
                 } else {
                     this.treeListp.push(v);
-                    console.log(this.treeListp)
+                    // console.log(this.treeListp)
                 }
             },
             jumpfw(v) {