ProjectInformation

131 阅读15分钟
import React from 'react';
import {
  View,
  Text,
  ScrollView,
  StyleSheet,
  TouchableOpacity,
  TextInput,
  PixelRatio,
  SafeAreaView
} from 'react-native';
import PropTypes from 'prop-types';
import { createForm } from 'rc-form';
import { connect } from 'react-redux';
import { NavigationEvents } from 'react-navigation';
import {
  // InputItem,
  CommonButton,
  Cell,
  RightArrow,
  PickerItem,
  Toast,
  Dialog,
  Back,
  Radio,
  Delete
} from '../../../../components';
import { ColorCommon, GapCommon } from '../../../../assets/publicConsts';
import GlobalStyles from '../../../../assets/globalStyles';
import { RNLog } from '../../../../utils/Tool';
// import { RNLog } from '../../../../utils/Tool';

const leasingMode = [ // 租赁模式
  { label: '直租', value: 1 },
  { label: '二手车回租', value: 2 },
  { label: '新车回租', value: 3 },
];

const contractVersionList = [
  { label: '自然人V1', value: 1 },
  { label: '自然人V2', value: 2 },
  { label: '法人', value: 3 },
];

const rentBack = [
  { label: '快捷支付', value: 5 },
  { label: '电汇支付', value: 2 },
];

const paymentList = [ // 付款方式
  { label: '电汇', value: 1 },
  { label: '银行承兑', value: 2 },
];

const rentAlert = [
  { label: '精确提醒', value: 1 },
  { label: '模糊提醒', value: 2 },
];

const receiving = [
  { label: '授信方', value: 1 },
  { label: '经销商', value: 2 },
  { label: '其他', value: 3 },
];
const dataP = {
  1: '担保',
  2: '非担保',
  3: '类担保',
  4: '弱担保'
};
const userCarType = [
  { label: '新车过户', value: 1 },
  { label: '二手车', value: 2 },
];
const options = [
  { label: '是', value: '1' },
  { label: '否', value: '0' }
];


let isEdit = true;
class ProjectInformation extends React.Component {
  static navigationOptions = ({ navigation }) => ({
    headerLeft: <Back navigation={navigation} onBeforeUnload={navigation.getParam('onBeforeUnload')} />,
  });

  static propTypes = {
    form: PropTypes.object.isRequired,
    navigation: PropTypes.object.isRequired,
    dispatch: PropTypes.func.isRequired,
    ContractVersionInfoList: PropTypes.object.isRequired,
    reportListAll: PropTypes.object.isRequired,
    projectForm: PropTypes.object.isRequired,
    projectAccountForm1: PropTypes.object.isRequired, // 项目信息 -> 账户信息
    projectAccountForm2: PropTypes.object.isRequired, // 项目信息 -> 账户信息
    getViewWithDrawal: PropTypes.object.isRequired,
    bankaccountInfoList: PropTypes.object.isRequired
    // submitAllList: PropTypes.object.isRequired,
  };

  state = {
    name3: '', // 授信方
    autherID: '', // 授信方ID
    name4: '', // 经销商
    dealerID: '', // 经销商ID
    icNameData: [], // 创新业务集合
    payCarMoneyType: '', // 收款方
    contractVersionNoNo: '', // 版本号
    payTypeflag: '' // 付款方式
  };

  componentWillUnmount() {
    const { dispatch } = this.props;
    dispatch({ type: 'CONTRACTVERSION_LIST_SUCCESS', data: {} });
  }

  handleWillFocus = () => {
    const { navigation, projectForm } = this.props;
    const data = navigation.getParam('data');
    if (projectForm[data ? data.loanID : '']) {
      const { rentType, contractVersion, c50151 } = projectForm[data ? data.loanID : ''];
      if (rentType && contractVersion && c50151) {
        this.handleContractVersionInfo(rentType, contractVersion, c50151, '', '', '', ''); // 合同版本号
      }
    }
    // 总查询
    this.handleReportSearchAll();
    navigation.setParams({
      onBeforeUnload: this.onBeforeUnload
    });
  }

  handleClear = (value) => {
    const { dispatch } = this.props;
    dispatch({ type: 'BANKINFO_SUCCESS', data: [] });
    this.setState({ payTypeflag: value });
  }

  changeReceivingSide = (value) => {
    const {
      dispatch, reportListAll, navigation, form
    } = this.props;
    const { getFieldValue } = form;
    const data = navigation.getParam('data');
    const { loanID } = data;
    const { autherID, dealerID } = this.state;
    this.setState({
      payCarMoneyType: value
    });
    // 查看收款方账户
    if (value === 3) {
      const bankInfoParams = {
        accountType: 3,
        loanId: loanID,
        bankType: getFieldValue('payType')
      };
      if (bankInfoParams.accountType
        && bankInfoParams.loanId
        && bankInfoParams.bankType) {
        dispatch({
          type: 'GET_BANKINFO',
          bankInfoParams
        });
      }
    } else if (value === 1) {
      const bankInfoParams = {
        accountType: 1,
        customerId: autherID || reportListAll.autherID,
        loanId: loanID,
        bankType: getFieldValue('payType')
      };
      if (bankInfoParams.accountType
        && bankInfoParams.customerId
        && bankInfoParams.customerId !== 0
        && bankInfoParams.loanId
        && bankInfoParams.bankType
      ) {
        dispatch({
          type: 'GET_BANKINFO',
          bankInfoParams
        });
      }
    } else if (value === 2) {
      const bankInfoParams = {
        accountType: 2,
        customerId: dealerID || reportListAll.dealerID,
        loanId: loanID,
        bankType: getFieldValue('payType')
      };
      if (bankInfoParams.accountType
        && bankInfoParams.customerId
        && bankInfoParams.customerId !== 0
        && bankInfoParams.loanId
        && bankInfoParams.bankType
      ) {
        dispatch({
          type: 'GET_BANKINFO',
          bankInfoParams
        });
      }
    }
  }

  // 离开页面
  onBeforeUnload = () => {
    const {
      navigation, form, dispatch, projectForm
    } = this.props;
    const routerParam = navigation.getParam('data');
    const { getFieldsValue } = form;
    const data = getFieldsValue();
    if ((routerParam
      && routerParam.status
      && routerParam.status === 1)
      || !routerParam.flagButton
      || (routerParam.flagApproing && routerParam.flagApproing === 1)) { // 若为编辑或者审批中查看,直接返回
      navigation.goBack();
      return;
    }
    // 判断表单是否修改
    if (isEdit) { // 没有更改表单值,直接返回
      navigation.goBack();
      return;
    }
    Dialog.show({
      title: '提示信息',
      notice: '保留此次编辑?',
      confirm: '保留',
      cancel: '不保留',
      cancelDoIt: () => {
        isEdit = true; // 操作后恢复初始值
        projectForm[routerParam.loanID] = {}; // 不保存将数据清空
        Dialog.hide();
        dispatch({ type: 'SET_PROJECT_INFO_FORM', data: projectForm });
        navigation.goBack();
      },
      confirmDoIt: () => {
        isEdit = true; // 操作后恢复初始值
        data.rentPayType = data.receiceRentType;
        data.receivePayType = data.payCarMoneyType;
        projectForm[routerParam.loanID] = data; // 列表存在多条数据,若保存数据需要将ID对应起来便于回显
        Dialog.hide();
        dispatch({ type: 'SET_PROJECT_INFO_FORM', data: projectForm }); // 将更改的值保存在redux中
        navigation.goBack();
      },
    });
  }

