This commit is contained in:
姜棚 2021-11-27 19:04:02 +08:00
parent bb93c1b999
commit 62ba91fbc6
4 changed files with 20 additions and 8 deletions

View File

@ -245,7 +245,7 @@ export default class add extends React.Component{
<div id="step1" className="step1">
<div className="plan-title">营销计划</div>
<Card style={{ width:'100%' }} title={this.state.step1_pagetitle}>
<Card style={{ width:'100%' }} title={this.state.step1_pagetitle } >
<Step1 ref="step1"/>
</Card>
</div>

View File

@ -32,7 +32,7 @@ export default class add extends React.Component{
step1_data:null,
step2_data:null,
step3_data:null,
disabled:false,
}
}
@ -60,6 +60,12 @@ export default class add extends React.Component{
componentDidMount(e){
console.log("测试编辑")
console.log(sessionStorage.getItem("plan_id"))
if(sessionStorage.getItem("plan_status") > 0)
{
this.setState({disabled:true})
}
let plan_id = sessionStorage.getItem("plan_id")
getDraftInfo(plan_id).then((res)=>{
handelResponse(res,(req,msg)=>{
@ -252,7 +258,7 @@ export default class add extends React.Component{
<div id="step1" className="step1">
<div className="plan-title">营销计划</div>
<Card style={{ width:'100%' }} title={this.state.step1_pagetitle}>
<Step1 ref="step1" data={this.state.step1_data} />
<Step1 ref="step1" data={this.state.step1_data} disabled={this.state.disabled} />
</Card>
</div>
@ -272,7 +278,7 @@ export default class add extends React.Component{
}>
<Step2 ref={"step2-"+ index} addNewkey ={()=>{this.addNewkey()}} data={item} />
<Step2 ref={"step2-"+ index} addNewkey ={()=>{this.addNewkey()}} data={item} disabled={this.state.disabled} />
</Card>
)
})
@ -286,7 +292,7 @@ export default class add extends React.Component{
this.state.card_visible ? (
<div id="step3" className="step3">
<Card style={{ width:'100%',height:"auto" }} title={this.state.step3_pagetitle}>
<Step3 ref="step3" data={this.state.step3_data} />
<Step3 ref="step3" data={this.state.step3_data} disabled={this.state.disabled} />
</Card>
</div>
) : null
@ -299,12 +305,12 @@ export default class add extends React.Component{
{
this.state.curstep == 3 ? (
<div className="step-btn-group">
<Button type="primary" onClick={()=>this.onNextStep()}>提交审核</Button>
<Button type="primary" onClick={()=>this.onNextStep()} disabled={this.state.disabled}>提交审核</Button>
<Button type="normal" onClick={()=>this.onReturn()}>取消</Button>
</div>
) :(
<div className="step-btn-group">
<Button type="primary" onClick={()=>this.onNextStep()}>下一步</Button>
<Button type="primary" onClick={()=>this.onNextStep()} disabled={this.state.disabled}>下一步</Button>
<Button type="normal" onClick={()=>this.onReturn()}>取消</Button>
</div>
)

View File

@ -196,6 +196,7 @@ export default class acclist extends React.Component{
<div id="step1">
<Form model={this.state.model} rules={rules} ref="form1">
<FormItem labelname="营销计划名称" prop="title" id="title">
<Ipt onChange={(e)=>{
let model2 = this.state.model;
model2.title = e;
@ -211,7 +212,11 @@ export default class acclist extends React.Component{
}}
value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'520px'} alignment={'left'}/>
</FormItem>
</FormItem>
<FormItem labelname="计划类型" prop="type" id="type">
<RadioGroup onChange={(e)=>{this.onTypeChange(e)}} value={this.state.model.type}>
<RadioButton value={1} disabled={true}>活动</RadioButton>

View File

@ -468,6 +468,7 @@ export default class acclist extends React.Component{
onEdit(e,row){
console.log("计划任务ID")
sessionStorage.setItem("plan_id",row.id)
sessionStorage.setItem("plan_status",row.status)
let link = window.location.href.replace(window.location.hash,"#/home/plan-edit");
window.open(link, "_blank")