Commit 9ad3ec0c by fukai

去除template按钮,增加n9x业务编号校验

parent e7906289
......@@ -174,12 +174,12 @@ export class LeadPage extends Component
<Col span={3}>
<Affix offsetTop={100}>
<div style={{textAlign:'right'}}>
<Button type="primary" title="Return" style={{marginRight:'1em',width:'8em'}} >
{/* <Button type="primary" title="Return" style={{marginRight:'1em',width:'8em'}} >
<a onClick={ () => {
this.props.history.push(`entry/${this.props.params.mctid ? this.props.params.mctid : ''}`)
} }
>Go Back</a>
</Button>
</Button> */}
</div>
</Affix>
</Col>
......
......@@ -63,6 +63,14 @@ export class SWFPage extends Component
rs.hasError = true
console.log(item.tag)
console.log(item.tagValue)
}else{
if("20" == item.tag && item.tagValue[1] && (/\d9\d/g.test(mty))){
ServiceAPI.checkOwnref(item.tagValue[1]).then(rtnmsg=>{
if(rtnmsg.errorCode != "0000"){
notification.warn({description:'the reference  does not exist,please confirm!',message:'Warn'})
}
})
}
}
}else if(item.cyclist)
......@@ -234,10 +242,17 @@ export class SWFPage extends Component
if(data.txt)
data = data.txt
data = JSON.parse(data)
if(typeof data=='string')
{
data = JSON.parse(data)
}
this.props.actions.updateRcvBic({rcv_bic:data.rcv_bic_info.rcv_bic})
let tree = data.swift_message_tree
if(typeof tree=='string')
{
tree = JSON.parse(tree)
tree = JSON.parse(tree.sf2temp).swift_message_tree
}
this.props.actions.initSwiftMessageTree(tree);
}).catch(err=>{
console.log(err)
......@@ -416,9 +431,9 @@ export class SWFPage extends Component
:null
}
<TempSaver getTemplateJSON={this.saveTemp} mty={mty} mctid={this.props.extra.mctid} style={{marginRight:'1em',width:'8em'}}/>
<br/>
{/* <TempSaver getTemplateJSON={this.saveTemp} mty={mty} mctid={this.props.extra.mctid} style={{marginRight:'1em',width:'8em'}}/>
<br/>
<br/> */}
{
!this.isdirect?
......
......@@ -36,4 +36,7 @@ export default class ServiceAPI{
{
return API.post("",{params:{action:'getmtm'},data:{sf2temp_inr}})
}
static checkOwnref(ownref){
return API.post("",{params:{action:'checkownref'},data:{sf2msg:ownref}})
}
}
......@@ -25,7 +25,7 @@ export default class T20 extends Component
let day = new Date()
let dayWrapper = moment(day)
let mty=this.props.mty.substring(2).substring(0,3)
let ref="BW"+mty+dayWrapper.format("X")+random.string(1);
let ref='';
//console.log("ref-->"+ref)
if (this.props.value){
......
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