Commit 43809fec authored by linfeng's avatar linfeng

提现详情、提现记录详情、租车价格日历

parent 22c08aa5
......@@ -47,6 +47,7 @@
<color name="gray_50171413">#50171413</color>
<color name="gray_ffcc0000">#ffcc0000</color>
<color name="gray_ffff4444">#ffff4444</color>
<color name="gray_F1F1F1">#F1F1F1</color>
<!--end-->
</resources>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_rv_bg_button_yellow_left" android:state_selected="true"/>
<item android:drawable="@drawable/shape_rv_bg_button_yellow_left2" android:state_selected="false"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_rv_bg_button_yellow_right" android:state_selected="true" />
<item android:drawable="@drawable/shape_rv_bg_button_yellow_right2" android:state_selected="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomLeftRadius="6dp"
android:topLeftRadius="6dp" />
<solid android:color="@color/gray_FFB74B" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!--空心框 圆角 少量红-->
<corners
android:bottomLeftRadius="6dp"
android:topLeftRadius="6dp" />
<stroke
android:width="1dp"
android:color="@color/gray_FFB74B" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomRightRadius="6dp"
android:topRightRadius="6dp" />
<solid android:color="@color/gray_FFB74B" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!--空心框 圆角 少量红-->
<corners
android:bottomRightRadius="6dp"
android:topRightRadius="6dp" />
<stroke
android:width="1dp"
android:color="@color/gray_FFB74B" />
</shape>
\ No newline at end of file
......@@ -37,6 +37,7 @@ import com.rv.home.rv.module.ui.main.home.bean.CarAttributeListBean;
import com.rv.home.rv.module.ui.main.home.bean.CarTypeListBean;
import com.rv.home.rv.module.ui.main.home.bean.OrderDataBean;
import com.rv.home.rv.module.ui.main.home.dialog.CarAttributePw;
import com.rv.home.rv.module.ui.main.home.dialog.CheckPriceDialog;
import com.rv.home.rv.module.ui.main.home.dialog.SelectAttributeDialog;
import java.text.ParseException;
......@@ -85,6 +86,7 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
private String begDate;
private String endDate;
private long copyDay;//租车天数
private CheckPriceDialog checkPriceDialog;
public static Intent getIntent(Context context, double lat, double lon, double outLatitude, double outLongitude, boolean bool, OrderDataBean bean, String startTime, String endTime) {
return new Intent(context, CarRentalListActivity.class)
......@@ -154,7 +156,13 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
@Override
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
if (view.getId() == R.id.tv_item_loook_price) {
showToast("价格。。。。。");
if (checkPriceDialog == null) {
checkPriceDialog = new CheckPriceDialog(mActivity);
}
if (checkPriceDialog != null) {
// checkPriceDialog.setNewData(DetailsData);
checkPriceDialog.show();
}
}
}
});
......
package com.rv.home.rv.module.ui.main.home.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.rv.home.R;
import com.rv.home.rv.module.ui.main.home.bean.SearchBean;
/**
* 租车价格查看
*/
public class CarRentalCheckPriceAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
public CarRentalCheckPriceAdapter() {
super(R.layout.rv_item_carrental_check_price);
}
@Override
protected void convert(BaseViewHolder helper, String item) {
}
}
......@@ -2,22 +2,74 @@ package com.rv.home.rv.module.ui.main.home.dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.ruiwenliu.wrapper.dialog.BaseDialog;
import com.ruiwenliu.wrapper.util.ViewHolder;
import com.rv.home.R;
import com.rv.home.rv.module.ui.main.home.HomeFragment;
import com.rv.home.rv.module.ui.main.home.adapter.CarRentalCheckPriceAdapter;
import java.util.ArrayList;
/**
* 查看租车每天价格
*/
public class CheckPriceDialog extends BaseDialog {
private CarRentalCheckPriceAdapter adapter;
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);
setDialogParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM);
}
@Override
public void helper(ViewHolder helper) {
super.helper(helper);
final TextView tvCash = (TextView) helper.getView(R.id.tv_item_use_cash);
final TextView tvMember = (TextView) helper.getView(R.id.tv_item_use_member);
final RecyclerView rvContent = (RecyclerView) helper.getView(R.id.rv_content);
tvCash.setSelected(true);
tvCash.setTextColor(getContext().getResources().getColor(R.color.colorWrite));
adapter = new CarRentalCheckPriceAdapter();
rvContent.setLayoutManager(new GridLayoutManager(getContext(), 7));
rvContent.setNestedScrollingEnabled(false);
rvContent.setAdapter(adapter);
helper.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int id = v.getId();
if (id == R.id.tv_item_use_cash) {
tvCash.setSelected(true);
tvCash.setTextColor(getContext().getResources().getColor(R.color.colorWrite));
tvMember.setSelected(false);
tvMember.setTextColor(getContext().getResources().getColor(R.color.gray_FFB74B));
} else if (id == R.id.tv_item_use_member) {
tvCash.setSelected(false);
tvCash.setTextColor(getContext().getResources().getColor(R.color.gray_FFB74B));
tvMember.setSelected(true);
tvMember.setTextColor(getContext().getResources().getColor(R.color.colorWrite));
}
}
}, R.id.tv_item_use_cash, R.id.tv_item_use_member);
initData();
}
private void initData() {
ArrayList<String> strings = new ArrayList<>();
for (int i = 0; i < 30; i++) {
strings.add("" + i);
}
adapter.addData(strings);
}
@Override
......
......@@ -10,6 +10,9 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_15"
android:layout_marginBottom="@dimen/size_15"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
......@@ -26,29 +29,107 @@
android:orientation="horizontal">
<TextView
android:id="@+id/tv_item_use_cash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/size_15"
android:background="@drawable/selector_rv_button_yellow_left"
android:paddingLeft="@dimen/size_12"
android:paddingTop="@dimen/size_8"
android:paddingRight="@dimen/size_15"
android:paddingRight="@dimen/size_12"
android:paddingBottom="@dimen/size_8"
android:text="使用现金"
android:textColor="@color/gray_FFB74B"
android:textSize="@dimen/text_14" />
<TextView
android:id="@+id/tv_item_use_member"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/size_15"
android:background="@drawable/selector_rv_button_yellow_right"
android:paddingLeft="@dimen/size_12"
android:paddingTop="@dimen/size_8"
android:paddingRight="@dimen/size_15"
android:paddingRight="@dimen/size_12"
android:paddingBottom="@dimen/size_8"
android:text="使用会员免费天数"
android:textColor="@color/gray_FFB74B"
android:textSize="@dimen/text_14" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/size_40"
android:background="@color/gray_F1F1F1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="周一"
android:textColor="@color/textGray"
android:textSize="@dimen/text_12" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="周二"
android:textColor="@color/textGray"
android:textSize="@dimen/text_12" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="周三"
android:textColor="@color/textGray"
android:textSize="@dimen/text_12" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="周四"
android:textColor="@color/textGray"
android:textSize="@dimen/text_12" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="周五"
android:textColor="@color/textGray"
android:textSize="@dimen/text_12" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="周六"
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_12" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="周日"
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_12" />
</LinearLayout>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"></android.support.v7.widget.RecyclerView>
</LinearLayout>
\ No newline at end of file
<?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="@dimen/size_70"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="15"
android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_3"
android:text="¥1500"
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_10" />
</LinearLayout>
......@@ -38,10 +38,14 @@ public class CashWithdrawalDetailsActivity extends BaseStatusActivity<WalletPres
WebView mWebView;
private String webUrl;
private String name;
private String amount;
public static Intent getIntent(Context context,String id) {
public static Intent getIntent(Context context, String id, String name, String amount) {
return new Intent(context, CashWithdrawalDetailsActivity.class)
.putExtra("id",id);
.putExtra("id", id)
.putExtra("name", name)
.putExtra("amount", amount);
}
@Override
......@@ -53,6 +57,9 @@ public class CashWithdrawalDetailsActivity extends BaseStatusActivity<WalletPres
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
titleView.setTitle("提现详情");
String id = intent.getStringExtra("id");
name = intent.getStringExtra("name");
amount = intent.getStringExtra("amount");
webUrl = WalletApi.HTTP_URL_WALLET_WITHDRAWDETAIL + "?id=" + id;
Log.i("CampDetailActivity", "initView: " + webUrl);
initWeb();
......@@ -123,6 +130,16 @@ public class CashWithdrawalDetailsActivity extends BaseStatusActivity<WalletPres
public String getToken() {
return OkGoUtil.getToken();
}
@JavascriptInterface
public String getAmount() {
return amount;
}
@JavascriptInterface
public String getName() {
return name;
}
}
@Override
......
......@@ -85,7 +85,7 @@ public class EnchashmentRecordActivity extends BaseStatusActivity<CommonPresente
adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
String url = RvFrameConfig.HOST_H5_DETAIL + "/h5/appHtml/view/withdrawDetail.html?id=" + ((WalletcathListBean.ItemWalletcath) adapter.getItem(position)).getId();
String url = RvFrameConfig.HOST_H5_DETAIL + "/h5/appHtml/view/withdrawProgress.html?id=" + ((WalletcathListBean.ItemWalletcath) adapter.getItem(position)).getId();
ComponentName componentName = new ComponentName(getApplicationContext(), "com.rv.share.WebViewActivity");
Intent intent = new Intent();
intent.setComponent(componentName);
......
......@@ -157,7 +157,7 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
case 4:
WithdrawBean bean = (WithdrawBean) result;
if (bean != null) {
startActivity(CashWithdrawalDetailsActivity.getIntent(mActivity, String.valueOf(bean.getData())));
startActivity(CashWithdrawalDetailsActivity.getIntent(mActivity, String.valueOf(bean.getData()),selectAccountNumber.getNickname(),withdrawalAmount));
RxBus.post(new WithdrawSuccessEvent());
finish();
}
......
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