更新营销计划审批流
This commit is contained in:
parent
6fa3fa3479
commit
bcb4fdf215
|
@ -21,7 +21,7 @@ export default class topNav extends React.Component{
|
|||
showlinkmenu(e,item){
|
||||
let self=this;
|
||||
try{
|
||||
item.child.forEach(item=>{
|
||||
item.children.forEach(item=>{
|
||||
if(item.level ===5){
|
||||
sessionStorage.setItem('pathname2',item.router);
|
||||
throw '终止循环'
|
||||
|
@ -30,11 +30,11 @@ export default class topNav extends React.Component{
|
|||
}catch(e){
|
||||
}
|
||||
self.setState({'linkshowname':item.title});
|
||||
self.setState({'menulinklist':item.child});
|
||||
self.setState({'menulinklist':item.children});
|
||||
|
||||
|
||||
// 防止刷新页面,导航签清空
|
||||
sessionStorage.setItem('menulinklist',JSON.stringify(item.child));
|
||||
sessionStorage.setItem('menulinklist',JSON.stringify(item.children));
|
||||
sessionStorage.setItem('showflag',true);
|
||||
sessionStorage.setItem('linkshowname',item.title);
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ export default class topNav extends React.Component{
|
|||
{
|
||||
this.state.navlists.map((item,i)=>{
|
||||
return (
|
||||
item.child&&item.child.length>0?<Link key={i} to={item.router} style={this.state.linkshowname==item.title?{width:"#100%",background:"#f2f4f7",color:'#296bef'}:null} className={this.state.linkshowname==item.title?'active':''} onClick={(e)=>this.showlinkmenu(e,item)} >{item.title}</Link>:null
|
||||
item.children&&item.children.length>0?<Link key={i} to={item.router} style={this.state.linkshowname==item.title?{width:"#100%",background:"#f2f4f7",color:'#296bef'}:null} className={this.state.linkshowname==item.title?'active':''} onClick={(e)=>this.showlinkmenu(e,item)} >{item.title}</Link>:null
|
||||
|
||||
)
|
||||
})
|
||||
|
@ -95,7 +95,7 @@ export default class topNav extends React.Component{
|
|||
<div className="linkmenu-row" >
|
||||
{
|
||||
this.state.menulinklist.map((item,key)=>{
|
||||
return(item.level==5?<Link key={key} to={item.router} onClick={()=>this.btnfn(item)} className={pathnameBreak==item.router&&item.child.length>=1?'menuactive':''}>{item.title}</Link>:null)
|
||||
return(item.level==5?<Link key={key} to={item.router} onClick={()=>this.btnfn(item)} className={pathnameBreak==item.router&&item.children.length>=1?'menuactive':''}>{item.title}</Link>:null)
|
||||
}) }
|
||||
</div>
|
||||
<span>数据最后更新时间:{window.timeshow}</span>
|
||||
|
|
|
@ -46,21 +46,16 @@ function FormDom(props) {
|
|||
|
||||
//首次进来进行商品获取
|
||||
getProductList();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sessionStorage.setItem('showflag',true);
|
||||
sessionStorage.setItem('showflag',true);
|
||||
let menuList=response.menu;
|
||||
if(response.menu&&response.menu.length>0){
|
||||
sessionStorage.setItem('activeMenu',JSON.stringify(response.menu));
|
||||
try{
|
||||
menuList.forEach(item=>{
|
||||
if(item.child&&item.child.length>0){
|
||||
let obj=item.child.filter(item=>item.level==5);
|
||||
if(item.children&&item.children.length>0){
|
||||
let obj=item.children.filter(item=>item.level==5);
|
||||
sessionStorage.setItem('pathname2',obj[0].router);
|
||||
sessionStorage.setItem('menulinklist',JSON.stringify(item.child));
|
||||
sessionStorage.setItem('menulinklist',JSON.stringify(item.children));
|
||||
if(item.id==16){
|
||||
sessionStorage.setItem('linkshowname',"营销计划管理");
|
||||
setTimeout(()=>{
|
||||
|
|
|
@ -32,7 +32,7 @@ const Column = [
|
|||
type: "normal",
|
||||
width:'100px'
|
||||
}, {
|
||||
title: '兑换码-批次ID',
|
||||
title: 'key-批次ID',
|
||||
name: 'key_batch_id',
|
||||
prop:'key_batch_id',
|
||||
type: "normal",
|
||||
|
|
|
@ -295,139 +295,32 @@ export default class acclist extends React.Component{
|
|||
return
|
||||
}
|
||||
|
||||
|
||||
if(key == 1)
|
||||
{
|
||||
let data ={
|
||||
"type":"sms"
|
||||
}
|
||||
|
||||
planResend(row.id,data).then((res)=>{
|
||||
planIsSend(row.id).then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
|
||||
Notify.success("发送成功")
|
||||
|
||||
},(err)=>{
|
||||
Notify.error(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
if(key == 2)
|
||||
{
|
||||
let data ={
|
||||
"type":"email"
|
||||
}
|
||||
|
||||
planResend(row.id,data).then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
|
||||
Notify.success("发送成功")
|
||||
},(err)=>{
|
||||
Notify.error(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
if(key == 3)
|
||||
{
|
||||
let email = ""
|
||||
let self = this;
|
||||
openDialog({
|
||||
closeBtn:true,
|
||||
dialogId: 1, // id is used to close the dialog
|
||||
title: '请输入接收邮箱',
|
||||
children: <Input placeholder="请输入接收邮箱" onChange={self.emailChange}></Input>,
|
||||
footer: <Button onClick={() => {
|
||||
|
||||
|
||||
if(this.state.email=="")
|
||||
{
|
||||
Notify.clear();
|
||||
Notify.error("接收邮箱不能为空")
|
||||
return
|
||||
}else{
|
||||
let reg=/^[A-Za-z0-9\u4e00-\u9fa5\.]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
|
||||
if(!reg.test(this.state.email)){
|
||||
Notify.clear();
|
||||
Notify.error("接收邮箱格式不正确")
|
||||
}else{
|
||||
let plan_id = row.id
|
||||
let data ={
|
||||
type:"email",
|
||||
to: this.state.email
|
||||
}
|
||||
|
||||
|
||||
planReceive(plan_id,data).then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
Notify.success("发送成功")
|
||||
closeDialog(1)
|
||||
},(err)=>{
|
||||
Notify.error(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}}>发送</Button>,
|
||||
onClose() {
|
||||
console.log('outer dialog closed');
|
||||
},
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if(key == 4)
|
||||
{
|
||||
let phone = ""
|
||||
let self = this
|
||||
openDialog({
|
||||
closeBtn:true,
|
||||
dialogId: 2, // id is used to close the dialog
|
||||
title: '请输入接收手机',
|
||||
children: <Input placeholder="请输入接收手机号" onChange={self.phoneChange}></Input>,
|
||||
footer: <Button onClick={
|
||||
()=>{
|
||||
if(this.state.phone=="")
|
||||
{
|
||||
Notify.clear();
|
||||
Notify.error("接收手机号不能为空")
|
||||
return
|
||||
}else{
|
||||
let reg=/^[1][3,4,5,6,7,8,9][0-9]{9}$/;
|
||||
if(!reg.test(self.state.phone)){
|
||||
Notify.clear()
|
||||
Notify.error("接收手机号格式不正确")
|
||||
}else{
|
||||
let plan_id = row.id
|
||||
let data ={
|
||||
type:"sms",
|
||||
to: this.state.phone
|
||||
}
|
||||
console.log(phone)
|
||||
|
||||
planReceive(plan_id,data).then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
Notify.success("发送成功")
|
||||
closeDialog(2)
|
||||
},(err)=>{
|
||||
Notify.error(err)
|
||||
})
|
||||
this.setState({cur_item:row})
|
||||
getReseller(row.reseller_id).then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
this.setState({phone_list:req.contact_phone})
|
||||
this.setState({email_list:req.contact_email})
|
||||
this.setState({audit_visible:true})
|
||||
|
||||
},(err)=>{
|
||||
Notify.error(err)
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}>发送</Button>,
|
||||
onClose() {
|
||||
console.log('outer dialog closed');
|
||||
},
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
//清空
|
||||
clearFn(){
|
||||
|
|
Loading…
Reference in New Issue