Browse Source

下单改造

yinds 2 weeks ago
parent
commit
fc9f6a5310
22 changed files with 2247 additions and 846 deletions
  1. 5 0
      app/src/main/AndroidManifest.xml
  2. 14 0
      app/src/main/java/com/hw/nativeapp/httpnet/ApiService.java
  3. 22 0
      app/src/main/java/com/hw/nativeapp/httpnet/entity/SeatGoodsEntity.java
  4. 27 0
      app/src/main/java/com/hw/nativeapp/httpnet/entity/SeatTypeEntity.java
  5. 16 0
      app/src/main/java/com/hw/nativeapp/httpnet/entity/TimeDateEntity.java
  6. 40 0
      app/src/main/java/com/hw/nativeapp/httpnet/entity/TimeEntity.java
  7. 1 0
      app/src/main/java/com/hw/nativeapp/httpnet/entity/handleBean.java
  8. 8 0
      app/src/main/java/com/hw/nativeapp/ui/activity/InfoInputActivity.java
  9. 34 15
      app/src/main/java/com/hw/nativeapp/ui/activity/PurchaseInfoActivity.java
  10. 550 0
      app/src/main/java/com/hw/nativeapp/ui/activity/SelectV2InfoActivity.java
  11. 49 26
      app/src/main/java/com/hw/nativeapp/ui/activity/TicketCollectionActivity.java
  12. 5 9
      app/src/main/java/com/hw/nativeapp/ui/activity/TicketPurchaseActivity.java
  13. 107 0
      app/src/main/java/com/hw/nativeapp/ui/dialogs/DialogMobileInPut.java
  14. 46 0
      app/src/main/java/com/hw/nativeapp/utils/DataUtils.java
  15. 69 0
      app/src/main/java/com/hw/nativeapp/utils/RegexUtil.java
  16. 154 122
      app/src/main/res/layout/activity_info_input.xml
  17. 159 146
      app/src/main/res/layout/activity_purchase_info.xml
  18. 272 0
      app/src/main/res/layout/activity_select_v2.xml
  19. 340 334
      app/src/main/res/layout/activity_take.xml
  20. 139 127
      app/src/main/res/layout/activity_ticket_collection.xml
  21. 75 67
      app/src/main/res/layout/activity_ticket_purchase.xml
  22. 115 0
      app/src/main/res/layout/dialog_mobile_input.xml

+ 5 - 0
app/src/main/AndroidManifest.xml

@@ -114,6 +114,11 @@
             android:configChanges="orientation|screenSize"
             android:theme="@style/ThemeNoTitleBar" />
 
+        <!--  自助购票选择信息页面 V2版本  -->
+        <activity android:name="com.hw.nativeapp.ui.activity.SelectV2InfoActivity"
+            android:configChanges="orientation|screenSize"
+            android:theme="@style/ThemeNoTitleBar" />
+
         <!--  自助购票用户页面  -->
         <activity android:name="com.hw.nativeapp.ui.activity.TakeUserInfoActivity"
             android:configChanges="orientation|screenSize"

+ 14 - 0
app/src/main/java/com/hw/nativeapp/httpnet/ApiService.java

@@ -83,6 +83,13 @@ public interface ApiService {
             @Query("t") Long currtime
     );
 
