Commit fe4a9b52 by qiuxia

新增保函部分交易修改结汇界面

parent d1cedf35
import React,{Component,Fragment} from 'react'
import PropTypes from 'prop-types'
import {Page,Validator,Notification,FormItem,DatePickerItem,TextAreaItem,CheckboxItem,Checkbox,
InputItem,Input,Bind,SelectItem,Button,Label,Image,Table} from '@/components/Common-Library'
InputItem,Input,Bind,SelectItem,Button,Label,Image,Table,Steps} from '@/components/Common-Library'
import Api from '@/service/api'
import mInflid from '../model'
import CodeTableFactory from '@/components/CodeTable'
import "./index.less"
import { inject, observer } from 'mobx-react'
import { action, observable,runInAction } from 'mobx'
import Basic from './Basic'
import { Card } from 'antd'
const CodeTable = CodeTableFactory.getInstance()
const StepItem = Steps.Item
@inject('UserContext')
......@@ -34,6 +37,9 @@ export default class InflidScreen extends Page
super(props)
this.model = new mInflid()
this.bind = Bind.bind(this)
this.state = {
flag: true
}
}
async componentWillMount()
......@@ -57,187 +63,19 @@ export default class InflidScreen extends Page
this.model.stopMonitor&&this.model.stopMonitor()//关闭校验
}
litmod_lidlstHeader=[
{
title:<Label itext="业务编号" />,
dataIndex:"ownref",
key:"ownref",
width:100,
sorter: (r1,r2)=>ColSorter(r1.ownref,r2.ownref),
},
{
title:<Label itext="摘要" />,
dataIndex:"nam",
key:"nam",
width:100,
sorter: (r1,r2)=>ColSorter(r1.nam,r2.nam),
},
{
title:<Label itext="开立日期" />,
dataIndex:"opndat",
key:"opndat",
width:100,
sorter: (r1,r2)=>ColSorter(r1.opndat,r2.opndat),
},
{
title:<Label itext="闭卷日期" />,
dataIndex:"clsdat",
key:"clsdat",
width:100,
sorter: (r1,r2)=>ColSorter(r1.clsdat,r2.clsdat),
},
{
title:<Label itext="溢短装" />,
dataIndex:"nomtop",
key:"nomtop",
width:100,
sorter: (r1,r2)=>ColSorter(r1.nomtop,r2.nomtop),
},
{
title:<Label itext="信用证类型" />,
dataIndex:"lcrtyp",
key:"lcrtyp",
width:100,
sorter: (r1,r2)=>ColSorter(r1.lcrtyp,r2.lcrtyp),
},
{
title:<Label itext="机构" />,
dataIndex:"ownbch",
key:"ownbch",
width:100,
sorter: (r1,r2)=>ColSorter(r1.ownbch,r2.ownbch),
},
]
//按钮事件
onLitmod_sel= ()=>{
this.formBlur=true //已触发表单提交处理
Validator.validate(this.model,this.model.descriptor,async(errors,values)=>{
if(errors)
return
const rtnmsg = await Api.post('inflid/litmod_sel',{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
Notification.success({message:'数据提交成功!'})
}
else
{
Notification.error({message:'服务端请求失败!'})
}
//余下逻辑处理
})
}
onLitmod_choose= ()=>{
this.formBlur=true //已触发表单提交处理
Validator.validate(this.model,this.model.descriptor,async(errors,values)=>{
if(errors)
return
const rtnmsg = await Api.post('inflid/litmod_choose',{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
Notification.success({message:'数据提交成功!'})
}
else
{
Notification.error({message:'服务端请求失败!'})
}
//余下逻辑处理
})
}
//交易内实现
renderPage(){
const bind = this.bind
const {i18n} = this.props
return (
<div className="transPage">
<Label itext="Own Reference" trn="inflid" />
<InputItem InputProps={bind("infcon_seaownref")} maxLength={16} desp="Own Reference for search" path="/infcon/seaownref" />
<Label itext="Name" trn="inflid" />
<InputItem InputProps={bind("infcon_nam")} maxLength={40} desp="Name" path="/infcon/nam" />
<Button type="primary" onClick={this.onInfbut_searow} desp="Search" path="/infbut/searow">
<Label itext="&Search"/>
</Button>
<Label itext="Party Reference" trn="inflid" />
<InputItem InputProps={bind("infcon_searef")} maxLength={16} desp="External Reference for search" path="/infcon/searef" />
<Label itext="Role" trn="inflid" />
<SelectItem InputProps={bind("infcon_searol")} desp="Role" path="/infcon/searol"/>
<Button type="primary" onClick={this.onInfbut_dsp} desp="Display" path="/infbut/dsp">
<Label itext="D&isplay"/>
</Button>
<Label itext="Select Single Party" trn="inflid" />
<InputItem InputProps={bind("pty_extkey")} maxLength={16} desp="客户号" path="/infcon/pty/extkey" />
<Label itext="Status" trn="inflid" />
<SelectItem InputProps={bind("infcon_seasta")} code={CodeTable.seasta} desp="Status" path="/infcon/seasta"/>
<Button type="primary" onClick={this.onInfbut_userow} desp="Use" path="/infbut/userow">
<Label itext="&Use"/>
</Button>
<Label itext="Party Name/BIC" trn="inflid" />
<InputItem InputProps={bind("infcon_seapty")} maxLength={24} desp="Party Name/BIC" path="/infcon/seapty" />
<Label itext="Currency" trn="inflid" />
<SelectItem InputProps={bind("infcon_seacur")} desp="Currency" path="/infcon/seacur"/>
<Button type="primary" onClick={this.onInfbut_clr} desp="Clear" path="/infbut/clr">
<Label itext="&Clear"/>
</Button>
<Label itext="Opening between" trn="inflid" />
<DatePickerItem InputProps={bind("infcon_opndatfrom")} desp="Open Date from" path="/infcon/opndatfrom" />
<Label itext="and" trn="inflid" />
<DatePickerItem InputProps={bind("infcon_opndatto")} desp="Open Date to" path="/infcon/opndatto" />
<Label itext="Amount between" trn="inflid" />
<InputItem InputProps={bind("infcon_seaamtfr")} desp="Amount from" path="/infcon/seaamtfr" />
<Label itext="and" trn="inflid" />
<InputItem InputProps={bind("infcon_seaamtto")} desp="Amount to" path="/infcon/seaamtto" />
<Label itext="Confirmation Status" trn="inflid" />
<SelectItem InputProps={bind("seacnfdet")} desp="confirmation status" path="/seacnfdet"/>
<Label itext="Form of L/C" trn="inflid" />
<SelectItem InputProps={bind("sealcrtyp")} desp="form of L/C" path="/sealcrtyp"/>
<InputItem InputProps={bind("infbut_dspstm")} desp="display stream" path="/infbut/dspstm" />
<Button type="primary" onClick={this.onInfbut_exi} desp="Exit" path="/infbut/exi">
<Label itext="E&xit"/>
</Button>
<Table rowKey="inr" columns={this.litmod_lidlstHeader} dataSource={this.model.litmod_lidlst} path="/litmod/lidlst"/>
<Button type="primary" icon="search" onClick={this.onLitmod_sel} desp="查询" path="/litmod/sel">
<Label itext="查询"/>
</Button>
<Button type="primary" onClick={this.onLitmod_choose} desp="选中" path="/litmod/choose">
<Label itext="选中"/>
</Button>
</div>
<Card title="信用证查询" size="small" className="transTitle">
<Steps>
<StepItem title="信用证查询">
<Basic model={this.model} extra={this.extra} flag={this.state.flag} />
</StepItem>
</Steps>
</Card>
)
}
}
import React,{Component,Fragment} from 'react'
import PropTypes from 'prop-types'
import {Page,Validator,Notification,FormItem,DatePickerItem,TextAreaItem,CheckboxItem,Checkbox,
InputItem,Input,Bind,SelectItem,Button,Label,Image,Table,BottomBtn} from '@/components/Common-Library'
InputItem,Input,Bind,SelectItem,Button,Label,Image,Table} from '@/components/Common-Library'
import Api from '@/service/api'
import mLcyadd from '../model'
import CodeTableFactory from '@/components/CodeTable'
......@@ -11,6 +11,7 @@ import { action, observable,runInAction } from 'mobx'
import { Row, Col} from 'antd';
import Ptspta2 from '@/views/Public/Ptspta2'
import Business from '@/views/Public/Business'
import BottomBtn from '@/views/Public/BottomBtn'
const CodeTable = CodeTableFactory.getInstance()
......
......@@ -42,26 +42,26 @@ export default class LcyaddScreen extends Page
}
}
async componentWillMount()
{
/*
*添加初始化代码
*/
const rtnmsg = await Api.post('lcyadd/init',{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
const {data} = rtnmsg
runInAction(()=>{
Object.assign(this.model,data)
})
}
//快照模式下,不必开启校验,否则,静默校验,和记录变动
!this.loadDisplay() && this.model.openMonitor && this.model.openMonitor() //开启校验
}
componentWillUnmount()
{
this.model.stopMonitor&&this.model.stopMonitor()//关闭校验
}
// async componentWillMount()
// {
// /*
// *添加初始化代码
// */
// const rtnmsg = await Api.post('lcyadd/init',{data:this.model})
// if(rtnmsg.retcod == SUCCESS)
// {
// const {data} = rtnmsg
// runInAction(()=>{
// Object.assign(this.model,data)
// })
// }
// //快照模式下,不必开启校验,否则,静默校验,和记录变动
// !this.loadDisplay() && this.model.openMonitor && this.model.openMonitor() //开启校验
// }
// componentWillUnmount()
// {
// this.model.stopMonitor&&this.model.stopMonitor()//关闭校验
// }
//交易内实现
renderPage(){
const bind = this.bind
......@@ -69,11 +69,7 @@ export default class LcyaddScreen extends Page
return (
<Card title="个人结汇新增" size="small" className="transTitle">
<Steps>
<StepItem title="新增">
<Basic model={this.model} extra={this.extra} flag={this.state.flag} />
</StepItem>
</Steps>
</Card>
)
}
......
import React,{Component,Fragment} from 'react'
import PropTypes from 'prop-types'
import {Page,Validator,Notification,FormItem,DatePickerItem,TextAreaItem,CheckboxItem,Checkbox,
InputItem,Input,Bind,SelectItem,Button,Label,Image,Table,BottomBtn} from '@/components/Common-Library'
InputItem,Input,Bind,SelectItem,Button,Label,Image,Table} from '@/components/Common-Library'
import Api from '@/service/api'
import mLcyame from '../model'
import CodeTableFactory from '@/components/CodeTable'
......@@ -9,8 +9,8 @@ import "./index.less"
import { inject, observer } from 'mobx-react'
import { action, observable,runInAction } from 'mobx'
import { Row, Col} from 'antd';
import Ptspta2 from '@/views/Public/Ptspta2'
import Business from '@/views/Public/Business'
import BottomBtn from '@/views/Public/BottomBtn'
const CodeTable = CodeTableFactory.getInstance()
......
......@@ -42,26 +42,26 @@ export default class LcyameScreen extends Page
}
}
async componentWillMount()
{
/*
*添加初始化代码
*/
const rtnmsg = await Api.post('lcyame/init',{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
const {data} = rtnmsg
runInAction(()=>{
Object.assign(this.model,data)
})
}
//快照模式下,不必开启校验,否则,静默校验,和记录变动
!this.loadDisplay() && this.model.openMonitor && this.model.openMonitor() //开启校验
}
componentWillUnmount()
{
this.model.stopMonitor&&this.model.stopMonitor()//关闭校验
}
// async componentWillMount()
// {
// /*
// *添加初始化代码
// */
// const rtnmsg = await Api.post('lcyame/init',{data:this.model})
// if(rtnmsg.retcod == SUCCESS)
// {
// const {data} = rtnmsg
// runInAction(()=>{
// Object.assign(this.model,data)
// })
// }
// //快照模式下,不必开启校验,否则,静默校验,和记录变动
// !this.loadDisplay() && this.model.openMonitor && this.model.openMonitor() //开启校验
// }
// componentWillUnmount()
// {
// this.model.stopMonitor&&this.model.stopMonitor()//关闭校验
// }
//交易内实现
renderPage(){
const bind = this.bind
......@@ -69,11 +69,7 @@ export default class LcyameScreen extends Page
return (
<Card title="个人结汇修改" size="small" className="transTitle">
<Steps>
<StepItem title="修改">
<Basic model={this.model} extra={this.extra} flag={this.state.flag} />
</StepItem>
</Steps>
</Card>
)
}
......
import React,{ Component } from 'react';
import { Row, Col } from 'antd';
import { ConfirmButton, Button, Label } from '@/components/Common-Library'
import { observable } from 'mobx'
import { inject, observer } from 'mobx-react'
@observer
export default class BottomBtn extends Component{
constructor(){
super()
}
@observable
pedLoading = false //控制暂存按钮是否处于等待状态----等待状态时不可点击
@observable
savLoading = false //控制暂存按钮是否处于等待状态----等待状态时不可点击
// 退出按钮
onRtn = () => {
}
//保存按钮
onSav = () => {
//点击按钮第一时间让按钮处于等待状态,防止多次点击触发事件
this.savLoading = true
setTimeout(()=>{
this.savLoading = false
},3000)
}
render(){
return (
<Row type="flex" justify="center">
<Col>
<div className="button0">
<div className='button2'>
<ConfirmButton type="primary"
onOK={this.onRtn}
onOK1={this.onRtnPed}
message="确定退出?"
isped={true}
>
<Label itext="退出" />
</ConfirmButton>
</div>
<div className='button2'>
<ConfirmButton type="primary"
onOK={this.onSav}
icon="save"
message="确定提交?"
loading={this.savLoading}
>
<Label itext="提交" />
</ConfirmButton>
</div>
</div>
</Col>
</Row>
)
}
}
\ 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