This commit is contained in:
姜棚 2021-11-24 20:04:54 +08:00
parent 0bbaeba3e4
commit e52e549344
7 changed files with 35 additions and 17 deletions

View File

@ -147,6 +147,13 @@ export const planSend = (id, params) => {
return req('put', baseurl + "/plan/send/" + id, params) return req('put', baseurl + "/plan/send/" + id, params)
} }
//重新修改手机号邮箱
export const planReceive = (id, params) => {
return req('put', baseurl + "/plan/receive/" + id, params)
}
//重新发送key批次压缩包和压缩包密码 //重新发送key批次压缩包和压缩包密码
export const planResend = (id, params) => { export const planResend = (id, params) => {
return req('put', baseurl + "/plan/resend/" + id, params) return req('put', baseurl + "/plan/resend/" + id, params)

View File

@ -6,7 +6,7 @@ const menu={
case 1:return '进行中';break; case 1:return '进行中';break;
case -1:return '暂停';break; case -1:return '暂停';break;
case 2:return '已结束';break; case 2:return '已结束';break;
case 3:return '已作废';break; case 5:return '已作废';break;
} }
}, },
exchangeStatusBg(params) { exchangeStatusBg(params) {
@ -15,7 +15,7 @@ const menu={
case 1:return '#3575C7';break; case 1:return '#3575C7';break;
case -1:return '#F6C041';break; case -1:return '#F6C041';break;
case 2:return '#43A65D';break; case 2:return '#43A65D';break;
case 3:return '#DC4F40';break; case 5:return '#DC4F40';break;
} }
}, },
//订单状态 //订单状态

View File

@ -33,6 +33,7 @@ import Menu from "../menu/main.js"
this.setState({selectedMenu:seleted}) this.setState({selectedMenu:seleted})
this.setState({text:seleted.name}) this.setState({text:seleted.name})
this.setState({menuShow:false}) this.setState({menuShow:false})
this.props.onSelect()
//点击选择菜单 //点击选择菜单
console.log(888,id); console.log(888,id);
} }

View File

@ -55,6 +55,12 @@ import FilterSelect from "../filterSelect/main.js"
this.setState({showItemList:this.state.showItemList}) this.setState({showItemList:this.state.showItemList})
} }
onSelect(e){
console.log(111111)
this.props.onSelect(e)
}
//隐藏菜单 //隐藏菜单
hideMenu (e,id) { hideMenu (e,id) {
this.setState({menuShow:false}) this.setState({menuShow:false})
@ -67,7 +73,7 @@ import FilterSelect from "../filterSelect/main.js"
{ {
this.state.showItemList.map((item,index)=>{ this.state.showItemList.map((item,index)=>{
return( return(
<FilterSelect data={item} onClose={(e,id)=>{this.onCloseSelect(e,id)}} key={index}> <FilterSelect data={item} onClose={(e,id)=>{this.onCloseSelect(e,id)}} onSelect={(e)=>{this.onSelect(e)}} key={index}>
</FilterSelect> </FilterSelect>
) )
}) })

View File

@ -118,6 +118,7 @@ export default class acclist extends React.Component{
key_word:'', key_word:'',
status:0, status:0,
tableHeight:600, tableHeight:600,
tabIndex:0,
} }
} }
clickFn(){ clickFn(){
@ -169,7 +170,7 @@ export default class acclist extends React.Component{
sessionStorage.setItem('breaknav',JSON.stringify(activerou)); sessionStorage.setItem('breaknav',JSON.stringify(activerou));
} }
tabFn(index){ tabFn(index){
this.setState({tabIndex:index})
this.getCodeListFn({},index); this.getCodeListFn({},index);
} }
//page //page
@ -368,7 +369,7 @@ componentDidUpdate(prevProps,prevState){
} }
if(com == "switch") if(com == "switch")
{ {
return <Switch size="small" checked={rowData.status==0?false:true} onChange={(e)=>this.changestatus(e,rowData)}></Switch>; return <Switch size="small" checked={rowData.status==0?false:true} onChange={(e)=>this.changestatus(e,rowData)} disabled={rowData.status == 4 ||rowData.status == 5 } ></Switch>;
} }
if(com == "status") if(com == "status")
{ {
@ -378,10 +379,10 @@ componentDidUpdate(prevProps,prevState){
{ {
return <div> return <div>
{ {
rowData.status!=2|| rowData.status!=3?<span className="grid-link" onClick={(e)=>this.editinfo(e,rowData)}>编辑</span>:null rowData.status!=4 && rowData.status!=5?<span className="grid-link" onClick={(e)=>this.editinfo(e,rowData)}>编辑</span>:<span></span>
} }
{ {
rowData.status!=2|| rowData.status!=3? <span className="grid-link" onClick={(e)=>this.delFn(e,rowData)} >作废</span>:null rowData.status!=4 && rowData.status!=5? <span className="grid-link" onClick={(e)=>this.delFn(e,rowData)} >作废</span>:<span style={{"padding-left":"10px"}}></span>
} }
{/* <span className="grid-link" >复制</span> */} {/* <span className="grid-link" >复制</span> */}
</div> </div>

View File

@ -318,6 +318,7 @@ export default class acclist extends React.Component{
quantity: [ quantity: [
{ type: "required", message: "请输入key数量"}, { type: "required", message: "请输入key数量"},
{ type: "regExp", message: "请输入正整数",reg:"^([1-9][0-9]*){1,3}$"},
], ],
bind_object: [ bind_object: [

View File

@ -9,7 +9,7 @@ import Ipt from "../../../components/input/main"
import Grid from "../../../components/gird/main.js" import Grid from "../../../components/gird/main.js"
import TabPage from "../../../components/tabPage/main.js" import TabPage from "../../../components/tabPage/main.js"
import Filterbar from "../../../components/filterbar/main.js" import Filterbar from "../../../components/filterbar/main.js"
import {getPlanList,handelResponse,startOrStopPlan,getAllEnum,resKeyEmail,planSend,putKeyEmail} from "../../../assets/api.js" import {getPlanList,handelResponse,startOrStopPlan,getAllEnum,resKeyEmail,planSend,planResend,planReceive} from "../../../assets/api.js"
import _ from "lodash"; import _ from "lodash";
import menu from "../../../assets/enum.js" import menu from "../../../assets/enum.js"
const PAGE_SIZE_OPTIONS = [10, 20, 30]; const PAGE_SIZE_OPTIONS = [10, 20, 30];
@ -24,7 +24,7 @@ export default class acclist extends React.Component{
limit:10, limit:10,
tabList:[{title:"营销计划列表"}], tabList:[{title:"营销计划列表"}],
distdata:[{title:'士大夫大师傅'}], distdata:[{title:'士大夫大师傅'}],
filterList:[{id:0,label:"状态",menuList:[{id:0,name:"创建中"},{id:1,name:"审核中"},{id:2,name:"生效中"},{id:3,name:"暂停中"},{id:4,name:"已失效"},{id:5,name:"待生效"}]}, filterList:[{id:0,label:"状态",menuList:[{id:0,name:"草稿"},{id:1,name:"审核中"},{id:2,name:"生效中"},{id:3,name:"暂停中"},{id:4,name:"已失效"},{id:5,name:"待生效"}]},
], ],
menuList:[{id:0,name:"状态",check:false}] menuList:[{id:0,name:"状态",check:false}]
} }
@ -142,7 +142,7 @@ export default class acclist extends React.Component{
"type":"sms" "type":"sms"
} }
resKeyEmail(row.id,data).then((res)=>{ planResend(row.id,data).then((res)=>{
handelResponse(res,(req,msg)=>{ handelResponse(res,(req,msg)=>{
Notify.success("更改状态成功") Notify.success("更改状态成功")
@ -158,7 +158,7 @@ export default class acclist extends React.Component{
"type":"email" "type":"email"
} }
resKeyEmail(row.id,data).then((res)=>{ planResend(row.id,data).then((res)=>{
handelResponse(res,(req,msg)=>{ handelResponse(res,(req,msg)=>{
Notify.success("更改状态成功") Notify.success("更改状态成功")
@ -197,7 +197,7 @@ export default class acclist extends React.Component{
} }
putKeyEmail(plan_id,data).then((res)=>{ planReceive(plan_id,data).then((res)=>{
handelResponse(res,(req,msg)=>{ handelResponse(res,(req,msg)=>{
Notify.success("发送成功") Notify.success("发送成功")
this.closeDialog(1) this.closeDialog(1)
@ -241,7 +241,7 @@ export default class acclist extends React.Component{
} }
console.log(phone) console.log(phone)
putKeyEmail(plan_id,data).then((res)=>{ planReceive(plan_id,data).then((res)=>{
handelResponse(res,(req,msg)=>{ handelResponse(res,(req,msg)=>{
Notify.success("发送成功") Notify.success("发送成功")
this.closeDialog(1) this.closeDialog(1)
@ -260,7 +260,9 @@ export default class acclist extends React.Component{
}); });
} }
} }
onFilter(e){
console.log(e)
}
render(){ render(){
const { current, pageSize } = this.state; const { current, pageSize } = this.state;
@ -359,7 +361,7 @@ export default class acclist extends React.Component{
<Button type="primary" icon="plus" onClick={this.clickFn.bind(this)}>新建营销计划</Button> <Button type="primary" icon="plus" onClick={this.clickFn.bind(this)}>新建营销计划</Button>
{/* <Button type="info">批量操作</Button> */} {/* <Button type="info">批量操作</Button> */}
</p> </p>
<Filterbar filterList={this.state.filterList} menuList={this.state.menuList}></Filterbar> <Filterbar filterList={this.state.filterList} menuList={this.state.menuList} onSelect={(e)=>{this.onFilter(e)}}></Filterbar>
<div> <div>
<Grid <Grid
spliteColor={'#fff'} spliteColor={'#fff'}
@ -391,7 +393,7 @@ export default class acclist extends React.Component{
} }
if(com == "switch") if(com == "switch")
{ {
return <Switch size="small" checked={rowData.status} onChange={(e)=>{this.onSwitchChange(e,rowData)}}></Switch>; return <Switch size="small" checked={rowData.open} onChange={(e)=>{this.onSwitchChange(e,rowData)}}></Switch>;
} }
if(com == "status") if(com == "status")
{ {