| | |
| | | ProResultStateId = orderDetailResult.getProResultStateId(); |
| | | switch (ProResultStateId) { |
| | | case 0://未上报 |
| | | binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.black)); |
| | | binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_no_bg)); |
| | | binding.dealButton.setBackgroundColor(getResources().getColor(R.color.title_color)); |
| | | binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.black,null)); |
| | | binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_no_bg,null)); |
| | | binding.dealButton.setBackgroundColor(getResources().getColor(R.color.title_color,null)); |
| | | binding.dealButton.setVisibility(View.VISIBLE); |
| | | break; |
| | | case 1://已上报 |
| | | binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.white)); |
| | | binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_wait_bg)); |
| | | binding.dealButton.setBackgroundColor(getResources().getColor(R.color.delete_color)); |
| | | binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.white,null)); |
| | | binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_wait_bg,null)); |
| | | binding.dealButton.setBackgroundColor(getResources().getColor(R.color.delete_color,null)); |
| | | binding.dealButton.setVisibility(View.VISIBLE); |
| | | binding.dealButton.setText("删除处理结果"); |
| | | break; |
| | | case 2://已完成 |
| | | binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.white)); |
| | | binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_finish_bg)); |
| | | binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.white,null)); |
| | | binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_finish_bg,null)); |
| | | binding.dealButton.setVisibility(View.GONE); |
| | | break; |
| | | case 3://被驳回 |
| | | binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.white)); |
| | | binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_reject_bg)); |
| | | binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.white,null)); |
| | | binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_reject_bg,null)); |
| | | binding.dealButton.setBackgroundColor(getResources().getColor(R.color.title_color)); |
| | | binding.dealButton.setVisibility(View.VISIBLE); |
| | | break; |
| | |
| | | } else { |
| | | ToastUtil.showToast(OrderDetailActivity.this, t.getMsg()); |
| | | } |
| | | } else if (t.DATA_NULL.equals(t.getCode())) { |
| | | //工单已被删除 |
| | | ToastUtil.showToast(OrderDetailActivity.this, "订单已被删除!"); |
| | | setResult(OrderFragment.RESULT_REFRESH); |
| | | OrderDetailActivity.this.finish(); |
| | | |
| | | } |
| | | } else { |
| | | ToastUtil.showToast(OrderDetailActivity.this, t.getMsg()); |