  // 合同版本号查询
  handleContractVersionInfo = (rentTypeBack, contractVersionBack, c50151Back, type, receivePayTypeBack, autherIDBack, dealerIDback) => {
    const {
      navigation, form, dispatch
    } = this.props;
    const { payCarMoneyType } = this.state;
    const data = navigation.getParam('data');
    const { loanID } = data;
    const { assureType } = data;
    if (type) {
      form.setFieldsValue({ contractVersionNo: '' }); // 清空版本号
    }
    const params = {
      di_release: contractVersionBack, // 合同版本
      l_id: loanID, // 贷款ID
      c_assuretype: assureType, // 担保类型
      c_leasetype: rentTypeBack, // 租赁模式
      c50151: c50151Back // 直营模式
    };
    const withdrawalParams = {
      loanId: loanID
    };
    const { getFieldValue } = form;
    // const accViewFlag = navigation.getParam('accViewFlag');
    // const payCarMoneyTypeFlag = accViewFlag || receivePayTypeBack;
    const payCarMoneyTypeFlag = payCarMoneyType || receivePayTypeBack;
    // alert(payCarMoneyTypeFlag);
    const { autherID, dealerID } = this.state;
    if (
      params.di_release
      && params.l_id
      && params.c_assuretype
      && params.c_leasetype) {
      dispatch({
        type: 'GET_CONTRACTVERSION',
        params,
        callback: (res) => {
          if (res.status === 0) {
            dispatch({
              type: 'GET_VIEW_WITHDRAWAL', // 账户信息租金回笼
              withdrawalParams,
              callback: (req) => {
                if (req.status === 0) {
                  // 查看收款方账户
                  if (payCarMoneyTypeFlag === 3) {
                    const bankInfoParams = {
                      accountType: 3,
                      loanId: loanID,
                      bankType: getFieldValue('payType')
                    };
                    if (bankInfoParams.accountType
                      && bankInfoParams.loanId
                      && bankInfoParams.bankType) {
                      dispatch({
                        type: 'GET_BANKINFO',
                        bankInfoParams
                      });
                    }
                  } else if (payCarMoneyTypeFlag === 1) {
                    const bankInfoParams = {
                      accountType: 1,
                      customerId: autherID || autherIDBack,
                      loanId: loanID,
                      bankType: getFieldValue('payType')
                    };
                    if (bankInfoParams.accountType
                      && bankInfoParams.customerId
                      && bankInfoParams.customerId !== 0
                      && bankInfoParams.loanId
                      && bankInfoParams.bankType
                    ) {
                      dispatch({
                        type: 'GET_BANKINFO',
                        bankInfoParams
                      });
                    }
                  } else if (payCarMoneyTypeFlag === 2) {
                    const bankInfoParams = {
                      accountType: 2,
                      customerId: dealerID || dealerIDback,
                      loanId: loanID,
                      bankType: getFieldValue('payType')
                    };
                    if (bankInfoParams.accountType
                      && bankInfoParams.customerId
                      && bankInfoParams.customerId !== 0
                      && bankInfoParams.loanId
                      && bankInfoParams.bankType
                    ) {
                      dispatch({
                        type: 'GET_BANKINFO',
                        bankInfoParams
                      });
                    }
                  }
                }
              }
            });
          }
        }
      });
    }
  }

  // 总查询
  handleReportSearchAll = () => {
    const { dispatch, navigation, form } = this.props;
    const getFieldValue = form;
    const routerParam = navigation.getParam('data');
    const { loanID } = routerParam;
    const { icNameData, payCarMoneyType, autherID, dealerID, payTypeflag } = this.state;
    const params = {
      loanID
    };

    dispatch({
      type: 'GET_PROJECTSEARCHALL_LIST',
      params,
      callback: (res) => {
        if (res.status === 0) {
          if (res.data && res.data.rentType && res.data.contractVersion && res.data.acid) {
            // 合同版本号查询
            this.handleContractVersionInfo(res.data.rentType, res.data.contractVersion, res.data.c50151, '', res.data.receivePayType, res.data.autherID, res.data.dealerID);
          } else {
            // 授信方/经销商
            // 查看收款方账户
            const payCarMoneyTypeFlag = payCarMoneyType;
            if (payCarMoneyTypeFlag === 3) {
              const bankInfoParams = {
                accountType: 3,
                loanId: loanID,
                bankType: payTypeflag
              };
              if (bankInfoParams.accountType
                && bankInfoParams.loanId
                && bankInfoParams.bankType) {
                dispatch({
                  type: 'GET_BANKINFO',
                  bankInfoParams
                });
              }
            } else if (payCarMoneyTypeFlag === 1) {
              const bankInfoParams = {
                accountType: 1,
                customerId: autherID,
                loanId: loanID,
                bankType: payTypeflag
              };
              if (bankInfoParams.accountType
                && bankInfoParams.customerId
                && bankInfoParams.customerId !== 0
                && bankInfoParams.loanId
                && bankInfoParams.bankType
              ) {
                dispatch({
                  type: 'GET_BANKINFO',
                  bankInfoParams
                });
              }
            } else if (payCarMoneyTypeFlag === 2) {
              const bankInfoParams = {
                accountType: 2,
                customerId: dealerID,
                loanId: loanID,
                bankType: payTypeflag
              };
              if (bankInfoParams.accountType
                && bankInfoParams.customerId
                && bankInfoParams.customerId !== 0
                && bankInfoParams.loanId
                && bankInfoParams.bankType
              ) {
                dispatch({
                  type: 'GET_BANKINFO',
                  bankInfoParams
                });
              }
            }
          }
          if (res.data && res.data.innovateInBusinessIDS
            && res.data.innovateInBusinessIDS.length > 0) {
            this.setState({ icNameData: [...res.data.innovateInBusinessIDS, ...icNameData] });
          }
        }
      }
    });
  }

