private void initUiData() {
    CarDetail cardetail_entity = context.task_detail_entity.getCarDetail();
    DriverLicense driverLicense_entity = context.task_detail_entity.getLicense().getDriverLicense();
    ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_car_brand))
        .setText(cardetail_entity.getCarName());
    if (!UIUtils.isEmpty(cardetail_entity.getCarPlateNo())) {
      String num = cardetail_entity.getCarPlateNo();
      ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_car_plate1))
          .setText(num.charAt(0) + "");
      ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_car_plate2))
          .setText(num.charAt(1) + "");
      ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_car_plate3))
          .setText(num.substring(2, num.length()));
    }
    ((EditText) driving_license_card_verify_view.findViewById(R.id.et_name))
        .setText(driverLicense_entity.getOwnerName());
    ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_hold_property))
        .setText(driverLicense_entity.getOwnerTypeName());
    ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_use_property))
        .setText(driverLicense_entity.getUseTypeName());
    ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_capacity))
        .setText(driverLicense_entity.getCapacity());
    ((EditText) driving_license_card_verify_view.findViewById(R.id.et_che_liang_shibie_daihao))
        .setText(driverLicense_entity.getCode());
    ((EditText) driving_license_card_verify_view.findViewById(R.id.et_engine_num))
        .setText(driverLicense_entity.getEngerNumber());
    ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_registration_date))
        .setText(driverLicense_entity.getRegisteDate());
    ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_nianjian_youxiaoqi))
        .setText(driverLicense_entity.getLicenseEndTime());

    getCarPrice(context.task_detail_entity);
  }
  private void loadImage() {
    final DriverLicense entity = context.task_detail_entity.getLicense().getDriverLicense();
    if (!UIUtils.isEmpty(entity.getLicenseImage())) {
      Glide.with(context)
          .load(Uri.parse(entity.getLicenseImage()))
          .placeholder(R.mipmap.icon_pic_loading)
          .error(R.mipmap.icon_pic_load_fail)
          .listener(new ImageLoaderListener(context, Uri.parse(entity.getLicenseImage())))
          .into(
              (ImageView)
                  driving_license_card_verify_view.findViewById(R.id.iv_driving_license_page));
      ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_face_2))
          .setText("上传成功,点击图片可重新上传");
    } else {
      Glide.with(context)
          .load(R.mipmap.driving_license_page)
          .listener(new ImageLoaderListener(context, null))
          .into(
              (ImageView)
                  driving_license_card_verify_view.findViewById(R.id.iv_driving_license_page));
      ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_face_2)).setText("点击上传");
    }

    if (!UIUtils.isEmpty(entity.getLicenseBackImage())) {
      Glide.with(context)
          .load(Uri.parse(entity.getLicenseBackImage()))
          .placeholder(R.mipmap.icon_pic_loading)
          .error(R.mipmap.icon_pic_load_fail)
          .listener(new ImageLoaderListener(context, Uri.parse(entity.getLicenseBackImage())))
          .into(
              (ImageView)
                  driving_license_card_verify_view.findViewById(R.id.iv_driving_license_vice_page));
      ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_back_2))
          .setText("上传成功,点击图片可重新上传");
    } else {
      Glide.with(context)
          .load(R.mipmap.driving_license_vice_page)
          .listener(new ImageLoaderListener(context, null))
          .into(
              (ImageView)
                  driving_license_card_verify_view.findViewById(R.id.iv_driving_license_vice_page));
      ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_back_2)).setText("点击上传");
    }
  }
  public void requestPass() {
    context.TAG_NO_FIRST_REQUEST = "tag_request_pass";
    final DriverLicense entity = context.task_detail_entity.getLicense().getDriverLicense();
    final HashMap<String, String> hashMap = new HashMap<String, String>();
    hashMap.put("car_id", context.task_detail_entity.getCarId());
    hashMap.put(
        "car_number",
        ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_car_plate1))
                .getText()
                .toString()
                .trim()
            + ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_car_plate2))
                .getText()
                .toString()
                .trim()
            + ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_car_plate3))
                .getText()
                .toString()
                .trim());
    hashMap.put(
        "code",
        ((EditText)
                (driving_license_card_verify_view.findViewById(R.id.et_che_liang_shibie_daihao)))
            .getText()
            .toString()
            .trim());
    hashMap.put("capacity", entity.getCapacity());
    hashMap.put(
        "engine_number",
        ((EditText) (driving_license_card_verify_view.findViewById(R.id.et_engine_num)))
            .getText()
            .toString()
            .trim());
    hashMap.put("license_register_date", entity.getRegisteDate());
    hashMap.put("car_type", entity.getUseType());
    hashMap.put("car_owner_type", entity.getOwnerType());
    hashMap.put("car_type_id", context.task_detail_entity.getCarDetail().getCarTypeId());
    hashMap.put("license_end_time", entity.getLicenseEndTime());
    hashMap.put(
        "c_license_username",
        ((EditText) driving_license_card_verify_view.findViewById(R.id.et_name))
            .getText()
            .toString()
            .trim());
    hashMap.put("audit", "1");
    new CCHttpEngine(
            context,
            NetConstants.NET_ID_DRIVING_LICENSE_INFO_PASS_SAVE,
            hashMap,
            context.TAG_NO_FIRST_REQUEST,
            new HttpCallBack() {
              public void onSuccess(ResponseBean responseBean) {
                if (responseBean.getCode() == 0) {
                  ToastUtils.showToast("审核通过");
                  driving_license_card_verify_view
                      .findViewById(R.id.tv_reject_reason)
                      .setVisibility(View.GONE);
                  context
                      .task_detail_entity
                      .getCarDetail()
                      .setCarPlateNo(hashMap.get("car_number"));
                  entity.setCode(hashMap.get("code"));
                  entity.setEngerNumber(hashMap.get("engine_number"));
                  entity.setOwnerName(hashMap.get("c_license_username"));
                  context.task_detail_entity.getLicense().getDriverLicense().setStatus("3");

                  if (!UIUtils.isEmpty(car_brand_name) && !UIUtils.isEmpty(car_type_name)) {
                    context
                        .task_detail_entity
                        .getCarDetail()
                        .setCarName(car_brand_name + car_type_name);
                  }

                  context.initCardsCheckStatus();
                  context.initRedCircle();
                } else {
                  ToastUtils.showToast(responseBean.getMessage());
                }
              }

              @Override
              public void onNetUnavailable(String net_unAvailabel) {
                ToastUtils.showToast(R.string.net_unavailable);
              }

              @Override
              public void onFailure(IOException e) {
                ToastUtils.showToast(R.string.net_fail);
              }
            })
        .executeTask();
  }
    @Override
    public void onClick(View v) {
      CarDetail cardetail_entity = context.task_detail_entity.getCarDetail();
      DriverLicense driverLicense_entity =
          context.task_detail_entity.getLicense().getDriverLicense();
      if (UIUtils.isEmpty(driverLicense_entity.getLicenseImage())) {
        ToastUtils.showToast("未上传行驶证正面照片");
        return;
      }
      if (UIUtils.isEmpty(driverLicense_entity.getLicenseBackImage())) {
        ToastUtils.showToast("未上传行驶证副页照片");
        return;
      }

      if (UIUtils.isEmpty(cardetail_entity.getCarTypeId())) {
        ToastUtils.showToast("未选择品牌型号");
        return;
      }

      if (UIUtils.isEmpty(
              ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_car_plate1))
                  .getText()
                  .toString()
                  .trim())
          || UIUtils.isEmpty(
              ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_car_plate2))
                  .getText()
                  .toString()
                  .trim())
          || UIUtils.isEmpty(
              ((TextView) driving_license_card_verify_view.findViewById(R.id.tv_car_plate3))
                  .getText()
                  .toString()
                  .trim())) {
        ToastUtils.showToast("请检查车牌号码");
        return;
      }

      if (UIUtils.isEmpty(
          ((EditText) driving_license_card_verify_view.findViewById(R.id.et_name))
              .getText()
              .toString()
              .trim())) {
        ToastUtils.showToast("请输入所有人姓名");
        return;
      }
      if (UIUtils.isEmpty(driverLicense_entity.getOwnerType())) { // 所有人性质;
        ToastUtils.showToast("请选择所有性质");
        return;
      }

      if (UIUtils.isEmpty(driverLicense_entity.getUseType())) {
        ToastUtils.showToast("请选择使用性质");
        return;
      }

      if (UIUtils.isEmpty(driverLicense_entity.getCapacity())) {
        ToastUtils.showToast("请选择可载人数");
        return;
      }

      if (UIUtils.isEmpty(
          ((EditText)
                  (driving_license_card_verify_view.findViewById(R.id.et_che_liang_shibie_daihao)))
              .getText()
              .toString()
              .trim())) {
        ToastUtils.showToast("请输入车辆识别号");
        return;
      }

      if (UIUtils.isEmpty(
          ((EditText) (driving_license_card_verify_view.findViewById(R.id.et_engine_num)))
              .getText()
              .toString()
              .trim())) {
        ToastUtils.showToast("请输入发动机号");
        return;
      }

      if (UIUtils.isEmpty(driverLicense_entity.getRegisteDate())) {
        ToastUtils.showToast("请选择注册日期");
        return;
      }

      if (UIUtils.isEmpty(driverLicense_entity.getLicenseEndTime())) {
        ToastUtils.showToast("请选择年检有效期");
        return;
      }

      String registeDate = driverLicense_entity.getRegisteDate();
      if (UIUtils.checkDateValidity(registeDate)) {
        ToastUtils.showToast("注册日期无效");
        return;
      }

      String outlineDate = driverLicense_entity.getLicenseEndTime();
      if (!UIUtils.checkDateValidity(outlineDate)) {
        ToastUtils.showToast("车检已过有效期");
        return;
      }

      requestPass();
    }