export default {
  setOrderDetail( state,payload ) {
    state.orderDetail = payload;
  },
  setIsShowDiscounts( state,payload ) {
    state.isShowDiscounts = payload;
  },
  setCheckedTotal( state,payload ) {
    state.checkedTotal = payload;
  },
  setDiscountDesc( state,payload ) {
    state.discountDesc = payload;
  },
  setEnableNewMemberPoints( state,payload ) {
    state.enableNewMemberPoints = payload;
  },
  setEnablePoints( state,payload ) {
    state.enablePoints = payload;
  },
  setIsFirst( state,payload ) {
    state.isFirst = payload;
  },
  setIntegralDesc( state,payload ) {
    state.integralDesc = payload;
  },
  setUsePoints( state,payload ) {
    state.usePoints = payload;
  },
  setEnableCoupon( state,payload ) {
    state.enableCoupon = payload;
  },
  setMaxOneDayCoupons( state,payload ) {
    state.maxOneDayCoupons = payload;
  },
  setRemainCoupons( state,payload ) {
    state.remainCoupons = payload;
  },
  setCoupons( state,payload ) {
    state.coupons = payload;
  },
  setCouponCount( state,payload ) {
    state.couponCount = payload;
  },
  setCouponDesc( state,payload ) {
    state.couponDesc = payload;
  },
  setEnablePaperCoupons( state,payload ) {
    state.enablePaperCoupons = payload;
  },
  setPaperCouponsDesc( state,payload ) {
    state.paperCouponsDesc = payload;
  },
  setUsingTotalDiscount( state,payload ) {
    state.usingTotalDiscount = payload;
  },
  setActualPayFee( state,payload ) {
    state.actualPayFee = payload;
  },
  setAvailableDiscountFee( state,payload ) {
    state.availableDiscountFee = payload;
  },
  setPointsPerHour( state,payload ) {
    state.pointsPerHour = payload;
  },
  setAvailable( state,payload ) {
    state.available = payload;
  },
  setMaxPointsTime( state,payload ) {
    state.maxPointsTime = payload;
  },
  setPointsTime( state,payload ) {
    state.pointsTime = payload;
  },
  setEnableConsume( state,payload ) {
    state.enableConsume = payload;
  },
  setMemberLevelDiscount( state,payload ) {
    state.memberLevelDiscount = payload;
  },
  setPointsPerUnit( state,payload ) {
    state.pointsPerUnit = payload;
  },
  setMaxOneDayDiscountFee( state,payload ) {
    state.maxOneDayDiscountFee = payload;
  },
  setUnitAmount( state,payload ) {
    state.unitAmount = payload || 1;
  },
  setUnlimitUsePoints(state, payload) {
    state.unlimitUsePoints = payload;
  },
  setUnLimitWeekendPoints(state, payload) {
    state.unLimitWeekendPoints = payload;
  },
  setUnitHour( state,payload ) {
    state.unitHour = payload || 1;
  },
  setMaxDiscountFee( state,payload ) {
    state.maxDiscountFee = payload;
  },
  setUnlicensedCar( state,payload ) {
    state.unlicensedCar = payload;
  },
  setParkMallCode( state,payload ) {
    state.parkMallCode = payload;
  },
  /* 纸质优惠券相关 */
  setPaperCoupons( state,payload ) {
    state.paperCoupons = payload;
  },
  setPaperCouponCount( state,payload ) {
    state.paperCouponCount = payload;
  },
  setPaperCouponDesc( state,payload ) {
    state.paperCouponDesc = payload;
  },
  setPaperDiscountFee( state,payload ) {
    state.paperDiscountFee = payload;
  },
  setPaperDiscountTime( state,payload ) {
    state.paperDiscountTime = payload;
  },
  // 订单初始化
  clearOrderInfo( state ) {
    state.orderDetail = {}; // 订单原始数据
    state.isShowDiscounts = false; // 是否展示会员登记优惠
    state.discountDesc = ''; // 停车优惠(首停、会员减免、消费减免)
    state.checkedTotal = 0; // 选中count数
    state.enableNewMemberPoints = false; // 是否开启新会员积分
    state.enablePoints = false; // 是否开启积分减免
    state.usePoints = 0; // 用户已选择的积分
    state.isFirst = 0; // 判断用户是否首次进入
    state.integralDesc = ''; // 积分减免说明文案
    state.pointsPerHour = 0; // 每小时兑换积分
    state.enableCoupon = false; // 电子优惠券是否启用
    state.maxOneDayCoupons = 0; // 单日可选优惠券上限
    state.remainCoupons = 0; // 单日剩余可选优惠券上限
    state.coupons = []; // 可选优惠券数量
    state.couponCount = 0; // 已选择优惠券
    state.couponDesc = ''; // 优惠券说明文案
    state.enablePaperCoupons = false; // 启动纸质优惠券
    state.paperCouponsDesc = ''; // 纸质优惠券说明
    state.usingTotalDiscount = 0; // 优惠金额
    state.actualPayFee = 0; // 应付金额
    state.availableDiscountFee = 0; // 当日剩余可使用优惠金额
    // 积分相关
    state.available = 0; // 用户可用积分
    state.maxPointsTime = ''; // 积分最大兑换时长
    state.pointsTime = ''; // 已兑换的积分时间
    state.unitAmount = 1;
    state.unlimitUsePoints = 'LIMIT';
    state.unLimitWeekendPoints = false;
    state.unitHour = 1;
    // 停车优惠：会员等级和消费减免
    state.memberLevelDiscount = false; // 是否开启会员等级
    state.enableConsume = false; // 是否开启消费减免
    state.pointsPerUnit = 0; //
    // unlicensed: false // true: 临时车牌；false：普通车牌
    // 无牌车逻辑
    state.unlicensedCar = '';
    // 车场相关
    state.parkMallCode = '' // 车场唯一编号
    /* 纸质优惠券相关 */
    state.paperCoupons = [] // 可选纸质优惠券数量
    state.paperCouponCount = 0 // 已选纸质择优惠券
    state.paperCouponDesc = '' // 纸质优惠券说明文案
    state.paperDiscountFee = 0 // 纸质优惠券总金额
    state.paperDiscountTime = 0 // 纸质优惠券总时间
  }
};