  // 总提交
  handleSubmit = () => {
    const {
      reportListAll,
      dispatch,
      navigation,
      form,
      projectForm
    } = this.props;
    const { getFieldValue, resetFields } = form;
    const accViewFlag = navigation.getParam('accViewFlag');//  授信方=1 经销商=2 其它=3 提交后
    const accEditFlag = navigation.getParam('accEditFlag');//  快捷支付=5 提交后
    const {
      autherID, dealerID, icNameData
    } = this.state;
    const receiceRentTypeFlag = form.getFieldValue('receiceRentType'); // 电汇=2 快捷支付=5
    const payCarMoneyTypeFlag = form.getFieldValue('payCarMoneyType'); // 授信方=1 经销商=2 其它=3

    const data = navigation.getParam('data');
    const { loanID, assureType } = data;

    const icNameDataList = [];
    icNameData.forEach((item) => {
      icNameDataList.push(item.icID);
    });

    form.validateFields((error, value) => {
      if (error) return;
      const params = {
        loanID, // 贷款ID
        assureType, // 担保类型
        autherID: autherID || reportListAll.autherID, // 授信方ID
        dealerID: dealerID || reportListAll.dealerID, // 经销商ID
        innovateInBusinessIDS: icNameDataList || reportListAll.innovateInBusinessIDS, // 创新业务ID集合
        ...value
      };
      if (params.innovateInBusinessIDS.length === 0 && params.innovateInBusinessType === '1') {
        Toast.show('请选择创新业务名称!');
        return;
      }
      const { flagApproing } = data; // 锁死授信方、经销商、担保模式
      // 查看回笼账户信息
      const withdrawalParams = {
        loanId: loanID
      };
      if (flagApproing === 1) {
        Dialog.show({
          notice: '因项目关键信息修改,提交将清空产品信息,需重新填写',
          cancel: '再想想',
          confirm: '确定',
          cancelDoIt: () => { Dialog.hide(); },
          confirmDoIt: () => {
            Dialog.hide();
            dispatch({
              type: 'GET_VIEW_WITHDRAWAL',
              withdrawalParams,
              callback: (res) => {
                if (res.status === 0) {
                  if (payCarMoneyTypeFlag === 1) {
                    const bankInfoParams = {
                      loanId: loanID,
                      accountType: 1,
                      customerId: autherID || reportListAll.autherID,
                      bankType: getFieldValue('payType')
                    };
                    if (bankInfoParams.loanId
                      && bankInfoParams.accountType
                      && bankInfoParams.customerId
                      && bankInfoParams.customerId !== 0
                      && bankInfoParams.bankType) {
                      dispatch({
                        type: 'GET_BANKINFO', // 查看经销商\授信方账户信息
                        bankInfoParams,
                        callback: (request) => {
                          if (request.status === 0) {
                            handSave(res.data, request.data);
                          }
                        }
                      });
                    }
                  }
                  if (payCarMoneyTypeFlag === 2) {
                    const bankInfoParams = {
                      loanId: loanID,
                      accountType: 2,
                      customerId: dealerID || reportListAll.dealerID,
                      bankType: getFieldValue('payType')
                    };
                    if (bankInfoParams.loanId
                      && bankInfoParams.accountType
                      && bankInfoParams.customerId
                      && bankInfoParams.customerId !== 0
                      && bankInfoParams.bankType) {
                      dispatch({
                        type: 'GET_BANKINFO', // 查看经销商\授信方账户信息
                        bankInfoParams,
                        callback: (request) => {
                          if (request.status === 0) {
                            handSave(res.data, request.data);
                          }
                        }
                      });
                    }
                  }
                  // 查看收款方账户
                  if (payCarMoneyTypeFlag === 3) {
                    const bankInfoParams = {
                      accountType: 3,
                      loanId: loanID,
                      bankType: getFieldValue('payType')
                    };
                    if (payCarMoneyTypeFlag.accountType
                      && payCarMoneyTypeFlag.loanId
                      && payCarMoneyTypeFlag.bankType) {
                      dispatch({
                        type: 'GET_BANKINFO',
                        bankInfoParams,
                        callback: (request) => {
                          if (request.status === 0) {
                            handSave(res.data, request.data);
                          }
                        }
                      });
                    }
                  }
                }
              }
            });
          },
        });
      } else {
        dispatch({
          type: 'GET_VIEW_WITHDRAWAL',
          withdrawalParams,
          callback: (res) => {
            if (res.status === 0) {
              if (payCarMoneyTypeFlag === 1) {
                const bankInfoParams = {
                  loanId: loanID,
                  accountType: 1,
                  customerId: autherID || reportListAll.autherID,
                  bankType: getFieldValue('payType')
                };
                if (bankInfoParams.loanId
                  && bankInfoParams.accountType
                  && bankInfoParams.customerId
                  && bankInfoParams.customerId !== 0
                  && bankInfoParams.bankType) {
                  dispatch({
                    type: 'GET_BANKINFO', // 查看经销商\授信方账户信息
                    bankInfoParams,
                    callback: (request) => {
                      if (request.status === 0) {
                        handSave(res.data, request.data);
                      }
                    }
                  });
                }
              }
              if (payCarMoneyTypeFlag === 2) {
                const bankInfoParams = {
                  loanId: loanID,
                  accountType: 2,
                  customerId: dealerID || reportListAll.dealerID,
                  bankType: getFieldValue('payType')
                };
                if (bankInfoParams.loanId
                  && bankInfoParams.accountType
                  && bankInfoParams.customerId
                  && bankInfoParams.customerId !== 0
                  && bankInfoParams.bankType) {
                  dispatch({
                    type: 'GET_BANKINFO', // 查看经销商\授信方账户信息
                    bankInfoParams,
                    callback: (request) => {
                      if (request.status === 0) {
                        handSave(res.data, request.data);
                      }
                    }
                  });
                }
              }
              // 查看收款方账户
              if (payCarMoneyTypeFlag === 3) {
                const bankInfoParams = {
                  accountType: 3,
                  loanId: loanID,
                  bankType: getFieldValue('payType')
                };
                if (bankInfoParams.accountType
                  && bankInfoParams.loanId
                  && bankInfoParams.bankType) {
                  dispatch({
                    type: 'GET_BANKINFO',
                    bankInfoParams,
                    callback: (request) => {
                      if (request.status === 0) {
                        handSave(res.data, request.data);
                      }
                    }
                  });
                }
              }
            }
          }
        });
      }

      const handSave = (getViewWithDrawal, bankaccountInfoList) => {
        // 回显与总提交
        if (
          receiceRentTypeFlag === 2
          && payCarMoneyTypeFlag === 3
          && (accViewFlag === 3
            || (bankaccountInfoList && bankaccountInfoList[0] && bankaccountInfoList[0].ba50032))) {
          dispatch({
            type: 'GET_GENERALSUBMIT_LIST',
            params,
            callback: (res) => {
              if (res.status === 0) {
                Toast.show('提交成功');
                resetFields('');
                projectForm[data.loanID] = {}; // 将当前loanId存储的数据清空
                dispatch({ type: 'SET_PROJECT_INFO_FORM', data: projectForm });
                // dispatch({ type: 'BANKINFO_SUCCESS', data: {} });
                navigation.goBack();
              }
            }
          });
        } else if (
          receiceRentTypeFlag === 2
          && payCarMoneyTypeFlag === 1
          && (accViewFlag === 1 || (bankaccountInfoList && bankaccountInfoList.find((item) => item.flag === 1)))) {
          dispatch({
            type: 'GET_GENERALSUBMIT_LIST',
            params,
            callback: (res) => {
              if (res.status === 0) {
                Toast.show('提交成功');
                resetFields('');
                projectForm[data.loanID] = {}; // 将当前loanId存储的数据清空
                dispatch({ type: 'SET_PROJECT_INFO_FORM', data: projectForm });
                // dispatch({ type: 'BANKINFO_SUCCESS', data: {} });
                navigation.goBack();
              }
            }
          });
        } else if (
          receiceRentTypeFlag === 2
          && payCarMoneyTypeFlag === 2
          && (accViewFlag === 2 || (bankaccountInfoList && bankaccountInfoList.find((item) => item.flag === 1)))) {
          dispatch({
            type: 'GET_GENERALSUBMIT_LIST',
            params,
            callback: (res) => {
              if (res.status === 0) {
                Toast.show('提交成功');
                resetFields('');
                projectForm[data.loanID] = {}; // 将当前loanId存储的数据清空
                dispatch({ type: 'SET_PROJECT_INFO_FORM', data: projectForm });
                // dispatch({ type: 'BANKINFO_SUCCESS', data: {} });
                navigation.goBack();
              }
            }
          });
        } else if (
          receiceRentTypeFlag === 5
          && (accEditFlag === 1 || getViewWithDrawal.ipa50570)
          && payCarMoneyTypeFlag === 3
          && (accViewFlag === 3 || (bankaccountInfoList && bankaccountInfoList[0].ba50032))) {
          dispatch({
            type: 'GET_GENERALSUBMIT_LIST',
            params,
            callback: (res) => {
              if (res.status === 0) {
                Toast.show('提交成功');
                resetFields('');
                projectForm[data.loanID] = {}; // 将当前loanId存储的数据清空
                dispatch({ type: 'SET_PROJECT_INFO_FORM', data: projectForm });
                // dispatch({ type: 'BANKINFO_SUCCESS', data: {} });
                navigation.goBack();
              }
            }
          });
        } else if (
          receiceRentTypeFlag === 5
          && (accEditFlag === 1 || getViewWithDrawal.ipa50570)
          && payCarMoneyTypeFlag === 1
          && (accViewFlag === 1 && (bankaccountInfoList && bankaccountInfoList.find((item) => item.flag === 1)))) {
          dispatch({
            type: 'GET_GENERALSUBMIT_LIST',
            params,
            callback: (res) => {
              if (res.status === 0) {
                Toast.show('提交成功');
                resetFields('');
                projectForm[data.loanID] = {}; // 将当前loanId存储的数据清空
                dispatch({ type: 'SET_PROJECT_INFO_FORM', data: projectForm });
                // dispatch({ type: 'BANKINFO_SUCCESS', data: {} });
                navigation.goBack();
              }
            }
          });
        } else if (
          receiceRentTypeFlag === 5
          && (accEditFlag === 1 || getViewWithDrawal.ipa50570)
          && payCarMoneyTypeFlag === 2
          && (accViewFlag === 2 && (bankaccountInfoList && bankaccountInfoList.find((item) => item.flag === 1)))) {
          dispatch({
            type: 'GET_GENERALSUBMIT_LIST',
            params,
            callback: (res) => {
              if (res.status === 0) {
                Toast.show('提交成功');
                resetFields('');
                projectForm[data.loanID] = {}; // 将当前loanId存储的数据清空
                dispatch({ type: 'SET_PROJECT_INFO_FORM', data: projectForm });
                // dispatch({ type: 'BANKINFO_SUCCESS', data: {} });
                navigation.goBack();
              }
            }
          });
        } else if (
          receiceRentTypeFlag === 5
          && payCarMoneyTypeFlag === 3
          && getViewWithDrawal.ipa50570
          && (accViewFlag === 3 || (bankaccountInfoList && bankaccountInfoList[0].ba50032))) {
          dispatch({
            type: 'GET_GENERALSUBMIT_LIST',
            params,
            callback: (res) => {
              if (res.status === 0) {
                Toast.show('提交成功');
                resetFields('');
                projectForm[data.loanID] = {}; // 将当前loanId存储的数据清空
                dispatch({ type: 'SET_PROJECT_INFO_FORM', data: projectForm });
                // dispatch({ type: 'BANKINFO_SUCCESS', data: {} });
                navigation.goBack();
              }
            }
          });
        } else if (
          receiceRentTypeFlag === 5
          && payCarMoneyTypeFlag === 1
          && getViewWithDrawal.ipa50570
          && (accViewFlag === 1 || (bankaccountInfoList && bankaccountInfoList.find((item) => item.flag === 1)))) {
          dispatch({
            type: 'GET_GENERALSUBMIT_LIST',
            params,
            callback: (res) => {
              if (res.status === 0) {
                Toast.show('提交成功');
                resetFields('');
                projectForm[data.loanID] = {}; // 将当前loanId存储的数据清空
                dispatch({ type: 'SET_PROJECT_INFO_FORM', data: projectForm });
                // dispatch({ type: 'BANKINFO_SUCCESS', data: {} });
                navigation.goBack();
              }
            }
          });
        } else if (
          receiceRentTypeFlag === 5
          && payCarMoneyTypeFlag === 2
          && getViewWithDrawal.ipa50570
          && (accViewFlag === 2 || (bankaccountInfoList && bankaccountInfoList.find((item) => item.flag === 1)))) {
          dispatch({
            type: 'GET_GENERALSUBMIT_LIST',
            params,
            callback: (res) => {
              if (res.status === 0) {
                Toast.show('提交成功');
                resetFields('');
                projectForm[data.loanID] = {}; // 将当前loanId存储的数据清空
                dispatch({ type: 'SET_PROJECT_INFO_FORM', data: projectForm });
                // dispatch({ type: 'BANKINFO_SUCCESS', data: {} });
                navigation.goBack();
              }
            }
          });
        } else {
          Toast.show('请填写相关数据再提交');
        }
      };
    });
  }

  handlepayCarMoneyType = (getFieldValue, navigation, autherID, reportListAll, accViewFlag, bankaccountInfoList) => {
    if (getFieldValue('payCarMoneyType') === 1) {
      return (
        <TouchableOpacity onPress={() => {
          const routerParam = navigation.getParam('data');
          const { loanID } = routerParam;
          const payType = getFieldValue('payType');
          if (!payType) {
            Toast.show('请选择付款方式');
            return;
          }
          if (!autherID && !reportListAll.autherID) {
            Toast.show('请选择经销商');
            return;
          }
          const _data = paymentList.filter((item) => item.value === payType);
          navigation.navigate('AccountInfoView', {
            flagKey: 1, autherID, loanID, _data, data: routerParam
          });
        }}
        >
          <Cell label="账户信息" required>
            <View style={styles.info}>
              {(bankaccountInfoList && bankaccountInfoList[0] && bankaccountInfoList.find((item) => item.flag === 1) && getFieldValue('payCarMoneyType') === 1)
                ? (<Text style={styles.infomationComplete}>已完成</Text>)
                : (<Text style={styles.infomation}>请确认</Text>)}
              <RightArrow style={{ width: 16, height: 16 }} />
            </View>
          </Cell>
        </TouchableOpacity>
      );
    } return null;
  }

