Browse Source

取消退款开发完成

huyuguo 5 years ago
parent
commit
f01378d053

+ 71 - 3
app/src/main/java/com/electric/chargingpile/activity/RefundListActivity.java

1
package com.electric.chargingpile.activity;
1
package com.electric.chargingpile.activity;
2
2
3
import android.content.Intent;
3
import android.os.Bundle;
4
import android.os.Bundle;
4
import android.support.v7.app.AppCompatActivity;
5
import android.support.v7.app.AppCompatActivity;
6
import android.util.Log;
5
import android.view.View;
7
import android.view.View;
6
import android.widget.ImageView;
8
import android.widget.ImageView;
7
import android.widget.LinearLayout;
9
import android.widget.LinearLayout;
8
import android.widget.ListView;
10
import android.widget.ListView;
9
import android.widget.TextView;
11
import android.widget.TextView;
12
import android.widget.Toast;
10
13
11
import com.blankj.utilcode.util.LogUtils;
14
import com.blankj.utilcode.util.LogUtils;
12
import com.electric.chargingpile.R;
15
import com.electric.chargingpile.R;
13
import com.electric.chargingpile.adapter.RefundAdapter;
16
import com.electric.chargingpile.adapter.RefundAdapter;
14
import com.electric.chargingpile.application.MainApplication;
17
import com.electric.chargingpile.application.MainApplication;
15
import com.electric.chargingpile.data.RefundData;
18
import com.electric.chargingpile.data.RefundData;
19
import com.electric.chargingpile.fragment.CancelRefundDialogFragment;
16
import com.electric.chargingpile.util.BarColorUtil;
20
import com.electric.chargingpile.util.BarColorUtil;
21
import com.electric.chargingpile.util.CommonParams;
17
import com.electric.chargingpile.util.JsonUtils;
22
import com.electric.chargingpile.util.JsonUtils;
23
import com.electric.chargingpile.util.LoadingDialog;
24
import com.electric.chargingpile.util.ToastUtil;
18
import com.zhy.http.okhttp.OkHttpUtils;
25
import com.zhy.http.okhttp.OkHttpUtils;
19
import com.zhy.http.okhttp.callback.StringCallback;
26
import com.zhy.http.okhttp.callback.StringCallback;
20
27
21
import java.util.ArrayList;
28
import java.util.ArrayList;
29
import java.util.HashMap;
30
import java.util.Map;
22
31
23
import okhttp3.Call;
32
import okhttp3.Call;
24
33
27
    private LinearLayout llList;
36
    private LinearLayout llList;
28
    private ListView lvRefund;
37
    private ListView lvRefund;
29
    private TextView tvEmpty;
38
    private TextView tvEmpty;
39
    private LoadingDialog loadingDialog;
30
40
31
    @Override
41
    @Override
32
    protected void onCreate(Bundle savedInstanceState) {
42
    protected void onCreate(Bundle savedInstanceState) {
36
46
37
        initViews();
47
        initViews();
38
        initEvent();
48
        initEvent();
49
39
    }
50
    }
40
51
41
    private void initViews() {
52
    private void initViews() {
53
        loadingDialog = new LoadingDialog(this);
54
        loadingDialog.setCanceledOnTouchOutside(false);
42
        ivBack = (ImageView) findViewById(R.id.iv_back);
55
        ivBack = (ImageView) findViewById(R.id.iv_back);
43
        llList = (LinearLayout) findViewById(R.id.ll_list);
56
        llList = (LinearLayout) findViewById(R.id.ll_list);
44
        lvRefund = (ListView) findViewById(R.id.listview);
57
        lvRefund = (ListView) findViewById(R.id.listview);
50
    }
63
    }
