import React, { Component, Fragment } from 'react'
import {
    Page, Validator, Notification, FormItem, DatePickerItem, Section, Checkbox,
    InputItem, Input, Bind, SelectItem, Button, Label, Image, Table, Steps, ConfirmButton,
} from '@/components/Common-Library'
import Api from '@/service/api'
import { Row, Col, Spin } from 'antd'
import mCptspe from '../model'
import CodeTableFactory from '@/components/CodeTable'
import "./index.less"
import { inject, observer } from 'mobx-react'
import { Link, withRouter } from 'react-router-dom'
import { action, observable } from 'mobx'
import Ptspta from '@/views/Public/Ptspta'
import { YwbhPicker } from '@/components/Business-Library'

const { Pre, Next, StepWrapper } = Steps
const CodeTable = CodeTableFactory.getInstance()

@withRouter
@inject('UserContext')
@inject('i18n')
@observer
export default class CptspeBasicScreen extends Page {
    @observable
    formBlur = false

    constructor(props) {
        super(props)
        // this.model = new mCptspe()
        this.model = props.model;
        // this.model.openValidate() //开启校验
        this.bind = Bind.bind(this)
    }

    componentWillUnmount() {
        // this.model.closeValidate()//关闭校验
    }

    glemod_glelstHeader = [
        {
            title: <Label i18nId="GLEMOD_TH000076" />,
            dsp: `借/贷`,
            dataIndex: "dbtcdt",
            key: "dbtcdt",
            width: 100,
        },
        {
            title: <Label i18nId="GLEMOD_TH000077" />,
            dsp: `账号`,
            dataIndex: "act",
            key: "act",
            width: 100,
        },
        {
            title: <Label i18nId="GLEMOD_TH000078" />,
            dsp: `币种`,
            dataIndex: "cur",
            key: "cur",
            width: 100,
        },
        {
            title: <Label i18nId="GLEMOD_TH000079" />,
            dsp: `金额`,
            dataIndex: "amt",
            key: "amt",
            width: 100,
        },
        {
            title: <Label i18nId="GLEMOD_TH000080" />,
            dsp: `起息日`,
            dataIndex: "valdat",
            key: "valdat",
            width: 100,
        },
        {
            title: <Label i18nId="GLEMOD_TH000081" />,
            dsp: `科目号`,
            dataIndex: "trmtyp",
            key: "trmtyp",
            width: 100,
        },
        {
            title: <Label i18nId="GLEMOD_TH000082" />,
            dsp: `PN序号`,
            dataIndex: "prn",
            key: "prn",
            width: 100,
        },
        {
            title: <Label i18nId="GLEMOD_" />,

            dataIndex: "dsp",
            key: "dsp",
            width: 100,
        },
        {
            title: <Label i18nId="GLEMOD_" />,

            dataIndex: "rat",
            key: "rat",
            width: 100,
        },
        {
            title: <Label i18nId="GLEMOD_TH000084" />,
            dsp: ``,
            dataIndex: "fctsgn",
            key: "fctsgn",
            width: 100,
        },
    ]
    docmod_doclstHeader = [
        {
            title: <Label i18nId="TRNDOC_TH004773" />,
            dsp: `角色`,
            dataIndex: "role",
            key: "role",
            width: 100,
        },
        {
            title: <Label i18nId="TRNDOC_TH004787" />,
            dsp: `码值`,
            dataIndex: "id",
            key: "id",
            width: 100,
        },
        {
            title: <Label i18nId="TRNDOC_TH004788" />,
            dsp: `凭证名称`,
            dataIndex: "docnam",
            key: "docnam",
            width: 100,
        },
        {
            title: <Label i18nId="TRNDOC_TH004775" />,
            dsp: `凭证类型`,
            dataIndex: "cortyp",
            key: "cortyp",
            width: 100,
        },
        {
            title: <Label i18nId="TRNDOC_TH004789" />,
            dsp: `出具/发送`,
            dataIndex: "mdtflg",
            key: "mdtflg",
            width: 100,
        },
        {
            title: <Label i18nId="TRNDOC_TH004790" />,
            dsp: ``,
            dataIndex: "ptainr",
            key: "ptainr",
            width: 100,
        },
    ]
    fegmod_feslstHeader = [
        {
            title: <Label i18nId="SETMOD_TH001629" />,
            dsp: `角色`,
            dataIndex: "rol",
            key: "rol",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001606" />,
            dsp: `费用代码`,
            dataIndex: "feecod",
            key: "feecod",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001620" />,
            dsp: `费用名称`,
            dataIndex: "feetxt",
            key: "feetxt",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001608" />,
            dsp: `收费币种`,
            dataIndex: "cur",
            key: "cur",
            width: 100,
            render: (val, row, index) => {
                let text = val
                let em = CodeTable.curtxt.find(item => item.value == val)
                if (em)
                    text = em.label
                return text
            }
        },
        {
            title: <Label i18nId="SETMOD_TH001605" />,
            dsp: `应收金额`,
            dataIndex: "basamt",
            key: "basamt",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001609" />,
            dsp: `实收金额`,
            dataIndex: "amt",
            key: "amt",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001611" />,
            dsp: `现收/缓收`,
            dataIndex: "dsp",
            key: "dsp",
            width: 100,
            render: (val, row, index) => {
                let text = val
                let em = CodeTable.dsp.find(item => item.value == val)
                if (em)
                    text = em.label
                return text
            }
        },
        {
            title: <Label i18nId="SETMOD_TH001610" />,
            dsp: `内扣/外收`,
            dataIndex: "payflg",
            key: "payflg",
            width: 100,
            render: (val, row, index) => {
                let text = val
                let em = CodeTable.payflg.find(item => item.value == val)
                if (em)
                    text = em.label
                return text
            }
        },
        {
            title: <Label i18nId="SETMOD_" />,

            dataIndex: "xrfcur",
            key: "xrfcur",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001624" />,
            dsp: ``,
            dataIndex: "xrfamt",
            key: "xrfamt",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001634" />,
            dsp: ``,
            dataIndex: "feeacc",
            key: "feeacc",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001635" />,
            dsp: ``,
            dataIndex: "fepinr",
            key: "fepinr",
            width: 100,
        },
    ]
    glgmod_glslstHeader = [
        {
            title: <Label i18nId="SETMOD_TH001630" />,
            dsp: `角色`,
            dataIndex: "rol",
            key: "rol",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001623" />,
            dsp: `借/贷`,
            dataIndex: "debcdtflg",
            key: "debcdtflg",
            width: 100,
            render: (val, row, index) => {
                let text = val
                let em = CodeTable.debcdtflg.find(item => item.value == val)
                if (em)
                    text = em.label
                return text
            }
        },
        {
            title: <Label i18nId="SETMOD_TH001614" />,
            dsp: `结算币种`,
            dataIndex: "cur",
            key: "cur",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001615" />,
            dsp: `结算金额`,
            dataIndex: "amt",
            key: "amt",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001616" />,
            dsp: `结算方式`,
            dataIndex: "dsp",
            key: "dsp",
            width: 100,
            render: (val, row, index) => {
                let text = val
                let em = CodeTable.dsp2.find(item => item.value == val)
                if (em)
                    text = em.label
                return text
            }
        },
        {
            title: <Label i18nId="SETMOD_TH001617" />,
            dsp: `账户`,
            dataIndex: "act",
            key: "act",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001612" />,
            dsp: `原币种`,
            dataIndex: "acccur",
            key: "acccur",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001625" />,
            dsp: `原金额`,
            dataIndex: "accamt",
            key: "accamt",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001626" />,
            dsp: ``,
            dataIndex: "actflg",
            key: "actflg",
            width: 100,
        },
        {
            title: <Label i18nId="SETMOD_TH001631" />,
            dsp: ``,
            dataIndex: "fmtamt",
            key: "fmtamt",
            width: 100,
        },
    ]


