Commit 86217d72 authored by linfeng's avatar linfeng

租车

parent 22ba4eae
......@@ -149,6 +149,15 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
}
}
});
mAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
@Override
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
if (view.getId() == R.id.tv_item_loook_price) {
showToast("价格。。。。。");
}
}
});
}
@Override
......@@ -273,8 +282,8 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
map.put("lat", mLat);
map.put("lon", mLon);
map.put("parkBranchCompanyId", dataBean.getStartCompanyId());
map.put("startCompanyId",dataBean.getStartCompanyId());
map.put("endCompanyId",dataBean.getEndCompanyId());
map.put("startCompanyId", dataBean.getStartCompanyId());
map.put("endCompanyId", dataBean.getEndCompanyId());
try {
map.put("startDateTamp", TimeManager.dateToStamp(begDate));
map.put("endDateTamp", TimeManager.dateToStamp(endDate));
......
......@@ -17,7 +17,6 @@ import com.rv.home.rv.module.ui.main.home.bean.ShopListBean;
* Created :Auser
* Date: 2019/5/16.
* Desc:租车列表适配器
* https://blog.csdn.net/anita9999/article/details/82346552
*/
public class CarRentalListAdapter extends BaseQuickAdapter<CarTypeListBean.DataBeanX.DataBean, BaseGlideHolder> {
......@@ -32,21 +31,19 @@ public class CarRentalListAdapter extends BaseQuickAdapter<CarTypeListBean.DataB
helper.setText(R.id.tv_context, item.getVehicleModel().getKeyword());
helper.setText(R.id.tv_point, String.valueOf(item.getVehicleModel().getPoint()));
String icon ="";
if (!TextUtils.isEmpty(item.getVehicleModel().getCoverPic())){
String icon = "";
if (!TextUtils.isEmpty(item.getVehicleModel().getCoverPic())) {
icon = item.getVehicleModel().getCoverPic();
}else {
} else {
icon = item.getVehicleModel().getIcon();
}
helper.loadRoundImage(mContext, icon, (ImageView) helper.getView(R.id.iv_goods), 10, DisplayUtil.dip2px(mContext, helper.getView(R.id.iv_goods).getWidth()), DisplayUtil.dip2px(mContext, helper.getView(R.id.iv_goods).getHeight()));
// helper.setText(R.id.tv_name,item);
helper.setText(R.id.tv_price, String.format("¥%1$s%2$s", item.getVehicleModel().getPrice(), mContext.getString(R.string.rv_day)));
helper.setText(R.id.tv_price, String.format("¥%1$s%2$s", item.getVehicleModel().getPrice(), "/天起"));
float score = (float) item.getVehicleModel().getScore() / 10;
StarBar starBar = helper.getView(R.id.starbar1);
starBar.setStarMark(score);
starBar.setVisibility(View.GONE);
helper.setText(R.id.tv_point, score + "");
helper.setText(R.id.tv_point, score + "分");
if ("0".equals(item.getHasVehicle())) {
helper.setGone(R.id.iv_sold_out, true);
helper.setGone(R.id.tv_layout_gray, true);
......@@ -55,13 +52,12 @@ public class CarRentalListAdapter extends BaseQuickAdapter<CarTypeListBean.DataB
helper.setGone(R.id.iv_sold_out, false);
helper.setGone(R.id.tv_layout_gray, false);
}
}
helper.setText(R.id.tv_address, item.getCompany().getName());
helper.addOnClickListener(R.id.tv_item_loook_price);
double instance = item.getDistance() / 1000;
// double instance = item.getDistance() / 1000;
helper.setText(R.id.tv_km, String.format("%s%d%s", mContext.getString(R.string.rv_km_you), new Double(instance).intValue(), mContext.getString(R.string.rv_km)));
// helper.setText(R.id.tv_km, String.format("%s%d%s", mContext.getString(R.string.rv_km_you), new Double(instance).intValue(), mContext.getString(R.string.rv_km)));
}
}
package com.rv.home.rv.module.ui.main.home.dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.Gravity;
import android.view.ViewGroup;
import com.ruiwenliu.wrapper.dialog.BaseDialog;
import com.rv.home.R;
/**
* 查看租车每天价格
*/
public class CheckPriceDialog extends BaseDialog {
public CheckPriceDialog(@NonNull Context context) {
super(context);
setDialogParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM);
findViewById(com.rv.component.dialog.R.id.iv_wx_select).setSelected(true);
}
@Override
public int getViewLayout() {
return R.layout.rv_dialog_check_price;
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorWrite"
android:orientation="vertical"
android:paddingLeft="@dimen/size_15"
android:paddingRight="@dimen/size_15">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="价格明细表"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_16" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/size_15"
android:paddingTop="@dimen/size_8"
android:paddingRight="@dimen/size_15"
android:paddingBottom="@dimen/size_8"
android:text="使用现金"
android:textColor="@color/gray_FFB74B"
android:textSize="@dimen/text_14" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/size_15"
android:paddingTop="@dimen/size_8"
android:paddingRight="@dimen/size_15"
android:paddingBottom="@dimen/size_8"
android:text="使用会员免费天数"
android:textColor="@color/gray_FFB74B"
android:textSize="@dimen/text_14" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ratingbar="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:ratingbar="http://schemas.android.com/apk/res-auto"
android:background="@color/colorLine">
<LinearLayout
......@@ -11,8 +11,15 @@
android:layout_marginTop="@dimen/size_5"
android:layout_marginBottom="@dimen/size_5"
android:background="@color/colorWrite"
android:orientation="horizontal"
android:padding="@dimen/size_10">
android:orientation="vertical"
android:paddingLeft="@dimen/size_10"
android:paddingTop="@dimen/size_10"
android:paddingRight="@dimen/size_10">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_goods"
......@@ -20,10 +27,11 @@
android:layout_height="85dp"
android:scaleType="centerInside" />
<RelativeLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="85dp"
android:layout_marginLeft="@dimen/size_5">
android:layout_marginLeft="@dimen/size_10"
android:orientation="vertical">
<TextView
android:id="@+id/tv_name"
......@@ -31,55 +39,36 @@
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text=""
android:text="大通自行式C型房车"
android:textColor="@color/textMain"
android:textSize="@dimen/text_14" />
<TextView
android:layout_marginRight="@dimen/size_50"
android:id="@+id/tv_address"
android:layout_width="wrap_content"
android:id="@+id/tv_context"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_name"
android:layout_marginTop="@dimen/size_5"
android:layout_marginTop="@dimen/size_10"
android:ellipsize="end"
android:maxLines="1"
android:text=""
android:textColor="@color/textGray"
android:text="C1 / 冰箱 / 彩电 / 浴室 / 厨房"
android:textColor="@color/gray_707070"
android:textSize="@dimen/text_10" />
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_address"
android:layout_marginTop="@dimen/size_3"
android:layout_marginTop="@dimen/size_8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_context"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:text=""
android:textColor="@color/textGray"
android:textSize="@dimen/text_10" />
<TextView
android:gravity="right|center_vertical"
android:layout_gravity="right"
android:id="@+id/tv_point"
android:layout_width="@dimen/size_60"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_10"
android:drawableRight="@drawable/rv_vehicle_icon_star_light"
android:ellipsize="end"
android:maxLines="1"
android:text=""
android:textColor="@color/textGray"
android:text="4.8分"
android:textColor="@color/gray_707070"
android:textSize="@dimen/text_10" />
<com.frame.base.view.StarBar
......@@ -87,20 +76,28 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_10"
ratingbar:isClick="true"
ratingbar:starCount="5"
ratingbar:starDistance="3dp"
ratingbar:starEmpty="@drawable/rv_vehicle_icon_star_gray"
ratingbar:starFill="@drawable/rv_vehicle_icon_star_light"
ratingbar:starDistance="3dp"
ratingbar:starCount="5"
ratingbar:isClick ="true"
ratingbar:starSize="@dimen/size_12"/>
ratingbar:starSize="@dimen/size_12" />
</LinearLayout>
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />
<include layout="@layout/common_line" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_item_look_price"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/ll_content"
android:layout_marginTop="@dimen/size_5"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -109,38 +106,42 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=""
android:text="¥1500/天起"
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_14"
android:textStyle="bold" />
<TextView
android:gravity="right|center_vertical"
android:id="@+id/tv_km"
android:layout_width="@dimen/size_70"
android:id="@+id/tv_item_loook_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="@color/textGray"
android:textSize="@dimen/text_10" />
android:paddingLeft="@dimen/size_30"
android:paddingTop="@dimen/size_10"
android:paddingBottom="@dimen/size_10"
android:drawableRight="@drawable/rv_common_icon_up_arrow"
android:drawablePadding="@dimen/size_5"
android:text="每日价格"
android:textColor="@color/text_Main"
android:textSize="@dimen/text_12" />
</LinearLayout>
</LinearLayout>
<ImageView
android:id="@+id/iv_sold_out"
android:visibility="gone"
android:layout_width="@dimen/size_90"
android:layout_height="@dimen/size_90"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginTop="@dimen/size_10"
android:layout_marginRight="@dimen/size_10"
android:src="@drawable/icon_home_item_car_rental_sold_out" />
</RelativeLayout>
</LinearLayout>
android:src="@drawable/icon_home_item_car_rental_sold_out"
android:visibility="gone" />
<TextView
android:visibility="gone"
android:id="@+id/tv_layout_gray"
android:layout_width="match_parent"
android:layout_height="@dimen/size_130"
android:background="@color/gray_50ffffff"/>
android:layout_marginTop="@dimen/size_5"
android:background="@color/gray_50ffffff"
android:visibility="gone" />
</RelativeLayout>
......@@ -171,8 +171,6 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
tvNickname.setText(userInfo.getNickname());
setMember(userInfo);
}
}
private void initRefresh() {
......
......@@ -6,7 +6,6 @@ import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
......
......@@ -66,7 +66,6 @@ public class EnchashmentRecordActivity extends BaseStatusActivity<CommonPresente
}
}
}
}
@Override
......
......@@ -141,7 +141,7 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
@Override
public void onShowError(String errorMsg, int errorType) {
super.onShowError(errorMsg, errorType);
tvHint.setText(errorMsg +",当前账户余额" + balance + "元");
tvHint.setText(errorMsg + ",当前账户余额" + balance + "元");
tvHint.setTextColor(getResources().getColor(R.color.colorBg));
}
......@@ -368,7 +368,7 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
Map<String, Object> headMap = new LinkedHashMap<>();
if (OkGoUtil.getToken() != null)
headMap.put("Authorization", OkGoUtil.getToken());
mPresenter.postBodyData(RvFrameConfig.VEHICLE_ORDER, 4, WalletApi.HTTP_URL_WALLET_APPLYCATH, WithdrawBean.class, new Withdraw(withdrawalAmount, passContent, selectAccountNumber.getId(), "1"), headMap, true);
mPresenter.postBodyData(RvFrameConfig.VEHICLE_ORDER, 4, WalletApi.HTTP_URL_WALLET_APPLYCATH, WithdrawBean.class, new Withdraw(withdrawalAmount, passContent, selectAccountNumber.getTxAlipay(), selectAccountNumber.getNickname(), "1"), headMap, true);
}
@Override
......@@ -383,11 +383,13 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
private String password;
private String accountNumber;
private String cathType;
private String accountName;
public Withdraw(String amount, String password, String accountNumber, String cathType) {
public Withdraw(String amount, String password, String accountNumber, String accountName, String cathType) {
this.amount = amount;
this.password = password;
this.accountNumber = accountNumber;
this.accountName = accountName;
this.cathType = cathType;
}
......@@ -422,5 +424,13 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
public void setCathType(String cathType) {
this.cathType = cathType;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
}
}
package com.xxrv.wallet.adapter;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.rv.component.utils.DateUtils;
import com.rv.component.utils.DisplayUtil;
import com.xxrv.wallet.R;
import com.xxrv.wallet.bean.IncomeRecordsBean;
import com.xxrv.wallet.bean.WalletcathListBean;
import java.util.List;
public class WalletCathAdapter extends BaseQuickAdapter<WalletcathListBean.ItemWalletcath, BaseViewHolder> {
......@@ -24,21 +17,9 @@ public class WalletCathAdapter extends BaseQuickAdapter<WalletcathListBean.ItemW
@Override
protected void convert(BaseViewHolder helper, WalletcathListBean.ItemWalletcath item) {
helper.setText(R.id.tv_consume_name, "提现" + item.getAmount() + "元");
helper.setText(R.id.tv_amount, item.getAmount() + "元");
helper.setText(R.id.tv_income_time, DateUtils.timestampToString1(item.getCrtTime()));
if (item.getStauts() == 0) {
helper.setText(R.id.tv_amount, "审核中");
helper.setTextColor(R.id.tv_amount, Color.parseColor("#cccccc"));
} else if (item.getStauts() == 1) {
helper.setText(R.id.tv_amount, "已到帐");
helper.setTextColor(R.id.tv_amount, Color.parseColor("#999999"));
} else if (item.getStauts() == 2) {
helper.setText(R.id.tv_amount, "审核失败");
helper.setTextColor(R.id.tv_amount, Color.parseColor("#F25b5b"));
}
Drawable drawable = mContext.getResources().getDrawable(R.drawable.common_icon_rig_gray);
drawable.setBounds(0, 0, DisplayUtil.dip2px(mContext, 8), DisplayUtil.dip2px(mContext, 12));
((TextView) helper.itemView.findViewById(R.id.tv_amount)).setCompoundDrawables(null, null, drawable, null);
helper.setText(R.id.tv_consume_name, item.getAccountNumberDesc());
}
......
......@@ -94,6 +94,8 @@ public class WalletcathListBean extends BaseBean {
private int stauts;
private long crtTime;
private long finishTime;
private String accountNumberDesc;//": "提现到支付宝(PeakLin)",
private String accountName;//": "PeakLin"
public int getId() {
return id;
......@@ -151,5 +153,21 @@ public class WalletcathListBean extends BaseBean {
public void setFinishTime(long finishTime) {
this.finishTime = finishTime;
}
public String getAccountNumberDesc() {
return accountNumberDesc;
}
public void setAccountNumberDesc(String accountNumberDesc) {
this.accountNumberDesc = accountNumberDesc;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment