Commit c99e7258 authored by chengkun's avatar chengkun

订单列表ui调整

parent e00aab1f
......@@ -112,57 +112,57 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
private fun setOrderStatus(data: OrderWebData, holder: BaseViewHolder) {
when(data.order_status) {
1 -> {
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "未支付"
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "未支付:"
holder.itemView.findViewById<TextView>(R.id.tv_pay_status).text = "未支付"
val money:TextView = holder.itemView.findViewById<TextView>(R.id.tv_pay_money_count)
money.typeface = Typeface.DEFAULT_BOLD
// money.typeface = Typeface.DEFAULT_BOLD
money.text = "${data.total_price}"
}
2 -> {
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "已支付"
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "已支付:"
holder.itemView.findViewById<TextView>(R.id.tv_pay_status).text = "已支付"
holder.itemView.findViewById<TextView>(R.id.tv_order_list_yuan).visibility = View.VISIBLE
val money:TextView = holder.itemView.findViewById<TextView>(R.id.tv_pay_money_count)
money.typeface = Typeface.DEFAULT_BOLD
// money.typeface = Typeface.DEFAULT_BOLD
money.text = "${data.total_price}"
}
3 -> {
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "已支付"
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "已支付:"
holder.itemView.findViewById<TextView>(R.id.tv_pay_status).text = "待退款"
holder.itemView.findViewById<TextView>(R.id.tv_order_list_yuan).visibility = View.VISIBLE
val money:TextView = holder.itemView.findViewById<TextView>(R.id.tv_pay_money_count)
money.typeface = Typeface.DEFAULT_BOLD
// money.typeface = Typeface.DEFAULT_BOLD
money.text = "${data.total_price}"
}
4,8 -> {
if (data.order_status == 4) {
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "已退款"
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "已退款:"
holder.itemView.findViewById<TextView>(R.id.tv_pay_status).text = "已退款"
} else {
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "部分退款"
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "部分退款:"
holder.itemView.findViewById<TextView>(R.id.tv_pay_status).text = "部分退款"
}
holder.itemView.findViewById<TextView>(R.id.tv_order_list_yuan).visibility = View.VISIBLE
val money:TextView = holder.itemView.findViewById(R.id.tv_pay_money_count)
money.typeface = Typeface.DEFAULT_BOLD
// money.typeface = Typeface.DEFAULT_BOLD
money.text = "${data.refund_amount}"
}
5 -> {
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "已支付"
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "已支付:"
holder.itemView.findViewById<TextView>(R.id.tv_pay_status).text = "退款中"
holder.itemView.findViewById<TextView>(R.id.tv_order_list_yuan).visibility = View.VISIBLE
val money:TextView = holder.itemView.findViewById<TextView>(R.id.tv_pay_money_count)
money.typeface = Typeface.DEFAULT_BOLD
// money.typeface = Typeface.DEFAULT_BOLD
money.text = "${data.total_price}"
}
6 -> {
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "已支付"
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "已支付:"
holder.itemView.findViewById<TextView>(R.id.tv_pay_status).text = "已拒绝"
holder.itemView.findViewById<TextView>(R.id.tv_order_list_yuan).visibility = View.VISIBLE
val money:TextView = holder.itemView.findViewById<TextView>(R.id.tv_pay_money_count)
money.typeface = Typeface.DEFAULT_BOLD
// money.typeface = Typeface.DEFAULT_BOLD
money.text = "${data.total_price}"
}
}
......
......@@ -196,16 +196,18 @@
android:id="@+id/tv_pay_money_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="已支付: "
android:text="已支付:"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_order_list_yuan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:text="¥"
android:textSize="12sp"
android:textStyle="bold" />
android:textStyle="bold"
android:textColor="@color/color_333333"
android:layout_marginLeft="20px"/>
<TextView
android:id="@+id/tv_pay_money_count"
......@@ -213,6 +215,7 @@
android:layout_height="wrap_content"
android:textColor="@color/color_333333"
android:textSize="16sp"
android:textStyle="bold"
tools:text="0.01" />
</LinearLayout>
</RelativeLayout>
......
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