Commit 2eb9a183 authored by linfeng's avatar linfeng

佣金修改

parent 35df5a84
...@@ -34,24 +34,31 @@ public class commissionListAdapter extends BaseQuickAdapter<IncomeRecordsBean.In ...@@ -34,24 +34,31 @@ public class commissionListAdapter extends BaseQuickAdapter<IncomeRecordsBean.In
helper.setText(R.id.tv_consume_name, buffer.toString()); helper.setText(R.id.tv_consume_name, buffer.toString());
helper.setText(R.id.tv_income_time, DateUtils.timestampToString1(item.getCrtTime())); helper.setText(R.id.tv_income_time, DateUtils.timestampToString1(item.getCrtTime()));
if (item.getWaiting() == 0) {//是否入账:0-未入账;1-已入账
helper.setBackgroundRes(R.id.tv_status, R.drawable.shape_rv_bg_income_not);
helper.setText(R.id.tv_status,"未到账");
} else if (item.getWaiting() == 1) {
helper.setBackgroundRes(R.id.tv_status, R.drawable.shape_rv_bg_income_has);
helper.setText(R.id.tv_status,"已到账");
}
if (item.getStatus() == 0) { if (item.isShow()) {
helper.setText(R.id.tv_amount, "取消订单");
helper.setTextColor(R.id.tv_amount, mContext.getResources().getColor(R.color.colorGray));
} else {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.append("+").append(item.getCommission()).append("元"); builder.append("+").append(item.getCommission()).append("元");
helper.setText(R.id.tv_amount, builder.toString()); helper.setText(R.id.tv_amount, builder.toString());
helper.setTextColor(R.id.tv_amount,mContext.getResources().getColor(R.color.textGray)); helper.setTextColor(R.id.tv_amount, mContext.getResources().getColor(R.color.textGray));
} else if (item.getStatus() == 1) { }
helper.setText(R.id.tv_amount, "取消订单");
helper.setTextColor(R.id.tv_amount,mContext.getResources().getColor(R.color.colorGray)); if (TextUtils.isEmpty(item.getSellerStatus())) {
helper.setGone(R.id.tv_status, false);
} else {
helper.setGone(R.id.tv_status, true);
if ("0".equals(item.getSellerStatus())) { //0未入账 1 已入账 2:取消
helper.setBackgroundRes(R.id.tv_status, R.drawable.shape_rv_bg_income_not);
helper.setText(R.id.tv_status, item.getStatusText());
} else if ("1".equals(item.getSellerStatus())) {
helper.setBackgroundRes(R.id.tv_status, R.drawable.shape_rv_bg_income_has);
helper.setText(R.id.tv_status, item.getStatusText());
} else if ("2".equals(item.getSellerStatus())) {
helper.setBackgroundRes(R.id.tv_status, R.drawable.shape_rv_bg_income_cancel); helper.setBackgroundRes(R.id.tv_status, R.drawable.shape_rv_bg_income_cancel);
helper.setText(R.id.tv_status,"取消"); helper.setText(R.id.tv_status, item.getStatusText());
}
} }
} }
......
...@@ -95,6 +95,10 @@ public class IncomeRecordsBean extends BaseBean { ...@@ -95,6 +95,10 @@ public class IncomeRecordsBean extends BaseBean {
private long updTime; private long updTime;
private String username; private String username;
private int waiting; private int waiting;
private String sellerStatus;// 0未入账 1 已入账 2:取消
private String statusText;
private boolean isShow;
public BigDecimal getCommission() { public BigDecimal getCommission() {
return commission; return commission;
...@@ -191,5 +195,29 @@ public class IncomeRecordsBean extends BaseBean { ...@@ -191,5 +195,29 @@ public class IncomeRecordsBean extends BaseBean {
public void setWaiting(int waiting) { public void setWaiting(int waiting) {
this.waiting = waiting; this.waiting = waiting;
} }
public String getSellerStatus() {
return sellerStatus;
}
public void setSellerStatus(String sellerStatus) {
this.sellerStatus = sellerStatus;
}
public String getStatusText() {
return statusText;
}
public void setStatusText(String statusText) {
this.statusText = statusText;
}
public boolean isShow() {
return isShow;
}
public void setShow(boolean show) {
isShow = show;
}
} }
} }
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10" android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginTop="@dimen/size_10" android:layout_marginTop="@dimen/size_10"
android:layout_marginRight="@dimen/dp_10"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
...@@ -16,10 +16,14 @@ ...@@ -16,10 +16,14 @@
<TextView <TextView
android:id="@+id/tv_status" android:id="@+id/tv_status"
android:layout_width="@dimen/size_60" android:layout_width="wrap_content"
android:layout_height="@dimen/size_20" android:layout_height="wrap_content"
android:background="@drawable/shape_rv_bg_income_not" android:background="@drawable/shape_rv_bg_income_not"
android:gravity="center" android:gravity="center"
android:paddingLeft="@dimen/size_8"
android:paddingTop="@dimen/size_3"
android:paddingRight="@dimen/size_8"
android:paddingBottom="@dimen/size_3"
android:text="" android:text=""
android:textColor="@color/colorWrite" android:textColor="@color/colorWrite"
android:textSize="@dimen/text_10" /> android:textSize="@dimen/text_10" />
......
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