This commit is contained in:
姜棚 2021-11-28 13:10:26 +08:00
parent 870aac783e
commit 47706f0c97
4 changed files with 20 additions and 10 deletions

View File

@ -176,3 +176,7 @@ resize: none;
border: none!important; border: none!important;
} }
.zent-btn-primary.zent-btn-disabled.zent-btn
{
background-color: #B8BCC2 !important;
}

View File

@ -60,7 +60,8 @@ export default class add extends React.Component{
componentDidMount(e){ componentDidMount(e){
console.log("测试编辑") console.log("测试编辑")
console.log(sessionStorage.getItem("plan_id")) console.log(sessionStorage.getItem("plan_id"))
if(sessionStorage.getItem("plan_status") == 4) let plan_status = sessionStorage.getItem("plan_status");
if(plan_status == 3 ||plan_status == 4|| plan_status == 5 )
{ {
this.setState({disabled:true}) this.setState({disabled:true})
} }

View File

@ -116,6 +116,7 @@ export default class acclist extends React.Component{
distdata3:[], distdata3:[],
distdata11:[], distdata11:[],
tableHeight:600, tableHeight:600,
disabled:false,
email:"", email:"",
key_word:'', key_word:'',
phone:"", phone:"",
@ -329,6 +330,11 @@ onEditRow(status,row){
componentWillMount(){ componentWillMount(){
this.setState({tableHeight:window.innerHeight-390}); this.setState({tableHeight:window.innerHeight-390});
if(sessionStorage.getItem("key_plan_status")==6)
{
this.setState({disabled:true})
}
} }
phoneChange=(e)=> phoneChange=(e)=>
@ -539,7 +545,7 @@ onChangeCombinedDate(e){
<div id="exchangecodelist"> <div id="exchangecodelist">
<TabPage slot={date} tabs={this.state.tabList} tabChange={this.tabFn.bind(this)}> <TabPage slot={date} tabs={this.state.tabList} tabChange={this.tabFn.bind(this)}>
<p className="codetable dflexj"> <p className="codetable dflexj">
<Button type="primary" icon="plus" onClick={this.clickFn.bind(this)}>新建key</Button> <Button type="primary" icon="plus" onClick={this.clickFn.bind(this)} disabled={this.state.disabled} >新建key</Button>
{/* <Button type="info">批量操作</Button> */} {/* <Button type="info">批量操作</Button> */}
<Ipt icon="search" placeholder={"请输入key批次ID进行匹配查询"} onChange={(e)=>this.setState({key_word:e})} value={this.state.key_word} wordSearch={this.iptsureFn.bind(this)} countShow={false} height={'36px'} width={'260px'} onClearItem={(e)=>{this.setState({key_word:''})}} alignment={'left'} /> <Ipt icon="search" placeholder={"请输入key批次ID进行匹配查询"} onChange={(e)=>this.setState({key_word:e})} value={this.state.key_word} wordSearch={this.iptsureFn.bind(this)} countShow={false} height={'36px'} width={'260px'} onClearItem={(e)=>{this.setState({key_word:''})}} alignment={'left'} />
</p> </p>

View File

@ -259,6 +259,7 @@ export default class acclist extends React.Component{
sessionStorage.setItem('breaknav',JSON.stringify(arr)); sessionStorage.setItem('breaknav',JSON.stringify(arr));
sessionStorage.setItem('linkshowname',"营销计划管理"); sessionStorage.setItem('linkshowname',"营销计划管理");
sessionStorage.setItem("key_plan_id",row.id) sessionStorage.setItem("key_plan_id",row.id)
sessionStorage.setItem("key_plan_status",row.status)
this.props.history.push('/home/key-list'); this.props.history.push('/home/key-list');
} }
menuItemClick(e,key,row){ menuItemClick(e,key,row){
@ -479,10 +480,12 @@ export default class acclist extends React.Component{
onEdit(e,row){ onEdit(e,row){
console.log("计划任务ID") console.log("计划任务ID")
if(row.status == 2 || row.status == 6)
if(row.status == 6 ||row.status == 0)
{ {
Notify.error("不可编辑")
return;
}
sessionStorage.setItem("plan_id",row.id) sessionStorage.setItem("plan_id",row.id)
sessionStorage.setItem("plan_status",row.status) sessionStorage.setItem("plan_status",row.status)
let link = window.location.href.replace(window.location.hash,"#/home/plan-edit"); let link = window.location.href.replace(window.location.hash,"#/home/plan-edit");
@ -495,11 +498,7 @@ export default class acclist extends React.Component{
sessionStorage.setItem('breaknav',JSON.stringify(arr)); sessionStorage.setItem('breaknav',JSON.stringify(arr));
sessionStorage.setItem('linkshowname',"营销计划管理"); sessionStorage.setItem('linkshowname',"营销计划管理");
}
else{
Notify.error("不可编辑此行")
}
} }
render(){ render(){