+    // 选择区域V2
+    @POST(COMMON + "/merchant/merchantTheatreAuditorium/selectRegionV2")
+    Observable<ResponseData<JSONObject>> selectRegionV2(
+            @Body JSONObject bean,
+            @Query("t") Long currtime
+    );
+
     // 二要数认证
     @POST(COMMON + "/thirdapi/identity/factorAuth")
     Observable<ResponseData<JSONObject>> factorAuth(
@@ -97,6 +104,13 @@ public interface ApiService {
             @Query("t") Long currtime
     );
 
+    // 订单提交
+    @POST(COMMON + "/order/orderInfo/submitV2")
+    Observable<ResponseData<JSONObject>> submitV2(
+            @Body JSONObject bean,
+            @Query("t") Long currtime
+    );
+
     // 订单支付
     @POST(COMMON + "/order/orderInfo/gotoNativePay")
     Observable<ResponseData<JSONObject>> gotoNativePay(

+ 22 - 0
app/src/main/java/com/hw/nativeapp/httpnet/entity/SeatGoodsEntity.java

@@ -0,0 +1,22 @@
+package com.hw.nativeapp.httpnet.entity;
+
+import java.math.BigDecimal;
+
+public class SeatGoodsEntity {
+    /**
+     * 商品ID
+     */
+    public String goodsId;
+    /**
+     * 商品名称
+     */
+    public String goodsName;
+    /**
+     * 商品价格
+     */
+    public String salePrice;
+    /**
+     * 座位类型库存
+     */
+    public String stockNum;
+}

+ 27 - 0
app/src/main/java/com/hw/nativeapp/httpnet/entity/SeatTypeEntity.java

@@ -0,0 +1,27 @@
+package com.hw.nativeapp.httpnet.entity;
+
+import java.util.List;
+
+public class SeatTypeEntity {
+    /**
+     * 座位类型ID - 票档ID
+     */
+    public String seatTypeId;
+    /**
+     * 座位类型名称
+     */
+    public String name;
+    /**
+     * 座位类型颜色
+     */
+    public String color;
+    /**
+     * 座位类型库存
+     */
+    public String stockNum;
+
+    /**
+     * 商品列表
+     */
+    public List<SeatGoodsEntity> goodsList;
+}

+ 16 - 0
app/src/main/java/com/hw/nativeapp/httpnet/entity/TimeDateEntity.java

@@ -0,0 +1,16 @@
+package com.hw.nativeapp.httpnet.entity;
+
+public class TimeDateEntity {
+    /**
+     * 剧目ID
+     */
+    public String performId;
+    /**
+     * 演出厅ID
+     */
+    public String auditoriumId;
+    /**
+     * 演出日期
+     */
+    public String performDate;
+}

+ 40 - 0
app/src/main/java/com/hw/nativeapp/httpnet/entity/TimeEntity.java

@@ -0,0 +1,40 @@
+package com.hw.nativeapp.httpnet.entity;
+
+public class TimeEntity {
+    /**
+     * 时段ID
+     */
+    public String id;
+    /**
+     * 剧目ID
+     */
+    public String performId;
+    /**
+     * 演出厅ID
+     */
+    public String auditoriumId;
+    /**
+     * 演出日期
+     */
+    public String performDate;
+    /**
+     * 演出时段开始
+     */
+    public String performTimeStart;
+    /**
+     * 演出时段结束
+     */
+    public String performTimeEnd;
+    /**
+     * 时段简介
+     */
+    public String timeSnapshot;
+    /**
+     * 库存总数
+     */
+    public String seatTotalNum;
+    /**
+     * 库存剩余
+     */
+    public String seatSurplusNum;
+}

+ 1 - 0
app/src/main/java/com/hw/nativeapp/httpnet/entity/handleBean.java

@@ -3,6 +3,7 @@ package com.hw.nativeapp.httpnet.entity;
 public class handleBean {
     public String id;
     public String showImg;
+    public String channelType;
     public String createBy;
     public String createTime;
     public String orderId;

+ 8 - 0
app/src/main/java/com/hw/nativeapp/ui/activity/InfoInputActivity.java

@@ -17,6 +17,7 @@ import android.view.inputmethod.InputMethodManager;
 import android.widget.EditText;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
+import android.widget.TextView;
 import android.widget.Toast;
 
 import com.alibaba.fastjson.JSONArray;
@@ -52,8 +53,11 @@ public class InfoInputActivity extends BaseActivity  {
     EditText et_name;
     @BindView(R.id.et_idcard)
     EditText et_idcard;
+    @BindView(R.id.tx_mobile)
+    TextView tx_mobile;
 
     private String performId = "";
+    private String mMobile = "";
     private String auditoriumId = "";
     private String date = "";
     private String goodsId = "";
@@ -126,6 +130,8 @@ public class InfoInputActivity extends BaseActivity  {
     private void getPageTransmitParams(){
         Intent transmitIntent = getIntent();
         performId = transmitIntent.getStringExtra("performId");
+        mMobile = transmitIntent.getStringExtra("mobile");
+        tx_mobile.setText(mMobile);
         auditoriumId = transmitIntent.getStringExtra("auditoriumId");
         goodsId = transmitIntent.getStringExtra("goodsId");
         salePeice = transmitIntent.getStringExtra("salePeice");
@@ -164,6 +170,7 @@ public class InfoInputActivity extends BaseActivity  {
     }
 
     // 二要数认证
+    @SuppressLint("CheckResult")
     private void factorAuth(){
         ToastUtils Toast = new ToastUtils();
         Toast.setGravity(Gravity.TOP, 0, 200);
@@ -226,6 +233,7 @@ public class InfoInputActivity extends BaseActivity  {
         bundle.putString("goodsId", goodsId);
         bundle.putString("salePeice", salePeice);
         bundle.putString("type", "1");
+        bundle.putString("mobile", mMobile);
         if(type.equals("1")){
             bundle.putString("name", et_name.getText().toString());
             bundle.putString("idcard", et_idcard.getText().toString());

+ 34 - 15
app/src/main/java/com/hw/nativeapp/ui/activity/PurchaseInfoActivity.java

@@ -38,6 +38,7 @@ import com.scwang.smartrefresh.layout.SmartRefreshLayout;
 import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
 import com.scwang.smartrefresh.layout.header.ClassicsHeader;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import butterknife.BindView;
@@ -69,6 +70,7 @@ public class PurchaseInfoActivity extends BaseActivity  {
     private ProgressDialog progressDialog;
 
     private String performId = "";
+    private String mMobile = "";
     private String auditoriumId = "";
     private String date = "";
     private String goodsId = "";
@@ -147,14 +149,28 @@ public class PurchaseInfoActivity extends BaseActivity  {
         options.put("performTimeId", performTimeId);
         options.put("seatTypeId", seatTypeId);
         options.put("source", "8");
+        options.put("channelType", "self");
         options.put("totalPrice", Double.valueOf(salePeice) * viewerList.size());
 
+
+        //观影人信息
+        List<JSONObject> tourists = new ArrayList<>();
+        for (Object obj : viewerList){
+            JSONObject objJson = (JSONObject) obj;
+            JSONObject touristItem = new JSONObject();
+            touristItem.put("realType", 1);
+            touristItem.put("name", objJson.getString("name"));
+            touristItem.put("mobile", mMobile);
+            touristItem.put("idcard", objJson.getString("idcard"));
+            tourists.add(touristItem);
+        }
+
         // 商品列表
         JSONArray goodsList = new  JSONArray();
         JSONObject goods = new  JSONObject();
         goods.put("goodsId", goodsId);
-        goods.put("salePeice", salePeice);
-        goods.put("saleNum", "1");
+        goods.put("saleNum", tourists.size());
+        goods.put("tourists", tourists);
         goodsList.add(goods);
         options.put("goodsList", goodsList);
 
@@ -162,28 +178,29 @@ public class PurchaseInfoActivity extends BaseActivity  {
         JSONObject purchaser = new  JSONObject();
         purchaser.put("name", name);
         purchaser.put("idcard", idcard);
+        purchaser.put("mobile", mMobile);
         options.put("purchaser", purchaser);
 
         // 观影人列表
-        JSONArray viewerList1 = new  JSONArray();
-        if(viewerList != null && viewerList.size() > 0){
-            for (int i = 0; i < viewerList.size(); i++) {
-                JSONObject viewer = new  JSONObject();
-                viewer.put("name", viewerList.getJSONObject(i).getString("name"));
-                viewer.put("idcard", viewerList.getJSONObject(i).getString("idcard"));
-                viewer.put("salePrice", salePeice);
-                viewer.put("realPrice", salePeice);
-                viewerList1.add(viewer);
-            }
-        }
-        options.put("viewerList", viewerList1);
+//        JSONArray viewerList1 = new  JSONArray();
+//        if(viewerList != null && viewerList.size() > 0){
+//            for (int i = 0; i < viewerList.size(); i++) {
+//                JSONObject viewer = new  JSONObject();
+//                viewer.put("name", viewerList.getJSONObject(i).getString("name"));
+//                viewer.put("idcard", viewerList.getJSONObject(i).getString("idcard"));
+//                viewer.put("salePrice", salePeice);
+//                viewer.put("realPrice", salePeice);
+//                viewerList1.add(viewer);
+//            }
+//        }
+//        options.put("viewerList", viewerList1);
         progressDialog = MaskUtil.showProgressDialog( "正在提交...", PurchaseInfoActivity.this);
         new Handler().postDelayed(() -> {
             if(progressDialog != null){
                 progressDialog.dismiss();
             }
         }, 30000);
-        MApplication.getApiService().orderSubmit( options, System.currentTimeMillis() / 1000)
+        MApplication.getApiService().submitV2( options, System.currentTimeMillis() / 1000)
                 .compose(RxUtil.applyObservableAsync())
                 .subscribe(new ResponseConsumer<JSONObject>() {
                     @Override
@@ -225,6 +242,7 @@ public class PurchaseInfoActivity extends BaseActivity  {
         bundle.putString("performTimeId", performTimeId);
         bundle.putString("seatTypeId", seatTypeId);
         bundle.putString("goodsId", goodsId);
+        bundle.putString("mobile", mMobile);
         bundle.putString("salePeice", salePeice);
         bundle.putString("type", "2");
         bundle.putString("name", name);
@@ -236,6 +254,7 @@ public class PurchaseInfoActivity extends BaseActivity  {
     private void getPageTransmitParams(){
         Intent transmitIntent = getIntent();
         performId = transmitIntent.getStringExtra("performId");
+        mMobile = transmitIntent.getStringExtra("mobile");
         auditoriumId = transmitIntent.getStringExtra("auditoriumId");
         goodsId = transmitIntent.getStringExtra("goodsId");
         salePeice = transmitIntent.getStringExtra("salePeice");

+ 550 - 0
app/src/main/java/com/hw/nativeapp/ui/activity/SelectV2InfoActivity.java

@@ -0,0 +1,550 @@
+package com.hw.nativeapp.ui.activity;
+import android.annotation.SuppressLint;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.CountDownTimer;
+import android.view.Gravity;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.hjq.bar.OnTitleBarListener;
+import com.hjq.bar.TitleBar;
+import com.hw.nativeapp.MApplication;
+import com.hw.nativeapp.R;
+import com.hw.nativeapp.httpnet.ErrorConsumer;
+import com.hw.nativeapp.httpnet.ResponseConsumer;
+import com.hw.nativeapp.httpnet.entity.SeatGoodsEntity;
+import com.hw.nativeapp.httpnet.entity.SeatTypeEntity;
+import com.hw.nativeapp.httpnet.entity.TimeDateEntity;
+import com.hw.nativeapp.httpnet.entity.TimeEntity;
+import com.hw.nativeapp.ui.dialogs.DialogMobileInPut;
+import com.hw.nativeapp.ui.dialogs.Dialog_Update;
+import com.hw.nativeapp.utils.ActivityUtils;
+import com.hw.nativeapp.utils.DataUtils;
+import com.hw.nativeapp.utils.DateUtils;
+import com.hw.nativeapp.utils.RegexUtil;
+import com.hw.nativeapp.utils.RxUtil;
+import com.hw.nativeapp.utils.StringUtils;
+import com.hw.nativeapp.utils.ToastUtils;
+
+import java.text.ParseException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+
+
+public class SelectV2InfoActivity extends BaseActivity  {
+
+    public static final Integer COUNTDOWN_TIME = 120000;
+    private CountDownTimer timer;
+    private TitleBar titleBar;
+
+    // 演出时间
+    @BindView(R.id.is_selectDate)
+    LinearLayout is_selectDate;
+    // 演出场次
+    @BindView(R.id.is_selectTimes)
+    LinearLayout is_selectTimes;
+    // 票务信息
+    @BindView(R.id.is_goods)
+    LinearLayout is_goods;
+    // 类型选择
+    @BindView(R.id.is_selectRegion)
+    LinearLayout is_selectRegion;
+
+    // 类型选择
+    @BindView(R.id.select_btn)
+    TextView select_btn;
+
+
+    private String performId = "";
+    private String auditoriumId = "";
+    //选中日期
+    private String selectedDate = "";
+    private String goodsId = "";
+    private String salePeice = "";
+    private String performTimeId = "";
+    private String seatTypeId = "";
+    private Boolean btnStatus = false;
+
+    private JSONObject auditorium = new JSONObject();
+
+    @Override
+    void initView() {
+        titleBar = findViewById(R.id.tb_main_bar);
+        titleBar.setOnTitleBarListener(new OnTitleBarListener() {
+
+            @Override
+            public void onLeftClick(View v) {
+                ActivityUtils.activityFinish(SelectV2InfoActivity.this, true );
+            }
+
+            @Override
+            public void onTitleClick(View v) {
+
+            }
+
+            @Override
+            public void onRightClick(View v) {
+
+            }
+        });
+        getPageTransmitParams();
+        startCountDownTimer();
+        getPerform();
+    }
+    //获取页面传递参数
+    private void getPageTransmitParams(){
+        Intent transmitIntent = getIntent();
+        performId = transmitIntent.getStringExtra("performId");
+    }
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_select_v2);
+        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
+    }
+
+    @OnClick({R.id.select_btn})
+    public void onClick(View v){
+        switch (v.getId()){
+            case R.id.select_btn:
+                if(btnStatus){
+                    DialogMobileInPut.Builder builder = new DialogMobileInPut.Builder(this);
+                    builder.setMessage("手机号")
+                            .setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
+                            .setPositionButton("确定", (dialog, mobile) -> {
+                                if (!RegexUtil.isMobile(mobile)){
+                                    ToastUtils.showShortToast(this, "手机号号码格式不正确");
+                                }else {
+                                    dialog.dismiss();
+                                    jumpInput(mobile);
+                                }
+
+                            })
+                            .create()
+                            .show();
+
+                    break;
+                }
+        }
+    }
+
+    private void jumpInput(String mobile){
+        if (StringUtils.isEmpty(mobile)){
+            ToastUtils.showShortToast(this, "输入的手机号为空");
+            return;
+        }
+        Bundle bundle = new Bundle();
+        if(performId.isEmpty()||auditoriumId.isEmpty()||performTimeId.isEmpty()||seatTypeId.isEmpty()||goodsId.isEmpty()||salePeice.isEmpty()){
+            ToastUtils.showShortToast(this, "提交数据不完整,请重新进入!");
+            return;
+        }
+        bundle.putString("performId", performId);
+        bundle.putString("auditoriumId", auditoriumId);
+        bundle.putString("performTimeId", performTimeId);
+        bundle.putString("seatTypeId", seatTypeId);
+        bundle.putString("goodsId", goodsId);
+        bundle.putString("salePeice", salePeice);
+        bundle.putString("type", "1");
+        bundle.putString("mobile", mobile);
+        ActivityUtils.launchActivity(this, InfoInputActivity.class, bundle);
+    }
+
+    // 获取演艺厅信息
+    @SuppressLint("CheckResult")
+    private void getPerform(){
+        Map< String,String> options = new HashMap<>();
+        options.put("performId", performId);
+        MApplication.getApiService().performSell( options, System.currentTimeMillis() / 1000)
+                .compose(RxUtil.applyObservableAsync())
+                .subscribe(new ResponseConsumer<JSONObject>() {
+                    @Override
+                    public void onSuccess(JSONObject data) {
+                        JSONArray theatreList = data.getJSONArray("theatreList");
+//                        JSONArray goodsList = data.getJSONArray("goodsList");
+                        JSONObject obj = theatreList.getJSONObject(0);
+                        JSONArray auditoriumList = obj.getJSONArray("auditoriumList");
+                        auditorium = auditoriumList.getJSONObject(0);
+                        auditoriumId = auditorium.getString("id");
+                        getSelectDate();
+//                        addGoods(goodsList);
+                    }
+
+                    @Override
+                    public void onFailed(int code, String msg) {
+
+                    }
+                }, new ErrorConsumer());
+    }
+    // 获取演出日期
+    @SuppressLint("CheckResult")
+    private void getSelectDate(){
+        Map< String,String> options = new HashMap<>();
+        options.put("performId", performId);
+        options.put("auditoriumId", auditorium.getString("id"));
+        MApplication.getApiService().selectDate( options, System.currentTimeMillis() / 1000)
+                .compose(RxUtil.applyObservableAsync())
+                .subscribe(new ResponseConsumer<JSONObject>() {
+                    @Override
+                    public void onSuccess(JSONObject data) throws ParseException {
+                        if (data.containsKey("list")){
+                            List<TimeDateEntity> dateList = DataUtils.timeDuplicate(data.getJSONArray("list")
+                                    .toJavaList(TimeDateEntity.class));
+                            if (dateList != null && !dateList.isEmpty()){
+                                selectedDate = dateList.get(0).performDate;
+                                addDate(dateList);
+                                getSelectTimes();
+                            }
+                        }
+                    }
+
+                    @Override
+                    public void onFailed(int code, String msg) {
+
+                    }
+                }, new ErrorConsumer());
+    }
+
+    // 获取演出场次
+    @SuppressLint("CheckResult")
+    private void getSelectTimes(){
+        Map< String,String> options = new HashMap<>();
+        options.put("performId", performId);
+        options.put("auditoriumId", auditorium.getString("id"));
+        options.put("date", selectedDate);
+        MApplication.getApiService().selectTimes( options, System.currentTimeMillis() / 1000)
+                .compose(RxUtil.applyObservableAsync())
+                .subscribe(new ResponseConsumer<JSONObject>() {
+                    @Override
+                    public void onSuccess(JSONObject data) {
+//                        JSONArray list = data.getJSONArray("list");
+                        if (data.containsKey("list")){
+                            List<TimeEntity> timeList = data.getJSONArray("list")
+                                    .toJavaList(TimeEntity.class);
+                            if (timeList != null && !timeList.isEmpty()){
+                                btnStatus = true;
+                                select_btn.setBackground(getResources().getDrawable(R.drawable.bg_btn_01));
+                                select_btn.setText("确定");
+
+                                performTimeId = timeList.get(0).id;
+                                addTimes(timeList);
+                                getSelectRegion();
+                            }else {
+                                btnStatus = false;
+                                is_selectTimes.removeAllViews();
+                                select_btn.setBackground(getResources().getDrawable(R.drawable.bg_btn_02));
+                                select_btn.setText("当前日期暂无演出场次,请重新选择");
+                            }
+                        }
+                    }
+
+                    @Override
+                    public void onFailed(int code, String msg) {
+
+                    }
+                }, new ErrorConsumer());
+    }
+
+    // 获取类型选择
+    @SuppressLint("CheckResult")
+    private void getSelectRegion(){
+        JSONObject options = new  JSONObject();
+        options.put("performId", performId);
+        options.put("auditoriumId", auditorium.getString("id"));
+        options.put("performTimeId", performTimeId);
+        MApplication.getApiService().selectRegionV2( options, System.currentTimeMillis() / 1000)
+                .compose(RxUtil.applyObservableAsync())
+                .subscribe(new ResponseConsumer<JSONObject>() {
+                    @Override
+                    public void onSuccess(JSONObject data) {
+                        is_selectRegion.removeAllViews();
+                        if (data.containsKey("seatList")){
+                            List<SeatTypeEntity> seatTypeList = data.getJSONArray("seatList")
+                                    .toJavaList(SeatTypeEntity.class);
+                            addRegion(seatTypeList);
+                        }
+                    }
+
+                    @Override
+                    public void onFailed(int code, String msg) {
+
+                    }
+                }, new ErrorConsumer());
+    }
+
+    private void jumpToLogin(){
+        stopCountDownTimer();
+        ActivityUtils.activityFinish(SelectV2InfoActivity.this, true);
+    }
+    private void stopCountDownTimer(){
+        if (timer != null){
+            timer.cancel();
+        }
+    }
+    private void startCountDownTimer(){
+        timer = new CountDownTimer(COUNTDOWN_TIME, 1000) {
+            @SuppressLint("SetTextI18n")
+            @Override
+            public void onTick(long millisUntilFinished) {
+                titleBar.setRightTitle(millisUntilFinished / 1000 + "s");
+            }
+
+            @Override
+            public void onFinish() {
+                jumpToLogin();
+            }
+        };
+        timer.start();
+    }
+
+    // 时间判断是否已经开场
+    private void contrastTime(String performTimeStr) {
+        try {
+            Long newDate = DateUtils.toDateStamp(DateUtils.getNewTime());
+            Long timeDate = DateUtils.toDateStamp(performTimeStr);
+            if (newDate > timeDate) { //  已超过当前时间
+                btnStatus = false;
+                select_btn.setBackground(getResources().getDrawable(R.drawable.bg_btn_02));
+                select_btn.setText("场次已结束");
+            } else {
+                btnStatus = true;
+                select_btn.setBackground(getResources().getDrawable(R.drawable.bg_btn_01));
+                select_btn.setText("确定");
+            }
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+    }
+
+    // 添加演出时间
+    private void addDate(List<TimeDateEntity> timeDateList ) throws ParseException {
+        for (int i = 0; i < timeDateList.size(); i++) {
+            LinearLayout linearLayout = new LinearLayout(this);
+            // 设置LinearLayout的布局参数
+            LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
+                    LinearLayout.LayoutParams.MATCH_PARENT);
+//            layoutParams.width = 380;
+            layoutParams.setMargins(0, 10, 50, 20);
+            linearLayout.setPadding(50, 20, 50, 20);
+            linearLayout.setOrientation(LinearLayout.VERTICAL);
+            linearLayout.setLayoutParams(layoutParams);
+
+            // 创建天TextView对象
+            TextView textView = new TextView(this);
+            textView.setGravity(Gravity.CENTER);
+            textView.setPadding(0,10,0,0);
+            textView.setTextSize(20);
+            textView.setText(DateUtils.getWeek(timeDateList.get(i).performDate));
+            // 创建时TextView对象
+            TextView textView1 = new TextView(this);
+            textView1.setTextSize(20);
+            textView1.setPadding(0,10,0,0);
+            textView1.setGravity(Gravity.CENTER);
+            textView1.setText(timeDateList.get(i).performDate);
+
+            if(i == 0){
+                linearLayout.setBackgroundResource(R.drawable.bg_box_02);
+                textView1.setTextColor(getResources().getColor(R.color.login_bk));
+                textView.setTextColor(getResources().getColor(R.color.login_bk));
+            } else {
+                linearLayout.setBackgroundResource(R.drawable.bg_box_01);
+                textView1.setTextColor(getResources().getColor(R.color.black));
+                textView.setTextColor(getResources().getColor(R.color.black));
+            }
+            linearLayout.setTag(timeDateList.get(i).performDate);
+            selectedDate = timeDateList.get(0).performDate;
+            linearLayout.addView(textView);
+            linearLayout.addView(textView1);
+            linearLayout.setOnClickListener(v -> {
+                for(int j = 0; j < is_selectDate.getChildCount(); j++){
+                    LinearLayout linearLayout1 = (LinearLayout) is_selectDate.getChildAt(j);
+                    linearLayout1.setBackgroundResource(R.drawable.bg_box_01);
+                    TextView textView2 = (TextView) linearLayout1.getChildAt(1);
+                    textView2.setTextColor(getResources().getColor(R.color.black));
+                    TextView textView11 = (TextView) linearLayout1.getChildAt(0);
+                    textView11.setTextColor(getResources().getColor(R.color.black));
+                }
+                linearLayout.setBackgroundResource(R.drawable.bg_box_02);
+                textView1.setTextColor(getResources().getColor(R.color.login_bk));
+                textView.setTextColor(getResources().getColor(R.color.login_bk));
+                selectedDate = linearLayout.getTag().toString();
+                getSelectTimes();
+            });
+            is_selectDate.addView(linearLayout);
+        }
+    }
+
+    // 添加演出场次
+    private void addTimes(List<TimeEntity> timeList) {
+        is_selectTimes.removeAllViews();
+        for (int i = 0; i < timeList.size(); i++) {
+            LinearLayout linearLayout = new LinearLayout(this);
+            // 设置LinearLayout的布局参数
+            LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
+                    LinearLayout.LayoutParams.MATCH_PARENT);
+//            layoutParams.width = 420;
+            layoutParams.setMargins(0, 30, 50, 20);
+            linearLayout.setPadding(50, 20, 50, 20);
+            linearLayout.setOrientation(LinearLayout.VERTICAL);
+            linearLayout.setLayoutParams(layoutParams);
+
+            // 创建天TextView对象
+            TextView textView = new TextView(this);
+            textView.setGravity(Gravity.CENTER);
+            textView.setTextSize(20);
+            String showT = timeList.get(i).performTimeStart + " - " + timeList.get(i).performTimeEnd;
+            textView.setText(showT);
+            performTimeId = timeList.get(0).id;
+            String performTimeStr = timeList.get(0).performDate + " " + timeList.get(0).performTimeStart + ":00";
+            contrastTime(performTimeStr);
+            linearLayout.setTag(timeList.get(i).id);
+            if(i == 0){
+                linearLayout.setBackgroundResource(R.drawable.bg_box_02);
+                textView.setTextColor(getResources().getColor(R.color.login_bk));
+            } else {
+                linearLayout.setBackgroundResource(R.drawable.bg_box_01);
+                textView.setTextColor(getResources().getColor(R.color.black));
+            }
+
+            linearLayout.addView(textView);
+            int finalI = i;
+            linearLayout.setOnClickListener(v -> {
+                for(int j = 0; j < is_selectTimes.getChildCount(); j++){
+                    LinearLayout linearLayout1 = (LinearLayout) is_selectTimes.getChildAt(j);
+                    linearLayout1.setBackgroundResource(R.drawable.bg_box_01);
+                    TextView textView1 = (TextView) linearLayout1.getChildAt(0);
+                    textView1.setTextColor(getResources().getColor(R.color.black));
+                }
+                linearLayout.setBackgroundResource(R.drawable.bg_box_02);
+                textView.setTextColor(getResources().getColor(R.color.login_bk));
+                performTimeId = linearLayout.getTag().toString();
+                getSelectRegion();
+                String performTime = timeList.get(finalI).performDate + " " + timeList.get(finalI).performTimeStart + ":00";
+                contrastTime(performTime);
+            });
+
+            is_selectTimes.addView(linearLayout);
+        }
+    }
+
+    // 添加票务信息
+    private void addGoods(List<SeatGoodsEntity> goodsList) {
+        is_goods.removeAllViews();
+        for (int i = 0; i < goodsList.size(); i++) {
+            LinearLayout linearLayout = new LinearLayout(this);
+            // 设置LinearLayout的布局参数
+            LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
+                    LinearLayout.LayoutParams.MATCH_PARENT);
+//            layoutParams.width = 420;
+            layoutParams.setMargins(0, 30, 50, 20);
+            linearLayout.setPadding(50, 20, 50, 20);
+            linearLayout.setOrientation(LinearLayout.VERTICAL);
+            linearLayout.setLayoutParams(layoutParams);
+
+            // 创建天TextView对象
+            TextView textView = new TextView(this);
+            textView.setGravity(Gravity.CENTER);
+            textView.setTextSize(20);
+            textView.setText(goodsList.get(i).goodsName );
+            if(i == 0){
+                linearLayout.setBackgroundResource(R.drawable.bg_box_02);
+                textView.setTextColor(getResources().getColor(R.color.login_bk));
+            } else {
+                linearLayout.setBackgroundResource(R.drawable.bg_box_01);
+                textView.setTextColor(getResources().getColor(R.color.black));
+            }
+            linearLayout.setTag(goodsList.get(0).goodsId);
+            linearLayout.addView(textView);
+
+
+            // 创建天TextView对象
+            TextView textViewAmount = new TextView(this);
+            textViewAmount.setGravity(Gravity.CENTER);
+            textViewAmount.setTextSize(24);
+            String showT = "¥" + goodsList.get(i).salePrice;
+            textViewAmount.setText( showT);
+            if(i == 0){
+                textViewAmount.setTextColor(getResources().getColor(R.color.red));
+            } else {
+                textViewAmount.setTextColor(getResources().getColor(R.color.black));
+            }
+            linearLayout.addView(textViewAmount);
+
+            salePeice = goodsList.get(0).salePrice;
+            goodsId = goodsList.get(0).goodsId;
+
+            int finalI = i;
+            linearLayout.setOnClickListener(v -> {
+                for(int j = 0; j < is_goods.getChildCount(); j++){
+                    LinearLayout linearLayout1 = (LinearLayout) is_goods.getChildAt(j);
+                    linearLayout1.setBackgroundResource(R.drawable.bg_box_01);
+                    TextView textView1 = (TextView) linearLayout1.getChildAt(0);
+                    textView1.setTextColor(getResources().getColor(R.color.black));
+                }
+                linearLayout.setBackgroundResource(R.drawable.bg_box_02);
+                goodsId = goodsList.get(finalI).goodsId;
+                salePeice = goodsList.get(finalI).salePrice;
+                textView.setTextColor(getResources().getColor(R.color.login_bk));
+//                getSelectRegion();
+            });
+
+            is_goods.addView(linearLayout);
+        }
+    }
+
+    // 添加类型选择
+    private void addRegion(List<SeatTypeEntity> seatTypeList) {
+        is_selectRegion.removeAllViews();
+        for (int i = 0; i < seatTypeList.size(); i++) {
+            LinearLayout linearLayout = new LinearLayout(this);
+            // 设置LinearLayout的布局参数
+            LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+//            layoutParams.width = 420;
+            layoutParams.setMargins(0, 30, 50, 20);
+            linearLayout.setPadding(50, 20, 50, 20);
+            linearLayout.setOrientation(LinearLayout.VERTICAL);
+            linearLayout.setLayoutParams(layoutParams);
+
+            // 创建天TextView对象
+            TextView textView = new TextView(this);
+            textView.setTextSize(20);
+            textView.setGravity(Gravity.CENTER);
+            textView.setText(seatTypeList.get(i).name);
+            if(i == 0){
+                linearLayout.setBackgroundResource(R.drawable.bg_box_02);
+                textView.setTextColor(getResources().getColor(R.color.login_bk));
+            } else {
+                linearLayout.setBackgroundResource(R.drawable.bg_box_01);
+                textView.setTextColor(getResources().getColor(R.color.black));
+            }
+            seatTypeId = seatTypeList.get(0).seatTypeId;
+            linearLayout.addView(textView);
+            int finalI = i;
+            linearLayout.setOnClickListener(v -> {
+                for(int j = 0; j < is_selectRegion.getChildCount(); j++){
+                    LinearLayout linearLayout1 = (LinearLayout) is_selectRegion.getChildAt(j);
+                    linearLayout1.setBackgroundResource(R.drawable.bg_box_01);
+                    TextView textView1 = (TextView) linearLayout1.getChildAt(0);
+                    textView1.setTextColor(getResources().getColor(R.color.black));
+                }
+                linearLayout.setBackgroundResource(R.drawable.bg_box_02);
+                textView.setTextColor(getResources().getColor(R.color.login_bk));
+                seatTypeId = seatTypeList.get(finalI).seatTypeId;
+                addGoods(seatTypeList.get(finalI).goodsList);
+            });
+
+            is_selectRegion.addView(linearLayout);
+        }
+
+        addGoods(seatTypeList.get(0).goodsList);
+    }
+}

+ 49 - 26
app/src/main/java/com/hw/nativeapp/ui/activity/TicketCollectionActivity.java

@@ -44,6 +44,7 @@ import com.scwang.smartrefresh.layout.SmartRefreshLayout;
 import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
 import com.scwang.smartrefresh.layout.header.ClassicsHeader;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -64,6 +65,8 @@ public class TicketCollectionActivity extends BaseActivity  {
     CheckBox all_btn;
     @BindView(R.id.txt_btn)
     TextView txt_btn;
+    @BindView(R.id.print_btn)
+    TextView print_btn;
 
 
     public static final Integer COUNTDOWN_TIME = 120000;
@@ -78,7 +81,7 @@ public class TicketCollectionActivity extends BaseActivity  {
     private String orderId = "";
     private int initNum = 0;
 
-    private JSONArray dataList = new JSONArray();
+    private List<JSONObject> dataList = new ArrayList<>();
 
     private ProgressDialog progressDialog;
 
@@ -135,14 +138,14 @@ public class TicketCollectionActivity extends BaseActivity  {
                 break;
             case R.id.all_btn:
                 for (int i = 0; i < dataList.size(); i++) {
-                    dataList.getJSONObject(i).put("checkedStatus", all_btn.isChecked());
+                    dataList.get(i).put("checkedStatus", all_btn.isChecked());
                 }
                 setDataList(true);
                 break;
             case R.id.txt_btn:
                 boolean isChecked = !all_btn.isChecked();
                 for (int i = 0; i < dataList.size(); i++) {
-                    dataList.getJSONObject(i).put("checkedStatus", isChecked);
+                    dataList.get(i).put("checkedStatus", isChecked);
                 }
                 all_btn.setChecked(isChecked);
                 setDataList(true);
@@ -180,10 +183,10 @@ public class TicketCollectionActivity extends BaseActivity  {
         adapter.setOnOutBtnClickListerer((bean, position) -> {
             boolean allStatus = true;
             for (int i = 0; i < dataList.size(); i++) {
-                if(bean.id.equals(dataList.getJSONObject(i).getString("id"))){
-                    dataList.getJSONObject(i).put("checkedStatus", bean.checkedStatus);
+                if(bean.id.equals(dataList.get(i).getString("id"))){
+                    dataList.get(i).put("checkedStatus", bean.checkedStatus);
                 }
-                if(!dataList.getJSONObject(i).getBoolean("checkedStatus")) {
+                if(!dataList.get(i).getBoolean("checkedStatus")) {
                     allStatus = false;
                 }
             }
@@ -218,14 +221,15 @@ public class TicketCollectionActivity extends BaseActivity  {
         if (dataList != null && !dataList.isEmpty()){
             List<handleBean> rowbeans = JSONArray.parseArray(JSON.toJSONString(dataList), handleBean.class);
             reflashLoadData(rowbeans, cleaned);
-            emptyShow(false);
+            emptyShow(false,"");
         }else {
-            emptyShow(true);
+            emptyShow(true,"");
         }
         reflashFinish();
     }
 
 
+    @SuppressLint("CheckResult")
     private void getDataList(boolean cleaned){
         Map< String,String> options = new HashMap<>();
         if(qrcodeNo != null && !qrcodeNo.isEmpty()){
@@ -250,20 +254,32 @@ public class TicketCollectionActivity extends BaseActivity  {
                 .subscribe(new ResponseConsumer<JSONObject>() {
                     @Override
                     public void onSuccess(JSONObject data) {
-//                        pageHandle(data.getInteger("total"), data.getInteger("page"),data.getInteger("pages"));
-                        JSONArray rows = data.getJSONArray("list");
-                        for (int i = 0; i < rows.size(); i++) {
-                            rows.getJSONObject(i).put("checkedStatus", false);
-                        }
-
-                        dataList = rows;
-                        if (rows != null && !rows.isEmpty()){
-                            List<handleBean> rowbeans = JSONArray.parseArray(JSON.toJSONString(rows), handleBean.class);
-                            reflashLoadData(rowbeans, cleaned);
-                            emptyShow(false);
+                        if (data.containsKey("list")){
+                            List<JSONObject> viewerList = data.getJSONArray("list").toJavaList(JSONObject.class);
+                            List<handleBean> viewerBeanActList = new ArrayList<>();
+                            List<JSONObject> viewerActList = new ArrayList<>();
+                            if (viewerList != null && !viewerList.isEmpty()){
+                                for (JSONObject it : viewerList){
+                                    it.put("checkedStatus", false);
+                                    String channelType = it.getString("channelType");
+                                    if (!StringUtils.isEmpty(channelType) && !channelType.equals("group")){
+                                        viewerActList.add(it);
+                                        viewerBeanActList.add(it.toJavaObject(handleBean.class));
+                                    }
+                                }
+                                if (viewerActList.isEmpty()){
+                                    emptyShow(true, "此票种需前往售票中心前台取票");
+                                }else {
+                                    dataList = viewerActList;
+                                    reflashLoadData(viewerBeanActList, cleaned);
+                                }
+                            }else {
+                                emptyShow(true, "");
+                            }
                         }else {
-                            emptyShow(true);
+                            emptyShow(true,"");
                         }
+
                         reflashFinish();
                     }
 
@@ -275,11 +291,18 @@ public class TicketCollectionActivity extends BaseActivity  {
     }
 
 
-    private void emptyShow(boolean empty){
+    private void emptyShow(boolean empty, String msg){
         if (empty){
             tx_noDataShow.setVisibility(View.VISIBLE);
+            if (!StringUtils.isEmpty(msg)){
+                tx_noDataShow.setText(msg);
+            }else {
+                tx_noDataShow.setText("没有对应票据");
+            }
+            all_btn.setEnabled(false);
             refreshLayout.setVisibility(View.GONE);
         }else{
+            all_btn.setEnabled(true);
             refreshLayout.setVisibility(View.VISIBLE);
             tx_noDataShow.setVisibility(View.GONE);
         }
@@ -333,12 +356,12 @@ public class TicketCollectionActivity extends BaseActivity  {
     private void printTicket() {
         JSONArray viewerList = new JSONArray();
         for (int i = 0; i < dataList.size(); i++) {
-            if(dataList.getJSONObject(i).getBooleanValue("checkedStatus")){
+            if(dataList.get(i).getBooleanValue("checkedStatus")){
                 JSONObject obj = new JSONObject();
-                obj.put("id",   dataList.getJSONObject(i).getString("id"));
-                obj.put("orderId",  dataList.getJSONObject(i).getString("orderId"));
-                obj.put("name",  dataList.getJSONObject(i).getString("name"));
-                obj.put("idcard",   dataList.getJSONObject(i).getString("idcard"));
+                obj.put("id",   dataList.get(i).getString("id"));
+                obj.put("orderId",  dataList.get(i).getString("orderId"));
+                obj.put("name",  dataList.get(i).getString("name"));
+                obj.put("idcard",   dataList.get(i).getString("idcard"));
                 viewerList.add(obj);
             }
         }

+ 5 - 9
app/src/main/java/com/hw/nativeapp/ui/activity/TicketPurchaseActivity.java

@@ -96,7 +96,8 @@ public class TicketPurchaseActivity extends BaseActivity {
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_ticket_purchase);
-        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
+        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+                WindowManager.LayoutParams.FLAG_FULLSCREEN);
     }
 
     @Override
@@ -139,7 +140,7 @@ public class TicketPurchaseActivity extends BaseActivity {
         adapter.setOnOutBtnClickListerer((bean, position) -> {
             Bundle bundle = new Bundle();
             bundle.putString("performId", bean.id);
-            ActivityUtils.launchActivity(this, SelectInfoActivity.class, bundle);
+            ActivityUtils.launchActivity(this, SelectV2InfoActivity.class, bundle);
         });
         listStock.setAdapter(adapter);
 
@@ -166,6 +167,7 @@ public class TicketPurchaseActivity extends BaseActivity {
         getDataList(true);
     }
 
+    @SuppressLint("CheckResult")
     private void getDataList(boolean cleaned){
         Map< String,String> options = new HashMap<>();
         if(initNum == 0){
@@ -213,13 +215,7 @@ public class TicketPurchaseActivity extends BaseActivity {
 
     }
 
-    private void pageHandle(int total, int page, int pageCount){
-        if (pageAsk.pageNum <= pageCount){
-            pageAsk.pageNum++;
-        }
-        pageAsk.pageCount = pageCount;
-        pageAsk.total = total;
-    }
+
     private void reflashLoadData(List<handleBean> rows, boolean cleared){
         if (adapter == null){
             return;

+ 107 - 0
app/src/main/java/com/hw/nativeapp/ui/dialogs/DialogMobileInPut.java

@@ -0,0 +1,107 @@
+package com.hw.nativeapp.ui.dialogs;
+
+import android.app.Dialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.hw.nativeapp.R;
+import com.hw.nativeapp.httpnet.entity.handleBean;
+
+
+public class DialogMobileInPut extends Dialog {
+
+    public DialogMobileInPut(Context mcontext) {
+        super(mcontext);
+    }
+
+    public DialogMobileInPut(Context context, int themeResId){
+        super(context, themeResId);
+    }
+
+    public static class Builder {
+        private Context context;
+        private String message;//提示消息
+        private String negative_text;//消极的
+        private String positive_text;//积极的
+        private boolean negativeShow = false;
+        private boolean positiveShow = false;
+        private OnClickListener negativeListener;//消极的监听
+        private OnBtnClickListerer positiveListener;//积极的监听
+
+        public Builder(Context context) {
+            this.context = context;
+        }
+
+
+        public Builder setMessage(String message) {
+            if (message == null) {
+                this.message = "您没有填写提示信息哦";
+            }
+            this.message = message;
+            return this;
+        }
+
+        public Builder setNegativeButton(String negative_text, OnClickListener negativeListener) {
+            if (negative_text == null) {
+                this.negative_text = "取消";
+            }
+            this.negative_text = negative_text;
+            this.negativeListener = negativeListener;
+            this.negativeShow = true;
+            return this;
+        }
+
+        public Builder setPositionButton(String positive_text, OnBtnClickListerer positiveListener) {
+            if (positive_text == null) {
+                this.positive_text = "确定";
+            }
+            this.positive_text = positive_text;
+            this.positiveListener = positiveListener;
+            this.positiveShow = true;
+            return this;
+        }
+
+
+        private TextView etMobile;
+        private TextView btnupEnter;
+        private TextView btnupCancel;
+
+
+        public DialogMobileInPut create() {
+            final DialogMobileInPut dialog = new DialogMobileInPut(context);
+            View view = LayoutInflater.from(context).inflate(R.layout.dialog_mobile_input, null);
+            dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);//加上这一句,取消原来的标题栏,没加这句之前,发现在三星的手机上会有一条蓝色的线
+            dialog.setContentView(view, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
+            dialog.setCancelable(false);
+            etMobile = view.findViewById(R.id.et_mobile);
+            btnupEnter = view.findViewById(R.id.btnup_enter);
+            btnupCancel = view.findViewById(R.id.btnup_cancel);
+
+//            txContent.setText(message);
+            btnupCancel.setText(negative_text);
+            btnupEnter.setText(positive_text);
+            dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
+            btnupCancel.setOnClickListener(v -> negativeListener.onClick(dialog, Dialog.BUTTON_NEGATIVE));
+            btnupEnter.setOnClickListener(v -> positiveListener.onClick(dialog, etMobile.getText().toString()));
+            if (negativeShow){
+                btnupCancel.setVisibility(View.VISIBLE);
+            }
+            if (positiveShow){
+                btnupEnter.setVisibility(View.VISIBLE);
+            }
+            return dialog;
+        }
+    }
+
+    public interface OnBtnClickListerer{
+        void onClick(DialogInterface dialog, String inText);
+    }
+}

+ 46 - 0
app/src/main/java/com/hw/nativeapp/utils/DataUtils.java

@@ -0,0 +1,46 @@
+package com.hw.nativeapp.utils;
+
+import com.hw.nativeapp.httpnet.entity.TimeDateEntity;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.HashSet;
+import java.util.List;
+import java.util.TimeZone;
+
+/**
+ * @author yi.ding
+ * @description
+ * @create 2017/9/9 11:44
+ */
+
+public class DataUtils {
+
+    private DataUtils() { }
+
+    public static <T> List<T>  removeDuplicate(List<T> dataList){
+        HashSet<T> setList = new HashSet<>(dataList.size());
+        List<T> resultList = new ArrayList<>();
+        for (T it : dataList){
+            if (setList.add(it)){
+                resultList.add(it);
+            }
+        }
+        return resultList;
+    }
+
+    public static  List<TimeDateEntity>  timeDuplicate(List<TimeDateEntity> dataList){
+        HashSet<String> dateSet = new HashSet<>(dataList.size());
+        List<TimeDateEntity> resultList = new ArrayList<>();
+        for (TimeDateEntity it : dataList){
+            if (dateSet.add(it.performDate)){
+                resultList.add(it);
+            }
+        }
+        return resultList;
+    }
+}

+ 69 - 0
app/src/main/java/com/hw/nativeapp/utils/RegexUtil.java

@@ -0,0 +1,69 @@
+package com.hw.nativeapp.utils;
+
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexUtil {
+    //手机号规则正则
+    public static final String REGEX_MOBILE = "^1([0-9])\\d{9}$";
+    //中文规则正则
+    public static final String REGEX_CHINESE = "^[\\u4e00-\\u9fa5]+$";
+    //包含中文英文数字
+    public static final String REGEX_CHEN = "^[a-zA-Z0-9\\u4E00-\\u9FA5]+$";
+    //纯数字
+    public static final String REGEX_NUMBER = "^-?\\d+(\\.\\d+)?$";
+    //纯字母
+    public static final String REGEX_LETTER = "^[a-zA-Z]+$";
+    //密码规则 数字+字母
+    private static final String LOGIN_PASSWOWD = "^(?=.*\\d)(?=.*[a-zA-Z])[!-~]{6,32}$";
+    //车牌规则
+    public  static final String CAR_RULE = "^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领测][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领测][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$";
+    //经度规则
+    private static final String LONGITUDE = "^[\\-\\+]?(0?\\d{1,2}\\.\\d{1,8}|1[0-7]?\\d{1}\\.\\d{1,8}|180\\.0{1,8})$";
+    //纬度规则
+    private static final String LATITUDE = "^[\\-\\+]?([0-8]?\\d{1}\\.\\d{1,8}|90\\.0{1,8})$";
+    //邮箱格式
+    private static final String EMAIL = "\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
+    /**
+     * 校验手机号
+     *
+     * @param mobile
+     * @return 校验通过返回true,否则返回false
+     */
+    public static boolean isMobile(String mobile) {
+        return Pattern.matches(REGEX_MOBILE, mobile);
+    }
+
+    public static boolean isChinese(String dataStr) {
+        return Pattern.matches(REGEX_CHINESE, dataStr);
+    }
+
+    public static boolean hasChinese(String dataStr){
+        boolean result = false;
+        Pattern pattern = Pattern.compile(REGEX_CHINESE);
+        Matcher matcher = pattern.matcher(dataStr);
+        return matcher.find();
+    }
+
+    public static boolean isChEn(String dataStr) {
+        return Pattern.matches(REGEX_CHEN, dataStr);
+    }
+
+    public static boolean isValidPwd(String dataStr){
+        return Pattern.matches(LOGIN_PASSWOWD, dataStr);
+    }
+
+
+    public static boolean isLongitude(String dataStr){
+        return Pattern.matches(LONGITUDE, dataStr);
+    }
+
+    public static boolean isLatitude(String dataStr){
+        return Pattern.matches(LATITUDE, dataStr);
+    }
+
+    public static boolean isEmail(String email){
+        return Pattern.matches(EMAIL, email);
+    }
+}

+ 154 - 122
app/src/main/res/layout/activity_info_input.xml

@@ -1,152 +1,184 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
     android:orientation="vertical"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@mipmap/page_bj">
-    <LinearLayout
+    <ScrollView
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center"
-        android:orientation="vertical">
-
-        <ImageView
-            android:id="@+id/main_img"
-            android:layout_width="match_parent"
-            android:layout_height="550dp"
-            android:scaleType="fitXY"
-            android:src="@mipmap/main_top" />
-
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="550dp">
-        <com.hjq.bar.TitleBar
-            android:id="@+id/tb_main_bar"
-            android:layout_width="match_parent"
-            android:layout_height="80dp"
-            android:background="@color/login_bk"
-            app:leftColor="@color/white"
-            app:leftIcon="@mipmap/left_44_icon"
-            app:leftSize="@dimen/inedx_btn_size"
-            app:leftTitle="返回"
-            app:rightColor="@color/white"
-            app:rightSize="@dimen/inedx_btn_size"
-            app:rightTitle="120s"
-            app:title="信息录入"
-            app:titleColor="@color/white"
-            app:titleSize="@dimen/text_30dp_size" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_gravity="top"
-        android:layout_marginTop="650sp"
-        android:orientation="vertical"
-        android:padding="60sp">
+        android:layout_height="match_parent">
 
         <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/bg_take"
-            android:orientation="vertical"
-            android:padding="50dp">
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:orientation="vertical">
             <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:gravity="center"
                 android:orientation="vertical">
+
+                <ImageView
+                    android:id="@+id/main_img"
+                    android:layout_width="match_parent"
+                    android:layout_height="550dp"
+                    android:scaleType="fitXY"
+                    android:src="@mipmap/main_top" />
+
+            </LinearLayout>
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <com.hjq.bar.TitleBar
+                    android:id="@+id/tb_main_bar"
+                    android:layout_width="match_parent"
+                    android:layout_height="80dp"
+                    android:background="@color/login_bk"
+                    app:leftColor="@color/white"
+                    app:leftIcon="@mipmap/left_44_icon"
+                    app:leftSize="@dimen/inedx_btn_size"
+                    app:leftTitle="返回"
+                    app:rightColor="@color/white"
+                    app:rightSize="@dimen/inedx_btn_size"
+                    app:rightTitle="120s"
+                    app:title="信息录入"
+                    app:titleColor="@color/white"
+                    app:titleSize="@dimen/text_30dp_size" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="top"
+                android:orientation="vertical"
+                android:padding="60sp">
+
                 <LinearLayout
+                    android:layout_marginStart="10sp"
+                    android:layout_marginEnd="10sp"
                     android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:layout_marginTop="50sp"
-                    android:gravity="center"
-                    android:orientation="horizontal">
+                    android:layout_height="wrap_content">
+
                     <TextView
-                        android:id="@+id/idCard_btn"
                         android:layout_width="wrap_content"
-                        android:layout_height="70dp"
-                        android:layout_marginTop="10sp"
-                        android:gravity="right"
-                        android:text="姓名:"
-                        android:textColor="@color/black"
-                        android:textSize="@dimen/text_30dp_size" />
-                    <EditText
-                        android:id="@+id/et_name"
-                        android:text=""
-                        android:layout_width="match_parent"
-                        android:layout_height="70dp"
-                        android:textSize="@dimen/text_30dp_size"
-                        android:background="@android:drawable/edit_text"
-                        android:hint="请输入" />
+                        android:layout_height="wrap_content"
+                        android:textSize="24sp"
+                        android:text="下单手机号:"/>
+
+                    <TextView
+                        android:id="@+id/tx_mobile"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:textSize="24sp"
+                        android:layout_marginStart="10sp"
+                        tools:text="18586814704"/>
                 </LinearLayout>
 
+
                 <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
-                    android:layout_marginTop="50sp"
-                    android:gravity="center"
-                    android:orientation="horizontal">
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="70dp"
-                        android:layout_marginTop="10sp"
-                        android:gravity="right"
-                        android:text="身份证号码:"
-                        android:inputType="text"
-                        android:textColor="@color/black"
-                        android:textSize="@dimen/text_30dp_size" />
-                    <EditText
-                        android:id="@+id/et_idcard"
+                    android:background="@drawable/bg_take"
+                    android:orientation="vertical"
+                    android:padding="50dp">
+                    <LinearLayout
                         android:layout_width="match_parent"
-                        android:layout_height="70dp"
-                        android:digits="0123456789X"
-                        android:textSize="@dimen/text_30dp_size"
-                        android:text=""
-                        android:background="@android:drawable/edit_text"
-                        android:hint="请输入" />
-                </LinearLayout>
-            </LinearLayout>
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:orientation="vertical">
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_marginTop="50sp"
+                            android:gravity="center"
+                            android:orientation="horizontal">
+                            <TextView
+                                android:id="@+id/idCard_btn"
+                                android:layout_width="wrap_content"
+                                android:layout_height="70dp"
+                                android:layout_marginTop="10sp"
+                                android:gravity="right"
+                                android:text="姓名:"
+                                android:textColor="@color/black"
+                                android:textSize="@dimen/text_30dp_size" />
+                            <EditText
+                                android:id="@+id/et_name"
+                                android:text=""
+                                android:layout_width="match_parent"
+                                android:layout_height="70dp"
+                                android:textSize="@dimen/text_30dp_size"
+                                android:background="@android:drawable/edit_text"
+                                android:hint="请输入" />
+                        </LinearLayout>
 
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_marginTop="100sp"
-                android:gravity="center"
-                android:paddingBottom="30sp"
-                android:orientation="horizontal">
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_marginTop="50sp"
+                            android:gravity="center"
+                            android:orientation="horizontal">
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="70dp"
+                                android:layout_marginTop="10sp"
+                                android:gravity="right"
+                                android:text="身份证号码:"
+                                android:inputType="text"
+                                android:textColor="@color/black"
+                                android:textSize="@dimen/text_30dp_size" />
+                            <EditText
+                                android:id="@+id/et_idcard"
+                                android:layout_width="match_parent"
+                                android:layout_height="70dp"
+                                android:digits="0123456789X"
+                                android:textSize="@dimen/text_30dp_size"
+                                android:text=""
+                                android:background="@android:drawable/edit_text"
+                                android:hint="请输入" />
+                        </LinearLayout>
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_marginTop="100sp"
+                        android:gravity="center"
+                        android:paddingBottom="30sp"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:id="@+id/input_btn"
+                            android:layout_width="wrap_content"
+                            android:layout_height="80dp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_btn_01"
+                            android:gravity="center"
+                            android:padding="20sp"
+                            android:text="确定"
+                            android:textColor="@color/white"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+                    </LinearLayout>
+                </LinearLayout>
 
-                <TextView
-                    android:id="@+id/input_btn"
-                    android:layout_width="wrap_content"
-                    android:layout_height="80dp"
-                    android:layout_weight="1"
-                    android:background="@drawable/bg_btn_01"
-                    android:gravity="center"
-                    android:padding="20sp"
-                    android:text="确定"
-                    android:textColor="@color/white"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
             </LinearLayout>
+            <com.hw.nativeapp.ui.widgets.MyKeyboardView
+                android:id="@+id/customKeyboard"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_alignParentBottom="true"
+                android:layout_gravity="bottom"
+                android:background="#e6e6e6"
+                android:focusable="true"
+                android:focusableInTouchMode="true"
+                android:keyBackground="@drawable/bg_keyboard_btn"
+                android:keyTextColor="#000000"
+                android:keyTextSize="31dp"
+                android:labelTextSize="23.04sp"
+                android:shadowRadius="0" />
         </LinearLayout>
-    </LinearLayout>
-    <com.hw.nativeapp.ui.widgets.MyKeyboardView
-        android:id="@+id/customKeyboard"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
-        android:layout_gravity="bottom"
-        android:background="#e6e6e6"
-        android:focusable="true"
-        android:focusableInTouchMode="true"
-        android:keyBackground="@drawable/bg_keyboard_btn"
-        android:keyTextColor="#000000"
-        android:keyTextSize="31dp"
-        android:labelTextSize="23.04sp"
-        android:shadowRadius="0" />
-
+    </ScrollView>
 </RelativeLayout>

+ 159 - 146
app/src/main/res/layout/activity_purchase_info.xml

@@ -6,174 +6,187 @@
     android:layout_height="match_parent"
     android:background="@mipmap/page_bj">
 
-    <LinearLayout
+
+    <ScrollView
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center"
-        android:orientation="vertical">
+        android:layout_height="match_parent">
 
-        <ImageView
-            android:id="@+id/main_img"
+        <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="550dp"
-            android:scaleType="fitXY"
-            android:src="@mipmap/main_top" />
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:orientation="vertical">
+
+                <ImageView
+                    android:id="@+id/main_img"
+                    android:layout_width="match_parent"
+                    android:layout_height="550dp"
+                    android:scaleType="fitXY"
+                    android:src="@mipmap/main_top" />
+
+            </LinearLayout>
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <com.hjq.bar.TitleBar
+                    android:id="@+id/tb_main_bar"
+                    android:layout_width="match_parent"
+                    android:layout_height="80dp"
+                    android:background="@color/login_bk"
+                    app:leftColor="@color/white"
+                    app:leftIcon="@mipmap/left_44_icon"
+                    app:leftSize="@dimen/inedx_btn_size"
+                    app:leftTitle="返回"
+                    app:rightColor="@color/white"
+                    app:rightSize="@dimen/inedx_btn_size"
+                    app:rightTitle="120s"
+                    app:title="信息录入"
+                    app:titleColor="@color/white"
+                    app:titleSize="@dimen/text_30dp_size" />
+            </LinearLayout>
 
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="550dp">
-        <com.hjq.bar.TitleBar
-            android:id="@+id/tb_main_bar"
-            android:layout_width="match_parent"
-            android:layout_height="80dp"
-            android:background="@color/login_bk"
-            app:leftColor="@color/white"
-            app:leftIcon="@mipmap/left_44_icon"
-            app:leftSize="@dimen/inedx_btn_size"
-            app:leftTitle="返回"
-            app:rightColor="@color/white"
-            app:rightSize="@dimen/inedx_btn_size"
-            app:rightTitle="120s"
-            app:title="信息录入"
-            app:titleColor="@color/white"
-            app:titleSize="@dimen/text_30dp_size" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_gravity="top"
-        android:layout_marginTop="640sp"
-        android:orientation="vertical">
-        <ScrollView
-            android:layout_marginBottom="30dp"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_below="@+id/tb_main_bar">
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_gravity="top"
-                android:orientation="vertical"
-                android:padding="60dp">
-                <LinearLayout
+                android:orientation="vertical">
+                <ScrollView
+                    android:layout_marginBottom="30dp"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="center"
-                    android:layout_marginTop="20sp"
-                    android:background="@drawable/bg_take"
-                    android:orientation="vertical"
-                    android:padding="60dp">
-
-                    <ScrollView
-                        android:id="@+id/sv"
+                    android:layout_height="match_parent"
+                    android:layout_below="@+id/tb_main_bar">
+                    <LinearLayout
                         android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_below="@+id/tb_main_bar">
-
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="top"
+                        android:orientation="vertical"
+                        android:padding="60dp">
                         <LinearLayout
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:gravity="center"
-                            android:layout_marginBottom="20sp"
-                            android:orientation="vertical">
-                            <TextView
-                                android:id="@+id/tx_noDataShow"
-                                android:layout_below="@+id/tb_main_bar"
-                                android:layout_width="match_parent"
-                                android:layout_height="match_parent"
-                                android:layout_marginTop="40sp"
-                                android:gravity="center"
-                                android:textSize="@dimen/text_30dp_size"
-                                android:visibility="gone"
-                                android:text="没有对应票据"/>
+                            android:layout_gravity="center"
+                            android:layout_marginTop="20sp"
+                            android:background="@drawable/bg_take"
+                            android:orientation="vertical"
+                            android:padding="60dp">
 
-                            <com.scwang.smartrefresh.layout.SmartRefreshLayout
+                            <ScrollView
+                                android:id="@+id/sv"
                                 android:layout_width="match_parent"
-                                android:layout_below="@+id/tb_main_bar"
-                                android:layout_marginTop="60sp"
-                                android:id="@+id/refreshLayout"
-                                android:layout_height="match_parent">
+                                android:layout_height="match_parent"
+                                android:layout_below="@+id/tb_main_bar">
 
-                                <androidx.recyclerview.widget.RecyclerView
-                                    android:id="@+id/list_stock"
+                                <LinearLayout
                                     android:layout_width="match_parent"
-                                    android:layout_height="match_parent"
-                                    app:layout_constraintBottom_toBottomOf="parent"
-                                    app:layout_constraintEnd_toEndOf="parent"
-                                    app:layout_constraintStart_toStartOf="parent"
-                                    app:layout_constraintTop_toTopOf="parent" />
+                                    android:layout_height="wrap_content"
+                                    android:gravity="center"
+                                    android:layout_marginBottom="20sp"
+                                    android:orientation="vertical">
+                                    <TextView
+                                        android:id="@+id/tx_noDataShow"
+                                        android:layout_below="@+id/tb_main_bar"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="match_parent"
+                                        android:layout_marginTop="40sp"
+                                        android:gravity="center"
+                                        android:textSize="@dimen/text_30dp_size"
+                                        android:visibility="gone"
+                                        android:text="没有对应票据"/>
 
-                            </com.scwang.smartrefresh.layout.SmartRefreshLayout>
-                        </LinearLayout>
+                                    <com.scwang.smartrefresh.layout.SmartRefreshLayout
+                                        android:layout_width="match_parent"
+                                        android:layout_below="@+id/tb_main_bar"
+                                        android:layout_marginTop="60sp"
+                                        android:id="@+id/refreshLayout"
+                                        android:layout_height="match_parent">
 
-                    </ScrollView>
+                                        <androidx.recyclerview.widget.RecyclerView
+                                            android:id="@+id/list_stock"
+                                            android:layout_width="match_parent"
+                                            android:layout_height="match_parent"
+                                            app:layout_constraintBottom_toBottomOf="parent"
+                                            app:layout_constraintEnd_toEndOf="parent"
+                                            app:layout_constraintStart_toStartOf="parent"
+                                            app:layout_constraintTop_toTopOf="parent" />
 
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="50dp"
-                        android:gravity="right"
-                        android:orientation="horizontal">
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:id="@+id/tx_num"
-                            android:text="共2张, 合计"
-                            android:textColor="@color/black"
-                            android:textFontWeight="800"
-                            android:textSize="@dimen/text_30dp_size" />
-                        <TextView
-                            android:id="@+id/tx_total"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="¥488"
-                            android:paddingRight="10dp"
-                            android:textColor="@color/login_bk"
-                            android:textFontWeight="800"
-                            android:textSize="@dimen/text_30dp_size" />
-                    </LinearLayout>
+                                    </com.scwang.smartrefresh.layout.SmartRefreshLayout>
+                                </LinearLayout>
 
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="80dp"
-                        android:gravity="center"
-                        android:paddingBottom="30sp"
-                        android:orientation="horizontal">
-
-                        <TextView
-                            android:id="@+id/continue_btn"
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"
-                            android:layout_weight="1"
-                            android:background="@drawable/bg_btn_01"
-                            android:gravity="center"
-                            android:padding="10sp"
-                            android:layout_marginRight="20sp"
-                            android:text="继续添加观影人"
-                            android:textColor="@color/white"
-                            android:textFontWeight="800"
-                            android:textSize="@dimen/text_30dp_size" />
-                        <TextView
-                            android:id="@+id/determine_btn"
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"
-                            android:layout_weight="1"
-                            android:background="@drawable/bg_btn_01"
-                            android:gravity="center"
-                            android:padding="10sp"
-                            android:text="确定付款"
-                            android:layout_marginLeft="20sp"
-                            android:textColor="@color/white"
-                            android:textFontWeight="800"
-                            android:textSize="@dimen/text_30dp_size" />
+                            </ScrollView>
+
+                            <LinearLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="wrap_content"
+                                android:layout_marginTop="50dp"
+                                android:gravity="right"
+                                android:orientation="horizontal">
+                                <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:id="@+id/tx_num"
+                                    android:text="共2张, 合计"
+                                    android:textColor="@color/black"
+                                    android:textFontWeight="800"
+                                    android:textSize="@dimen/text_30dp_size" />
+                                <TextView
+                                    android:id="@+id/tx_total"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:text="¥488"
+                                    android:paddingRight="10dp"
+                                    android:textColor="@color/login_bk"
+                                    android:textFontWeight="800"
+                                    android:textSize="@dimen/text_30dp_size" />
+                            </LinearLayout>
+
+                            <LinearLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:layout_marginTop="80dp"
+                                android:gravity="center"
+                                android:paddingBottom="30sp"
+                                android:orientation="horizontal">
+
+                                <TextView
+                                    android:id="@+id/continue_btn"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="match_parent"
+                                    android:layout_weight="1"
+                                    android:background="@drawable/bg_btn_01"
+                                    android:gravity="center"
+                                    android:padding="10sp"
+                                    android:layout_marginRight="20sp"
+                                    android:text="继续添加观影人"
+                                    android:textColor="@color/white"
+                                    android:textFontWeight="800"
+                                    android:textSize="@dimen/text_30dp_size" />
+                                <TextView
+                                    android:id="@+id/determine_btn"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="match_parent"
+                                    android:layout_weight="1"
+                                    android:background="@drawable/bg_btn_01"
+                                    android:gravity="center"
+                                    android:padding="10sp"
+                                    android:text="确定付款"
+                                    android:layout_marginLeft="20sp"
+                                    android:textColor="@color/white"
+                                    android:textFontWeight="800"
+                                    android:textSize="@dimen/text_30dp_size" />
+                            </LinearLayout>
+                        </LinearLayout>
                     </LinearLayout>
-                </LinearLayout>
+                </ScrollView>
             </LinearLayout>
-        </ScrollView>
-    </LinearLayout>
+        </LinearLayout>
+    </ScrollView>
+
+
 
 </RelativeLayout>

+ 272 - 0
app/src/main/res/layout/activity_select_v2.xml

@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@mipmap/page_bj">
+
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:orientation="vertical">
+
+                <ImageView
+                    android:id="@+id/main_img"
+                    android:layout_width="match_parent"
+                    android:layout_height="550dp"
+                    android:scaleType="fitXY"
+                    android:src="@mipmap/main_top" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:id="@+id/ll_bar"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <com.hjq.bar.TitleBar
+                    android:id="@+id/tb_main_bar"
+                    android:layout_width="match_parent"
+                    android:layout_height="80dp"
+                    android:background="@color/login_bk"
+                    app:leftColor="@color/white"
+                    app:leftIcon="@mipmap/left_44_icon"
+                    app:leftSize="@dimen/inedx_btn_size"
+                    app:leftTitle="返回"
+                    app:rightColor="@color/white"
+                    app:rightSize="@dimen/inedx_btn_size"
+                    app:rightTitle="120s"
+                    app:title="选择信息"
+                    app:titleColor="@color/white"
+                    app:titleSize="@dimen/text_30dp_size" />
+            </LinearLayout>
+
+            <ScrollView
+                android:id="@+id/sv"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_below="@+id/ll_bar"
+                android:layout_marginTop="4dp"
+                android:layout_marginBottom="30dp">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_margin="40sp"
+                    android:layout_marginBottom="20sp"
+                    android:background="@drawable/bg_take"
+                    android:orientation="horizontal"
+                    android:padding="50sp">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:orientation="vertical">
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:layout_marginTop="20dp"
+                            android:gravity="left"
+                            android:text="演出信息"
+                            android:textColor="@color/black"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="30sp"
+                            android:orientation="vertical">
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+                                android:gravity="left"
+                                android:text="日期"
+                                android:textColor="@color/gray"
+                                android:textSize="25dp" />
+
+                            <HorizontalScrollView
+                                android:layout_width="match_parent"
+                                android:layout_height="wrap_content">
+
+                                <LinearLayout
+                                    android:id="@+id/is_selectDate"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+                                    android:isScrollContainer="true"
+                                    android:orientation="horizontal"
+                                    android:paddingTop="10dp"
+                                    android:paddingBottom="10dp">
+
+                                </LinearLayout>
+                            </HorizontalScrollView>
+                        </LinearLayout>
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="30sp"
+                            android:orientation="vertical">
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+                                android:gravity="left"
+                                android:text="场次"
+                                android:textColor="@color/gray"
+                                android:textSize="25dp" />
+
+                            <HorizontalScrollView
+                                android:layout_width="match_parent"
+                                android:layout_height="wrap_content">
+
+                                <LinearLayout
+                                    android:id="@+id/is_selectTimes"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+                                    android:isScrollContainer="true"
+                                    android:orientation="horizontal"
+                                    android:paddingTop="10dp"
+                                    android:paddingBottom="10dp">
+
+                                </LinearLayout>
+                            </HorizontalScrollView>
+                        </LinearLayout>
+
+                    </LinearLayout>
+
+                    <View
+                        android:layout_width="1dp"
+                        android:layout_height="match_parent"
+                        android:layout_marginStart="10dp"
+                        android:layout_marginTop="40dp"
+                        android:layout_marginEnd="10dp"
+                        android:layout_marginBottom="40dp"
+                        android:background="@color/gray" />
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:orientation="vertical">
+
+                        <TextView
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_marginTop="20dp"
+                            android:gravity="left"
+                            android:text="选择票种"
+                            android:textColor="@color/black"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size"
+                            android:textStyle="bold" />
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="30sp"
+                            android:orientation="vertical">
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+                                android:gravity="left"
+                                android:text="票档"
+                                android:textColor="@color/gray"
+                                android:textSize="25dp" />
+
+                            <HorizontalScrollView
+                                android:layout_width="match_parent"
+                                android:layout_height="wrap_content">
+
+                                <LinearLayout
+                                    android:id="@+id/is_selectRegion"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+                                    android:isScrollContainer="true"
+                                    android:orientation="horizontal"
+                                    android:paddingTop="10dp"
+                                    android:paddingBottom="10dp"></LinearLayout>
+                            </HorizontalScrollView>
+                        </LinearLayout>
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="30sp"
+                            android:orientation="vertical">
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+                                android:gravity="left"
+                                android:text="票种"
+                                android:textColor="@color/gray"
+                                android:textSize="25dp" />
+
+                            <HorizontalScrollView
+                                android:layout_width="match_parent"
+                                android:layout_height="wrap_content">
+
+                                <LinearLayout
+                                    android:id="@+id/is_goods"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+                                    android:isScrollContainer="true"
+                                    android:orientation="vertical"
+                                    android:paddingTop="10dp"
+                                    android:paddingBottom="10dp">
+
+                                </LinearLayout>
+                            </HorizontalScrollView>
+                        </LinearLayout>
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_marginTop="80sp"
+                            android:gravity="right|center">
+
+                            <TextView
+                                android:id="@+id/select_btn"
+                                android:layout_width="300dp"
+                                android:layout_height="wrap_content"
+                                android:background="@drawable/bg_btn_01"
+                                android:gravity="center"
+                                android:padding="15dp"
+                                android:text="确定"
+                                android:textColor="@color/white"
+                                android:textFontWeight="800"
+                                android:textSize="@dimen/text_30dp_size" />
+                        </LinearLayout>
+                    </LinearLayout>
+
+                </LinearLayout>
+            </ScrollView>
+
+        </LinearLayout>
+
+    </ScrollView>
+
+
+
+</RelativeLayout>

+ 340 - 334
app/src/main/res/layout/activity_take.xml

@@ -5,366 +5,372 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@mipmap/page_bj">
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center"
-        android:orientation="vertical">
-
-        <ImageView
-            android:id="@+id/main_img"
-            android:layout_width="match_parent"
-            android:layout_height="550dp"
-            android:scaleType="fitXY"
-            android:src="@mipmap/main_top" />
 
-    </LinearLayout>
-    <LinearLayout
+    <ScrollView
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="550dp">
-        <com.hjq.bar.TitleBar
-            android:id="@+id/tb_main_bar"
-            android:layout_width="match_parent"
-            android:layout_height="80dp"
-            android:background="@color/login_bk"
-            app:leftColor="@color/white"
-            app:leftIcon="@mipmap/left_44_icon"
-            app:leftSize="@dimen/inedx_btn_size"
-            app:leftTitle="返回"
-            app:rightColor="@color/white"
-            app:rightSize="@dimen/inedx_btn_size"
-            app:rightTitle="120s"
-            app:title="自助取票"
-            app:titleColor="@color/white"
-            app:titleSize="@dimen/text_30dp_size" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="700sp"
-        android:padding="30sp"
-        android:layout_gravity="top">
+        android:layout_height="match_parent">
 
         <LinearLayout
-            android:id="@+id/take_btn"
-            android:layout_width="230dp"
-            android:layout_height="700dp"
-            android:layout_gravity="center"
-            android:layout_marginRight="30sp"
-            android:layout_weight="1"
-            android:background="@drawable/bg_take"
-            android:orientation="vertical"
-            android:padding="30sp">
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:orientation="vertical">
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="30sp"
-                android:orientation="horizontal">
-
-                <TextView
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    android:gravity="center"
-                    android:text="取票码/手机号取票"
-                    android:textColor="@color/black"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="60dp"
-                android:layout_marginTop="30sp"
                 android:gravity="center"
-                android:orientation="horizontal">
+                android:orientation="vertical">
 
-                <EditText
-                    android:id="@+id/et_modify_quantity"
+                <ImageView
+                    android:id="@+id/main_img"
                     android:layout_width="match_parent"
-                    android:layout_height="60dp"
-                    android:enabled="true"
-                    android:focusable="false"
-                    android:textSize="@dimen/inedx_btn_size"
-                    android:paddingLeft="10dp"
-                    android:background="@android:drawable/edit_text"
-                    android:hint="取票码/手机号取票"
-                    android:text=""
-                    android:inputType="number" />
-
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="30sp"
-                android:gravity="center"
-                android:orientation="horizontal">
-
-                <TextView
-                    android:id="@+id/num_01"
-                    android:layout_width="wrap_content"
-                    android:layout_height="60dp"
-                    android:layout_marginRight="30sp"
-                    android:layout_weight="1"
-                    android:background="@drawable/bg_num_01"
-                    android:gravity="center"
-                    android:text="1"
-                    android:textColor="@color/blue"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
-
-                <TextView
-                    android:id="@+id/num_02"
-                    android:layout_width="wrap_content"
-                    android:layout_height="60dp"
-                    android:layout_marginRight="30sp"
-                    android:layout_weight="1"
-                    android:background="@drawable/bg_num_01"
-                    android:gravity="center"
-                    android:text="2"
-                    android:textColor="@color/blue"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
-
-                <TextView
-                    android:id="@+id/num_03"
-                    android:layout_width="wrap_content"
-                    android:layout_height="60dp"
-                    android:layout_weight="1"
-                    android:background="@drawable/bg_num_01"
-                    android:gravity="center"
-                    android:text="3"
-                    android:textColor="@color/blue"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="20sp"
-                android:gravity="center"
-                android:orientation="horizontal">
+                    android:layout_height="550dp"
+                    android:scaleType="fitXY"
+                    android:src="@mipmap/main_top" />
 
-                <TextView
-                    android:id="@+id/num_04"
-                    android:layout_width="wrap_content"
-                    android:layout_height="60dp"
-                    android:layout_marginRight="30sp"
-                    android:layout_weight="1"
-                    android:background="@drawable/bg_num_01"
-                    android:gravity="center"
-                    android:text="4"
-                    android:textColor="@color/blue"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
-
-                <TextView
-                    android:id="@+id/num_05"
-                    android:layout_width="wrap_content"
-                    android:layout_height="60dp"
-                    android:layout_marginRight="30sp"
-                    android:layout_weight="1"
-                    android:background="@drawable/bg_num_01"
-                    android:gravity="center"
-                    android:text="5"
-                    android:textColor="@color/blue"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
-
-                <TextView
-                    android:id="@+id/num_06"
-                    android:layout_width="wrap_content"
-                    android:layout_height="60dp"
-                    android:layout_weight="1"
-                    android:background="@drawable/bg_num_01"
-                    android:gravity="center"
-                    android:text="6"
-                    android:textColor="@color/blue"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
             </LinearLayout>
-
             <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="20sp"
-                android:gravity="center"
-                android:orientation="horizontal">
-
-                <TextView
-                    android:id="@+id/num_07"
-                    android:layout_width="wrap_content"
-                    android:layout_height="60dp"
-                    android:layout_marginRight="30sp"
-                    android:layout_weight="1"
-                    android:background="@drawable/bg_num_01"
-                    android:gravity="center"
-                    android:text="7"
-                    android:textColor="@color/blue"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
-
-                <TextView
-                    android:id="@+id/num_08"
-                    android:layout_width="wrap_content"
-                    android:layout_height="60dp"
-                    android:layout_marginRight="30sp"
-                    android:layout_weight="1"
-                    android:background="@drawable/bg_num_01"
-                    android:gravity="center"
-                    android:text="8"
-                    android:textColor="@color/blue"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
-
-                <TextView
-                    android:id="@+id/num_09"
-                    android:layout_width="wrap_content"
-                    android:layout_height="60dp"
-                    android:layout_weight="1"
-                    android:background="@drawable/bg_num_01"
-                    android:gravity="center"
-                    android:text="9"
-                    android:textColor="@color/blue"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
+                android:layout_height="wrap_content">
+                <com.hjq.bar.TitleBar
+                    android:id="@+id/tb_main_bar"
+                    android:layout_width="match_parent"
+                    android:layout_height="80dp"
+                    android:background="@color/login_bk"
+                    app:leftColor="@color/white"
+                    app:leftIcon="@mipmap/left_44_icon"
+                    app:leftSize="@dimen/inedx_btn_size"
+                    app:leftTitle="返回"
+                    app:rightColor="@color/white"
+                    app:rightSize="@dimen/inedx_btn_size"
+                    app:rightTitle="120s"
+                    app:title="自助取票"
+                    app:titleColor="@color/white"
+                    app:titleSize="@dimen/text_30dp_size" />
             </LinearLayout>
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="20sp"
-                android:gravity="center"
-                android:orientation="horizontal">
-
-                <TextView
-                    android:id="@+id/num_0"
-                    android:layout_width="120dp"
-                    android:layout_height="60dp"
-                    android:layout_marginRight="30sp"
-                    android:layout_weight="1"
-                    android:background="@drawable/bg_num_01"
-                    android:gravity="center"
-                    android:text="0"
-                    android:textColor="@color/blue"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
-
-                <TextView
-                    android:id="@+id/num_empty"
-                    android:layout_width="120dp"
-                    android:layout_height="60dp"
+                android:padding="30sp"
+                android:layout_gravity="top">
+
+                <LinearLayout
+                    android:id="@+id/take_btn"
+                    android:layout_width="230dp"
+                    android:layout_height="700dp"
+                    android:layout_gravity="center"
                     android:layout_marginRight="30sp"
                     android:layout_weight="1"
-                    android:background="@drawable/bg_num_01"
-                    android:gravity="center"
-                    android:text="清空"
-                    android:textColor="@color/blue"
-                    android:textSize="@dimen/inedx_btn_size" />
-
-                <TextView
-                    android:id="@+id/num_del"
-                    android:layout_width="120dp"
-                    android:layout_height="60dp"
+                    android:background="@drawable/bg_take"
+                    android:orientation="vertical"
+                    android:padding="30sp">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="30sp"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="取票码/手机号取票"
+                            android:textColor="@color/black"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="60dp"
+                        android:layout_marginTop="30sp"
+                        android:gravity="center"
+                        android:orientation="horizontal">
+
+                        <EditText
+                            android:id="@+id/et_modify_quantity"
+                            android:layout_width="match_parent"
+                            android:layout_height="60dp"
+                            android:enabled="true"
+                            android:focusable="false"
+                            android:textSize="@dimen/inedx_btn_size"
+                            android:paddingLeft="10dp"
+                            android:background="@android:drawable/edit_text"
+                            android:hint="取票码/手机号取票"
+                            android:text=""
+                            android:inputType="number" />
+
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="30sp"
+                        android:gravity="center"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:id="@+id/num_01"
+                            android:layout_width="wrap_content"
+                            android:layout_height="60dp"
+                            android:layout_marginRight="30sp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_num_01"
+                            android:gravity="center"
+                            android:text="1"
+                            android:textColor="@color/blue"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+
+                        <TextView
+                            android:id="@+id/num_02"
+                            android:layout_width="wrap_content"
+                            android:layout_height="60dp"
+                            android:layout_marginRight="30sp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_num_01"
+                            android:gravity="center"
+                            android:text="2"
+                            android:textColor="@color/blue"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+
+                        <TextView
+                            android:id="@+id/num_03"
+                            android:layout_width="wrap_content"
+                            android:layout_height="60dp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_num_01"
+                            android:gravity="center"
+                            android:text="3"
+                            android:textColor="@color/blue"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="20sp"
+                        android:gravity="center"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:id="@+id/num_04"
+                            android:layout_width="wrap_content"
+                            android:layout_height="60dp"
+                            android:layout_marginRight="30sp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_num_01"
+                            android:gravity="center"
+                            android:text="4"
+                            android:textColor="@color/blue"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+
+                        <TextView
+                            android:id="@+id/num_05"
+                            android:layout_width="wrap_content"
+                            android:layout_height="60dp"
+                            android:layout_marginRight="30sp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_num_01"
+                            android:gravity="center"
+                            android:text="5"
+                            android:textColor="@color/blue"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+
+                        <TextView
+                            android:id="@+id/num_06"
+                            android:layout_width="wrap_content"
+                            android:layout_height="60dp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_num_01"
+                            android:gravity="center"
+                            android:text="6"
+                            android:textColor="@color/blue"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="20sp"
+                        android:gravity="center"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:id="@+id/num_07"
+                            android:layout_width="wrap_content"
+                            android:layout_height="60dp"
+                            android:layout_marginRight="30sp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_num_01"
+                            android:gravity="center"
+                            android:text="7"
+                            android:textColor="@color/blue"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+
+                        <TextView
+                            android:id="@+id/num_08"
+                            android:layout_width="wrap_content"
+                            android:layout_height="60dp"
+                            android:layout_marginRight="30sp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_num_01"
+                            android:gravity="center"
+                            android:text="8"
+                            android:textColor="@color/blue"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+
+                        <TextView
+                            android:id="@+id/num_09"
+                            android:layout_width="wrap_content"
+                            android:layout_height="60dp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_num_01"
+                            android:gravity="center"
+                            android:text="9"
+                            android:textColor="@color/blue"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="20sp"
+                        android:gravity="center"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:id="@+id/num_0"
+                            android:layout_width="120dp"
+                            android:layout_height="60dp"
+                            android:layout_marginRight="30sp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_num_01"
+                            android:gravity="center"
+                            android:text="0"
+                            android:textColor="@color/blue"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+
+                        <TextView
+                            android:id="@+id/num_empty"
+                            android:layout_width="120dp"
+                            android:layout_height="60dp"
+                            android:layout_marginRight="30sp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_num_01"
+                            android:gravity="center"
+                            android:text="清空"
+                            android:textColor="@color/blue"
+                            android:textSize="@dimen/inedx_btn_size" />
+
+                        <TextView
+                            android:id="@+id/num_del"
+                            android:layout_width="120dp"
+                            android:layout_height="60dp"
+                            android:layout_weight="1"
+                            android:background="@drawable/bg_num_01"
+                            android:gravity="center"
+                            android:paddingTop="7sp"
+                            android:paddingBottom="7sp"
+                            android:text="删除"
+                            android:textColor="@color/blue"
+                            android:textSize="@dimen/inedx_btn_size" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="60dp"
+                        android:layout_marginTop="50sp"
+                        android:gravity="center"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:id="@+id/purchase_btn"
+                            android:layout_width="match_parent"
+                            android:layout_height="60dp"
+                            android:background="@drawable/bg_btn_01"
+                            android:gravity="center"
+                            android:text="立即取票"
+                            android:textColor="@color/white"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+                    </LinearLayout>
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="230dp"
+                    android:layout_height="700dp"
+                    android:layout_marginLeft="15sp"
                     android:layout_weight="1"
-                    android:background="@drawable/bg_num_01"
-                    android:gravity="center"
-                    android:paddingTop="7sp"
-                    android:paddingBottom="7sp"
-                    android:text="删除"
-                    android:textColor="@color/blue"
-                    android:textSize="@dimen/inedx_btn_size" />
+                    android:background="@drawable/bg_take"
+                    android:padding="30sp"
+                    android:orientation="vertical">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="30sp"
+                        android:gravity="center">
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="二维码取票"
+                            android:textColor="@color/black"
+                            android:textFontWeight="800"
+                            android:textSize="@dimen/text_30dp_size" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="40sp"
+                        android:gravity="center">
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="请打开二维码对准扫码区域"
+                            android:textColor="@color/login_bk"
+                            android:textFontWeight="800"
+                            android:textSize="18dp" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="700dp"
+                        android:layout_marginTop="40sp"
+                        android:gravity="top"
+                        android:orientation="vertical">
+                        <ImageView
+                            android:id="@+id/img_code_btn"
+                            android:layout_width="match_parent"
+                            android:layout_height="420dp"
+                            android:scaleType="fitXY"
+                            android:src="@mipmap/take_code" />
+                    </LinearLayout>
+                </LinearLayout>
             </LinearLayout>
 
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="60dp"
-                android:layout_marginTop="50sp"
-                android:gravity="center"
-                android:orientation="horizontal">
-
-                <TextView
-                    android:id="@+id/purchase_btn"
-                    android:layout_width="match_parent"
-                    android:layout_height="60dp"
-                    android:background="@drawable/bg_btn_01"
-                    android:gravity="center"
-                    android:text="立即取票"
-                    android:textColor="@color/white"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
-            </LinearLayout>
         </LinearLayout>
+    </ScrollView>
 
-        <LinearLayout
-            android:layout_width="230dp"
-            android:layout_height="700dp"
-            android:layout_marginLeft="15sp"
-            android:layout_weight="1"
-            android:background="@drawable/bg_take"
-            android:padding="30sp"
-            android:orientation="vertical">
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="30sp"
-                android:gravity="center">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    android:gravity="center"
-                    android:text="二维码/身份证取票"
-                    android:textColor="@color/black"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_30dp_size" />
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="40sp"
-                android:gravity="center">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    android:gravity="center"
-                    android:text="请选择二维码/身份证对准扫码区域"
-                    android:textColor="@color/login_bk"
-                    android:textFontWeight="800"
-                    android:textSize="18dp" />
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="700dp"
-                android:layout_marginTop="40sp"
-                android:gravity="top"
-                android:orientation="vertical">
-                <ImageView
-                    android:id="@+id/img_code_btn"
-                    android:layout_width="match_parent"
-                    android:layout_height="420dp"
-                    android:scaleType="fitXY"
-                    android:src="@mipmap/idcard_demonstrate" />
-<!--                <ImageView-->
-<!--                    android:layout_marginTop="20dp"-->
-<!--                    android:id="@+id/img_idcard_btn"-->
-<!--                    android:layout_width="140dp"-->
-<!--                    android:layout_height="110dp"-->
-<!--                    android:scaleType="fitXY"-->
-<!--                    android:src="@mipmap/take_idcard" />-->
-            </LinearLayout>
-        </LinearLayout>
-    </LinearLayout>
 
 </RelativeLayout>

+ 139 - 127
app/src/main/res/layout/activity_ticket_collection.xml

@@ -6,153 +6,165 @@
     android:layout_height="match_parent"
     android:background="@mipmap/page_bj">
 
-    <LinearLayout
+    <ScrollView
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center"
-        android:orientation="vertical">
+        android:layout_height="match_parent">
 
-        <ImageView
-            android:id="@+id/main_img"
-            android:layout_width="match_parent"
-            android:layout_height="550dp"
-            android:scaleType="fitXY"
-            android:src="@mipmap/main_top" />
-
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="550dp">
-        <com.hjq.bar.TitleBar
-            android:id="@+id/tb_main_bar"
-            android:layout_width="match_parent"
-            android:layout_height="80dp"
-            android:background="@color/login_bk"
-            app:leftColor="@color/white"
-            app:leftIcon="@mipmap/left_44_icon"
-            app:leftSize="@dimen/inedx_btn_size"
-            app:leftTitle="返回"
-            app:rightColor="@color/white"
-            app:rightSize="@dimen/inedx_btn_size"
-            app:rightTitle="120s"
-            app:title="自助取票"
-            app:titleColor="@color/white"
-            app:titleSize="@dimen/text_30dp_size" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_gravity="top"
-        android:layout_marginTop="700sp"
-        android:layout_marginLeft="30sp"
-        android:layout_marginRight="30sp"
-        android:layout_marginBottom="100sp"
-        android:background="@drawable/bg_take"
-        android:orientation="vertical"
-        android:padding="30sp">
-        <ScrollView
-            android:id="@+id/sv"
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_below="@+id/tb_main_bar">
-
+            android:gravity="center"
+            android:orientation="vertical">
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginBottom="30sp"
                 android:gravity="center"
                 android:orientation="vertical">
 
-                <TextView
-                    android:id="@+id/tx_noDataShow"
+                <ImageView
+                    android:id="@+id/main_img"
+                    android:layout_width="match_parent"
+                    android:layout_height="550dp"
+                    android:scaleType="fitXY"
+                    android:src="@mipmap/main_top" />
+
+            </LinearLayout>
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <com.hjq.bar.TitleBar
+                    android:id="@+id/tb_main_bar"
                     android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:layout_below="@+id/tb_main_bar"
-                    android:padding="30dp"
-                    android:gravity="center"
-                    android:text="没有对应票据"
-                    android:textSize="@dimen/text_30dp_size"
-                    android:visibility="gone" />
-
-                <com.scwang.smartrefresh.layout.SmartRefreshLayout
-                    android:id="@+id/refreshLayout"
+                    android:layout_height="80dp"
+                    android:background="@color/login_bk"
+                    app:leftColor="@color/white"
+                    app:leftIcon="@mipmap/left_44_icon"
+                    app:leftSize="@dimen/inedx_btn_size"
+                    app:leftTitle="返回"
+                    app:rightColor="@color/white"
+                    app:rightSize="@dimen/inedx_btn_size"
+                    app:rightTitle="120s"
+                    app:title="自助取票"
+                    app:titleColor="@color/white"
+                    app:titleSize="@dimen/text_30dp_size" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="top"
+                android:layout_marginLeft="30sp"
+                android:layout_marginRight="30sp"
+                android:layout_marginBottom="100sp"
+                android:background="@drawable/bg_take"
+                android:orientation="vertical"
+                android:padding="30sp">
+                <ScrollView
+                    android:id="@+id/sv"
                     android:layout_width="match_parent"
-                    android:layout_height="match_parent"
+                    android:layout_height="wrap_content"
                     android:layout_below="@+id/tb_main_bar">
 
-                    <androidx.recyclerview.widget.RecyclerView
-                        android:id="@+id/list_stock"
+                    <LinearLayout
                         android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintEnd_toEndOf="parent"
-                        app:layout_constraintStart_toStartOf="parent"
-                        app:layout_constraintTop_toTopOf="parent" />
+                        android:layout_height="wrap_content"
+                        android:layout_marginBottom="30sp"
+                        android:gravity="center"
+                        android:orientation="vertical">
 
-                </com.scwang.smartrefresh.layout.SmartRefreshLayout>
-            </LinearLayout>
-        </ScrollView>
-    </LinearLayout>
+                        <TextView
+                            android:id="@+id/tx_noDataShow"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_below="@+id/tb_main_bar"
+                            android:padding="30dp"
+                            android:gravity="center"
+                            android:text="没有对应票据"
+                            android:textSize="@dimen/text_30dp_size"
+                            android:visibility="gone" />
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
-        android:layout_marginTop="60sp"
-        android:background="@drawable/bg_take"
-        android:gravity="center"
-        android:orientation="horizontal"
-        android:paddingLeft="30sp"
-        android:paddingTop="20dp"
-        android:paddingBottom="20dp">
+                        <com.scwang.smartrefresh.layout.SmartRefreshLayout
+                            android:id="@+id/refreshLayout"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_below="@+id/tb_main_bar">
 
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="60dp"
-            android:layout_weight="1"
-            android:orientation="horizontal">
-
-            <CheckBox
-                android:id="@+id/all_btn"
-                android:layout_width="60dp"
-                android:layout_marginLeft="40dp"
-                android:layout_height="match_parent"
-                android:layout_centerInParent="true"
-                android:scaleX="2"
-                android:scaleY="2" />
-
-            <TextView
-                android:id="@+id/txt_btn"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="-20dp"
-                android:layout_marginTop="5dp"
-                android:text="全选"
-                android:textColor="@color/black"
-                android:textSize="@dimen/text_30dp_size" />
-        </LinearLayout>
+                            <androidx.recyclerview.widget.RecyclerView
+                                android:id="@+id/list_stock"
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintTop_toTopOf="parent" />
 
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="60dp"
-            android:layout_weight="1"
-            android:paddingLeft="30dp"
-            android:paddingRight="30dp"
-            android:orientation="horizontal">
-
-            <TextView
-                android:id="@+id/print_btn"
+                        </com.scwang.smartrefresh.layout.SmartRefreshLayout>
+                    </LinearLayout>
+                </ScrollView>
+            </LinearLayout>
+
+            <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="60dp"
-                android:layout_marginLeft="20sp"
-                android:background="@drawable/bg_btn_01"
+                android:layout_height="wrap_content"
+                android:layout_alignParentBottom="true"
+                android:layout_marginTop="60sp"
+                android:background="@drawable/bg_take"
                 android:gravity="center"
-                android:text="确定打印"
-                android:textColor="@color/white"
-                android:textFontWeight="800"
-                android:textSize="@dimen/text_30dp_size" />
+                android:orientation="horizontal"
+                android:paddingLeft="30sp"
+                android:paddingTop="20dp"
+                android:paddingBottom="20dp">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="60dp"
+                    android:layout_weight="1"
+                    android:orientation="horizontal">
+
+                    <CheckBox
+                        android:id="@+id/all_btn"
+                        android:layout_width="60dp"
+                        android:layout_marginLeft="40dp"
+                        android:layout_height="match_parent"
+                        android:layout_centerInParent="true"
+                        android:scaleX="2"
+                        android:scaleY="2" />
+
+                    <TextView
+                        android:id="@+id/txt_btn"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="-20dp"
+                        android:layout_marginTop="5dp"
+                        android:text="全选"
+                        android:textColor="@color/black"
+                        android:textSize="@dimen/text_30dp_size" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="60dp"
+                    android:layout_weight="1"
+                    android:paddingLeft="30dp"
+                    android:paddingRight="30dp"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:id="@+id/print_btn"
+                        android:layout_width="match_parent"
+                        android:layout_height="60dp"
+                        android:layout_marginLeft="20sp"
+                        android:background="@drawable/bg_btn_01"
+                        android:gravity="center"
+                        android:text="确定打印"
+                        android:textColor="@color/white"
+                        android:textFontWeight="800"
+                        android:textSize="@dimen/text_30dp_size" />
+                </LinearLayout>
+            </LinearLayout>
+
         </LinearLayout>
-    </LinearLayout>
+    </ScrollView>
+
+
 </RelativeLayout>

+ 75 - 67
app/src/main/res/layout/activity_ticket_purchase.xml

@@ -1,94 +1,102 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:orientation="vertical"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@mipmap/page_bj">
 
-    <LinearLayout
+    <ScrollView
+        android:id="@+id/sv2"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center"
-        android:orientation="vertical">
+        android:layout_height="match_parent">
 
-        <ImageView
-            android:id="@+id/main_img"
+        <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="550dp"
-            android:scaleType="fitXY"
-            android:src="@mipmap/main_top" />
-
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="550dp">
-        <com.hjq.bar.TitleBar
-            android:id="@+id/tb_main_bar"
-            android:layout_width="match_parent"
-            android:layout_height="80dp"
-            android:background="@color/login_bk"
-            app:leftColor="@color/white"
-            app:leftIcon="@mipmap/left_44_icon"
-            app:leftSize="@dimen/inedx_btn_size"
-            app:leftTitle="返回"
-            app:rightColor="@color/white"
-            app:rightSize="@dimen/inedx_btn_size"
-            app:rightTitle="120s"
-            app:title="自助取票"
-            app:titleColor="@color/white"
-            app:titleSize="@dimen/text_30dp_size" />
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_gravity="top"
-        android:layout_marginTop="640sp"
-        android:orientation="vertical">
-        <ScrollView
-            android:id="@+id/sv"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_below="@+id/tb_main_bar">
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:orientation="vertical">
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:gravity="center"
-                android:layout_marginBottom="60sp"
                 android:orientation="vertical">
-                <TextView
-                    android:id="@+id/tx_noDataShow"
-                    android:layout_below="@+id/tb_main_bar"
+
+                <ImageView
+                    android:id="@+id/main_img"
                     android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:layout_marginTop="120sp"
-                    android:gravity="center"
-                    android:visibility="gone"
-                    android:textSize="@dimen/text_30dp_size"
-                    android:text="没有对应票据"/>
+                    android:layout_height="550dp"
+                    android:scaleType="fitXY"
+                    android:src="@mipmap/main_top" />
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
 
-                <com.scwang.smartrefresh.layout.SmartRefreshLayout
+                <com.hjq.bar.TitleBar
+                    android:id="@+id/tb_main_bar"
                     android:layout_width="match_parent"
-                    android:layout_below="@+id/tb_main_bar"
-                    android:layout_marginTop="30sp"
-                    android:id="@+id/refreshLayout"
-                    android:layout_height="match_parent">
+                    android:layout_height="80dp"
+                    android:background="@color/login_bk"
+                    app:leftColor="@color/white"
+                    app:leftIcon="@mipmap/left_44_icon"
+                    app:leftSize="@dimen/inedx_btn_size"
+                    app:leftTitle="返回"
+                    app:rightColor="@color/white"
+                    app:rightSize="@dimen/inedx_btn_size"
+                    app:rightTitle="120s"
+                    app:title="自助取票"
+                    app:titleColor="@color/white"
+                    app:titleSize="@dimen/text_30dp_size" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="top"
+                android:orientation="vertical">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginBottom="60sp"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <TextView
+                        android:id="@+id/tx_noDataShow"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_below="@+id/tb_main_bar"
+                        android:layout_marginTop="120sp"
+                        android:gravity="center"
+                        android:text="没有对应票据"
+                        android:textSize="@dimen/text_30dp_size"
+                        android:visibility="gone" />
 
-                    <androidx.recyclerview.widget.RecyclerView
-                        android:id="@+id/list_stock"
+                    <com.scwang.smartrefresh.layout.SmartRefreshLayout
+                        android:id="@+id/refreshLayout"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintEnd_toEndOf="parent"
-                        app:layout_constraintStart_toStartOf="parent"
-                        app:layout_constraintTop_toTopOf="parent" />
+                        android:layout_below="@+id/tb_main_bar"
+                        android:layout_marginTop="30sp">
 
-                </com.scwang.smartrefresh.layout.SmartRefreshLayout>
+                        <androidx.recyclerview.widget.RecyclerView
+                            android:id="@+id/list_stock"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintTop_toTopOf="parent" />
+                    </com.scwang.smartrefresh.layout.SmartRefreshLayout>
+                </LinearLayout>
+                <!--            </ScrollView>-->
             </LinearLayout>
+        </LinearLayout>
 
-        </ScrollView>
-    </LinearLayout>
+    </ScrollView>
 
 </RelativeLayout>

+ 115 - 0
app/src/main/res/layout/dialog_mobile_input.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/rootLayout"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center"
+    android:orientation="vertical">
+
+    <RelativeLayout
+        android:layout_width="400dp"
+        android:layout_height="240dp"
+        android:background="@drawable/bg_corners_01"
+        android:gravity="center"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/dp_10"
+            android:layout_marginTop="@dimen/dp_10"
+            android:layout_marginEnd="@dimen/dp_10"
+            android:layout_marginBottom="@dimen/dp_10"
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="16sp"
+                android:layout_marginBottom="10sp"
+                android:gravity="center"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/tx_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="请输入手机号"
+                    android:textColor="#333333"
+                    android:textSize="20sp" />
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="#E9E9E9" />
+
+            <LinearLayout
+
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/dp_10"
+                android:layout_marginTop="20dp"
+                android:layout_marginEnd="@dimen/dp_10"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textStyle="bold"
+                    android:textColor="@color/black"
+                    android:textSize="24sp"
+                    android:text="手机号:"/>
+
+                <EditText
+                    android:id="@+id/et_mobile"
+                    android:layout_marginStart="10sp"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:background="@drawable/bg_corners_10"
+                    android:enabled="true"
+                    android:textSize="22sp"
+                    android:hint="请输入您的手机号"
+                    android:gravity="left" />
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="30dp"
+                android:gravity="center"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/btnup_cancel"
+                    android:layout_width="80dp"
+                    android:layout_height="40dp"
+
+                    android:background="@drawable/bg_corners_06"
+                    android:gravity="center"
+                    android:text="取消"
+                    android:textColor="@color/black"
+                    android:textSize="20sp" />
+
+                <TextView
+                    android:id="@+id/btnup_enter"
+                    android:layout_width="80dp"
+                    android:layout_height="40dp"
+                    android:layout_marginStart="@dimen/dp_40"
+                    android:background="@drawable/bg_corners_05"
+                    android:gravity="center"
+                    android:text="确认"
+                    android:textColor="@color/white"
+                    android:textSize="20sp" />
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+
+    </RelativeLayout>
+
+</LinearLayout>