Esempio n. 1
0
  private void contactService(String orderId) {
    String servicePhone = orderDetailLayout.getDetail().getCustomer_service_phone();
    String cs_identifier = orderDetailLayout.getDetail().getCS_identifier();
    startActivity(
        new Intent(this, CustomerActivity.class)
            .putExtra("orderId", orderId)
            .putExtra("servicePhone", servicePhone)
            .putExtra("identifier", cs_identifier));

    //        startActivity(new Intent(this, CustomerActivity.class));
  }
Esempio n. 2
0
 @Override
 public void onJsonObjectSuccess(BaseBean o, NetworkParams paramsCode) {
   // 首次进来获取数据
   if (paramsCode == NetworkParams.CUPCAKE) { // 获取全局数据
     OrderDetailBean orderDetailBean = (OrderDetailBean) o;
     final OrderDetailBean.DataEntity data = orderDetailBean.getData();
     fillProductList(orderDetailBean, data);
     fillGuideList(data);
     orderDetailLayout.setDetail(data);
   } else if (paramsCode == NetworkParams.DONUT) { // 预约签到的返回
     AppTools.showNormalSnackBar(parentView, getString(R.string.order_detail_already_sign_in));
     networkModel.orderDetail(orderId, "1", NetworkParams.CUPCAKE);
   } else if (paramsCode == NetworkParams.ICECREAMSANDWICH) {
     orderDetailLayout.llytEvaluate.setVisibility(View.GONE);
     orderDetailLayout.llytEvaluation.setVisibility(View.VISIBLE);
     AppTools.sendBroadcast(null, AppKeyMap.WAITING_COST_ACTION);
     Intent intent =
         new Intent()
             .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP)
             .setClass(this, MainActivity.class);
     startActivity(intent);
     AppTools.sendBroadcast(new Bundle(), AppKeyMap.REFRESH_AND_JUMPTO_SERVICED_PAGE); // 意在刷新
   } else if (paramsCode == NetworkParams.LOLLIPOP) {
     start(MainActivity.class);
     AppTools.sendBroadcast(new Bundle(), AppKeyMap.REFRESH_AND_JUMPTO_SERVICED_PAGE); // 意在刷新
   } else if (paramsCode == NetworkParams.HONEYCOMB) { // 未读清除成功
     AppTools.sendBroadcast(new Bundle(), AppKeyMap.REFRESH_AND_JUMPTO_SERVICED_PAGE); // 意在刷新
   }
 }
Esempio n. 3
0
 @Override
 protected void onClick(int id, View view) {
   final OrderDetailBean.DataEntity detail = orderDetailLayout.getDetail();
   if (detail == null) {
     return;
   }
   String orderId = detail.getOrderid();
   switch (id) {
     case R.id.btn_sign_appointment: // 签到
       if (AppTools.isNetworkConnected()) {
         AppTools.showNormalSnackBar(parentView, getString(R.string.main_locating));
         AppTools.locate(this);
       } else {
         AppTools.showSettingSnackBar(parentView, getString(R.string.no_network_is_detected));
       }
       break;
     case R.id.btn_edit_appointment: // 修改预约
       alterPopupWindow.showAtLocation(parentView, Gravity.BOTTOM, 0, 0);
       break;
     case R.id.btn_appointment_again: // 再次预约
       appointAgain();
       break;
     case R.id.btn_confirm_done: // 完成工单
       completeAcce();
       break;
     case R.id.btn_engineer:
       contactEngineer(detail);
       break;
     case R.id.btn_user:
       contactUser(detail);
       break;
     case R.id.tv_location:
       locationActivityLogic(detail);
       break;
     case R.id.btn_track:
       startActivity(
           new Intent().putExtra("orderId", orderId).setClass(this, OrderTrackingActivity.class));
       break;
     case R.id.textView: // 联系客服
       contactService(orderId);
       BGABadgeTextView bt = (BGABadgeTextView) view;
       bt.hiddenBadge();
       break;
     case R.id.btn_expenses:
       startActivity(new Intent(this, ExpensesDetailActivity.class).putExtra("orderId", orderId));
       break;
     case R.id.btn_msg: // 短信转发
       if (PermissionTools.alreadyHasPermission(
           this, AppKeyMap.GINGERBREAD, Manifest.permission.SEND_SMS)) {
         smsForword();
       }
       break;
   }
 }
Esempio n. 4
0
 private void smsForword() {
   Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("smsto:"));
   intent.putExtra("sms_body", orderDetailLayout.getDetail().getSms_template());
   startActivity(intent);
 }