51
64
52
    private void getRefundData() {
65
    private void getRefundData() {
66
        loadingDialog.show();
53
        String url = MainApplication.url + "/zhannew/basic/web/index.php/refund/list?phone="
67
        String url = MainApplication.url + "/zhannew/basic/web/index.php/refund/list?phone="
54
                + MainApplication.userPhone + "&password=" + MainApplication.userPassword;
68
                + MainApplication.userPhone + "&password=" + MainApplication.userPassword;
55
        OkHttpUtils.get().url(url).build().connTimeOut(6000).execute(new StringCallback() {
69
        OkHttpUtils.get().url(url).build().connTimeOut(6000).execute(new StringCallback() {
56
            @Override
70
            @Override
57
            public void onError(Call call, Exception e) {
71
            public void onError(Call call, Exception e) {
58
72
                loadingDialog.dismiss();
73
                ToastUtil.showToast(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT);
59
            }
74
            }
60
75
61
            @Override
76
            @Override
62
            public void onResponse(String response) {
77
            public void onResponse(String response) {
63
                LogUtils.e(response);
78
                loadingDialog.dismiss();
64
                String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
79
                String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
65
                if ("01".equals(rtnCode)) {
80
                if ("01".equals(rtnCode)) {
66
                    String data = JsonUtils.getKeyResult(response, "data");
81
                    String data = JsonUtils.getKeyResult(response, "data");
67
                    ArrayList<RefundData> list = (ArrayList<RefundData>) JsonUtils.parseToObjectList(data, RefundData.class);
82
                    ArrayList<RefundData> list = (ArrayList<RefundData>) JsonUtils.parseToObjectList(data, RefundData.class);
68
                    LogUtils.e(list.size());
69
                    if (list.size() > 0) {
83
                    if (list.size() > 0) {
70
                        RefundAdapter refundAdapter = new RefundAdapter(list);
84
                        RefundAdapter refundAdapter = new RefundAdapter(list);
85
                        refundAdapter.setOnRefundAdapterListener(new RefundAdapter.OnRefundAdapterListener() {
86
                            @Override
87
                            public void refund(final RefundData refundData) {
88
                                CancelRefundDialogFragment cancelRefundDialogFragment = CancelRefundDialogFragment.newInstance();
89
                                cancelRefundDialogFragment.setOnReportParkingDialogFragmentListener(new CancelRefundDialogFragment.OnCancelRefundDialogFragmentListener() {
90
                                    @Override
91
                                    public void cancelRefund() {
92
                                        cancelRefundPost(refundData);
93
                                    }
94
                                });
95
                                cancelRefundDialogFragment.show(getFragmentManager(), "");
96
                            }
97
                        });
71
                        lvRefund.setAdapter(refundAdapter);
98
                        lvRefund.setAdapter(refundAdapter);
72
                        llList.setVisibility(View.VISIBLE);
99
                        llList.setVisibility(View.VISIBLE);
73
                        tvEmpty.setVisibility(View.GONE);
100
                        tvEmpty.setVisibility(View.GONE);
88
    }
115
    }
89
116
90
    @Override
117
    @Override
118
    protected void onDestroy() {
119
        if (loadingDialog != null) {
120
            loadingDialog.dismiss();
121
        }
122
        super.onDestroy();
123
    }
124
125
    @Override
91
    public void onClick(View view) {
126
    public void onClick(View view) {
92
        switch (view.getId()) {
127
        switch (view.getId()) {
93
            case R.id.iv_back:
128
            case R.id.iv_back:
95
                break;
130
                break;
96
        }
131
        }
97
    }
132
    }
133
134
    private void cancelRefundPost(RefundData refundData) {
135
        loadingDialog.show();
136
        String url = MainApplication.url + "/zhannew/basic/web/index.php/refunds/cancel";
137
        final Map<String, String> map = new HashMap<>();
138
        map.put("phone", MainApplication.userPhone + "");
139
        map.put("password", MainApplication.userPassword + "");
140
        map.put("refund_id", refundData.getId() + "");
141
        CommonParams.addCommonParams(map);
142
        Log.d("xxxxxxxxxxxxxxx", "cancelRefundPost: " + map);
143
144
        OkHttpUtils.post().params(map).url(url).build().connTimeOut(6000).readTimeOut(6000).execute(new StringCallback() {
145
            @Override
146
            public void onError(Call call, Exception e) {
147
                loadingDialog.dismiss();
148
                ToastUtil.showToast(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT);
149
            }
150
151
            @Override
152
            public void onResponse(String response) {
153
                loadingDialog.dismiss();
154
                String code = JsonUtils.getKeyResult(response, "code");
155
                if ("200".equals(code)) {
156
                    getRefundData();
157
                    ToastUtil.showToast(getApplicationContext(), "取消退款成功", Toast.LENGTH_SHORT);
158
                } else {
159
                    String err = JsonUtils.getKeyResult(response, "err");
160
                    ToastUtil.showToast(getApplicationContext(), err, Toast.LENGTH_SHORT);
161
                }
162
            }
163
        });
164
    }
165
98
}
166
}

+ 28 - 4
app/src/main/java/com/electric/chargingpile/adapter/RefundAdapter.java

4
import android.view.View;
4
import android.view.View;
5
import android.view.ViewGroup;
5
import android.view.ViewGroup;
6
import android.widget.BaseAdapter;
6
import android.widget.BaseAdapter;
7
import android.widget.Button;
7
import android.widget.TextView;
8
import android.widget.TextView;
8
9
9
import com.electric.chargingpile.R;
10
import com.electric.chargingpile.R;
16
 */
17
 */
17
public class RefundAdapter extends BaseAdapter {
18
public class RefundAdapter extends BaseAdapter {
18
    private ArrayList<RefundData> datas;
19
    private ArrayList<RefundData> datas;
20
    private OnRefundAdapterListener refundAdapterListener;
19
21
20
22
21
    public RefundAdapter(ArrayList<RefundData> datas) {
23
    public RefundAdapter(ArrayList<RefundData> datas) {
71
                    .findViewById(R.id.goods_time);
73
                    .findViewById(R.id.goods_time);
72
            holder.tv_Status = (TextView) convertView
74
            holder.tv_Status = (TextView) convertView
73
                    .findViewById(R.id.goods_status);
75
                    .findViewById(R.id.goods_status);
76
            holder.cancel_refund = convertView.findViewById(R.id.cancel_refund);
74
        }
77
        }
75
78
76
        if (holder != null && convertView != null) {
79
        if (holder != null && convertView != null) {
78
        }
81
        }
79
82
80
        {
83
        {
81
            RefundData refundData = datas.get(position);
84
            final RefundData refundData = datas.get(position);
82
            holder.tv_Time.setText(refundData.getTime());
85
            holder.tv_Time.setText(refundData.getTime());
83
86
84
            if ("0.00".equals(refundData.getGive_money())) {
87
            if ("0.00".equals(refundData.getGive_money())) {
85
                holder.tv_coins.setVisibility(View.GONE);
88
                holder.tv_coins.setText("");
86
            } else {
89
            } else {
87
                holder.tv_coins.setVisibility(View.VISIBLE);
88
                holder.tv_coins.setText("清空赠送金额:" + refundData.getGive_money() + "元");
90
                holder.tv_coins.setText("清空赠送金额:" + refundData.getGive_money() + "元");
89
            }
91
            }
90
92
92
            if (refundData.getSchedule().equals("0")) {
94
            if (refundData.getSchedule().equals("0")) {
93
                holder.tv_Status.setText("退款中");
95
                holder.tv_Status.setText("退款中");
94
                holder.tv_Status.setTextColor(convertView.getResources().getColor(R.color.juhuang));
96
                holder.tv_Status.setTextColor(convertView.getResources().getColor(R.color.juhuang));
97
                holder.cancel_refund.setVisibility(View.VISIBLE);
95
            } else if (refundData.getSchedule().equals("2")) {
98
            } else if (refundData.getSchedule().equals("2")) {
96
                holder.tv_Status.setText("已操作退款");
99
                holder.tv_Status.setText("已操作退款");
97
                holder.tv_Status.setTextColor(convertView.getResources().getColor(R.color.lvse));
100
                holder.tv_Status.setTextColor(convertView.getResources().getColor(R.color.lvse));
101
                holder.cancel_refund.setVisibility(View.GONE);
98
            } else {
102
            } else {
99
                holder.tv_Status.setText("退款失败\n" + refundData.getRemarks());
103
                holder.tv_Status.setText("退款失败\n" + refundData.getRemarks()); // TODO 确认
100
                holder.tv_Status.setTextColor(convertView.getResources().getColor(R.color.ui_fail_red));
104
                holder.tv_Status.setTextColor(convertView.getResources().getColor(R.color.ui_fail_red));
105
                holder.cancel_refund.setVisibility(View.GONE);
101
            }
106
            }
102
107
103
            holder.tv_Name.setText("退款金额:" + refundData.getRefund_money());
108
            holder.tv_Name.setText("退款金额:" + refundData.getRefund_money());
104
109
110
            holder.cancel_refund.setOnClickListener(new View.OnClickListener() {
111
                @Override
112
                public void onClick(View v) {
113
                    if (refundAdapterListener != null) {
114
                        refundAdapterListener.refund(refundData);
115
                    }
116
                }
117
            });
118
105
        }
119
        }
106
        return convertView;
120
        return convertView;
107
    }
121
    }
108
122
109
    private class ViewHolder {
123
    private class ViewHolder {
110
        TextView tv_Name, tv_coins, tv_Time, tv_Status;
124
        TextView tv_Name, tv_coins, tv_Time, tv_Status;
125
        Button cancel_refund;
126
    }
127
128
129
    public interface OnRefundAdapterListener {
130
        void refund(RefundData refundData);
131
    }
132
133
    public void setOnRefundAdapterListener(OnRefundAdapterListener listener) {
134
        this.refundAdapterListener = listener;
111
    }
135
    }
112
}
136
}

+ 2 - 2
app/src/main/java/com/electric/chargingpile/application/MainApplication.java

75
    public static String firstPoint = "";
75
    public static String firstPoint = "";
76
    public static Boolean firstSsyd;
76
    public static Boolean firstSsyd;
77
    public static String password = "";
77
    public static String password = "";
78
    public static String url = "http://59.110.68.162";// 充电桩测试环境
79
    //    public static String url = "http://cdz.evcharge.cc";// 充电桩正式环境
78
//    public static String url = "http://59.110.68.162";// 充电桩测试环境
79
        public static String url = "http://cdz.evcharge.cc";// 充电桩正式环境
80
//    public static String urlNew = "http://123.56.67.7:83/api/0300";// 一电测试环境
80
//    public static String urlNew = "http://123.56.67.7:83/api/0300";// 一电测试环境
81
    public static String urlNew = "https://api.touchev.com:83/api/0300";// 一电正式环境
81
    public static String urlNew = "https://api.touchev.com:83/api/0300";// 一电正式环境
82
    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
82
    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";

+ 87 - 0
app/src/main/java/com/electric/chargingpile/fragment/CancelRefundDialogFragment.java

1
package com.electric.chargingpile.fragment;
2
3
import android.app.Dialog;
4
import android.app.DialogFragment;
5
import android.os.Bundle;
6
import android.support.annotation.NonNull;
7
import android.view.Gravity;
8
import android.view.View;
9
import android.view.Window;
10
import android.view.WindowManager;
11
import android.widget.Button;
12
13
import com.electric.chargingpile.R;
14
15
public class CancelRefundDialogFragment extends DialogFragment implements View.OnClickListener {
16
17
    private Dialog mDialog;
18
    private Button continue_refund;
19
    private Button cancel_refund;
20
    private OnCancelRefundDialogFragmentListener cancelRefundDialogFragmentListener;
21
22
    public static CancelRefundDialogFragment newInstance() {
23
        Bundle args = new Bundle();
24
//        args.putSerializable("type", type);
25
        CancelRefundDialogFragment fragment = new CancelRefundDialogFragment();
26
        fragment.setArguments(args);
27
        return fragment;
28
    }
29
30
    @NonNull
31
    @Override
32
    public Dialog onCreateDialog(Bundle savedInstanceState) {
33
        mDialog = new Dialog(getActivity(), R.style.CenterDialog);
34
        mDialog.setCancelable(true);
35
        mDialog.setCanceledOnTouchOutside(true);
36
37
        mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
38
        mDialog.setContentView(R.layout.fragment_dialog_cancel_refund);
39
40
        Window window = mDialog.getWindow();
41
        WindowManager.LayoutParams layoutParams = window.getAttributes();
42
        // 布局属性位于整个窗口底部
43
        layoutParams.gravity = Gravity.CENTER;
44
        // 布局属性宽度填充整个窗口,默认是有margin的
45
        layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
46
        window.setAttributes(layoutParams);
47
48
        initDialog();
49
        initListener();
50
51
        return mDialog;
52
    }
53
54
    private void initDialog() {
55
        continue_refund = mDialog.findViewById(R.id.continue_refund);
56
        cancel_refund = mDialog.findViewById(R.id.cancel_refund);
57
    }
58
59
    private void initListener() {
60
        continue_refund.setOnClickListener(this);
61
        cancel_refund.setOnClickListener(this);
62
    }
63
64
    @Override
65
    public void onClick(View v) {
66
        switch (v.getId()) {
67
            case R.id.continue_refund:
68
                mDialog.dismiss();
69
                break;
70
            case R.id.cancel_refund:
71
                if (cancelRefundDialogFragmentListener != null) {
72
                    cancelRefundDialogFragmentListener.cancelRefund();
73
                }
74
                mDialog.dismiss();
75
                break;
76
        }
77
    }
78
79
    public interface OnCancelRefundDialogFragmentListener {
80
        void cancelRefund();
81
    }
82
83
    public void setOnReportParkingDialogFragmentListener(OnCancelRefundDialogFragmentListener listener) {
84
        this.cancelRefundDialogFragmentListener = listener;
85
    }
86
87
}

+ 0 - 2
app/src/main/java/com/electric/chargingpile/fragment/ReportParkingDialogFragment.java

1
package com.electric.chargingpile.fragment;
1
package com.electric.chargingpile.fragment;
2
2
3
import android.app.Dialog;
3
import android.app.Dialog;
4
import android.graphics.Color;
5
import android.media.Image;
6
import android.os.Bundle;
4
import android.os.Bundle;
7
import android.support.constraint.ConstraintLayout;
5
import android.support.constraint.ConstraintLayout;
8
import android.support.v4.app.DialogFragment;
6
import android.support.v4.app.DialogFragment;

+ 7 - 0
app/src/main/res/drawable/cancel_refund_alert_shape.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android">
3
    <!-- 背景色 -->
4
    <solid android:color="#ffffff"></solid>
5
    <!-- 边框圆角 -->
6
    <corners android:radius="4dp"></corners>
7
</shape>

+ 9 - 0
app/src/main/res/drawable/cancel_refund_btn_shape.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android">
3
    <!-- 背景色 -->
4
    <solid android:color="#ffffff"></solid>
5
    <!-- 边框颜色、宽度  -->
6
    <stroke android:width="1dip" android:color="#e8e8e8"></stroke>
7
    <!-- 边框圆角 -->
8
    <corners android:radius="15dp"></corners>
9
</shape>

+ 4 - 4
app/src/main/res/drawable/report_parking_shape.xml

1
<?xml version="1.0" encoding="utf-8"?>
1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android">
2
<shape xmlns:android="http://schemas.android.com/apk/res/android">
3
    <!-- 背景色 -->
4
    <solid android:color="#00B536"></solid>
5
    <!-- 边框圆角 -->
6
    <corners android:radius="4dp"></corners>
3
<!-- 背景色 -->
4
<solid android:color="#00B536"></solid>
5
<!-- 边框圆角 -->
6
<corners android:radius="4dp"></corners>
7
</shape>
7
</shape>

+ 71 - 0
app/src/main/res/layout/fragment_dialog_cancel_refund.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    android:layout_width="match_parent"
5
    android:layout_height="match_parent"
6
    android:background="#a0000000">
7
8
9
    <android.support.constraint.ConstraintLayout
10
        android:layout_width="270dp"
11
        android:layout_height="143dp"
12
        android:background="@drawable/cancel_refund_alert_shape"
13
        app:layout_constraintBottom_toBottomOf="parent"
14
        app:layout_constraintLeft_toLeftOf="parent"
15
        app:layout_constraintRight_toRightOf="parent"
16
        app:layout_constraintTop_toTopOf="parent">
17
18
        <TextView
19
            android:id="@+id/title"
20
            android:layout_width="wrap_content"
21
            android:layout_height="wrap_content"
22
            android:layout_marginTop="20dp"
23
            android:text="取消退款"
24
            android:textColor="#444444"
25
            android:textSize="15sp"
26
            app:layout_constraintLeft_toLeftOf="parent"
27
            app:layout_constraintRight_toRightOf="parent"
28
            app:layout_constraintTop_toTopOf="parent" />
29
30
31
        <TextView
32
            android:layout_width="wrap_content"
33
            android:layout_height="wrap_content"
34
            android:layout_marginTop="15dp"
35
            android:text="取消退款后,可继续使用APP充电"
36
            android:textColor="#444444"
37
            android:textSize="13sp"
38
            app:layout_constraintLeft_toLeftOf="parent"
39
            app:layout_constraintRight_toRightOf="parent"
40
            app:layout_constraintTop_toBottomOf="@+id/title" />
41
42
        <LinearLayout
43
            android:layout_width="match_parent"
44
            android:layout_height="35dp"
45
            android:layout_marginBottom="20dp"
46
            android:gravity="center"
47
            app:layout_constraintBottom_toBottomOf="parent"
48
            app:layout_constraintLeft_toLeftOf="parent"
49
            app:layout_constraintRight_toRightOf="parent">
50
            <Button
51
                android:id="@+id/continue_refund"
52
                android:layout_width="100dp"
53
                android:layout_height="match_parent"
54
                android:background="@drawable/cancel_report_parking_shap"
55
                android:text="继续退款"
56
                android:textColor="#999999"
57
                android:textSize="13sp" />
58
59
            <Button
60
                android:id="@+id/cancel_refund"
61
                android:layout_width="100dp"
62
                android:layout_height="match_parent"
63
                android:layout_marginLeft="10dp"
64
                android:background="@drawable/report_parking_shape"
65
                android:text="取消退款"
66
                android:textColor="#ffffff"
67
                android:textSize="13sp" />
68
        </LinearLayout>
69
70
    </android.support.constraint.ConstraintLayout>
71
</android.support.constraint.ConstraintLayout>

+ 32 - 14
app/src/main/res/layout/layout_refund_list.xml

1
<?xml version="1.0" encoding="utf-8"?>
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
3
    xmlns:tools="http://schemas.android.com/tools"
4
    xmlns:tools="http://schemas.android.com/tools"
4
    android:layout_width="match_parent"
5
    android:layout_width="match_parent"
5
    android:layout_height="wrap_content"
6
    android:layout_height="wrap_content"
7
    android:paddingBottom="10dp"
6
    tools:background="#dbe0e3">
8
    tools:background="#dbe0e3">
7
9
8
    <TextView
10
    <TextView
9
        android:id="@+id/goods_name"
11
        android:id="@+id/goods_name"
10
        android:layout_width="wrap_content"
12
        android:layout_width="wrap_content"
11
        android:layout_height="wrap_content"
13
        android:layout_height="wrap_content"
12
        android:layout_alignParentLeft="true"
13
        android:layout_marginTop="12dp"
14
        android:layout_marginTop="12dp"
14
        android:text=""
15
        android:text=""
15
        android:textColor="@color/ui_62"
16
        android:textColor="@color/ui_62"
16
        android:textSize="16sp"
17
        android:textSize="16sp"
18
        app:layout_constraintLeft_toLeftOf="parent"
19
        app:layout_constraintTop_toTopOf="parent"
17
        tools:text="退款金额:100.0" />
20
        tools:text="退款金额:100.0" />
18
21
19
22
21
        android:id="@+id/goods_coins"
24
        android:id="@+id/goods_coins"
22
        android:layout_width="wrap_content"
25
        android:layout_width="wrap_content"
23
        android:layout_height="wrap_content"
26
        android:layout_height="wrap_content"
24
        android:layout_alignTop="@+id/goods_name"
25
        android:layout_alignParentEnd="true"
26
        android:layout_alignParentRight="true"
27
        android:layout_marginEnd="16dp"
27
        android:layout_marginTop="14dp"
28
        android:layout_marginRight="16dp"
28
        android:layout_marginRight="16dp"
29
        android:gravity="right"
29
        android:gravity="right"
30
        android:text=""
30
        android:text="东方闪电"
31
        android:textColor="#b2b2b2"
31
        android:textColor="#b2b2b2"
32
        android:textSize="13sp"
32
        android:textSize="13sp"
33
        app:layout_constraintRight_toRightOf="parent"
34
        app:layout_constraintTop_toTopOf="parent"
33
        tools:text="赠送金额(38元)" />
35
        tools:text="赠送金额(38元)" />
34
36
35
37
37
        android:id="@+id/goods_time"
39
        android:id="@+id/goods_time"
38
        android:layout_width="wrap_content"
40
        android:layout_width="wrap_content"
39
        android:layout_height="wrap_content"
41
        android:layout_height="wrap_content"
40
        android:layout_below="@+id/goods_name"
41
        android:layout_marginTop="6dp"
42
        android:layout_marginTop="6dp"
42
        android:text=""
43
        android:text=""
43
        android:textColor="@color/ui_68"
44
        android:textColor="@color/ui_68"
44
        android:textSize="13sp"
45
        android:textSize="13sp"
46
        app:layout_constraintLeft_toLeftOf="parent"
47
        app:layout_constraintTop_toBottomOf="@+id/goods_name"
45
        tools:text="2017-10-22 18:09" />
48
        tools:text="2017-10-22 18:09" />
46
49
47
    <TextView
50
    <TextView
48
        android:id="@+id/goods_status"
51
        android:id="@+id/goods_status"
49
        android:layout_width="wrap_content"
52
        android:layout_width="wrap_content"
50
        android:layout_height="wrap_content"
53
        android:layout_height="wrap_content"
51
        android:layout_alignTop="@+id/goods_time"
52
        android:layout_alignParentEnd="true"
53
        android:layout_alignParentRight="true"
54
        android:layout_marginEnd="16dp"
54
        android:layout_marginTop="7dp"
55
        android:layout_marginRight="16dp"
55
        android:layout_marginRight="16dp"
56
        android:layout_marginBottom="12dp"
57
        android:gravity="right"
56
        android:gravity="right"
58
        android:text=""
57
        android:text=""
59
        android:textColor="@color/ui_65"
58
        android:textColor="@color/ui_65"
60
        android:textSize="13sp"
59
        android:textSize="13sp"
60
        app:layout_constraintRight_toRightOf="parent"
61
        app:layout_constraintTop_toBottomOf="@+id/goods_coins"
61
        tools:text="已操作退款" />
62
        tools:text="已操作退款" />
62
63
63
</RelativeLayout>
64
    <Button
65
        android:id="@+id/cancel_refund"
66
        android:layout_width="75dp"
67
        android:layout_height="30dp"
68
        android:layout_marginRight="16dp"
69
        android:background="@drawable/cancel_refund_btn_shape"
70
        android:text="取消退款"
71
        android:textColor="#888888"
72
        android:textSize="13sp"
73
        android:layout_marginTop="7dp"
74
        app:layout_constraintBottom_toBottomOf="parent"
75
        app:layout_constraintRight_toRightOf="parent"
76
        android:visibility="gone"
77
        tools:visibility="visible"
78
        app:layout_constraintTop_toBottomOf="@+id/goods_status" />
79
80
81
</android.support.constraint.ConstraintLayout>