Commit 937ca322 by s_guodong

修复bug

parent 132cc69e
......@@ -18,6 +18,7 @@ const Step = Steps.Step;
componentWillMount()
{
//提交报文
let user = sessionStorage.getItem("j_username")
let datas = {MSGTYP:this.props.extra.msgtyp.substring(2).toUpperCase(),SNDKEY:this.props.sndkey,MCTSWTID:this.props.extra.mctid}
//取出20,21
let tags = this.props.swift_message_tree.Tags
......@@ -29,7 +30,7 @@ const Step = Steps.Step;
datas.F21=tags[1].tagValue[1]
ServiceAPI.saveMessage(
// {
// smhinr:this.props.extra.smhinr,
// sf2msg:this.props.swift_message,
// datas:{
......@@ -37,22 +38,22 @@ const Step = Steps.Step;
// sndkey:this.props.rcv_bic
// }
// }
`smhinr=${this.props.extra.smhinr?this.props.extra.smhinr:''}&user=${this.props.extra.mctid||"NONE" }&sf2msg=${encodeURIComponent(this.props.swift_message)}`
`smhinr=${this.props.extra.smhinr?this.props.extra.smhinr:''}&user=${user||"NONE" }&sf2msg=${encodeURIComponent(this.props.swift_message)}`
).then(data=>{
if(typeof data=='string')
{
data = JSON.parse(data)
}
if(data.errorCode == '0000')
this.setState({isOK:0})
this.setState({isOK:0})
else
this.setState({isOK:0,error:"保存失败!"})
this.setState({isOK:0,error:"保存失败!"})
}).catch(reason=>{
console.log(reason)
this.setState({isOK:0,error:'保存失败!'})
});
}
render()
{
......@@ -61,7 +62,7 @@ const Step = Steps.Step;
<Col span={3}/>
<Col span={18}>
{
this.props.params.kind=='0'?
this.props.params.kind=='0'?
<Steps current={2}>
<Step title="报文编辑" description="编辑报文栏位值" />
<Step title="预览报文" description="预览报文" />
......@@ -90,11 +91,11 @@ const Step = Steps.Step;
</Col>
<Col span={3}></Col>
</Row>
</div>
)
}
}
}
const mapStateToProps = (state) => {
const {swift_message,extra,snd_bic_info,swift_message_tree} = state.swift;
......@@ -109,4 +110,4 @@ function mapDispatchToProps(dispatch) {
};
}
export default connect(mapStateToProps, mapDispatchToProps)(Result)
\ No newline at end of file
export default connect(mapStateToProps, mapDispatchToProps)(Result)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment