Commit e7906289 by fukai

手工拟报支持与国结直接集成

parent c276bf94
......@@ -4,7 +4,7 @@ const api = new Api({
baseURI: window.serviceURL,
headers: {
'Accept': 'application/json',
"Content-Type": "application/x-www-form-urlencoded"
"Content-Type": "application/json"
}
})
......
......@@ -17,7 +17,7 @@
<script src="./ie-lt10-support.js"></script>
<script>
window.serviceURL="./service";
window.serviceURL="/webapi/frontend/msgeditor/service";
window.CUR =[
'AUD',
'CHF',
......
......@@ -28,6 +28,12 @@ const Step = Steps.Step;
if(tags.length > 1 && tags[1].tag == '21')
datas.F21=tags[1].tagValue[1]
let tempStr = JSON.stringify(window.templateObject)
let argdata = {
smhinr:this.props.extra.smhinr||'',
user:this.props.extra.mctid||"NONE",
sf2msg:this.props.swift_message,
msgtre:tempStr
}
ServiceAPI.saveMessage(
// {
......@@ -38,7 +44,7 @@ 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)}&sf2temp=${encodeURIComponent(tempStr)}`
argdata
).then(data=>{
if(typeof data=='string')
{
......
......@@ -416,7 +416,7 @@ export class SWFPage extends Component
:null
}
{/* <TempSaver getTemplateJSON={this.saveTemp} mty={mty} mctid={this.props.extra.mctid} style={{marginRight:'1em',width:'8em'}}/> */}
<TempSaver getTemplateJSON={this.saveTemp} mty={mty} mctid={this.props.extra.mctid} style={{marginRight:'1em',width:'8em'}}/>
<br/>
<br/>
......
......@@ -4,7 +4,7 @@ import API from "../api"
export default class ServiceAPI{
static getSMH(smhinr){
return API.get("",{params:{action:'getsmh',smhinr}})
return API.post("",{params:{action:'getsmh'},data:{smhinr}})
}
static getBIC(biccod,bicnam)
{
......@@ -13,7 +13,7 @@ export default class ServiceAPI{
data.biccod = biccod
if(bicnam)
data.bicnam = bicnam
return API.get("",{params:{action:'getbic',...data}})
return API.post("",{params:{action:'getbic'},data})
}
static getBIC_JZ(biccod,bicnam)
{
......@@ -22,7 +22,7 @@ export default class ServiceAPI{
data.biccod = biccod
if(bicnam)
data.bicnam = bicnam
return API.get("",{params:{action:'getbic_jz',...data}})
return API.post("",{params:{action:'getbic_jz'},data})
}
static saveMessage(data) //拼接好的报文相关数据
{
......@@ -34,6 +34,6 @@ export default class ServiceAPI{
}
static getTemplate(sf2temp_inr)
{
return API.post("",{params:{action:'getmtm',sf2temp_inr}})
return API.post("",{params:{action:'getmtm'},data:{sf2temp_inr}})
}
}
......@@ -43,7 +43,7 @@ export default class TemplateSaver extends Component{
this.setState({ loading: true });
//调用模板保存API
let tempJsn = this.props.getTemplateJSON()
let json = {...vals,sf2temp:tempJsn,mty:this.props.mty,user:this.props.mctid||'NONE'}
let json = {...vals,msgtre:tempJsn,mty:this.props.mty,user:this.props.mctid||'NONE'}
console.log(json)
ServiceAPI.saveTemplate(json).then(data=>{
if(typeof data=='string')
......
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