Преглед изворни кода

团队管理:编辑团队,绑定团队管理当前团队。

shipeng пре 1 недеља
родитељ
комит
e2bf601028

+ 0 - 3
src/views/order/groupBuyingMr/index.vue

@@ -684,7 +684,6 @@ export default {
         teamId: id
       })
       .then(response => {
-        console.log(response,'111111');
         this.nameList = response.data.rows;
       }).catch(()=>{
         this.nameList = []
@@ -918,7 +917,6 @@ export default {
           } catch(err) {
             console.error('获取余额信息失败', err)
           }
-          console.log(res.data,'res.data.corporate');
           this.getTeamList(res.data.teamId);
           this.$set(this.form,'payerId',res.data.teamId)
           if(res.data.corporate && JSON.stringify(res.data.corporate) != '{}'){
@@ -952,7 +950,6 @@ export default {
         },
         handleCorporatePayClose(){
           this.$set(this.form,'photoList',[])
-          console.log('1111');
           this.corporatePayLoading = false;
           this.showCorporatePay = false;
         },

+ 8 - 2
src/views/team/teamMr/dialog/addAndEdit.vue

@@ -308,6 +308,7 @@ export default {
       teamListTime: null,
       teamListLoading: null,
       isDisabled: false,
+      rowId: "",
     };
   },
   methods: {
@@ -351,7 +352,12 @@ export default {
           checkStatus: 1
         })
         .then(response => {
-            this.teamList = response.data.rows;
+            let teamArr = response.data.rows || []
+            if(teamArr.length != 0) {
+              this.teamList = teamArr.filter(ele => ele.id != this.rowId)
+            } else {
+              this.teamList = []
+            }
             this.teamListLoading = false;
           }
         ).catch(()=>{
@@ -396,6 +402,7 @@ export default {
       const id = row.id
       getSelectById(id).then(response => {
         const obj = response.data;
+        this.rowId = obj.id;
         if(obj.bindTeamId) {
           let index = obj.bindTeamName.indexOf("(");
           let resVal = index === -1 ? obj.bindTeamName : obj.bindTeamName.substring(0, index); 
@@ -448,7 +455,6 @@ export default {
     // 团队解绑 // bindTeamName
     removeBind() {
       removeBindApi(this.form.id).then(res => {
-        console.log(res,'res');
         if(res.code === 200) {
           this.$message.success("解绑成功!");
           this.$set(this.form, 'bindTeamId', '');