  handlepayCarMoney = (getFieldValue, navigation, dealerID, reportListAll, accViewFlag, bankaccountInfoList) => {
    if (getFieldValue('payCarMoneyType') === 2) {
      return (
        <TouchableOpacity onPress={() => {
          const routerParam = navigation.getParam('data');
          const { loanID } = routerParam;
          const payType = getFieldValue('payType');
          if (!payType) {
            Toast.show('请选择付款方式');
            return;
          }
          if (!dealerID && !reportListAll.dealerID) {
            Toast.show('请选择经销商');
            return;
          }
          const _data = paymentList.filter((item) => item.value === payType);
          navigation.navigate('AccountInfoView', {
            flagKey: 2, dealerID, loanID, _data, data: routerParam
          });
        }}
        >
          <Cell label="账户信息" required>
            <View style={styles.info}>
              {(bankaccountInfoList && bankaccountInfoList[0] && bankaccountInfoList.find((item) => item.flag === 1) && getFieldValue('payCarMoneyType') === 2)
                ? (<Text style={styles.infomationComplete}>已完成</Text>)
                : (<Text style={styles.infomation}>请确认</Text>)}
              <RightArrow style={{ width: 16, height: 16 }} />
            </View>
          </Cell>
        </TouchableOpacity>
      );
    } return null;
  }

  handleautherName = (flagApproing, navigation, data, name3, reportListAll) => {
    if (flagApproing !== 1) {
      return (
        <TouchableOpacity
          onPress={() => {
            navigation.navigate('ProjectInfoSearch', { returnData: this.returnData.bind(this), key: 3, data });
          }}
        >
          <Cell label="授信方" required>
            {name3 ? (<Text style={styles.content}>{name3}</Text>)
              : <Text style={styles.content}>{reportListAll && reportListAll.autherName ? reportListAll.autherName : '请输入'}</Text>}
          </Cell>
        </TouchableOpacity>
      );
    }
    return null;
  }

  handledealerName = (flagApproing, navigation, data, acId, name4, reportListAll) => {
    if (flagApproing !== 1) {
      return (
        <TouchableOpacity onPress={() => {
          navigation.navigate('ProjectInfoSearch', {
            returnData: this.returnData.bind(this), key: 4, data, acId
          });
        }}
        >
          <Cell label="经销商" required>
            {name4 ? (<Text style={styles.content}>{name4}</Text>)
              : <Text style={styles.content}>{reportListAll && reportListAll.dealerName ? reportListAll.dealerName : '请输入'}</Text>}
          </Cell>
        </TouchableOpacity>
      );
    }
    return null;
  }

  handleDelete = (index) => {
    const { icNameData } = this.state;
    icNameData.splice(index, 1);
    this.setState({ icNameData });
  }

  handleCheck = (icNameData) => {
    const { dispatch, reportListAll } = this.props;
    const { autherID } = this.state;
    const icNameDataList = [];
    icNameData.forEach((item) => {
      icNameDataList.push(item.icID);
    });
    // this.setState({ icIDDAta: icNameDataList });
    const params = {
      autherID: autherID || reportListAll.autherID,
      innovateInBusinessIDS: icNameDataList
    };
    dispatch({
      type: 'GET_CREDITAREA_CHECK',
      params
    }); // 实时监测创新业务
  }

  returnData(obj) {
    const { form } = this.props;
    const { setFieldsValue } = form;
    const { icNameData } = this.state;
    if (obj.key === 3) {
      setFieldsValue({
        autherID: String(obj.ccustomerid),
        autherName: obj.name,
        acId: obj.acId,
        c50151: obj.c50151
      });
      this.setState({
        name3: obj.name, autherID: obj.ccustomerid
      });
      const rentType = form.getFieldValue('rentType');
      const contractVersion = form.getFieldValue('contractVersion');
      this.handleContractVersionInfo(rentType, contractVersion, obj.c50151, 'autherID', '', '', '');
    }
    if (obj.key === 4) {
      setFieldsValue({
        dealerID: String(obj.customerid),
        dealerName: obj.name
      });
      this.setState({ name4: obj.name, dealerID: obj.customerid });
    }
    if (obj.key === 8) {
      setFieldsValue({
        icID: obj.icID,
        icName: obj.icName,
        icNameInput: obj.icNameInput
      });
      this.setState({
        // icID: obj.icID,
        // icName: obj.icName,
        // icNameInput: obj.icNameInput,
        icNameData: [...icNameData, obj]
      });
      this.handleCheck([...icNameData, obj]);
    }
  }

  render() {
    const versionNumber = [];
    const {
      form,
      navigation,
      ContractVersionInfoList,
      reportListAll,
      projectForm,
      projectAccountForm1,
      projectAccountForm2,
      getViewWithDrawal,
      bankaccountInfoList
    } = this.props;
    // RNLog({ 2222: bankaccountInfoList });
    const data = navigation.getParam('data');
    // 判断本地有存储未完成的项目信息,回显到表单中
    if (projectForm[data ? data.loanID : ''] && Object.values(projectForm[data ? data.loanID : '']).length > 0) {
      Object.assign(reportListAll, projectForm[data ? data.loanID : '']);
    }
    // 判断本地有存储未完成的账户信息1,租金回笼模式默认显示快捷支付,
    if ((projectAccountForm1[data ? data.loanID : ''] && Object.values(projectAccountForm1[data ? data.loanID : '']).length > 0)) {
      reportListAll.receiceRentType = 5;
    }
    // 判断本地有存储未完成的账户信息2,收款方默认显示其他,
    if ((projectAccountForm2[data ? data.loanID : ''] && Object.values(projectAccountForm2[data ? data.loanID : '']).length > 0)) {
      reportListAll.payCarMoneyType = 3;
    }
    const { flagApproing } = data; // 锁死授信方、经销商、担保模式
    const { assureType, productType } = data;
    const { autherID, dealerID, contractVersionNoNo } = this.state;
    const acId = form.getFieldValue('acId');
    const { getFieldDecorator, getFieldError, getFieldValue } = form;
    const {
      name3, name4, icNameData
    } = this.state;
    if (ContractVersionInfoList && ContractVersionInfoList.copynos
      && ContractVersionInfoList.copynos.length > 0) {
      for (let i = 0; i < ContractVersionInfoList.copynos.length; i += 1) {
        // 合同版本号
        versionNumber.push(
          {
            label: ContractVersionInfoList.copynos[i].copyno,
            value: ContractVersionInfoList.copynos[i].copyid
          }
        );
      }
    }
    const { flagButton } = data;
    const accEditFlag = navigation.getParam('accEditFlag');
    const accViewFlag = navigation.getParam('accViewFlag');
    return (
      <View style={GlobalStyles.container}>
        <NavigationEvents
          onWillFocus={this.handleWillFocus}
          // onWillBlur={this.handleWillBlur}
        />
        <ScrollView>
          <View style={styles.list}>
            {/* 授信方模糊查询 */}
            {flagApproing === 1
              ? (
                <Cell label="授信方" required>
                  <Text style={styles.content}>{reportListAll && reportListAll.autherName ? reportListAll.autherName : '请输入'}</Text>
                </Cell>
              ) : this.handleautherName(flagApproing, navigation, data, name3, reportListAll)}
            {getFieldDecorator('autherID', {
              initialValue: reportListAll ? reportListAll.autherID : '',
            })(
              <TextInput style={{ display: 'none' }} />
            )}
            {getFieldDecorator('autherName', {
              initialValue: reportListAll ? reportListAll.autherName : '',
            })(
              <TextInput style={{ display: 'none' }} />
            )}
            {getFieldDecorator('c50151', {
              initialValue: reportListAll ? reportListAll.c50151 : '',
            })(
              <TextInput style={{ display: 'none' }} />
            )}
            {/* 经销商模糊查询 */}
            {flagApproing === 1
              ? (
                <Cell label="经销商" required>
                  <Text style={styles.content}>{reportListAll && reportListAll.dealerName ? reportListAll.dealerName : '请输入'}</Text>
                </Cell>
              ) : this.handledealerName(flagApproing, navigation, data, acId, name4, reportListAll)}
            {getFieldDecorator('dealerID', {
              initialValue: reportListAll ? reportListAll.dealerID : '',
            })(
              <TextInput style={{ display: 'none' }} />
            )}
            {getFieldDecorator('dealerName', {
              initialValue: reportListAll ? reportListAll.dealerName : '',
            })(
              <TextInput style={{ display: 'none' }} />
            )}
            <Cell label="担保模式" required>
              <View style={styles.box}>
                <Text style={styles.boxContent}>
                  {reportListAll && reportListAll.assureType
                    ? dataP[reportListAll.assureType] : dataP[assureType]}
                </Text>
              </View>
            </Cell>

            {productType === 5 ? getFieldDecorator('rentType', {
              initialValue: 2,
              validateFirst: true,
              rules: [
                { required: true, message: '请选择!' },
              ],
            })(
              <PickerItem
                form={form}
                pickerData={leasingMode}
                changeSelectedValue={(value) => {
                  const contractVersion = form.getFieldValue('contractVersion');
                  const c50151 = form.getFieldValue('c50151');
                  this.handleContractVersionInfo(value, contractVersion, c50151 || reportListAll.c50151, 'rentType', '', '', '');
                }}
                name="rentType"
                type="marryType"
                placeholder="请选择"
                error={getFieldError('rentType')}
                required
                disable
              >
                <Text style={styles.name}>租赁模式</Text>
              </PickerItem>
            )
              : getFieldDecorator('rentType', {
                initialValue: reportListAll && reportListAll.rentType ? reportListAll.rentType : '',
                validateFirst: true,
                rules: [
                  { required: true, message: '请选择!' },
                ],
              })(
                <PickerItem
                  form={form}
                  pickerData={leasingMode}
                  changeSelectedValue={(value) => {
                    const contractVersion = form.getFieldValue('contractVersion');
                    const c50151 = form.getFieldValue('c50151');
                    this.handleContractVersionInfo(value, contractVersion, c50151 || reportListAll.c50151, 'rentType', '', '', '');
                  }}
                  name="rentType"
                  type="marryType"
                  placeholder="请选择"
                  error={getFieldError('rentType')}
                  required
                >
                  <Text style={styles.name}>租赁模式</Text>
                </PickerItem>
              )}

            {/* 新增的逻辑 */}
            {getFieldValue('rentType') === 2
              ? (getFieldDecorator('usedCarType', {
                initialValue: reportListAll && reportListAll.usedCarType ? reportListAll.usedCarType : '',
                validateFirst: true,
                rules: [
                  { required: true, message: '请选择!' },
                ],
              })(
                <PickerItem
                  form={form}
                  pickerData={userCarType}
                  name="usedCarType"
                  type="usedCarType"
                  placeholder="请选择"
                  error={getFieldError('usedCarType')}
                  required
                >
                  <Text style={styles.name}>二手车类型</Text>
                </PickerItem>
              )) : null
            }
            <Cell label="是创新业务" required>
              {getFieldDecorator('innovateInBusinessType', {
                initialValue: reportListAll && String(reportListAll.innovateInBusinessType) ? String(reportListAll.innovateInBusinessType) : '',
                validateFirst: true,
                rules: [{ required: true, message: '请选择内容!' }],
              })(
                <Radio options={options} error={getFieldError('innovateInBusinessType')} />
              )}
            </Cell>
            {
              getFieldValue('innovateInBusinessType') === '1'
                ? (
                  <TouchableOpacity
                    onPress={() => {
                      const dataInfo = {
                        leaseModel: form.getFieldValue('rentType'),
                        usedCarType: form.getFieldValue('usedCarType'),
                        ...data
                      };
                      navigation.navigate('ProjectInfoSearch', { returnData: this.returnData.bind(this), key: 8, data: dataInfo });
                    }}
                  >
                    <Cell label="创新业务名称" required>
                      {/* {icNameInput ? (
                        <Text style={styles.content}>
                          {icNameInput}
                        </Text>
                      ) : <Text style={styles.content}> 请输入</Text>} */}
                      <Text style={styles.content}>请输入</Text>
                    </Cell>
                  </TouchableOpacity>
                ) : null
            }
            {icNameData && icNameData.length > 0 && getFieldValue('innovateInBusinessType') === '1'
              && (
                <View style={styles.creativeBox}>
                  {icNameData.map((item, index) => (
                    <View style={styles.creative}>
                      <Text style={styles.creativeText}>{item.icName}</Text>
                      <TouchableOpacity onPress={() => this.handleDelete(index)}>
                        <Delete
                          style={{ width: 9, height: 9, marginRight: GapCommon.gapBase * 2 }}
                        />
                      </TouchableOpacity>
                    </View>
                  ))}
                </View>
              )
            }

            {/* 产品类型为用车金融, 默认电汇,不可编辑; */}
            {/* 担保类型为担保、类担保,且租赁模式为直租,可选 ;其他 默认电汇,不可编辑 */}
            {(assureType === 1 || assureType === 3) && getFieldValue('rentType') === 1 && productType !== 5 ? getFieldDecorator('payType', {
              initialValue: reportListAll && reportListAll.payType ? (reportListAll.payType) : '',
              validateFirst: true,
              rules: [
                { required: true, message: '请选择!' },
              ],
            })(
              <PickerItem
                pickerData={paymentList}
                name="payType"
                placeholder="请选择"
                changeSelectedValue={this.handleClear}
                error={getFieldError('payType')}
                required
              >
                <Text style={styles.name}>付款方式</Text>
              </PickerItem>
            ) : getFieldDecorator('payType', {
              initialValue: 1,
              validateFirst: true,
              rules: [
                { required: true, message: '请选择!' },
              ],
            })(
              <PickerItem
                pickerData={paymentList}
                name="payType"
                placeholder="请选择"
                changeSelectedValue={this.handleClear}
                error={getFieldError('payType')}
                required
                disable
              >
                <Text style={styles.name}>付款方式</Text>
              </PickerItem>
            )}

            {getFieldDecorator('contractVersion', {
              initialValue: reportListAll && reportListAll.contractVersion ? (reportListAll.contractVersion) : '',
              validateFirst: true,
              rules: [
                { required: true, message: '请选择!' },
              ],
            })(
              <PickerItem
                pickerData={contractVersionList}
                changeSelectedValue={(value) => {
                  const rentType = form.getFieldValue('rentType');
                  const c50151 = form.getFieldValue('c50151');
                  this.handleContractVersionInfo(rentType, value, c50151 || reportListAll.c50151, 'contractVersion', '', '', '');
                }}
                name="contractVersion"
                type="marryType"
                placeholder="请选择"
                error={getFieldError('contractVersion')}
                required
              >
                <Text style={styles.name}>合同版本</Text>
              </PickerItem>
            )}
            {(ContractVersionInfoList && ContractVersionInfoList.copynos
              && ContractVersionInfoList.copynos.length) ? getFieldDecorator('contractVersionNo', {
                initialValue: reportListAll && reportListAll.contractVersionNo ? String(reportListAll.contractVersionNo) : contractVersionNoNo,
                validateFirst: true,
                rules: [
                  { required: true, message: '请选择!' },
                ],
              })(
                <PickerItem
                  pickerData={versionNumber}
                  name="contractVersionNo"
                  changeSelectedValue={(value) => this.setState({ contractVersionNoNo: value })}
                  type="marryType"
                  placeholder="请选择"
                  error={getFieldError('contractVersionNo')}
                  required

                >
                  <Text style={styles.name}>版本号</Text>
                </PickerItem>
              ) : getFieldDecorator('contractVersionNo', {
                initialValue: reportListAll && reportListAll.contractVersionNo ? String(reportListAll.contractVersionNo) : contractVersionNoNo,
                validateFirst: true,
                rules: [
                  { required: true, message: '请选择!' },
                ],
              })(
                <PickerItem
                  form={form}
                  pickerData={versionNumber}
                  changeSelectedValue={(value) => this.setState({ contractVersionNoNo: value })}
                  name="contractVersionNo"
                  type="marryType"
                  placeholder="请选择"
                  error={getFieldError('contractVersionNo')}
                  required
                  disable={reportListAll && reportListAll.contractVersionNo}
                >
                  <Text style={styles.name}>版本号</Text>
                </PickerItem>
              )}
            {/* 枚举值:快捷支付、电汇支付,如预审批中选择“用车金融”产品,租金回笼方式默认为“快捷支付”;如担保模式为弱担保/不担保,租金回笼方式默认为“快捷支付” */}
            {productType === 5 || assureType === 2 || assureType === 4 ? getFieldDecorator('receiceRentType', {
              initialValue: 5,
              validateFirst: true,
              rules: [
                { required: true, message: '请选择!' },
              ],
            })(
              <PickerItem
                form={form}
                pickerData={rentBack}
                name="receiceRentType"
                type="marryType"
                placeholder="请选择"
                error={getFieldError('receiceRentType')}
                required
                disable
              >
                <Text style={styles.name}>租金回笼模式</Text>
              </PickerItem>
            )
              : getFieldDecorator('receiceRentType', {
                initialValue: reportListAll && reportListAll.rentPayType ? reportListAll.rentPayType : '',
                validateFirst: true,
                rules: [
                  { required: true, message: '请选择!' },
                ],
              })(
                <PickerItem
                  form={form}
                  pickerData={rentBack}
                  name="receiceRentType"
                  type="marryType"
                  placeholder="请选择"
                  error={getFieldError('receiceRentType')}
                  required
                >
                  <Text style={styles.name}>租金回笼模式</Text>
                </PickerItem>
              )}
            {/* 若租金回笼方式为“快捷支付”,弹出“账户信息”字段,需手动编辑,提交后需校验是否与已签约还款卡相同,不相同报错;若租金回笼方式为“电汇支付”,则不展示此字段 */}
            {getFieldValue('receiceRentType') === 5 ? (
              <TouchableOpacity onPress={() => {
                const routerParam = navigation.getParam('data');
                const contract = getFieldValue('contractVersion');
                const { loanID } = routerParam;
                navigation.navigate('AccountInfoEdit', { loanID, data: routerParam, contract });
              }}
              >
                <Cell label="账户信息" required>
                  <View style={styles.info}>
                    {accEditFlag === 1 || (getViewWithDrawal && getViewWithDrawal.ipa50574)
                      ? (<Text style={styles.infomationComplete}>已完成</Text>)
                      : (<Text style={styles.infomation}>请编辑</Text>)}
                    <RightArrow style={{ width: 16, height: 16 }} />
                  </View>
                </Cell>
              </TouchableOpacity>
            ) : null}

            {getFieldDecorator('messageModel', {
              initialValue: reportListAll && reportListAll.messageModel ? reportListAll.messageModel : '',
              validateFirst: true,
              rules: [
                { required: true, message: '请选择!' },
              ],
            })(
              <PickerItem
                form={form}
                pickerData={rentAlert}
                name="messageModel"
                type="marryType"
                placeholder="请选择"
                error={getFieldError('messageModel')}
                required
              >
                <Text style={styles.name}>租金及租金日短信提醒</Text>
              </PickerItem>
            )}

            {accViewFlag === 1 || accViewFlag === 2 || accViewFlag === 3 ? (
              getFieldDecorator('payCarMoneyType', {
                initialValue: accViewFlag,
                validateFirst: true,
                rules: [
                  { required: true, message: '请选择!' },
                ],
              })(
                <PickerItem
                  form={form}
                  pickerData={receiving}
                  changeSelectedValue={this.changeReceivingSide}
                  name="payCarMoneyType"
                  type="marryType"
                  placeholder="请选择"
                  error={getFieldError('payCarMoneyType')}
                  required
                >
                  <Text style={styles.name}>收款方</Text>
                </PickerItem>
              )

            ) : (
              getFieldDecorator('payCarMoneyType', {
                initialValue: reportListAll && reportListAll.receivePayType ? reportListAll.receivePayType : '',
                validateFirst: true,
                rules: [
                  { required: true, message: '请选择!' },
                ],
              })(
                <PickerItem
                  form={form}
                  pickerData={receiving}
                  changeSelectedValue={this.changeReceivingSide}
                  name="payCarMoneyType"
                  type="marryType"
                  placeholder="请选择"
                  error={getFieldError('payCarMoneyType')}
                  required
                >
                  <Text style={styles.name}>收款方</Text>
                </PickerItem>
              )
            )}

            {/*  若收款方为“授信方/经销商”,则此处账户信息自动带出,按钮为“查看”;若收款方为“其他”,则此处账户信息需手动填写,按钮为“编辑” */}
            {getFieldValue('payCarMoneyType') === 1 && reportListAll && reportListAll.autherID
              ? (
                <TouchableOpacity onPress={() => {
                  const routerParam = navigation.getParam('data');
                  const { loanID } = routerParam;
                  const payType = getFieldValue('payType');
                  if (!payType) {
                    Toast.show('请选择付款方式');
                    return;
                  }
                  if (!autherID && !reportListAll.autherID) {
                    Toast.show('请选择授信方');
                    return;
                  }
                  const _data = paymentList.filter((item) => item.value === payType);
                  navigation.navigate('AccountInfoView', {
                    flagKey: 1, _data, autherID: autherID || reportListAll.autherID, loanID, data: routerParam
                  });
                }}
                >
                  <Cell label="账户信息" required>
                    <View style={styles.info}>
                      {(bankaccountInfoList && bankaccountInfoList[0] && bankaccountInfoList.find((item) => item.flag === 1) && getFieldValue('payCarMoneyType') === 1)
                        ? (<Text style={styles.infomationComplete}>已完成</Text>)
                        : (<Text style={styles.infomation}>请确认</Text>)}
                      <RightArrow style={{ width: 16, height: 16 }} />
                    </View>
                  </Cell>
                </TouchableOpacity>
              ) : this.handlepayCarMoneyType(getFieldValue, navigation, autherID, reportListAll, accViewFlag, bankaccountInfoList)}

            {getFieldValue('payCarMoneyType') === 2 && reportListAll && reportListAll.dealerID ? (
              <TouchableOpacity onPress={() => {
                const routerParam = navigation.getParam('data');
                const { loanID } = routerParam;
                const payType = getFieldValue('payType');
                if (!payType) {
                  Toast.show('请选择付款方式');
                  return;
                }
                if (!dealerID && !reportListAll.dealerID) {
                  Toast.show('请选择经销商');
                  return;
                }
                const _data = paymentList.filter((item) => item.value === payType);
                navigation.navigate('AccountInfoView', {
                  flagKey: 2, _data, dealerID: dealerID || reportListAll.dealerID, loanID, data: routerParam
                });
              }}
              >
                <Cell label="账户信息" required>
                  <View style={styles.info}>
                    {(bankaccountInfoList && bankaccountInfoList[0] && bankaccountInfoList.find((item) => item.flag === 1) && getFieldValue('payCarMoneyType') === 2)
                      ? (<Text style={styles.infomationComplete}>已完成</Text>)
                      : (<Text style={styles.infomation}>请确认</Text>)}
                    <RightArrow style={{ width: 16, height: 16 }} />
                  </View>
                </Cell>
              </TouchableOpacity>
            ) : this.handlepayCarMoney(getFieldValue, navigation, dealerID, reportListAll, accViewFlag, bankaccountInfoList)}

            {getFieldValue('payCarMoneyType') === 3 ? (
              <TouchableOpacity onPress={() => {
                const routerParam = navigation.getParam('data');
                const { loanID } = routerParam;
                const payType = getFieldValue('payType');
                const _data = paymentList.filter((item) => item.value === payType);
                navigation.navigate('AccountInfoView', {
                  flagKey: 3, _data, loanID, data: routerParam
                });
              }}
              >
                <Cell label="账户信息" required>
                  <View style={styles.info}>
                    {accViewFlag === 3 || (bankaccountInfoList && bankaccountInfoList[0] && bankaccountInfoList[0].ba50039)
                      ? (<Text style={styles.infomationComplete}>已完成</Text>)
                      : (<Text style={styles.infomation}>请编辑</Text>)}
                    <RightArrow style={{ width: 16, height: 16 }} />
                  </View>
                </Cell>
              </TouchableOpacity>
            ) : null}

          </View>
        </ScrollView>

        <SafeAreaView style={styles.protocolWrap}>
          {flagButton === 1
            ? (
              <CommonButton
                text="提交"
                onPressButton={this.handleSubmit}
              />
            ) : null}

        </SafeAreaView>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  list: {
    backgroundColor: ColorCommon.white,
    marginTop: GapCommon.gapBase * 2,
  },
  textInputContent: {
    fontSize: 16,
    textAlign: 'right'
  },
  name: {
    color: ColorCommon.lightGray,
    fontSize: 16
  },
  star: {
    color: ColorCommon.primary,
    fontSize: 16
  },
  protocolWrap: {
    paddingTop: GapCommon.gapBase * 4,
    paddingBottom: GapCommon.gapBase * 4,
    paddingLeft: GapCommon.gapBase * 4,
    paddingRight: GapCommon.gapBase * 4
  },
  box: {
    backgroundColor: 'rgba(255,102,51,0.15)',
    paddingLeft: GapCommon.gapBase * 2,
    paddingRight: GapCommon.gapBase * 2,
    paddingBottom: GapCommon.gapBase * 2,
    paddingTop: GapCommon.gapBase * 2,
    borderRadius: 8,
  },
  boxContent: {
    color: ColorCommon.primary
  },
  infomation: {
    color: ColorCommon.dark,
    fontSize: 16,
    marginRight: GapCommon.gapBase
  },
  infomationComplete: {
    color: ColorCommon.lightGray,
    fontSize: 16,
    marginRight: GapCommon.gapBase
  },
  info: {
    flexDirection: 'row',
    paddingLeft: 60,
    textAlign: 'right',
  },
  content: {
    color: ColorCommon.dark,
    fontSize: 16,
  },
  creativeBox: {
    paddingBottom: GapCommon.gapBase * 3,
    paddingRight: GapCommon.gapBase * 4,
    alignItems: 'flex-end',
    borderBottomWidth: 1 / PixelRatio.get(),
    minHeight: 48,
    borderColor: ColorCommon.lineColor,
    backgroundColor: ColorCommon.white
  },
  creative: {
    borderRadius: 8,
    borderWidth: 1,
    borderColor: ColorCommon.primary,
    color: ColorCommon.primary,
    flexDirection: 'row',
    alignItems: 'center',
    marginTop: GapCommon.gapBase * 3
  },
  creativeText: {
    color: ColorCommon.primary,
    paddingLeft: GapCommon.gapBase * 4,
    paddingRight: GapCommon.gapBase * 3
  }
});

const mapStateToProps = (state) => ({
  ContractVersionInfoList: state.ContractVersionInfoList,
  reportListAll: state.reportListAll,
  projectForm: state.projectForm,
  submitAllList: state.submitAllList,
  getViewWithDrawal: state.getViewWithDrawal,
  bankaccountInfoList: state.bankaccountInfoList,
  projectAccountForm1: state.projectAccountForm1, // 未填写完成的项目信息 -> 账户信息
  projectAccountForm2: state.projectAccountForm2 // 未填写完成的项目信息 -> 账户信息
});

const ProjectInformationForm = createForm({
  // 表单域改变时设置isEdit为false
  onValuesChange() {
    isEdit = false;
  }
})(ProjectInformation);
export default connect(mapStateToProps)(ProjectInformationForm);