naturalPersonTaxation.js 4.1 KB
import * as types from '../constants/ActionTypes'

const initialState = {
  natPerBasInfoCollList: {},
  specAddDeduCollList: {},
  natPerInfoDecList: {},
  natPerInfoDecNum: {},
  cyclesFailedList: {},
  natPerInfoDecDetailed: {},
  specAddDeduDecList: {},
  specAddDeduDecNum: {},
  specAddDeduDecListDetailed: {},
  specAddMonthList: {},
  specAddMonthDetailed: {},
  preWithholdingDecList: {},
  preeWithholdingDecNum: {},
  preWithholdingDecDetailedList: {},
  getTaxPersonRecordsDetailed: {},
  getTaxPersonTaxesList: {},
  getTaxPersonTaxesDetailedList: {},
  professionList: {},
  additionalDeductionList: {},
  DeclareNumber:[],
  personalNumber:{},
}

export default function naturalPersonTaxation(state = initialState, action) {
  switch (action.type) {
    case types.NATURA_PER_BASICINFO_COLLECT_LIST:
      return Object.assign({}, state, {
        natPerBasInfoCollList: action.natPerBasInfoCollList,
      })
      break
    case types.SPEC_ADD_DEDU_COLL_LIST:
      return Object.assign({}, state, {
        specAddDeduCollList: action.specAddDeduCollList,
      })
      break
    case types.NATURA_PER_INFO_DEC_LIST:
      return Object.assign({}, state, {
        natPerInfoDecList: action.natPerInfoDecList,
      })
      break
    case types.NATURA_PER_INFO_DEC_DETAILED:
      return Object.assign({}, state, {
        natPerInfoDecDetailed: action.natPerInfoDecDetailed,
      })
      break
    case types.SPEC_ADD_DEDU_DEC_LIST:
      return Object.assign({}, state, {
        specAddDeduDecList: action.specAddDeduDecList,
      })
      break
    case types.SPEC_ADD_DEDU_DEC_NUM:
      return Object.assign({}, state, {
        specAddDeduDecNum: action.specAddDeduDecNum,
      })
      break
    case types.NATURA_PER_INFO_DEC_NUM:
      return Object.assign({}, state, {
        natPerInfoDecNum: action.natPerInfoDecNum,
      })
      break
    case types.CYCLES_FAILED_LIST:
      return Object.assign({}, state, {
        cyclesFailedList: action.cyclesFailedList,
      })
      break
    case types.SPEC_ADD_DEDU_DEC_LIST_DETAILED:
      return Object.assign({}, state, {
        specAddDeduDecListDetailed: action.specAddDeduDecListDetailed,
      })
      break
    case types.SPEC_ADD_MONTH_LIST:
      return Object.assign({}, state, {
        specAddMonthList: action.specAddMonthList,
      })
      break
    case types.SPEC_ADD_MONTH_DETAILED:
      return Object.assign({}, state, {
        specAddMonthDetailed: action.specAddMonthDetailed,
      })
      break
    case types.PRE_WITH_DEC_LIST:
      return Object.assign({}, state, {
        preWithholdingDecList: action.preWithholdingDecList,
      })
      break
    case types.PRE_WITH_DEC_LIST_NUM:
      return Object.assign({}, state, {
        preeWithholdingDecNum: action.preeWithholdingDecNum,
      })
      break
    case types.PRE_WITH_DEC_DETAILED_LIST:
      return Object.assign({}, state, {
        preWithholdingDecDetailedList: action.preWithholdingDecDetailedList,
      })
      break
    case types.GET_TAX_PERSON_RECORD_DETAILED:
      return Object.assign({}, state, {
        getTaxPersonRecordsDetailed: action.getTaxPersonRecordsDetailed,
      })
      break
    case types.GET_TAX_PERSON_TAXES_LIST:
      return Object.assign({}, state, {
        getTaxPersonTaxesList: action.getTaxPersonTaxesList,
      })
      break
    case types.GET_TAX_PERSON_TAXES_DEATAIL_LIST:
      return Object.assign({}, state, {
        getTaxPersonTaxesDetailedList: action.getTaxPersonTaxesDetailedList,
      })
      break
    case types.PROFESSION_LIST:
      return Object.assign({}, state, {
        professionList: action.professionList
      })
      break
    case types.ADDITIONAL_DEDUCTION_LIST:
      return Object.assign({}, state, {
        additionalDeductionList: action.additionalDeductionList
      })
      break
    case types.GETDECLARENUMBER:
      return Object.assign({}, state, {
        DeclareNumber: action.DeclareNumber,
      })
      break
    case types.PERSONALNUMBER:
      return Object.assign({}, state, {
        personalNumber: action.personalNumber,
      })
      break
    default:
      return state
  }

}