审批调整细节
This commit is contained in:
parent
364d2d6c30
commit
74c72edc35
|
@ -1012,7 +1012,6 @@ export default class exchangedit extends React.Component{
|
||||||
<div className="audit">
|
<div className="audit">
|
||||||
<div className="modal"> </div>
|
<div className="modal"> </div>
|
||||||
<div className="audit-box" >
|
<div className="audit-box" >
|
||||||
<Icon type="close" className="audit-close" onClick={(e)=>{this.setState({approvalLoading:false})}} />
|
|
||||||
<div className="audit-box-title">撤销审批中</div>
|
<div className="audit-box-title">撤销审批中</div>
|
||||||
<div className="audit-box-txt">
|
<div className="audit-box-txt">
|
||||||
正在发起撤销...,请等待 <span style={{color:"red"}}> {this.state.timer}</span> 秒
|
正在发起撤销...,请等待 <span style={{color:"red"}}> {this.state.timer}</span> 秒
|
||||||
|
|
|
@ -7,7 +7,7 @@ import Step1 from "./step1.js"
|
||||||
import Step2 from "./step2.js"
|
import Step2 from "./step2.js"
|
||||||
import Step3 from "./step3.js"
|
import Step3 from "./step3.js"
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import {addPlanStep,handelResponse,getReseller,planSend,getDraftInfo,putPlanStep,uploadImg,getApprovalsInfo,approvals,terminateApprovals,getApprovalsStatus} from "../../../assets/api.js"
|
import {getThemeChoice,addPlanStep,handelResponse,getReseller,planSend,getDraftInfo,putPlanStep,uploadImg,getApprovalsInfo,approvals,terminateApprovals,getApprovalsStatus} from "../../../assets/api.js"
|
||||||
|
|
||||||
export default class add extends React.Component{
|
export default class add extends React.Component{
|
||||||
constructor(props){
|
constructor(props){
|
||||||
|
@ -42,6 +42,7 @@ export default class add extends React.Component{
|
||||||
payment_direction:["对私账户","对公账户","预付款扣除"],
|
payment_direction:["对私账户","对公账户","预付款扣除"],
|
||||||
approvalLoading:false,
|
approvalLoading:false,
|
||||||
timer:3,
|
timer:3,
|
||||||
|
theme_options:[]
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,7 +80,7 @@ export default class add extends React.Component{
|
||||||
let approval_id = sessionStorage.getItem("approval_id")
|
let approval_id = sessionStorage.getItem("approval_id")
|
||||||
|
|
||||||
//获取审批接口的编辑信息
|
//获取审批接口的编辑信息
|
||||||
if(approval_id !=0)
|
if(approval_id > 0)
|
||||||
{
|
{
|
||||||
getApprovalsInfo(approval_id).then((res)=>{
|
getApprovalsInfo(approval_id).then((res)=>{
|
||||||
handelResponse(res,(req,msg)=>{
|
handelResponse(res,(req,msg)=>{
|
||||||
|
@ -110,9 +111,25 @@ export default class add extends React.Component{
|
||||||
},500)
|
},500)
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
if(req.theme)
|
||||||
this.setState({card_visible : true})
|
{
|
||||||
|
|
||||||
|
|
||||||
|
let theme_data ={
|
||||||
|
|
||||||
|
theme_id:req.theme.theme_id,
|
||||||
|
use:req.theme.theme_data.use,
|
||||||
|
link:req.theme.theme_data.link,
|
||||||
|
list:req.theme.theme_data.list
|
||||||
|
|
||||||
}
|
}
|
||||||
|
this.getThemeData();
|
||||||
|
console.log("样式数据",theme_data)
|
||||||
|
this.setState({step3_data:theme_data})
|
||||||
|
this.setState({card_visible : true})
|
||||||
|
this.setState({curstep:3})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},(err)=>{
|
},(err)=>{
|
||||||
Notify.error(err)
|
Notify.error(err)
|
||||||
|
@ -296,6 +313,23 @@ export default class add extends React.Component{
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getThemeData(){
|
||||||
|
|
||||||
|
getThemeChoice().then((res)=>{
|
||||||
|
handelResponse(res,(req,msg)=>{
|
||||||
|
let arr = _.map(req,(o)=>{
|
||||||
|
let obj = {};
|
||||||
|
obj.key = o.id;
|
||||||
|
obj.text = o.title
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
|
||||||
|
this.setState({theme_options:arr})
|
||||||
|
},(err)=>{
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
addNewkey(){
|
addNewkey(){
|
||||||
let step = "step2-" + this.state.keys.length
|
let step = "step2-" + this.state.keys.length
|
||||||
this.state.keys.push(step)
|
this.state.keys.push(step)
|
||||||
|
@ -535,7 +569,7 @@ export default class add extends React.Component{
|
||||||
this.state.card_visible ? (
|
this.state.card_visible ? (
|
||||||
<div id="step3" className="step3">
|
<div id="step3" className="step3">
|
||||||
<Card style={{ width:'100%',height:"auto" }} title={this.state.step3_pagetitle}>
|
<Card style={{ width:'100%',height:"auto" }} title={this.state.step3_pagetitle}>
|
||||||
<Step3 ref="step3" data={this.state.step3_data} disabled={this.state.disabled} />
|
<Step3 ref="step3" data={this.state.step3_data} options={this.state.theme_options} disabled={this.state.disabled} />
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
) : null
|
) : null
|
||||||
|
@ -565,7 +599,7 @@ export default class add extends React.Component{
|
||||||
<div className="audit">
|
<div className="audit">
|
||||||
<div className="modal"> </div>
|
<div className="modal"> </div>
|
||||||
<div className="audit-box" >
|
<div className="audit-box" >
|
||||||
<Icon type="close" className="audit-close" onClick={(e)=>{this.onReturn(e)}} />
|
<Icon type="close" className="audit-close" onClick={(e)=>{this.setState({audit_visible:false})}} />
|
||||||
<div className="audit-box-title">提交审核</div>
|
<div className="audit-box-title">提交审核</div>
|
||||||
<div className="payType">
|
<div className="payType">
|
||||||
|
|
||||||
|
@ -577,7 +611,7 @@ export default class add extends React.Component{
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="audit-btn-group">
|
<div className="audit-btn-group">
|
||||||
<Button onClick={(e)=>{this.onReturn(e)}}>取消</Button>
|
<Button onClick={(e)=>{this.setState({audit_visible:false})}}>取消</Button>
|
||||||
<Button type="primary" onClick={(e)=>{this.onConfirm(e)}} >确定</Button>
|
<Button type="primary" onClick={(e)=>{this.onConfirm(e)}} >确定</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -615,11 +649,11 @@ export default class add extends React.Component{
|
||||||
<div className="audit">
|
<div className="audit">
|
||||||
<div className="modal"> </div>
|
<div className="modal"> </div>
|
||||||
<div className="audit-box" >
|
<div className="audit-box" >
|
||||||
<Icon type="close" className="audit-close" onClick={(e)=>{this.onReturn(e)}} />
|
|
||||||
<div className="audit-box-title">撤销审批中</div>
|
<div className="audit-box-title">撤销审批中</div>
|
||||||
<div className="audit-box-txt">
|
<div className="audit-box-txt">
|
||||||
正在发起撤销...,请等待{this.state.timer}秒
|
正在发起撤销...,请等待<span style={{color:"red"}}> {this.state.timer}</span>秒
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
):null
|
):null
|
||||||
|
|
|
@ -15,6 +15,12 @@ const TabPanel = Tabs.TabPanel;
|
||||||
export default class acclist extends React.Component{
|
export default class acclist extends React.Component{
|
||||||
constructor(props){
|
constructor(props){
|
||||||
super(props)
|
super(props)
|
||||||
|
console.log(props)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.state={
|
this.state={
|
||||||
model:{ //数据模型不可少
|
model:{ //数据模型不可少
|
||||||
"theme_id":"",
|
"theme_id":"",
|
||||||
|
@ -22,8 +28,12 @@ export default class acclist extends React.Component{
|
||||||
"use": 1,
|
"use": 1,
|
||||||
"link": 3,
|
"link": 3,
|
||||||
},
|
},
|
||||||
options:[]
|
select_theme:null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount(e){
|
componentDidMount(e){
|
||||||
|
@ -44,6 +54,19 @@ export default class acclist extends React.Component{
|
||||||
})
|
})
|
||||||
|
|
||||||
this.setState({options:arr})
|
this.setState({options:arr})
|
||||||
|
|
||||||
|
if(this.props.data && this.props.data.theme_id)
|
||||||
|
{
|
||||||
|
this.setState({theme_id:this.props.data.theme_id})
|
||||||
|
|
||||||
|
let selctobj = this.state.options.find(o=>o.key == this.props.data.theme_id)
|
||||||
|
|
||||||
|
let model = this.state.model;
|
||||||
|
model.theme_id = selctobj
|
||||||
|
this.setState({model:model})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},(err)=>{
|
},(err)=>{
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -101,7 +124,7 @@ export default class acclist extends React.Component{
|
||||||
edit(data)
|
edit(data)
|
||||||
{
|
{
|
||||||
let model={ //数据模型不可少
|
let model={ //数据模型不可少
|
||||||
"theme_id": data.theme_id,
|
"theme_id":192 ,
|
||||||
"list": data.list,
|
"list": data.list,
|
||||||
"use": data.use,
|
"use": data.use,
|
||||||
"link": data.link
|
"link": data.link
|
||||||
|
|
|
@ -121,6 +121,8 @@ export default class acclist extends React.Component{
|
||||||
temp.push(req.code_batch[i])
|
temp.push(req.code_batch[i])
|
||||||
}
|
}
|
||||||
//获取审批单信息
|
//获取审批单信息
|
||||||
|
if(approval_id > 0)
|
||||||
|
{
|
||||||
getApprovalsInfo(approval_id).then((res)=>{
|
getApprovalsInfo(approval_id).then((res)=>{
|
||||||
handelResponse(res,(req,msg)=>{
|
handelResponse(res,(req,msg)=>{
|
||||||
|
|
||||||
|
@ -141,6 +143,8 @@ export default class acclist extends React.Component{
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let model = {
|
let model = {
|
||||||
style: req.style,
|
style: req.style,
|
||||||
|
@ -478,8 +482,11 @@ export default class acclist extends React.Component{
|
||||||
|
|
||||||
|
|
||||||
onReCall(){
|
onReCall(){
|
||||||
|
|
||||||
let approval_id = sessionStorage.getItem("approval_id")
|
let approval_id = sessionStorage.getItem("approval_id")
|
||||||
this.setState({recall_visible:false})
|
this.setState({recall_visible:false})
|
||||||
|
if(approval_id > 0)
|
||||||
|
{
|
||||||
terminateApprovals(approval_id).then((res)=>{
|
terminateApprovals(approval_id).then((res)=>{
|
||||||
handelResponse(res,(req,msg)=>{
|
handelResponse(res,(req,msg)=>{
|
||||||
this.setState({approvalLoading:true})
|
this.setState({approvalLoading:true})
|
||||||
|
@ -497,6 +504,9 @@ export default class acclist extends React.Component{
|
||||||
Notify.error(err)
|
Notify.error(err)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmit(){
|
onSubmit(){
|
||||||
|
@ -510,6 +520,8 @@ export default class acclist extends React.Component{
|
||||||
{
|
{
|
||||||
this.setState({audit_visible:false})
|
this.setState({audit_visible:false})
|
||||||
let approval_id = sessionStorage.getItem("approval_id")
|
let approval_id = sessionStorage.getItem("approval_id")
|
||||||
|
if(approval_id > 0)
|
||||||
|
{
|
||||||
getApprovalsStatus(approval_id).then((res)=>{
|
getApprovalsStatus(approval_id).then((res)=>{
|
||||||
handelResponse(res,(req,msg)=>{
|
handelResponse(res,(req,msg)=>{
|
||||||
if(req.status == 0)
|
if(req.status == 0)
|
||||||
|
@ -559,9 +571,35 @@ export default class acclist extends React.Component{
|
||||||
Notify.error(err)
|
Notify.error(err)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
let selection = this.refs.bindObj.getSelectData()
|
||||||
|
console.log("选中对象")
|
||||||
|
console.log(selection)
|
||||||
|
let formdata = selection.filter((item)=>{
|
||||||
|
return !item.hasOwnProperty("disabled") || item.disabled == false
|
||||||
|
})
|
||||||
|
|
||||||
|
let id = sessionStorage.getItem("keybatch_id")
|
||||||
|
let data = {
|
||||||
|
code_batch:formdata,
|
||||||
|
"reseller_id":this.state.reseller.id,
|
||||||
|
"reseller_name":this.state.reseller.name,
|
||||||
|
"company_name":this.state.reseller.company_name,
|
||||||
|
"receive_email":this.state.reseller.contact_email[0],
|
||||||
|
"payment_direction":this.state.payment_direction[this.state.paytype - 1],
|
||||||
|
}
|
||||||
|
putKeyBatchDetail(id,data).then((res)=>{
|
||||||
|
handelResponse(res,(req,msg)=>{
|
||||||
|
Notify.success("更新key成功");
|
||||||
|
setTimeout(()=>{
|
||||||
|
window.history.back()
|
||||||
|
},1000);
|
||||||
|
},(err)=>{
|
||||||
|
Notify.error(err)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(this.refs.form1.validator())
|
if(this.refs.form1.validator())
|
||||||
|
@ -1246,7 +1284,7 @@ export default class acclist extends React.Component{
|
||||||
<div className="audit">
|
<div className="audit">
|
||||||
<div className="modal"> </div>
|
<div className="modal"> </div>
|
||||||
<div className="audit-box" >
|
<div className="audit-box" >
|
||||||
<Icon type="close" className="audit-close" onClick={(e)=>{this.onReturn(e)}} />
|
<Icon type="close" className="audit-close" onClick={(e)=>{this.setState({audit_visible:false})}} />
|
||||||
<div className="audit-box-title">提交审核</div>
|
<div className="audit-box-title">提交审核</div>
|
||||||
<div className="payType">
|
<div className="payType">
|
||||||
|
|
||||||
|
@ -1258,7 +1296,7 @@ export default class acclist extends React.Component{
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="audit-btn-group">
|
<div className="audit-btn-group">
|
||||||
<Button onClick={(e)=>{this.onReturn(e)}}>取消</Button>
|
<Button onClick={(e)=>{this.setState({audit_visible:false})}}>取消</Button>
|
||||||
<Button type="primary" onClick={(e)=>{this.onConfirm(e)}} >确定</Button>
|
<Button type="primary" onClick={(e)=>{this.onConfirm(e)}} >确定</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1298,7 +1336,7 @@ export default class acclist extends React.Component{
|
||||||
<Icon type="close" className="audit-close" onClick={(e)=>{this.setState({approvalLoading:false})}} />
|
<Icon type="close" className="audit-close" onClick={(e)=>{this.setState({approvalLoading:false})}} />
|
||||||
<div className="audit-box-title">撤销审批中</div>
|
<div className="audit-box-title">撤销审批中</div>
|
||||||
<div className="audit-box-txt">
|
<div className="audit-box-txt">
|
||||||
正在发起撤销...,请等待{this.state.timer}秒
|
正在发起撤销...,请等待<span style={{color:"red"}}> {this.state.timer}</span>秒
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue