Commit 937ca322 by s_guodong

修复bug

parent 132cc69e
...@@ -18,6 +18,7 @@ const Step = Steps.Step; ...@@ -18,6 +18,7 @@ const Step = Steps.Step;
componentWillMount() 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} let datas = {MSGTYP:this.props.extra.msgtyp.substring(2).toUpperCase(),SNDKEY:this.props.sndkey,MCTSWTID:this.props.extra.mctid}
//取出20,21 //取出20,21
let tags = this.props.swift_message_tree.Tags let tags = this.props.swift_message_tree.Tags
...@@ -29,7 +30,7 @@ const Step = Steps.Step; ...@@ -29,7 +30,7 @@ const Step = Steps.Step;
datas.F21=tags[1].tagValue[1] datas.F21=tags[1].tagValue[1]
ServiceAPI.saveMessage( ServiceAPI.saveMessage(
// { // {
// smhinr:this.props.extra.smhinr, // smhinr:this.props.extra.smhinr,
// sf2msg:this.props.swift_message, // sf2msg:this.props.swift_message,
// datas:{ // datas:{
...@@ -37,22 +38,22 @@ const Step = Steps.Step; ...@@ -37,22 +38,22 @@ const Step = Steps.Step;
// sndkey:this.props.rcv_bic // 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=>{ ).then(data=>{
if(typeof data=='string') if(typeof data=='string')
{ {
data = JSON.parse(data) data = JSON.parse(data)
} }
if(data.errorCode == '0000') if(data.errorCode == '0000')
this.setState({isOK:0}) this.setState({isOK:0})
else else
this.setState({isOK:0,error:"保存失败!"}) this.setState({isOK:0,error:"保存失败!"})
}).catch(reason=>{ }).catch(reason=>{
console.log(reason) console.log(reason)
this.setState({isOK:0,error:'保存失败!'}) this.setState({isOK:0,error:'保存失败!'})
}); });
} }
render() render()
{ {
...@@ -61,7 +62,7 @@ const Step = Steps.Step; ...@@ -61,7 +62,7 @@ const Step = Steps.Step;
<Col span={3}/> <Col span={3}/>
<Col span={18}> <Col span={18}>
{ {
this.props.params.kind=='0'? this.props.params.kind=='0'?
<Steps current={2}> <Steps current={2}>
<Step title="报文编辑" description="编辑报文栏位值" /> <Step title="报文编辑" description="编辑报文栏位值" />
<Step title="预览报文" description="预览报文" /> <Step title="预览报文" description="预览报文" />
...@@ -90,11 +91,11 @@ const Step = Steps.Step; ...@@ -90,11 +91,11 @@ const Step = Steps.Step;
</Col> </Col>
<Col span={3}></Col> <Col span={3}></Col>
</Row> </Row>
</div> </div>
) )
} }
} }
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
const {swift_message,extra,snd_bic_info,swift_message_tree} = state.swift; const {swift_message,extra,snd_bic_info,swift_message_tree} = state.swift;
...@@ -109,4 +110,4 @@ function mapDispatchToProps(dispatch) { ...@@ -109,4 +110,4 @@ function mapDispatchToProps(dispatch) {
}; };
} }
export default connect(mapStateToProps, mapDispatchToProps)(Result) export default connect(mapStateToProps, mapDispatchToProps)(Result)
\ No newline at end of file
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