Commit 31d6d072 by YuMengShuai

模拟数据

parent b7c63ed3
......@@ -14,11 +14,13 @@ 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'
import mPcysel from '../model'
import BottomBtn from '@/views/Public/BottomBtn'
const { Pre, Next, StepWrapper } = Steps
const CodeTable = CodeTableFactory.getInstance()
const confirm = Modal.confirm
@withRouter
@inject('UserContext')
@inject('i18n')
......@@ -29,15 +31,21 @@ export default class JieshouhuiScreen extends Page {
constructor(props) {
super(props)
this.model = new mLitsel()
this.model = new mPcysel()
this.bind = Bind.bind(this)
this.model.litmod_selflg = props.flg
this.state={
selectedInr:""
selectedInr:"",
dataSource:[]
}
}
componentDidMount() {
this.setState(
{dataSource:global.dataSources}
)
super.componentDidMount()
if (this.props.flg == "0") {
......@@ -49,9 +57,10 @@ export default class JieshouhuiScreen extends Page {
render: (val, row, index) => {
return (
<div>
<a onClick={()=>{this.link('fcyame',row.inr)}}>修改</a>
<a onClick={()=>{this.com.link('fcyame',val,row,index)}}>修改</a>
<Divider type="vertical" />
<a onClick={()=>{this.link('fcydel',row.inr)}}>删除</a>
{/* <a onClick={()=>{this.link('fcydel',row.inr)}}>删除</a> */}
<a onClick={()=>{this.com.onDelete(val, row, index)}}>删除</a>
</div>
)
......@@ -70,9 +79,11 @@ export default class JieshouhuiScreen extends Page {
render: (val, row, index) => {
return (
<div>
<a onClick={()=>{this.link('lcyame',row.inr)}}>修改</a>
{/* <a onClick={()=>{this.link('lcyame',row.inr)}}>修改</a> */}
<a onClick={()=>{this.com.link('lcyame',val,row,index)}}>修改</a>
<Divider type="vertical" />
<a onClick={()=>{this.link('lcydel',row.inr)}}>删除</a>
{/* <a onClick={()=>{this.link('lcydel',row.inr)}}>删除</a> */}
<a onClick={()=>{this.com.link('lcydel',val,row,index)}}>删除</a>
</div>
)
}
......@@ -87,7 +98,8 @@ export default class JieshouhuiScreen extends Page {
//交易跳转函数,若参数inr存在,则赋值给this.lidinr,此时为闭卷或者到单,不存在则为信用证其他
//调用后台查询是否符合跳转前提(前手交易是否复核),根据返回值决定是否带参跳转至pathname交易
async link(pathname, inr){
async link(pathname,inr){
if(inr){
this.lidinr = inr
}
......@@ -237,11 +249,12 @@ export default class JieshouhuiScreen extends Page {
rowKey="inr" size="middle"
onRow={ row=>({onClick:()=>this.onSelcon(row.inr)}) }
columns={this.litmod_lidlstHeader}
dataSource={this.model.litmod_lidlst}
dataSource={this.state.dataSource}
rowClassName={this.rowClass}
/>
</Col>
</Row>
<BottomBtn _this={this} wrappedComponentRef={ref => (this.com = ref)} css={{display:'none'}}/>
</div >
)
}
......
......@@ -33,7 +33,7 @@ export default class PcyselScreen extends Page
constructor(props) {
super(props)
this.state = {
flag: true
flag: true,
}
this.model = new mPcysel()
}
......@@ -43,13 +43,7 @@ export default class PcyselScreen extends Page
/*
*添加初始化代码
*/
const rtnmsg = await Api.post('pcysel/init',{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
const {data} = rtnmsg
Object.assign(this.model,data)
}
// Object.assign(this.model, );
//快照模式下,不必开启校验,否则,静默校验,和记录变动
!this.loadDisplay() && this.model.openMonitor && this.model.openMonitor() //开启校验
}
......@@ -60,6 +54,8 @@ export default class PcyselScreen extends Page
//交易内实现
renderPage(){
return (
<Card title="结售汇" size="small" className="transTitle">
<Steps>
......
......@@ -3,7 +3,10 @@ import { Row, Col } from 'antd';
import { ConfirmButton, Button, Label } from '@/components/Common-Library'
import { observable } from 'mobx'
import { inject, observer } from 'mobx-react'
import { Link, withRouter } from 'react-router-dom'
global.dataSources =[]
global.dataSources1 =[]
@withRouter
@observer
export default class BottomBtn extends Component{
constructor(){
......@@ -25,29 +28,63 @@ export default class BottomBtn extends Component{
onSav = () => {
//点击按钮第一时间让按钮处于等待状态,防止多次点击触发事件
this.savLoading = true
// if(this.props.history.location.query){
// console.log(this.props.history.location.query.model)
// this.state.dataSource=this.props.history.location.query.model
// console.log(this.state.dataSource)
// }
// if(this.props.dataSource &&!(this.props.dataSource instanceof Array)){
// console.log(this.props.dataSource)
// global.dataSources.push(this.props.dataSource)
// console.log( global.dataSources)
// this.setState({
// dataSource: global.dataSources
// })
// }
if(this.props._this.model &&!(this.props._this.model instanceof Array)){
global.dataSources.push(this.props._this.model)
}
this.props.history.push({ pathname:'pcysel', query: { model:this.props._this.model} })
setTimeout(()=>{
this.savLoading = false
},3000)
}
onDelete=(val, row, index)=>{
console.log(val)
global.dataSources.splice( global.dataSources.indexOf(val), 1);
console.log(row)
console.log(index)
}
async link(pathname, val,row,index){
this.onDelete(val, row, index)
if(val){
this.lidinr = val
}
// 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}` })
// }
}
render(){
return (
<Row type="flex" justify="center">
<Col>
<div className="button0">
<div className="button0" style={this.props.css}>
<div className='button2'>
<ConfirmButton type="primary"
onOK={this.onRtn}
onOK1={this.onRtnPed}
message="确定退出?"
isped={true}
disabled={this.props.disabled}
>
<Label itext="退出" />
</ConfirmButton>
</div>
<div className='button2'>
<div className='button2' style={this.props.css}>
<ConfirmButton type="primary"
onOK={this.onSav}
icon="save"
......
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