Commit fc8c09bf by 陈浩建

分销员(PC端完成缺二维码,未在链接上新增分销员参数)

parent 5f234d6e
......@@ -38,7 +38,9 @@ let unlockUser = (params) => postAction(prefix + "/userDeploy/unlockUser" , para
// 锁定账户
let lockUser = (params) => postAction(prefix + "/userDeploy/lockUser" , params);
let pushFxyList = (params) => postAction(prefix + "/school/partner/pushFxyList" , params);
export {
findByList,modify,getlistysm,addPartner,getSubstList,getSchoolList,getXzUserList,
getRoleList,exportUserList,deleteUser,unlockUser,lockUser
getRoleList,exportUserList,deleteUser,unlockUser,lockUser,pushFxyList
}
......@@ -297,8 +297,8 @@
<a-modal :title="titleName" :visible="modifyvisibleFXY" @ok="createFXYOk" @cancel="createCancel" html-type="submit" width="720px">
<a-button @click="handleTabsAdd()" style="margin-left: 8px" icon="plus" type="primary">新增分销商</a-button>
<a-button @click="handleTabRemove()" style="margin-left: 8px" icon="close" type="primary">删除当前分销商</a-button>
<a-tabs name="tab" refs="tab">
<a-tab-pane :key="item" v-for="item in fxyList">
<a-tabs name="tab" ref="tabs" @tabClick="handleTabClick">
<a-tab-pane :key="item" :name="item" v-for="item in fxyList">
<span slot="tab">{{ modifyFormFXY.name+item }}</span>
<div id="qrcodeImg"></div>
</a-tab-pane>
......@@ -314,7 +314,7 @@
import {
findByList,modify,getlistysm,getRoleList,
addPartner,getSubstList,getSchoolList,getXzUserList,
exportUserList,deleteUser, lockUser, unlockUser
exportUserList,deleteUser, lockUser, unlockUser,pushFxyList
} from "../../../api/school-center/PartnerManagementAPI"
import {cloneObject,exportFile} from '@/utils/util'
import treecheck from '@/components/sysmanage/treeCheck'
......@@ -723,21 +723,41 @@
this.fxyList = data.fxs==""?[]:data.fxs.split(",");
this.modifyvisibleFXY = true;
},
handleTabsAdd(){
this.fxyList.length
if(this.fxyList.length>=5){
this.$message.info("分销商不得超过5个",2);
return;
}
this.fxyList.push("");
let i=1;
for (i=1;i<=5;i++){
if(this.fxyList.indexOf(i) == -1){
this.fxyList.push(i);
break;
}
}
this.$refs.tabs.activeKey = i;
this.setFxyList()
},
handleTabClick(name){
this.$refs.tabs.activeKey = name;
},
handleTabRemove(){
debugger
this.$refs.tab
let index = this.fxyList.indexOf(this.$refs.tabs.activeKey);
this.fxyList.splice(index,1);
this.$refs.tabs.activeKey = this.fxyList[0];
this.setFxyList()
},
setFxyList(){
pushFxyList({id:this.modifyFormFXY.id,fxy:this.fxyList.sort().toString()}).then(res =>{
if (res.state == 'success') {
this.$message.success("分销商更新成功",2);
}
});
},
createFXYOk(){
this.modifyvisibleFXY = false;
this.search();
},
createCancel(){
this.addUser=false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment