Просмотр исходного кода

1.修个个人信息数据模型,新增BankModel
2.收款记录列表,详情增加已扣税额

ZhangXinYu 6 лет назад
Родитель
Сommit
d863d97a3e

+ 1 - 1
.idea/vcs.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="VcsDirectoryMappings">
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+    <mapping directory="" vcs="Git" />
   </component>
 </project>

+ 76 - 0
app/src/main/java/com/webrain/happywork/bean/BankModel.java

@@ -0,0 +1,76 @@
+package com.webrain.happywork.bean;
+
+public class BankModel {
+    private String id;
+    private String userId;
+    private String cardNumber;
+    private String joinTime;
+    private String joinBy;
+    private String bnkflg;
+    private String eacbnk;
+    private String rcveaa;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getCardNumber() {
+        return cardNumber;
+    }
+
+    public void setCardNumber(String cardNumber) {
+        this.cardNumber = cardNumber;
+    }
+
+    public String getJoinTime() {
+        return joinTime;
+    }
+
+    public void setJoinTime(String joinTime) {
+        this.joinTime = joinTime;
+    }
+
+    public String getJoinBy() {
+        return joinBy;
+    }
+
+    public void setJoinBy(String joinBy) {
+        this.joinBy = joinBy;
+    }
+
+    public String getBnkflg() {
+        return bnkflg;
+    }
+
+    public void setBnkflg(String bnkflg) {
+        this.bnkflg = bnkflg;
+    }
+
+    public String getEacbnk() {
+        return eacbnk;
+    }
+
+    public void setEacbnk(String eacbnk) {
+        this.eacbnk = eacbnk;
+    }
+
+    public String getRcveaa() {
+        return rcveaa;
+    }
+
+    public void setRcveaa(String rcveaa) {
+        this.rcveaa = rcveaa;
+    }
+}

+ 27 - 0
app/src/main/java/com/webrain/happywork/bean/RecordBean.java

