Commit 7e909da6 by qiuxia

增加gitame

parent 3f4440c0
export {default as model} from './model'
export {default as descriptor} from './descriptor'
export {default} from './views'
\ No newline at end of file
import React,{Component,Fragment} from 'react'
import PropTypes from 'prop-types'
import {Page,Validator,Notification,FormItem,BottomBtn,DatePickerItem,TextAreaItem,CheckboxItem,Checkbox,
InputItem,Input,Bind,SelectItem,Button,Label,Image,Table} from '@/components/Common-Library'
import Api from '@/service/api'
import mGitame from '../model'
import CodeTableFactory from '@/components/CodeTable'
import "./index.less"
import { inject, observer } from 'mobx-react'
import { action, observable,runInAction } from 'mobx'
import {Row ,Col} from 'antd'
import Business from '@/views/Public/Business'
const CodeTable = CodeTableFactory.getInstance()
@inject('UserContext')
@inject('i18n')
@observer
export default class GitameScreen extends Page
{
static childContextTypes = {
trn: PropTypes.string,
}
getChildContext () {
return {trn:'gitame'}
}
@observable
formBlur=false
constructor(props)
{
super(props)
this.model = props.model
this.bind = Bind.bind(this)
}
onRevtxt_buttxmsel= ()=>{
this.formBlur=true //已触发表单提交处理
Validator.validate(this.model,this.model.descriptor,async(errors,values)=>{
if(errors)
return
const rtnmsg = await Api.post('gitame/issp_sel',{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 style={{ position: 'relative' }}>
<Row>
<Col span={12}>
<Row className="row">
<Col span={5} offset={2}>
<Label itext="Declaration of" trn="gitame" />
</Col>
<Col span={11}>
<TextAreaItem InputProps={bind("blk_revtxt")} desp="Declaration of Indemnity Text" path="/gidgrp/blk/revtxt"/>
</Col>
<Col span={2} offset={1}>
<Button type="primary" icon="search" onClick={this.onRevtxt_buttxmsel} desp="..." path="/gitp/revtxt/buttxmsel">
<Label itext="..."/>
</Button>
</Col>
</Row>
</Col>
<Col span={12}>
<Row className="row">
</Row>
</Col>
</Row>
{/*<Label itext="Indemnity" trn="gitame" /> */}
<Row>
<Col span={12}>
<Row className="row">
<Col span={5} offset={2}>
<Label itext="Additional Amount" trn="gitame" />
</Col>
<Col span={6}>
<SelectItem InputProps={bind("max2_cur")} code={CodeTable.curtxt} desp="Currency" path="/gidgrp/cbs/max2/cur"/>
</Col>
<Col span={7} offset={1}>
<InputItem InputProps={bind("max2_amt")} desp="Balance" path="/gidgrp/cbs/max2/amt" />
</Col>
</Row>
</Col>
<Col span={12}>
<Row className="row">
<Col span={5} offset={2}>
<Label itext="Open Add. Amount" trn="gitame" />
</Col>
<Col span={6}>
<SelectItem InputProps={bind("opn2_cur")} code={CodeTable.curtxt} desp="Currency" path="/gidgrp/cbs/opn2/cur"/>
</Col>
<Col span={7} offset={1}>
<InputItem InputProps={bind("opn2_amt")} desp="Balance" path="/gidgrp/cbs/opn2/amt" />
</Col>
</Row>
</Col>
</Row>
<Row>
<Col span={12}>
<Row className="row">
<Col span={5} offset={2}>
<Label itext="Covered" trn="gitame" />
</Col>
<Col span={14}>
<TextAreaItem InputProps={bind("blk_addamtcov")} desp="Additional Amount Covered" path="/gidgrp/blk/addamtcov"/>
</Col>
</Row>
</Col>
<Col span={12}>
<Row className="row">
<Col span={5} offset={2}>
<Label itext="Amendments so Far" trn="gitame" />
</Col>
<Col span={14}>
<TextAreaItem InputProps={bind("blk_gidtxtame")} desp="History of Amendments" path="/gidgrp/blk/gidtxtame"/>
</Col>
</Row>
</Col>
</Row>
{/* <Label itext="Guarantee Text " trn="gitame" />
<Label itext="before this" trn="gitame" />
<Label itext="Amendment" trn="gitame" />
<Label itext="备注 R=接受, J=拒绝, I=增额修改, D=减额修改" trn="gitame" />
<Button type="primary" icon="save"
onClick={this.onSav} desp="Save" path="/mtabut/sav">
<Label itext="提交"/>
</Button>
<Button type="primary" onClick={this.onChk} desp="Check" path="/mtabut/chk">
<Label itext="检核"/>
</Button>
<Button type="primary" onClick={this.onPed} desp="暂存" path="/mtabut/ped">
<Label itext="暂存"/>
</Button>
<Button type="primary" onClick={this.onExi} desp="Exit" path="/mtabut/exi">
<Label itext="退出"/>
</Button> */}
{/* 底部按钮 */}
<BottomBtn _this={this} />
</div>
)
}
}
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,Steps} from '@/components/Common-Library'
import Api from '@/service/api'
import mGitame 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 Ovwp from './Ovwp'
import Confp from './Confp'
import Detp from './Detp'
import Oth from './Oth'
import Fee from '@/views/Public/Fee'
import Gle from '@/views/Public/Gle'
import Papper from '@/views/Public/Papper'
import { Card } from 'antd'
import Engp from '@/views/Public/Engp'
const CodeTable = CodeTableFactory.getInstance()
const StepItem = Steps.Item
@inject('UserContext')
@inject('i18n')
@observer
export default class GitameScreen extends Page
{
static childContextTypes = {
trn: PropTypes.string,
}
getChildContext () {
return {trn:'gitame'}
}
@observable
formBlur=false
@observable
extra = { inifrm: 'gitame', sptinr: '',oldinr:'', bchlevelLst: [] }
constructor(props)
{
super(props)
this.model = new mGitame()
this.bind = Bind.bind(this)
this.state = {
flag: true
}
}
async componentWillMount()
{
/*
*添加初始化代码
*/
let gidinr='';
if (this.props.location.query) {
if(this.props.location.query.from=="sptsel"){
this.extra.sptinr=this.props.location.query.sptinr;
}else{
gidinr=this.props.location.query.gidinr;
}
}
const rtnmsg = await Api.post('gitame/init',{params: { sptinr:this.extra.sptinr,gidinr } })
if(rtnmsg.retcod == SUCCESS)
{
const {data} = rtnmsg
runInAction(()=>{
Object.assign(this.model,data)
})
this.extra.oldinr=gidinr;
this.setState({ flag: false })
}
//快照模式下,不必开启校验,否则,静默校验,和记录变动
!this.loadDisplay() && this.model.openMonitor && this.model.openMonitor() //开启校验
}
componentWillUnmount()
{
this.model.stopMonitor&&this.model.stopMonitor()//关闭校验
}
//交易内实现
renderPage(){
const bind = this.bind
const {i18n} = this.props
return (
<Card title="Amendment of Guarantee" size="small" className="transTitle">
<Steps>
<StepItem title="Amendment ">
<Basic model={this.model} extra={this.extra} flag={this.state.flag} />
</StepItem>
<StepItem title="overview">
<Ovwp model={this.model} extra={this.extra} flag={this.state.flag} />
</StepItem>
<StepItem title="Confirmation Details">
<Confp model={this.model} extra={this.extra} flag={this.state.flag} />
</StepItem>
<StepItem title="Details">
<Detp model={this.model} extra={this.extra} flag={this.state.flag} />
</StepItem>
<StepItem title="Declaration of Indemnity">
<Oth model={this.model} extra={this.extra} flag={this.state.flag} />
</StepItem>
{/* <StepItem title="表外&保证金">
<Engp model={this.model} extra={this.extra} />
</StepItem>
<StepItem title="费用&账务">
<Fee model={this.model} extra={this.extra} />
</StepItem>
<StepItem title="会计分录">
<Gle model={this.model} extra={this.extra} flag={this.state.flag}/>
</StepItem>
<StepItem title="面函">
<Papper model={this.model} extra={this.extra} flag={this.state.flag}/>
</StepItem>
*/}
</Steps>
</Card>
)
}
}
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