@Override
  public void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);

    Bundle bundle = getArguments();
    if (bundle != null) {
      mRfqID = bundle.getString("rfqid");
      mIsRecommend = bundle.getString("isrecommend");
      if (Utils.isEmpty(mIsRecommend)) {
        mIsRecommend = "0";
      }
    }
  }
  private void sendQuotation() {
    CommonProgressDialog.getInstance()
        .showCancelableProgressDialog(getActivity(), getString(R.string.message_sent_loading));
    // 是滞存在附件
    if (!Utils.isEmpty(sendData.mFilePath)) {

      RequestCenter.uploadFile(uploadListener, sendData.mFilePath, "quotationAttachment");
    } else {
      if (isEdit) {
        RequestCenter.modifyQuotation(sendData, sendListener);
      } else {
        RequestCenter.sendQuotation(sendData, quoteSource, quotationid, sendListener);
      }
    }
  }
 @Override
 public View getView(int position, View convertView, ViewGroup parent) {
   if (null == convertView || null == convertView.getTag()) {
     holder = new ViewHolder();
     convertView = LayoutInflater.from(context).inflate(R.layout.list_item_message, parent, false);
     holder.name = (TextView) convertView.findViewById(R.id.message_contacts_lv_item_name);
     holder.otherPeopleName =
         (TextView) convertView.findViewById(R.id.message_contacts_lv_item_other_name);
     holder.content = (TextView) convertView.findViewById(R.id.message_contacts_lv_item_content);
     holder.data = (TextView) convertView.findViewById(R.id.message_contacts_lv_item_data);
     holder.tag = (ImageView) convertView.findViewById(R.id.message_contacts_lv_item_tag);
     holder.city = (CountryImageView) convertView.findViewById(R.id.message_contacts_lv_item_city);
     holder.rlItemCity =
         (RelativeLayout) convertView.findViewById(R.id.message_contacts_rl_item_city);
     holder.attachment =
         (ImageView) convertView.findViewById(R.id.message_contacts_lv_item_attachment);
     holder.isRead = (ImageView) convertView.findViewById(R.id.message_contacts_lv_item_read);
     holder.rlTag =
         (RelativeLayout) convertView.findViewById(R.id.message_contacts_lv_item_rl_tag);
     holder.rlTagPadding =
         (View) convertView.findViewById(R.id.message_contacts_lv_item_left_padding);
     convertView.setTag(holder);
   } else {
     holder = (ViewHolder) convertView.getTag();
   }
   messageContent = (MessageContent) getItem(position);
   if ("0".equals(action)) {
     holder.isRead.setVisibility(View.GONE);
     fullName = messageContent.sender.fullName;
     otherNameTag = "收件人:";
     if ("00".equals(messageContent.receiver.operatorId)
         || !SupplierApplication.getInstance().getUser().content.userInfo.isManager()) {
       otherName = "我";
       otherNameColor = context.getResources().getColor(R.color.color_b3b3b3);
     } else {
       otherName = messageContent.receiver.fullName;
       otherNameColor = context.getResources().getColor(R.color.color_ccb895);
     }
     if (!Utils.isEmpty(messageContent.sender.countryImageUrl)) {
       holder.rlItemCity.setVisibility(View.VISIBLE);
       ImageUtil.getImageLoader()
           .displayImage(
               messageContent.sender.countryImageUrl,
               holder.city,
               ImageUtil.getCommonImageOptions());
     } else {
       holder.rlItemCity.setVisibility(View.INVISIBLE);
     }
     if ("0".equals(messageContent.isRead)) // true:未读
     {
       holder.name.setTextColor(context.getResources().getColor(R.color.color_333333));
       holder.tag.setImageResource(R.drawable.bg_message_blue_dot);
       holder.tag.setVisibility(View.VISIBLE);
     } else {
       // 判断是否已经回复
       if ("1".equals(messageContent.isReplied)) {
         holder.tag.setImageResource(R.drawable.ic_message_reply);
         holder.tag.setVisibility(View.VISIBLE);
       } else {
         holder.tag.setVisibility(View.INVISIBLE);
       }
       holder.name.setTextColor(context.getResources().getColor(R.color.color_666666));
     }
   } else {
     holder.rlTag.setVisibility(View.GONE);
     holder.rlTagPadding.setVisibility(View.VISIBLE);
     if ("1".equals(messageContent.receiverReadFlag)) // true:未读
     {
       holder.name.setTextColor(context.getResources().getColor(R.color.color_666666));
       holder.isRead.setVisibility(View.VISIBLE);
     } else {
       holder.name.setTextColor(context.getResources().getColor(R.color.color_333333));
       holder.isRead.setVisibility(View.GONE);
     }
     fullName = messageContent.receiver.fullName;
     otherNameTag = "发件人:";
     if ("00".equals(messageContent.sender.operatorId)
         || !SupplierApplication.getInstance().getUser().content.userInfo.isManager()) {
       otherName = "我";
       otherNameColor = context.getResources().getColor(R.color.color_b3b3b3);
     } else {
       otherName = messageContent.sender.fullName;
       otherNameColor = context.getResources().getColor(R.color.color_ccb895);
     }
     holder.rlItemCity.setVisibility(View.GONE);
     holder.tag.setVisibility(View.GONE);
   }
   if ("1".equals(messageContent.isAttached)) {
     holder.attachment.setVisibility(View.VISIBLE);
   } else {
     holder.attachment.setVisibility(View.GONE);
   }
   holder.otherPeopleName.setText(otherNameTag + otherName);
   holder.otherPeopleName.setTextColor(otherNameColor);
   holder.name.setText(fullName);
   if (!Utils.isEmpty(messageContent.date)) {
     holder.data.setText(Util.formatDateForMessageList(messageContent.date));
     holder.data.setVisibility(View.VISIBLE);
   } else {
     holder.data.setVisibility(View.INVISIBLE);
   }
   holder.content.setText(messageContent.subject);
   return convertView;
 }
  private void setData() {
    if (null == sendData) return;

    // 产品资料
    tvProductName.setText(sendData.prodName);

    tvProductType.setText(sendData.prodModel);

    tvProductDescription.setText(sendData.remark);

    // 附件图片
    if (!Utils.isEmpty(sendData.mFilePath)) {
      ivImage.setImageBitmap(BitmapFactory.decodeFile(sendData.mFilePath));
    } else {
      if (!Utils.isEmpty(sendData.prodImg)) {
        ImageUtil.getImageLoader()
            .displayImage(sendData.prodImg, ivImage, ImageUtil.getRecommendImageOptions());
      } else {
        ivImage.setVisibility(View.GONE);
      }
    }

    // 报价详情
    tvTradeType.setText(sendData.shipmentType);

    tvPortName.setText(sendData.shipmentPort);

    tvUnitPrice.setText(
        sendData.prodPrice
            + " "
            + sendData.prodPriceUnit_pro
            + "/"
            + sendData.prodpricePacking_pro_zh);

    tvMinOrder.setText(sendData.prodMinnumOrder + " " + sendData.prodMinnumOrderType_pro_zh);

    tvPayment.setText(sendData.paymentTerm_pro);

    // 是否显示

    if ("1".equals(sendData.mAddtional)) {

      if (Utils.isEmpty(sendData.quoteExpiredDate_zh)
          && Utils.isEmpty(sendData.leadTime)
          && Utils.isEmpty(sendData.deliveryMethod_pro_zh)
          && Utils.isEmpty(sendData.packaging_zh)
          && Utils.isEmpty(sendData.qualityInspection_zh)
          && Utils.isEmpty(sendData.documents_zh)) {
        llAdditionalContent.setVisibility(View.GONE);
      } else {

        llAdditionalContent.setVisibility(View.VISIBLE);
        // 附加条件
        if (Utils.isEmpty(sendData.quoteExpiredDate_zh)) {
          llValidDate.setVisibility(View.GONE);
        } else {
          llValidDate.setVisibility(View.VISIBLE);
          tvValidDate.setText(sendData.quoteExpiredDate_zh);
        }

        if (Utils.isEmpty(sendData.leadTime)) {
          llDeliveryTime.setVisibility(View.GONE);
        } else {
          llDeliveryTime.setVisibility(View.VISIBLE);
          tvDeliveryTime.setText(sendData.leadTime + " " + getString(R.string.unit_day));
        }

        if (Utils.isEmpty(sendData.deliveryMethod_pro_zh)) {
          llModeOfTransport.setVisibility(View.GONE);
        } else {
          llModeOfTransport.setVisibility(View.VISIBLE);
          tvModeOfTransport.setText(sendData.deliveryMethod_pro_zh);
        }

        if (Utils.isEmpty(sendData.packaging_zh)) {
          llModeOfPacking.setVisibility(View.GONE);
        } else {
          llModeOfPacking.setVisibility(View.VISIBLE);
          tvModeOfPacking.setText(sendData.packaging_zh);
        }

        if (Utils.isEmpty(sendData.qualityInspection_zh)) {
          llQualityInspection.setVisibility(View.GONE);
        } else {
          llQualityInspection.setVisibility(View.VISIBLE);
          tvQualityInspection.setText(sendData.qualityInspection_zh);
        }

        if (Utils.isEmpty(sendData.documents_zh)) {
          llFile.setVisibility(View.GONE);
        } else {
          llFile.setVisibility(View.VISIBLE);
          tvFile.setText(sendData.documents_zh);
        }
      }
    } else {
      llAdditionalContent.setVisibility(View.GONE);
    }

    // 梓品

    if ("1".equals(sendData.sampleProvide)) {
      llSamplingContent.setVisibility(View.VISIBLE);
      if ("1".equals(sendData.sampleFre)) {
        tvSample.setText(R.string.sampling_free);
      } else {
        tvSample.setText(R.string.sampling_unfree);
      }
    } else {
      llSamplingContent.setVisibility(View.GONE);
    }
  }