Commit fb55e19c authored by chengkun's avatar chengkun

修改订单状态

parent ddfc3e36
...@@ -73,22 +73,14 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout ...@@ -73,22 +73,14 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
} }
holder.itemView.findViewById<TextView>(R.id.tv_order_goods_count).text = "共${data.goods_num}件" holder.itemView.findViewById<TextView>(R.id.tv_order_goods_count).text = "共${data.goods_num}件"
holder.itemView.findViewById<TextView>(R.id.tv_pay_time).text = data.pay_time holder.itemView.findViewById<TextView>(R.id.tv_pay_time).text = data.pay_time
var money:TextView = holder.itemView.findViewById<TextView>(R.id.tv_pay_money_count)
money.setTypeface(Typeface.DEFAULT_BOLD)
money.text = "${data.payment}"
holder.itemView.findViewById<RelativeLayout>(R.id.rl_show_order_detail).setOnClickListener { holder.itemView.findViewById<RelativeLayout>(R.id.rl_show_order_detail).setOnClickListener {
//跳转订单详情页面 //跳转订单详情页面
var map = HashMap<String, Any?>() var map = HashMap<String, Any?>()
map[IntentConstants.KEY_EXTRA_ORDER_ID] = data.order_id map[IntentConstants.KEY_EXTRA_ORDER_ID] = data.order_id
XPageManager.push(XRouterPathConstants.ORDER_DETAIL_ACTIVITY, map) XPageManager.push(XRouterPathConstants.ORDER_DETAIL_ACTIVITY, map)
} }
if (data.online_status.equals("4")) { setOrderStatus(data, holder)
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_status).text = "已支付"
}
} }
fun gotoMarketingDetail(marketingId: Int) { fun gotoMarketingDetail(marketingId: Int) {
val pageUrl = XBirdPageConstants.FIGHT_ORDER_EVENT_DETAILS + "?marketing_id=${marketingId}" val pageUrl = XBirdPageConstants.FIGHT_ORDER_EVENT_DETAILS + "?marketing_id=${marketingId}"
...@@ -100,4 +92,57 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout ...@@ -100,4 +92,57 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
holder.itemView.findViewById<LinearLayout>(R.id.ll_order_image2).visibility = View.VISIBLE holder.itemView.findViewById<LinearLayout>(R.id.ll_order_image2).visibility = View.VISIBLE
holder.itemView.findViewById<LinearLayout>(R.id.ll_order_image3).visibility = View.VISIBLE holder.itemView.findViewById<LinearLayout>(R.id.ll_order_image3).visibility = View.VISIBLE
} }
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_status).text = "未支付"
holder.itemView.findViewById<TextView>(R.id.tv_order_list_yuan).visibility = View.INVISIBLE
var money:TextView = holder.itemView.findViewById<TextView>(R.id.tv_pay_money_count)
money.setTypeface(Typeface.DEFAULT_BOLD)
money.text = ""
}
2 -> {
holder.itemView.findViewById<TextView>(R.id.tv_pay_money_status).text = "已支付:"
holder.itemView.findViewById<TextView>(R.id.tv_pay_status).text = "已支付"
var money:TextView = holder.itemView.findViewById<TextView>(R.id.tv_pay_money_count)
money.setTypeface(Typeface.DEFAULT_BOLD)
money.text = "${data.payment}"
}
3 -> {
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.INVISIBLE
var money:TextView = holder.itemView.findViewById<TextView>(R.id.tv_pay_money_count)
money.setTypeface(Typeface.DEFAULT_BOLD)
money.text = ""
}
4 -> {
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.INVISIBLE
var money:TextView = holder.itemView.findViewById<TextView>(R.id.tv_pay_money_count)
money.setTypeface(Typeface.DEFAULT_BOLD)
money.text = ""
}
5 -> {
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.INVISIBLE
var money:TextView = holder.itemView.findViewById<TextView>(R.id.tv_pay_money_count)
money.setTypeface(Typeface.DEFAULT_BOLD)
money.text = ""
}
6 -> {
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.INVISIBLE
var money:TextView = holder.itemView.findViewById<TextView>(R.id.tv_pay_money_count)
money.setTypeface(Typeface.DEFAULT_BOLD)
money.text = ""
}
}
}
} }
...@@ -192,6 +192,7 @@ ...@@ -192,6 +192,7 @@
> >
</TextView> </TextView>
<TextView <TextView
android:id="@+id/tv_order_list_yuan"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="12sp" android:textSize="12sp"
......
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