Commit a3206d64 by WeiCong

进口信用证查询

parent 870b0f11
......@@ -5896,4 +5896,10 @@ export const sndorrcv = [
export const chksta = [
{ label: `未通过`, value: `1` },
{ label: `通过`, value: `0` },
]
export const lcrtyp = [
{label:`IRREVOCABLE `,value:`I` },
{label:`IRREVOCABLE TRANSFERABLE`,value:`IT` },
{label:`REVOCABLE`,value:`R` },
{label:`REVOCABLE TRANSFERABLE`,value:`RT` },
]
\ No newline at end of file
export default fieldSet = {
brtmod_brref:[
{type:'string',max:16,message:'长度不能超过16个字符'}, // \brtmod\brref 单据编号
],
brtmod_lcref:[
{type:'string',max:16,message:'长度不能超过16个字符'}, // \brtmod\lcref 信用证编号
],
brtmod_selflg:[
{type:'string',max:1,message:'长度不能超过1个字符'}, // \brtmod\selflg 查询标志
],
litmod_ownref:[
{type:'string',max:20,message:'长度不能超过20个字符'}, // \litmod\ownref 业务编号
],
litmod_selflg:[
{type:'string',max:1,message:'长度不能超过1个字符'}, // \litmod\selflg 信用证查询标志
],
}
\ No newline at end of file
export {default as model} from './model'
export {default as descriptor} from './descriptor'
export {default} from './views'
\ No newline at end of file
import { action, observable } from 'mobx'
import _descriptor from '../descriptor'
import {modelWrapper} from '@/components/RunTime'
@modelWrapper
class Litsel {
@observable
brtmod_brdlst=[] // \brtmod\brdlst
@observable
brtmod_brref="" // \brtmod\brref 单据编号
@observable
brtmod_lcref="" // \brtmod\lcref 信用证编号
@observable
brtmod_selflg="" // \brtmod\selflg 查询标志
@observable
litmod_lidlst=[] // \litmod\lidlst
@observable
litmod_ownref="" // \litmod\ownref 业务编号
@observable
litmod_selflg="" // \litmod\selflg 信用证查询标志
@observable
inr="" //\litmod\rec\inr
@observable
inr1="" //\brtmod\rec\inr
get descriptor()
{
return _descriptor
}
clear()
{
this.brtmod_brdlst=[]
this.brtmod_brref=""
this.brtmod_lcref=""
this.brtmod_selflg=""
this.litmod_lidlst=[]
this.litmod_ownref=""
this.litmod_selflg=""
}
}
export default Litsel
\ No newline at end of file
import React, { Component, Fragment } from 'react'
import {
Page, Validator, Notification, FormItem,
InputItem, Input, Bind, SelectItem, Button, Label, DatePickerItem, Section, ConfirmButton, Steps, CheckboxItem, TextAreaItem
} from '@/components/Common-Library'
import Api from '@/service/api'
import CodeTableFactory from '@/components/CodeTable'
import "./index.less"
import { inject, observer } from 'mobx-react'
import { action, observable } from 'mobx'
import { Row, Col, Popconfirm, Modal, Spin, Tooltip, Table } from 'antd';
import { PtyPicker } from '@/components/Business-Library'
import { Link, withRouter } from 'react-router-dom'
import Business from '@/views/Public/Business'
import mLitsel from '../model'
import moment from 'moment';
const CodeTable = CodeTableFactory.getInstance()
const confirm = Modal.confirm
@withRouter
@inject('UserContext')
@inject('i18n')
@observer
export default class DanjuScreen extends Page {
@observable
formBlur = false
constructor(props) {
super(props)
this.model = new mLitsel()
this.bind = Bind.bind(this)
this.model.brtmod_selflg = props.flg
this.state={
selectedInr:""
}
}
componentDidMount() {
super.componentDidMount()
if (this.props.flg == "0") {
this.brtmod_brdlstHeader.push(
{
title: <Label itext="操作" />,
width: 60,
key: "operation",
render: (val, row, index) => {
return (
<a onClick={()=>{this.link("brtdcr",row.inr)}}>拒付</a>
)
}
}
)
}
else if (this.props.flg == "1") {
this.brtmod_brdlstHeader.push(
{
title: <Label itext="操作" />,
width: 60,
key: "operation",
render: (val, row, index) => {
return (
<a onClick={()=>{this.link("brtudp",row.inr)}}>承兑</a>
)
}
})
}
else if (this.props.flg == "2") {
this.brtmod_brdlstHeader.push(
{
title: <Label itext="操作" />,
width: 60,
key: "operation",
render: (val, row, index) => {
return (
<a onClick={()=>{this.link("brtset",row.inr)}}>付款</a>
)
}
})
}
else if (this.props.flg == "3") {
this.brdinr = ""
this.model.inr1 = "0"
}
}
//交易跳转函数,若参数inr存在,则赋值给this.brdinr
//调用后台查询是否符合跳转前提(前手交易是否复核),根据返回值决定是否带参跳转至pathname交易
async link(pathname, inr){
if(inr){
this.brdinr = inr
}
const rtnmsg = await Api.post('litsel/cfgfil_isnext', { data: this.model, params: { objinr:this.brdinr, objtyp:"bdd"} })
if (rtnmsg.retcod == SUCCESS) {
this.props.history.push({ pathname, query: { brdinr:this.brdinr} });
}else{
Notification.error({ message: `${rtnmsg.retmsg}` })
}
}
onSellst = async () => {
this.formBlur = true //已触发表单提交处理
const rtnmsg = await Api.post('litsel/brtmod_sel', { data: this.model })
if (rtnmsg.retcod == SUCCESS) {
this.model.brtmod_brdlst = rtnmsg.data['brtmod_brdlst'];
}
else {
Notification.error({ message: '查询失败!' })
}
//余下逻辑处理
}
async onSelcon(brdinr) {
this.formBlur = true //已触发表单提交处理
this.setState({selectedInr:brdinr}) //获取选中行的inr,用于改变选中行样式
this.brdinr = brdinr;
this.model.inr1 = brdinr;
}
brtmod_brdlstHeader = [
{
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: 190,
sorter: (r1, r2) => ColSorter(r1.nam, r2.nam),
},
{
title: <Label itext="交单日期" />,
dataIndex: "predat",
key: "predat",
width: 90,
sorter: (r1, r2) => ColSorter(r1.predat, r2.predat),
render:(val)=>{
if(val)
return moment(val).format('YYYY-MM-DD')
}
},
{
title: <Label itext="装运日期" />,
dataIndex: "shpdat",
key: "shpdat",
width: 90,
sorter: (r1, r2) => ColSorter(r1.shpdat, r2.shpdat),
render:(val)=>{
if(val)
return moment(val).format('YYYY-MM-DD')
}
},
{
title: <Label itext="到期日" />,
dataIndex: "matdat",
key: "matdat",
width: 90,
sorter: (r1, r2) => ColSorter(r1.matdat, r2.matdat),
render:(val)=>{
if(val)
return moment(val).format('YYYY-MM-DD')
}
},
{
title: <Label itext="承兑日期" />,
dataIndex: "advdat",
key: "advdat",
width: 90,
sorter: (r1, r2) => ColSorter(r1.advdat, r2.advdat),
render:(val)=>{
if(val)
return moment(val).format('YYYY-MM-DD')
}
},
{
title: <Label itext="闭卷日期" />,
dataIndex: "clsdat",
key: "clsdat",
width: 90,
sorter: (r1, r2) => ColSorter(r1.clsdat, r2.clsdat),
render:(val)=>{
if(val)
return moment(val).format('YYYY-MM-DD')
}
},
{
title: <Label itext="经办柜员" />,
dataIndex: "ownusr",
key: "ownusr",
width: 100,
sorter: (r1, r2) => ColSorter(r1.ownusr, r2.ownusr),
},
]
rowClass = (row, index)=>{
//表格选中行变色
if(this.props.flg == 6 && row.inr == this.state.selectedInr){
return "selectedStyle"
}
//单双行样式
if(index %2)
{
return "tableEvenStyle"
}
return "tableOddStyle"
}
onTabFocus(){
this.setState({selectedInr:""}) //切换页签时重置行选中样式
}
//交易内实现
renderPage() {
const bind = this.bind
const { i18n } = this.props
return (
<div style={{ position: 'relative' }}>
<Business wrappedComponentRef={ref => (this.com = ref)} extra={this.props.extra} model={this.model} />
{/* 第一行 */}
<Row>
<Col span={24}>
<Row className="row">
<Col span={2} >
<Label itext="信用证编号" trn="litsel" />
</Col>
<Col span={3} >
<InputItem InputProps={{ ...bind("brtmod_lcref"), onPressEnter: this.onSellst }} maxLength={16} desp="信用证编号" path="/brtmod/lcref" />
</Col>
<Col span={2} offset={1}>
<Label itext="单据编号" trn="ditsel" />
</Col>
<Col span={3} >
<InputItem InputProps={bind("brtmod_brref")} maxLength={16} desp="单据编号" path="/brtmod/brref" />
</Col>
<Col span={6} offset={1}>
<Button type="primary" icon="search" size="small" onClick={this.onSellst} desp="查询" path="/brtmod/sel">
<Label itext="查询" />
</Button>
</Col>
</Row>
</Col>
</Row>
<Row style={{ marginTop: 30 }}>
<Col span={24} >
<Table rowKey="inr" size="middle"
onRow={row => ({ onClick: () => this.onSelcon(row.inr) })}
columns={this.brtmod_brdlstHeader}
dataSource={this.model.brtmod_brdlst}
rowClassName={this.rowClass}
/>
</Col>
</Row>
{this.props.flg == "3" ?
<div style={{ textAlign: "center", marginTop: 30 }}>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr1 == "0" ? true : false} type="primary" size="small" onClick={()=>{this.link("brtdck")}}>
<Label itext="单据修改" />
</Button>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr1 == "0" ? true : false} type="primary" size="small" onClick={()=>{this.link("brtcan")}}>
<Label itext="单据注销" />
</Button>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr1 == "0" ? true : false} type="primary" size="small" onClick={()=>{this.link("brtfre")}}>
<Label itext="自由报文" />
</Button>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr1 == "0" ? true : false} type="primary" size="small" onClick={()=>{this.link("brtfee")}}>
<Label itext="收费" />
</Button>
</div>
: null}
</div >
)
}
}
import React, { Component, Fragment } from 'react'
import {
Page, Validator, Notification, FormItem,
InputItem, Input, Bind, SelectItem, Button, Label, DatePickerItem, Section, ConfirmButton, Steps, CheckboxItem, TextAreaItem
} from '@/components/Common-Library'
import Api from '@/service/api'
import CodeTableFactory from '@/components/CodeTable'
import "./index.less"
import { inject, observer } from 'mobx-react'
import { action, observable } from 'mobx'
import { Row, Col, Tooltip, Modal, Spin, Table } from 'antd';
import { PtyPicker } from '@/components/Business-Library'
import { Link, withRouter } from 'react-router-dom'
import Ptspta1 from '@/views/Public/Ptspta1'
import Business from '@/views/Public/Business'
import moment from 'moment'
import mLitsel from '../model'
const { Pre, Next, StepWrapper } = Steps
const CodeTable = CodeTableFactory.getInstance()
const confirm = Modal.confirm
@withRouter
@inject('UserContext')
@inject('i18n')
@observer
export default class XinyongzhengScreen extends Page {
@observable
formBlur = false
constructor(props) {
super(props)
this.model = new mLitsel()
this.bind = Bind.bind(this)
this.model.litmod_selflg = props.flg
this.state={
selectedInr:""
}
}
componentDidMount() {
super.componentDidMount()
if (this.props.flg == "5") {
this.litmod_lidlstHeader.push(
{
title: <Label itext="操作" />,
width: 60,
key: "operation",
render: (val, row, index) => {
return (
<a onClick={()=>{this.link('litdck',row.inr)}}>到单</a>
)
}
}
)
}
else if (this.props.flg == "3") {
this.litmod_lidlstHeader.push(
{
title: <Label itext="操作" />,
width: 60,
key: "operation",
render: (val, row, index) => {
return (
<a onClick={()=>{this.link('litcan',row.inr)}}>闭卷</a>
)
}
})
}
else if (this.props.flg == "12") {
this.litmod_lidlstHeader.push(
{
title: <Label itext="操作" />,
width: 60,
key: "operation",
render: (val, row, index) => {
return (
<a onClick={()=>{this.link('litrop',row.inr)}}>重开</a>
)
}
})
}
else if (this.props.flg == "1") {
this.lidinr=""
this.model.inr="0"
}
}
onTabFocus(){
this.setState({selectedInr:""}) //切换页签时重置行选中样式
}
//交易跳转函数,若参数inr存在,则赋值给this.lidinr,此时为闭卷或者到单,不存在则为信用证其他
//调用后台查询是否符合跳转前提(前手交易是否复核),根据返回值决定是否带参跳转至pathname交易
async link(pathname, inr){
if(inr){
this.lidinr = inr
}
const rtnmsg = await Api.post('litsel/cfgfil_isnext', { data: this.model, params: { objinr:this.lidinr, objtyp:"lid"} })
if (rtnmsg.retcod == SUCCESS) {
this.props.history.push({ pathname, query: { lidinr:this.lidinr} });
}else{
Notification.error({ message: `${rtnmsg.retmsg}` })
}
}
async onSelcon(lidinr){
this.formBlur=true //已触发表单提交处理
this.setState({selectedInr:lidinr}) //获取选中行的inr,用于改变选中行样式
this.lidinr=lidinr;
this.model.inr=lidinr;
}
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: 260,
sorter: (r1, r2) => ColSorter(r1.nam, r2.nam),
},
{
title: <Label itext="开立日期" />,
dataIndex: "opndat",
key: "opndat",
width: 90,
sorter: (r1, r2) => ColSorter(r1.opndat, r2.opndat),
render:(val)=>{
if(val)
return moment(val).format('YYYY-MM-DD')
}
},
{
title: <Label itext="开证类型" />,
dataIndex: "lcrtyp",
key: "lcrtyp",
width: 100,
sorter: (r1, r2) => ColSorter(r1.lcrtyp, r2.lcrtyp),
render: (val, row, index) => {
let text = val
let em = CodeTable.lcrtyp.find(item => item.value == val)
if (em)
text = em.label
return text
}
},
{
title: <Label itext="失效日期" />,
dataIndex: "clsdat",
key: "clsdat",
width: 80,
sorter: (r1, r2) => ColSorter(r1.clsdat, r2.clsdat),
render:(val)=>{
if(val)
return moment(val).format('YYYY-MM-DD')
}
},
{
title: <Label itext="兑付方式" />,
dataIndex: "avbby",
key: "avbby",
width: 80,
sorter: (r1, r2) => ColSorter(r1.avbby, r2.avbby),
render: (val, row, index) => {
let text = val
let em = CodeTable.avbby.find(item => item.value == val)
if (em)
text = em.label
return text
}
},
{
title: <Label itext="效期(天)" />,
dataIndex: "tenmaxday",
key: "tenmaxday",
width: 80,
sorter: (r1, r2) => ColSorter(r1.tenmaxday, r2.tenmaxday),
},
{
title: <Label itext="经办柜员" />,
dataIndex: "ownusr",
key: "ownusr",
width: 100,
sorter: (r1, r2) => ColSorter(r1.ownusr, r2.ownusr),
},
]
onSellst = async () => {
this.formBlur = true //已触发表单提交处理
const rtnmsg = await Api.post('litsel/litmod_sel', { data: this.model })
if (rtnmsg.retcod == SUCCESS) {
this.model.litmod_lidlst = rtnmsg.data['litmod_lidlst'];
}
else {
Notification.error({ message: '查询失败!' })
}
//余下逻辑处理
}
rowClass = (row, index)=>{
//表格选中行变色
if(this.props.flg == 5 && row.inr == this.state.selectedInr){
return "selectedStyle"
}
//单双行样式
if(index %2)
{
return "tableEvenStyle"
}
return "tableOddStyle"
}
//交易内实现
renderPage() {
const bind = this.bind
return (
<div style={{ position: 'relative' }}>
<Business wrappedComponentRef={ref => (this.com = ref)} extra={this.props.extra} model={this.model} />
{/* 第一行 */}
<Row>
<Col span={12}>
<Row className="row">
<Col span={4} >
<Label itext="信用证编号" trn="litsel" />
</Col>
<Col span={6} >
<InputItem InputProps={{...bind("litmod_ownref"),onPressEnter:this.onSellst}} maxLength={16} desp="信用证编号" path="/litmod/ownref" />
</Col>
<Col span={6} offset={2}>
<Button type="primary" icon="search" size="small" onClick={this.onSellst} desp="查询" path="/litmod/sel">
<Label itext="查询" />
</Button>
</Col>
</Row>
</Col>
</Row>
<Row style={{ marginTop: 30 }}>
<Col span={24} >
<Table
rowKey="inr" size="middle"
onRow={ row=>({onClick:()=>this.onSelcon(row.inr)}) }
columns={this.litmod_lidlstHeader}
dataSource={this.model.litmod_lidlst}
rowClassName={this.rowClass}
/>
</Col>
</Row>
{this.props.flg=="1"?
<div style={{ textAlign: "center", marginTop: 30 }}>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr=="0"?true:false}type="primary" size="small" onClick={()=>{this.link("litame")}}>
<Label itext="信用证修改" />
</Button>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr=="0"?true:false}type="primary" size="small" onClick={()=>{this.link("litadd")}}>
<Label itext="编号修改" />
</Button>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr=="0"?true:false}type="primary" size="small" onClick={()=>{this.link("litatt")}}>
<Label itext="报文绑定" />
</Button>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr=="0"?true:false}type="primary" size="small" onClick={()=>{this.link("litdav")}}>
<Label itext="单据通知" />
</Button>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr=="0"?true:false}type="primary" size="small" onClick={()=>{this.link("litdla")}}>
<Label itext="修改接受" />
</Button>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr=="0"?true:false}type="primary" size="small" onClick={()=>{this.link("liteng")}}>
<Label itext="保证金调整" />
</Button>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr=="0"?true:false}type="primary" size="small" onClick={()=>{this.link("litfee")}}>
<Label itext="收费" />
</Button>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr=="0"?true:false} type="primary" size="small" onClick={()=>{this.link("litrog")}}>
<Label itext="提货担保" />
</Button>
<Button style={{ marginLeft: 10, marginRight: 10 }} disabled={this.model.inr=="0"?true:false} type="primary" size="small" onClick={()=>{this.link("litfre")}}>
<Label itext="自由报文" />
</Button>
</div>
:null
}
</div >
)
}
}
import React,{Component,Fragment} from 'react'
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 mLitsel from '../model'
import CodeTableFactory from '@/components/CodeTable'
import "./index.less"
import { inject, observer } from 'mobx-react'
import { action, observable} from 'mobx'
import Xinyongzheng from './Xinyongzheng'
import Danju from './Danju'
import { Card } from 'antd'
import DateFormat from '@/utils/DateUtil'
const CodeTable = CodeTableFactory.getInstance()
const StepItem = Steps.Item
@inject('UserContext')
@inject('i18n')
@observer
export default class LitselScreen extends Page
{
@observable
formBlur = false
@observable
extra = { inifrm: 'litsel', sptinr: '', bchlevelLst: [] }
constructor(props) {
super(props)
this.state = {
flag: true
}
this.model = new mLitsel()
}
async componentWillMount()
{
/*
*添加初始化代码
*/
const rtnmsg = await Api.post('litsel/init',{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
const {data} = rtnmsg
Object.assign(this.model,data)
}
//快照模式下,不必开启校验,否则,静默校验,和记录变动
!this.loadDisplay() && this.model.openMonitor && this.model.openMonitor() //开启校验
}
componentWillUnmount()
{
this.model.stopMonitor&&this.model.stopMonitor()//关闭校验
}
//交易内实现
renderPage(){
return (
<Card title="国内证买方" size="small" className="transTitle">
<Steps>
<StepItem title="信用证到单">
<Xinyongzheng model={this.model} extra={this.extra} flg="5" />
</StepItem>
<StepItem title="信用证闭卷">
<Xinyongzheng model={this.model} extra={this.extra} flg="3"/>
</StepItem>
<StepItem title="信用证重开">
<Xinyongzheng model={this.model} extra={this.extra} flg="12"/>
</StepItem>
<StepItem title="单据拒付">
<Danju model={this.model} extra={this.extra} flg="0"/>
</StepItem>
<StepItem title="单据承兑">
<Danju model={this.model} extra={this.extra} flg="1"/>
</StepItem>
<StepItem title="单据付款">
<Danju model={this.model} extra={this.extra} flg="2"/>
</StepItem>
<StepItem title="信用证其他">
<Xinyongzheng model={this.model} extra={this.extra} flg="1" />
</StepItem>
<StepItem title="单据其他">
<Danju model={this.model} extra={this.extra} flg="3"/>
</StepItem>
</Steps>
<Button style={{ position:'absolute',right:'3em',top:'4em' }} type="primary" size="small" onClick={()=>{this.props.history.push('litopn')}}>
<Label itext="开立信用证" />
</Button>
<Button style={{ position:'absolute',right:'10em',top:'4em' }} type="primary" size="small" onClick={()=>{this.props.history.push('inflid')}}>
<Label itext="信用证查询" />
</Button>
</Card>
)
}
}
......@@ -183,6 +183,7 @@ const Getsel =MLoader(()=>import('./Getsel'))
const Getame =MLoader(()=>import('./Getame'))
const Getopn =MLoader(()=>import('./Getopn'))
const Litsel =MLoader(()=>import('./Litsel'))
export default class Bus extends Component{
......@@ -389,6 +390,8 @@ export default class Bus extends Component{
<Route exact path={`${moduleBasePath}getsel${!isDisplay?'':'/:trninr'}`} render={(props)=><Getsel {...props} {...params}/>} />
<Route exact path={`${moduleBasePath}getopn${!isDisplay?'':'/:trninr'}`} render={(props)=><Getopn {...props} {...params}/>} />
<Route exact path={`${moduleBasePath}getame${!isDisplay?'':'/:trninr'}`} render={(props)=><Getame {...props} {...params}/>} />
<Route exact path={`${moduleBasePath}litsel${!isDisplay?'':'/:trninr'}`} render={(props)=><Litsel {...props} {...params}/>} />
</React.Fragment>
}
}
......
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