@@ -25,6 +25,9 @@ public class RecordBean {
     private String bnkflg;
     private String eacbnk;
     private String rcveaa;
+    private String taxRate;
+    private String netPayment;
+    private String taxFee;
 
     public String getId() {
         return id;
@@ -209,4 +212,28 @@ public class RecordBean {
     public void setRcveaa(String rcveaa) {
         this.rcveaa = rcveaa;
     }
+
+    public String getTaxRate() {
+        return taxRate;
+    }
+
+    public void setTaxRate(String taxRate) {
+        this.taxRate = taxRate;
+    }
+
+    public String getNetPayment() {
+        return netPayment;
+    }
+
+    public void setNetPayment(String netPayment) {
+        this.netPayment = netPayment;
+    }
+
+    public String getTaxFee() {
+        return taxFee;
+    }
+
+    public void setTaxFee(String taxFee) {
+        this.taxFee = taxFee;
+    }
 }

+ 3 - 3
app/src/main/java/com/webrain/happywork/bean/UserBean.java

@@ -12,7 +12,7 @@ public class UserBean {
     private String sysOrgCode;
     private String registerTime;
     private int registerFrom;
-    private String hwBankAccount;
+    private BankModel hwBankAccount;
     private String cardNumber;
     private String registerTime_begin;
     private String registerTime_end;
@@ -107,11 +107,11 @@ public class UserBean {
         this.registerFrom = registerFrom;
     }
 
-    public String getHwBankAccount() {
+    public BankModel getHwBankAccount() {
         return hwBankAccount;
     }
 
-    public void setHwBankAccount(String hwBankAccount) {
+    public void setHwBankAccount(BankModel hwBankAccount) {
         this.hwBankAccount = hwBankAccount;
     }
 

+ 4 - 1
app/src/main/java/com/webrain/happywork/ui/activity/MineCollectionRecordDetailActivity.java

@@ -27,6 +27,8 @@ public class MineCollectionRecordDetailActivity extends BaseActivity<MineCollect
     TextView tvRecordAccount;
     @BindView(R.id.tv_record_date)
     TextView tvRecordDate;
+    @BindView(R.id.tv_record_taxfee)
+    TextView tvRecordTaxfee;
 
     @Override
     public int getLayoutId() {
@@ -52,7 +54,8 @@ public class MineCollectionRecordDetailActivity extends BaseActivity<MineCollect
             setLoadingVisible(false);
             setErrorVisible(false);
             tvOrderNumber.setText(TextUtils.isEmpty(bean.getOrderNumber()) ? "" : bean.getOrderNumber());
-            tvRecordMoney.setText(TextUtils.isEmpty(bean.getPayment()) ? "" : bean.getPayment());
+            tvRecordMoney.setText(TextUtils.isEmpty(bean.getNetPayment()) ? "" : bean.getNetPayment());
+            tvRecordTaxfee.setText(TextUtils.isEmpty(bean.getTaxFee()) ? "" : bean.getTaxFee());
             tvRecordPerson.setText(TextUtils.isEmpty(bean.getUserName()) ? "" : bean.getUserName());
             tvRecordBank.setText(!TextUtils.isEmpty(bean.getBnkflg()) && bean.getBnkflg().equals("Y") ? "招商银行" : TextUtils.isEmpty(bean.getEacbnk()) ? "" : bean.getEacbnk());
             tvRecordAccount.setText(TextUtils.isEmpty(bean.getCardNumber()) ? "" : bean.getCardNumber());

+ 1 - 1
app/src/main/java/com/webrain/happywork/ui/activity/MineInformationActivity.java

@@ -87,7 +87,7 @@ public class MineInformationActivity extends BaseActivity<MineInformationPresent
         tvGender.setText(TextUtils.isEmpty(mUserBean.getGender()) ? "" : mUserBean.getGender().equals("1") ? "男" : "女");
         tvPhone.setText(mUserBean.getPhone());
         tvIdCard.setText(mUserBean.getIdcardNumber());
-        tvBankId.setText(mUserBean.getHwBankAccount());
+        tvBankId.setText(mUserBean.getHwBankAccount() == null ? "" : mUserBean.getHwBankAccount().getCardNumber());
     }
 
     /**

+ 4 - 1
app/src/main/java/com/webrain/happywork/ui/adapter/listview/MineCollectionRecordListAdapter.java

@@ -44,6 +44,8 @@ public class MineCollectionRecordListAdapter extends BaseListAdapter<RecordBean,
         TextView tvDate;
         @BindView(R.id.tv_money)
         TextView tvMoney;
+        @BindView(R.id.tv_taxfee)
+        TextView tvTaxfee;
 
         public MineCollectionRecordViewHolder(Context mContext) {
             super(mContext);
@@ -59,8 +61,9 @@ public class MineCollectionRecordListAdapter extends BaseListAdapter<RecordBean,
             super.initData(position, obj);
             if (obj != null) {
                 tvId.setText(TextUtils.isEmpty(obj.getOrderNumber()) ? "" : obj.getOrderNumber());
-                tvMoney.setText(TextUtils.isEmpty(obj.getPayment()) ? "" : ("¥" + obj.getPayment()));
+                tvMoney.setText(TextUtils.isEmpty(obj.getNetPayment()) ? "" : ("¥" + obj.getNetPayment()));
                 tvDate.setText(TextUtils.isEmpty(obj.getCreateTime()) ? "" : obj.getCreateTime());
+                tvTaxfee.setText(TextUtils.isEmpty(obj.getTaxFee()) ? "" : ("已扣税额:¥" + obj.getTaxFee()));
             }
         }
     }

+ 3 - 0
app/src/main/java/com/webrain/happywork/ui/adapter/listview/MineOrderListAdapter.java

@@ -90,6 +90,7 @@ public class MineOrderListAdapter extends BaseListAdapter<OrderBean, MineOrderLi
 
                 tvName.setTextColor(mContext.getResources().getColorStateList(R.color.text_black));
                 tvPrice.setTextColor(mContext.getResources().getColorStateList(R.color.text_blue_32));
+                tvStage.setTextColor(mContext.getResources().getColorStateList(R.color.text_blue_32));
                 llState.setVisibility(View.GONE);
                 if (obj.getStatus() == AppConstant.ORDER_STATE_WAIT_SURE) {
                     llState.setVisibility(View.VISIBLE);
@@ -98,12 +99,14 @@ public class MineOrderListAdapter extends BaseListAdapter<OrderBean, MineOrderLi
                     tvState.setText(R.string.order_close);
                     tvName.setTextColor(mContext.getResources().getColorStateList(R.color.text_gray_88));
                     tvPrice.setTextColor(mContext.getResources().getColorStateList(R.color.text_gray_88));
+                    tvStage.setTextColor(mContext.getResources().getColorStateList(R.color.text_gray_88));
                 } else if (obj.getStatus() == AppConstant.ORDER_STATE_SURE) {
                     tvState.setText(R.string.order_sure);
                 } else if (obj.getStatus() == AppConstant.ORDER_STATE_STOP) {
                     tvState.setText(R.string.order_stop);
                     tvName.setTextColor(mContext.getResources().getColorStateList(R.color.text_gray_88));
                     tvPrice.setTextColor(mContext.getResources().getColorStateList(R.color.text_gray_88));
+                    tvStage.setTextColor(mContext.getResources().getColorStateList(R.color.text_gray_88));
                 } else if (obj.getStatus() == AppConstant.ORDER_STATE_FINISH) {
                     tvState.setText(R.string.order_finish);
                 }

+ 26 - 0
app/src/main/res/layout/activity_mine_collection_record_detail.xml

@@ -31,6 +31,32 @@
             android:textColor="@color/text_black"
             android:textSize="@dimen/px42_14sp" />
     </LinearLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="56dp"
+        android:layout_marginTop="2dp"
+        android:background="@color/white"
+        android:gravity="center_vertical"
+        android:orientation="horizontal"
+        android:paddingLeft="20dp"
+        android:paddingRight="20dp">
+
+        <TextView
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:text="@string/mine_record_taxfee"
+            android:textColor="@color/text_gray_88"
+            android:textSize="@dimen/px42_14sp" />
+
+        <TextView
+            android:id="@+id/tv_record_taxfee"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="50"
+            android:textColor="@color/text_black"
+            android:textSize="@dimen/px42_14sp" />
+    </LinearLayout>
 
     <LinearLayout
         android:layout_width="match_parent"

+ 31 - 15
app/src/main/res/layout/item_list_mine_collection_record.xml

@@ -11,41 +11,57 @@
         android:layout_marginTop="2dp"
         android:background="@color/white"
         android:gravity="center_vertical"
+        android:orientation="vertical"
         android:paddingLeft="20dp"
         android:paddingRight="15dp">
 
         <LinearLayout
-            android:layout_width="0dp"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:orientation="vertical">
+            android:orientation="horizontal">
 
             <TextView
                 android:id="@+id/tv_id"
-                android:layout_width="wrap_content"
+                android:layout_width="0dp"
                 android:layout_height="wrap_content"
+                android:layout_marginRight="5dp"
+                android:layout_weight="1"
                 android:text="DD201911110001"
                 android:textColor="@color/text_black"
                 android:textSize="@dimen/px48_16sp" />
 
             <TextView
-                android:id="@+id/tv_date"
+                android:id="@+id/tv_money"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="1dp"
+                android:text="¥500,000"
+                android:textColor="@color/text_black"
+                android:textSize="@dimen/px48_16sp" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="1dp"
+            android:orientation="horizontal">
+
+            <TextView
+                android:id="@+id/tv_date"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
                 android:text="2019.12.12 13:13:21"
                 android:textColor="@color/text_gray_88"
                 android:textSize="@dimen/px36_12sp" />
-        </LinearLayout>
 
-        <TextView
-            android:id="@+id/tv_money"
-            android:textStyle="bold"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="¥500,000"
-            android:textColor="@color/text_black"
-            android:textSize="@dimen/px60_20sp" />
+            <TextView
+                android:id="@+id/tv_taxfee"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="已扣税额:¥500,000"
+                android:textColor="@color/text_gray_88"
+                android:textSize="@dimen/px36_12sp" />
+        </LinearLayout>
     </LinearLayout>
 
 </LinearLayout>

+ 2 - 1
app/src/main/res/values/strings.xml

@@ -60,6 +60,7 @@
     <string name="mine_payment_record">收款记录</string>
     <string name="mine_payment_record_detail">收款详情</string>
     <string name="mine_order_number">订单编号</string>
+    <string name="mine_record_taxfee">已扣税额</string>
     <string name="mine_record_money">收款金额</string>
     <string name="mine_record_person">收款人</string>
     <string name="mine_record_bank">收款银行</string>
@@ -74,7 +75,7 @@
     <string name="mine_tax_tip2">如果需要查询请致电:</string>
     <string name="mine_tax_tip3">400-692-0099</string>
     <string name="mine_base_information">基本信息</string>
-    <string name="mine_information_tips">认证用户只允许修改头像和所在地</string>
+    <string name="mine_information_tips">认证用户只允许修改头像</string>
 
 
     <string name="hint_input_phone">请输入手机号码</string>