    //按钮事件
    onCodsel1_selbut = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/codsel1_selbut', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPyep_ptysel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pyep_ptysel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onPyep_ptysel' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onRmtp_sel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/rmtp_sel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onRmtp_sel' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onSetmod_ast = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/setmod_ast', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onSetmod_ast' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onBaspp1_getref = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/baspp1_getref', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!console.log(rtnmsg.data.ownref);' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPybp1_ptysel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pybp1_ptysel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onPybp1_ptysel' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPyep_sel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pyep_sel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onPyep_sel' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onSetmod_recal = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/setmod_recal', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onSetmod_recal' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPed = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/ped', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onPed' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onCodsel2_selbut = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/codsel2_selbut', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onCodsel2_selbut' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPts3_extkey = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pts3_extkey', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onPts3_extkey' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onGlemod_rebook = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/glemod_rebook', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onGlemod_rebook' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onBaspp_getref = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/baspp_getref', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onBaspp_getref' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onCodsel11_selbut = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/codsel11_selbut', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onCodsel11_selbut' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onOrip1_sel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/orip1_sel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onOrip1_sel' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onChk = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/chk', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onChk' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPts8_adrblk = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pts8_adrblk', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onPts8_adrblk' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onSwftyp = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/swftyp', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onSwftyp' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onBas_custype = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/bas_custype', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!onBas_custype' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onTrndoc_butshw = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/trndoc_butshw', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onCodsel1_selbut1 = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/codsel1_selbut1', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onRmtp_ptysel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/rmtp_ptysel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onOrcp_sel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/orcp_sel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onOrip_ptysel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/orip_ptysel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onOrip_sel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/orip_sel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPybp_ptysel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pybp_ptysel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPts4_adrblk = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pts4_adrblk', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onSndp_sel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/sndp_sel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onBas1_ownextkey = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/bas1_ownextkey', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onBas1_custype = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/bas1_custype', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPts2_adrblk = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pts2_adrblk', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPts_adrblk = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pts_adrblk', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPybp_sel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pybp_sel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPts5_adrblk = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pts5_adrblk', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPts6_adrblk = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pts6_adrblk', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPts3_adrblk = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pts3_adrblk', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPts1_adrblk = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pts1_adrblk', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onOrcp_ptysel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/orcp_ptysel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onCodsel21_selbut = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/codsel21_selbut', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onBas_ownextkey = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/bas_ownextkey', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPts9_adrblk = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pts9_adrblk', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onOwnref = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/ownref', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onSav = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/sav', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPts7_adrblk = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pts7_adrblk', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onSndp_ptysel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/sndp_ptysel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPyep1_sel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pyep1_sel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onPybp1_sel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pybp1_sel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onMsgmod_butshw = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/msgmod_butshw', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onRtn = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/rtn', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onOrip1_ptysel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/orip1_ptysel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onAcsp_sel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/acsp_sel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onGetref = async () => {
        this.formBlur = true  //已触发表单提交处理
        const rtnmsg = await Api.post('cptspe/getref', { data: this.model })
        if (rtnmsg.retcod == SUCCESS) {
            // Notification.success({ message: '数据提交成功!onGetref' })
            this.model.ownref = rtnmsg.data.ownref;
        }
        else {
            Notification.error({ message: '服务端请求失败!' })
        }
        //余下逻辑处理


    }
    onPyep1_ptysel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/pyep1_ptysel', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onTrndoc_reldoc = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/trndoc_reldoc', { data: this.model })
            if (rtnmsg.retcod == SUCCESS) {
                Notification.success({ message: '数据提交成功!' })

            }
            else {
                Notification.error({ message: '服务端请求失败!' })
            }
            //余下逻辑处理

        })
    }
    onAcsp_ptysel = () => {
        this.formBlur = true  //已触发表单提交处理
        Validator.validate(this.model, this.model.descriptor, async (errors, values) => {
            if (errors)
                return
            const rtnmsg = await Api.post('cptspe/acsp_ptysel', { 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框 */}
                                <Label i18nId={"CPTP_LT000054"} />
                            </Col>
                            <Col span={10}>
                                {/* 业务编号 输入框 // \cpdgrp\rec\ownref    业务编号 */}
                                <InputItem InputProps={bind("ownref")} maxLength={16} desp="业务编号" path="/cpdgrp/rec/ownref" />
                            </Col>
                            <Col span={4} offset={1}>
                                {/* 业务编号 查询按钮 */}
                                {/* <Button type="primary" onClick={this.onGetref}>
                                    <Label i18nId="CPTP_BT000091" />
                                </Button> */}
                                <YwbhPicker type="primary" onChange={(data) => { Object.assign(this.model, data) }} onClick={() => this.onGetref()}>
                                    <Label i18nId="查询" />
                                </YwbhPicker>
                            </Col>
                        </Row>
                    </Col>
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>
                                {/* 业务归属机构 label框 */}
                                <Label i18nId={"CPTP_LT000052"} />
                            </Col>
                            <Col span={14}>
                                <SelectItem InputProps={bind("branchinr")} desp="所属机构" path="/cpdgrp/rec/branchinr" />
                            </Col>
                        </Row>
                    </Col>
                </Row>
                {/*第二行*/}
                <Row >
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>
                                {/* 汇款方式 label框 */}
                                <Label i18nId={"CPTP_LT000060"} />
                            </Col>
                            <Col span={14}>
                                {/* // \cpdgrp\rec\paytyp    汇款方式  汇款方式 选择输入框 */}
                                <SelectItem InputProps={bind("paytyp")} code={CodeTable.paytyp} desp="汇款方式" path="/cpdgrp/rec/paytyp" />
                            </Col>
                        </Row>
                    </Col>
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>
                                {/* 客户经理 label框 */}
                                <Label i18nId={"CPTP_LT000059"} />
                            </Col>
                            <Col span={14}>
                                <InputItem InputProps={bind("pty_ownusr")} maxLength={10} desp="客户经理" path="/cpdgrp/orc/pty/ownusr" />
                            </Col>
                        </Row>
                    </Col>
                </Row>
                {/*第三行*/}
                <Row >
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>
                                {/* 汇款类型 label框 */}
                                <Label i18nId={"CPTP_LT000061"} />
                            </Col>
                            <Col span={14}>
                                <SelectItem InputProps={bind("cpdflg")} code={CodeTable.custyp} desp="汇款类型" path="/cpdgrp/rec/cpdflg" />
                            </Col>
                        </Row>
                    </Col>
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>
                                {/* 汇款人性质 label框 */}
                                <Label i18nId={"CPTP_LT000087"} />
                            </Col>
                            <Col span={14}>
                                <SelectItem InputProps={bind("custyp")} code={CodeTable.ptytyp} desp="汇款人性质" path="/cpdgrp/rec/custyp" />
                            </Col>
                        </Row>
                    </Col>
                </Row>
                {/* 第四行 */}
                <Row>
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>

                                <Label value="汇款币种金额" />
                            </Col>
                            <Col span={5}>
                                <SelectItem InputProps={bind("max_cur")} code={CodeTable.curtxt} desp="Currency" path="/cpdgrp/cbs/max/cur" />
                            </Col>
                            <Col span={8} offset={1}>
                                <InputItem InputProps={bind("max_amt")} desp="Balance" path="/cpdgrp/cbs/max/amt" />
                            </Col>
                        </Row>
                    </Col>
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>
                                {/* 起息日 label框 */}
                                <Label i18nId={"CPTP_LT000063"} />
                            </Col>
                            <Col span={14}>
                                <DatePickerItem InputProps={bind("valdat")} desp="起息日" path="/cpdgrp/rec/valdat" />
                            </Col>
                        </Row>
                    </Col>
                </Row>
                {/* 第五行 */}
                <Row>
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>
                                {/* 清算路径 label框 */}
                                <Label i18nId={"CPTP_LT000065"} />
                            </Col>
                            <Col span={14}>
                                <SelectItem InputProps={bind("liqtyp")} code={CodeTable.liqtyp} desp="清算路径" path="/cpdgrp/rec/liqtyp" />
                            </Col>
                        </Row>
                    </Col>
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>
                                {/* 报文类型 label框 */}
                                <Label i18nId={"CPTP_LT000066"} />
                            </Col>
                            <Col span={14}>
                                <SelectItem InputProps={bind("swftyp")} code={CodeTable.swftyp} desp="报文类型" path="/cpdgrp/rec/swftyp" />
                            </Col>
                        </Row>
                    </Col>
                </Row>
                {/*第六行*/}
                <Row >
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>
                                <Label value="交易对手国别" />
                            </Col>
                            <Col span={14}>
                                <SelectItem InputProps={bind("stacty")} desp="交易对手国别" path="/cpdgrp/rec/stacty" />
                            </Col>
                        </Row>
                    </Col>
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>
                                {/* 解付方式 label框 */}
                                <Label i18nId={"CPTP_LT000064"} />
                            </Col>
                            <Col span={14}>
                                <SelectItem InputProps={bind("diptyp")} code={this.props.code.diptyp} desp="解付方式" path="/cpdgrp/rec/diptyp" />

                            </Col>
                        </Row>
                    </Col>
                </Row>


                {/*第七行*/}
                {/* 四个查询 用public中的组件 */}
                <Row>
                    {/* 收款人 */}
                    <Ptspta
                        model={this.model}
                        argArr={{
                            desc: "收款人",
                            prefix: 'pts',
                            url: 'cptspe/pyep_ptysel',
                            flg: 'C',
                            datakey: '\\cptp\\pyep\\ptslst'
                        }} />
                    {/* 汇款人 pts1_extkey*/}
                    <Ptspta
                        model={this.model}
                        argArr={{
                            desc: "汇款人",
                            prefix: 'pts1',
                            url: 'cptspe/orcp_ptysel',
                            flg: 'C',
                            datakey: '\\cptp\\orcp\\ptslst'
                        }} />
                </Row>
                {/*第八行*/}
                <Row >
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>
                                {/* 收款人账号 label框 */}
                                <Label i18nId={"CPTP_LT000069"} />
                            </Col>
                            <Col span={14}>
                                {/* // \cpdgrp\rec\pyeacc    收款人账号 收款人账号？ 输入框 */}
                                <InputItem InputProps={bind("pyeacc")} />
                            </Col>
                        </Row>
                    </Col>
                    <Col span={12}>
                        <Row className='row'>
                            <Col span={5} offset={2}>
                                {/* 汇款人账号 label框 */}
                                <Label i18nId={"CPTP_LT000070"} />
                            </Col>
                            <Col span={14}>
                                {/* // \cpdgrp\rec\orcacc    付款人账号 汇款人账号？ 输入框 */}
                                <InputItem InputProps={bind("orcacc")} />
                            </Col>
                        </Row>
                    </Col>
                </Row>
                {/*第九行*/}
                <Row>
                    {/* 我行账户行 pts2_extkey */}
                    <Ptspta
                        model={this.model}
                        argArr={{
                            desc: "我行账户行",
                            prefix: 'pts2',
                            url: 'cptspe/orip_ptysel',
                            flg: 'B',
                            datakey: '\\cptp\\orip\\ptslst'
                        }} />
                    {/* 汇款人账户行 pts3_extkey*/}
                    <Ptspta
                        model={this.model}
                        argArr={{
                            desc: "汇款人账户行",
                            prefix: 'pts3',
                            url: 'cptspe/pybp_ptysel',
                            flg: 'B',
                            datakey: '\\cptp\\pybp\\ptslst'
                        }} />
                </Row>
                <Row type="flex" justify="center">
                    <Col>
                        <div className='button2'>
                            {/* 退出按钮 */}
                            <ConfirmButton
                                onOK={this.onRtn}
                                title=""
                                message="确定退出？"
                            >
                                <Label i18nId="MTABUT_BT000464" />
                            </ConfirmButton>
                        </div>
                        <div className='button2'>
                            {/* 暂存按钮 */}
                            <ConfirmButton
                                onOK={this.onPed}
                                title=""
                                message="确定暂存？"
                            >
                                <Label i18nId="MTABUT_BT000398" />
                            </ConfirmButton>
                        </div>
                        <div className='button2'>
                            {/* 检核按钮 */}
                            <Button type="primary" onClick={this.onChk}>
                                <Label i18nId="MTABUT_BT000180" />
                            </Button>
                        </div>
                    </Col>
                </Row>
            </div>
        )
    }
}
