Просмотр исходного кода

提交类型 处理bug
提交内容 1.抢商机的闪退bug,起因是在itemClick里面没有判断,数组越界
2.审批界面,恢复原有的配置,由于后台的要求,修改参数,最后发现是错误的
3.一元捐多项修改
4.补卡申述时候在出错了时候系统返回的是200导致无法获取异常信息的问题
5.处理在切换账套时候,没有更新外勤的配置信息bug

冲突:无

Bitliker 8 лет назад
Родитель
Сommit
0d4960413f

+ 3 - 3
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Wed Dec 13 15:38:16 CST 2017
-debugName=144
+#Wed Dec 13 16:31:58 CST 2017
+debugName=148
 versionName=618
-debugCode=144
+debugCode=148
 versionCode=157

+ 1 - 1
app_modular/apputils/src/main/java/com/modular/apputils/utils/SwitchUtil.java

@@ -9,7 +9,7 @@ import com.common.config.BaseConfig;
 public class SwitchUtil {
 
     public static boolean showYiyuanjuan() {
-        return BaseConfig.isDebug();
+        return BaseConfig.isDebug()&&false;
     }
 
     public static boolean showShebeiguanli() {

+ 5 - 5
app_modular/apputils/src/main/java/com/modular/apputils/widget/SpaceItemDecoration.java

@@ -31,12 +31,12 @@ public class SpaceItemDecoration extends RecyclerView.ItemDecoration {
     @Override
     public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
         super.getItemOffsets(outRect, view, parent, state);
-        outRect.left = mSpace;
-        outRect.right = mSpace;
+//        outRect.left = mSpace;
+//        outRect.right = mSpace;
         outRect.bottom = mSpace;
-        if (parent.getChildAdapterPosition(view) == 0) {
-            outRect.top = mSpace;
-        }
+//        if (parent.getChildAdapterPosition(view) == 0) {
+//            outRect.top = mSpace;
+//        }
  
     }
  

+ 54 - 31
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/activity/BusinessTravelActivity.java

@@ -38,54 +38,73 @@ public class BusinessTravelActivity extends BaseActivity {
     private RecyclerView mRecyclerView;
     private BusinessTravelAdapter mAdapter;
 
+    private int page = 1;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_business_travel);
         initView();
-//        loadData();
-        try {
-            handlerData(null);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+        loadData(page = 1);
     }
 
     private void initView() {
         mRefreshLayout = findViewById(R.id.mRefreshLayout);
         mRecyclerView = findViewById(R.id.mRecyclerView);
+        mRefreshLayout.setOnRefreshListener(new BaseRefreshLayout.onRefreshListener() {
+            @Override
+            public void onRefresh() {
+                loadData(page = 1);
+            }
+
+            @Override
+            public void onLoadMore() {
+                loadData(++page);
+            }
+        });
     }
 
 
-    public void loadData() {
-        progressDialog.show();
-        httpClient.Api().send(new HttpClient.Builder()
-                .url("mobile/getFeePlease.action")
-                .add("emcode", CommonUtil.getEmcode())
-                .header("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(BaseConfig.getContext(), "sessionId"))
-                .method(Method.GET)
-                .build(), new ResultSubscriber<>(new ResultListener<Object>() {
-            @Override
-            public void onResponse(Object o) {
-                try {
-                    if (o != null) {
-                        handlerData(o.toString());
-                    }
-                } catch (Exception e) {
-                    if (e != null) {
-                        LogUtil.i("e=" + e.getMessage());
-                        ToastUtil.showToast(ct, e.getMessage());
-                    }
-                }
+    public void loadData(int page) {
+        if (1 == 1) {
+            try {
+                handlerData(TestStr.FEEPLEASE);
                 mRefreshLayout.stopRefresh();
-                progressDialog.dismiss();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        } else {
+            if (!mRefreshLayout.isRefreshing()) {
+                progressDialog.show();
             }
-        }));
+            httpClient.Api().send(new HttpClient.Builder()
+                    .url("mobile/getFeePlease.action")
+                    .add("emcode", CommonUtil.getEmcode())
+                    .add("page", page)
+                    .header("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(BaseConfig.getContext(), "sessionId"))
+                    .method(Method.GET)
+                    .build(), new ResultSubscriber<>(new ResultListener<Object>() {
+                @Override
+                public void onResponse(Object o) {
+                    try {
+                        if (o != null) {
+                            handlerData(o.toString());
+                        }
+                    } catch (Exception e) {
+                        if (e != null) {
+                            LogUtil.i("e=" + e.getMessage());
+                            ToastUtil.showToast(ct, e.getMessage());
+                        }
+                    }
+                    mRefreshLayout.stopRefresh();
+                    progressDialog.dismiss();
+                }
+            }));
+        }
+
     }
 
     private void handlerData(String message) throws Exception {
-        LogUtil.i("message=" + message);
-        message = TestStr.FEEPLEASE;
         JSONArray listdata = JSONUtil.getJSONArray(message, "listdata");
         List<BusinessTravel> models = new ArrayList<>();
         BusinessTravel model = null;
@@ -115,7 +134,11 @@ public class BusinessTravelActivity extends BaseActivity {
             mRecyclerView.setLayoutManager(new LinearLayoutManager(ct));
             mRecyclerView.setAdapter(mAdapter);
         } else {
-            mAdapter.setModels(models);
+            if (page == 1) {
+                mAdapter.setModels(models);
+            } else {
+                mAdapter.addModels(models);
+            }
         }
     }
 }

+ 132 - 92
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/adapter/BusinessTravelAdapter.java

@@ -8,9 +8,10 @@ import android.view.ViewGroup;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
-import com.baidu.cyberplayer.utils.G;
+
 import com.common.data.DateFormatUtil;
 import com.common.data.ListUtils;
+import com.modular.apputils.widget.TravelDirectionView;
 import com.uas.appworks.OA.platform.model.BusinessTravel;
 import com.uas.appworks.R;
 
@@ -72,10 +73,13 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
             BusinessTravel model = models.get(position);
             if (holder instanceof TitleViewHolder) {
                 bindTitleView((TitleViewHolder) holder, model);
-            } else if (holder instanceof AirViewHolder) {
-                bindAirView((AirViewHolder) holder, model, position);
-            } else if (holder instanceof HotelViewHolder) {
-                bindHotelView((HotelViewHolder) holder, model,position);
+            } else if (holder instanceof BaseViewHlder) {
+                bindBaseView((BaseViewHlder) holder, model, position);
+                if (holder instanceof AirViewHolder) {
+                    bindAirView((AirViewHolder) holder, model, position);
+                } else if (holder instanceof HotelViewHolder) {
+                    bindHotelView((HotelViewHolder) holder, model);
+                }
             }
 
         }
@@ -85,58 +89,60 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
         holder.codeTv.setText(model.getCode());
     }
 
-    private void bindAirView(AirViewHolder holder, BusinessTravel model, int position) {
-        holder.codeTv.setText("住宿:"+model.getCode());
+
+    private void bindBaseView(BaseViewHlder holder, BusinessTravel model, int position) {
+        holder.codeTv.setText(model.getTitle());
         holder.statusTv.setText(model.getStatus());
-        holder.levelTv.setText(model.getLevel());
-        holder.businessNameTv.setText(model.getBusinessName());
-        String whenLongTv="入住"+DateFormatUtil.long2Str(model.getStartTime(),"MM:dd")+"      离店"+DateFormatUtil.long2Str(model.getStartTime(),"MM:dd")+"    共2晚";
-        holder.whenLongTv.setText(whenLongTv);
-        holder.numberTv.setText(model.getNumber()+"人");
         holder.nameTv.setText("龚鹏明");
-        holder.idTypeTv.setText("二代身份证");
-        holder.idCardTv.setText("450122xxxxxxxxxx");
-        holder.roomsTv.setText("1间");
+        holder.idCardTv.setText("450122xxxxxxx");
         holder.seatTv.setText(model.getSeat());
         holder.realFeeTv.setText(model.getRealFee());
         holder.payTypeTv.setText(model.getPayType());
-        holder.addressTv.setText(model.getAddress());
-        holder.dateTv.setText(DateFormatUtil.long2Str(DateFormatUtil.YMD));
-        holder.numberSubTv.setText(model.getNumber() + "人");
+        holder.levelTv.setText(model.getLevel());
         holder.expecteFeeTv.setText(model.getExpecteFee());
-        holder.subRl.setVisibility(model.isExpand() ? View.VISIBLE : View.GONE);
+        holder.idTypeTv.setText("二代身份证");
+        holder.dateTv.setText(model.getDate());
         holder.doneTv.setTag(R.id.tag_key, model);
+        holder.doneTv.setTag(R.id.tag_key2, position);
         holder.doneTv.setOnClickListener(this);
         holder.expandTv.setTag(R.id.tag_key, model);
         holder.expandTv.setTag(R.id.tag_key2, position);
         holder.expandTv.setOnClickListener(this);
+        holder.subRl.setVisibility(model.isExpand() ? View.VISIBLE : View.GONE);
     }
 
-    private void bindHotelView(HotelViewHolder holder, BusinessTravel model, int position) {
-        holder.codeTv.setText(model.getCode());
-        holder.statusTv.setText(model.getStatus());
-        holder.levelTv.setText(model.getLevel());
-        holder.businessNameTv.setText(model.getBusinessName());
-        String whenLongTv="入住"+DateFormatUtil.long2Str(model.getStartTime(),"MM:dd")+"      离店"+DateFormatUtil.long2Str(model.getStartTime(),"MM:dd")+"    共2晚";
+    private void bindAirView(AirViewHolder holder, BusinessTravel model, int position) {
+        String fromCity = model.getStarting();
+        String toCity = model.getDestination();
+        //出发点
+        holder.fromCityTv.setText(fromCity);
+        holder.startDateTv.setText(DateFormatUtil.long2Str(model.getStartTime(), "yyyy-MM-dd"));
+        holder.startTimeTv.setText(DateFormatUtil.long2Str(model.getStartTime(), "HH:mm"));
+        holder.orderTypeTv.setText(model.getOrderType());
+        //目的地
+        holder.toCityTv.setText(toCity);
+        holder.toDateTv.setText(DateFormatUtil.long2Str(model.getEndTime(), "yyyy-MM-dd"));
+        holder.toTimeTv.setText(DateFormatUtil.long2Str(model.getEndTime(), "HH:mm"));
+        //行程
+        holder.tripTv.setText(fromCity + "-" + toCity);
+        holder.mTravelDirectionView.setData(model.getSeat(), longTime2Time(model.getAllTime()));
+        //改签
+        if (model.canChange()) {
+            holder.changeTv.setTag(R.id.tag_key, model);
+            holder.changeTv.setTag(R.id.tag_key2,position );
+            holder.changeTv.setOnClickListener(this);
+        }
+    }
+
+    private void bindHotelView(HotelViewHolder holder, BusinessTravel model) {
+        String whenLongTv = "入住: " + DateFormatUtil.long2Str(model.getStartTime(), "MM-dd") + "      离店: " + DateFormatUtil.long2Str(model.getStartTime(), "MM-dd") + "     共" + longTime2Time(model.getAllTime());
         holder.whenLongTv.setText(whenLongTv);
-        holder.numberTv.setText("1人");
-        holder.nameTv.setText("龚鹏明");
-        holder.idTypeTv.setText("二代身份证");
-        holder.idCardTv.setText("450122xxxxxxxxxx");
+        holder.businessNameTv.setText(model.getBusinessName());
+        holder.numberTv.setText(model.getNumber() + "人");
         holder.roomsTv.setText("1间");
-        holder.seatTv.setText(model.getSeat());
-        holder.realFeeTv.setText(model.getRealFee());
-        holder.payTypeTv.setText(model.getPayType());
         holder.addressTv.setText(model.getAddress());
         holder.dateTv.setText(DateFormatUtil.long2Str(DateFormatUtil.YMD));
         holder.numberSubTv.setText(model.getNumber() + "人");
-        holder.expecteFeeTv.setText(model.getExpecteFee());
-        holder.subRl.setVisibility(model.isExpand() ? View.VISIBLE : View.GONE);
-        holder.doneTv.setTag(R.id.tag_key, model);
-        holder.doneTv.setOnClickListener(this);
-        holder.expandTv.setTag(R.id.tag_key, model);
-        holder.expandTv.setTag(R.id.tag_key2, position);
-        holder.expandTv.setOnClickListener(this);
     }
 
 
@@ -155,75 +161,101 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
 
         public TitleViewHolder(View itemView) {
             super(itemView);
-            codeTv = (TextView) itemView.findViewById(R.id.codeTv);
+            codeTv = itemView.findViewById(R.id.codeTv);
         }
     }
 
-    private class AirViewHolder extends RecyclerView.ViewHolder {
-        TextView codeTv, statusTv, levelTv, businessNameTv, whenLongTv, numberTv,
-                nameTv, idTypeTv, idCardTv, roomsTv, seatTv, realFeeTv, payTypeTv, doneTv, expandTv, addressTv, dateTv, numberSubTv, expecteFeeTv;
-        RelativeLayout subRl;
+    private class HotelViewHolder extends BaseViewHlder {
+        TextView
+                businessNameTv,
+                whenLongTv,
+                numberSubTv,//人数
+                numberTv,
+                dateTv,
+                addressTv,  //地址
+                roomsTv;//房间人数
 
-        public AirViewHolder(ViewGroup viewGroup) {
+        public HotelViewHolder(ViewGroup viewGroup) {
             this(getInflater().inflate(R.layout.item_bus_travel_hotel, viewGroup, false));
         }
 
-        public AirViewHolder(View itemView) {
+        public HotelViewHolder(View itemView) {
             super(itemView);
-            subRl = itemView.findViewById(R.id.subRl);
-            codeTv = itemView.findViewById(R.id.codeTv);
-            statusTv = itemView.findViewById(R.id.statusTv);
-            levelTv = itemView.findViewById(R.id.levelTv);
-            businessNameTv = itemView.findViewById(R.id.businessNameTv);
-            whenLongTv = itemView.findViewById(R.id.whenLongTv);
-            numberTv = itemView.findViewById(R.id.numberTv);
-            nameTv = itemView.findViewById(R.id.nameTv);
-            idTypeTv = itemView.findViewById(R.id.idTypeTv);
-            idCardTv = itemView.findViewById(R.id.idCardTv);
-            roomsTv = itemView.findViewById(R.id.roomsTv);
-            seatTv = itemView.findViewById(R.id.seatTv);
-            realFeeTv = itemView.findViewById(R.id.realFeeTv);
-            payTypeTv = itemView.findViewById(R.id.payTypeTv);
-            doneTv = itemView.findViewById(R.id.doneTv);
-            expandTv = itemView.findViewById(R.id.expandTv);
-            addressTv = itemView.findViewById(R.id.addressTv);
-            dateTv = itemView.findViewById(R.id.dateTv);
-            numberSubTv = itemView.findViewById(R.id.numberSubTv);
-            expecteFeeTv = itemView.findViewById(R.id.expecteFeeTv);
+            businessNameTv = (TextView) itemView.findViewById(R.id.businessNameTv);
+            whenLongTv = (TextView) itemView.findViewById(R.id.whenLongTv);
+            numberTv = (TextView) itemView.findViewById(R.id.numberTv);
+            dateTv = (TextView) itemView.findViewById(R.id.dateTv);
+            roomsTv = (TextView) itemView.findViewById(R.id.roomsTv);
+            addressTv = (TextView) itemView.findViewById(R.id.addressTv);
+            numberSubTv = (TextView) itemView.findViewById(R.id.numberSubTv);
         }
     }
 
-    private class HotelViewHolder extends RecyclerView.ViewHolder {
-        TextView codeTv, statusTv, levelTv, businessNameTv, whenLongTv, numberTv,
-                nameTv, idTypeTv, idCardTv, roomsTv, seatTv, realFeeTv, payTypeTv, doneTv, expandTv, addressTv, dateTv, numberSubTv, expecteFeeTv;
+    public class BaseViewHlder extends RecyclerView.ViewHolder {
+        TextView codeTv,//订单编号
+                statusTv,//订单状态
+                nameTv,//当前人名字
+                idCardTv,//身份证号
+                seatTv,//座位号|房间号
+                realFeeTv,//实际付款
+                payTypeTv,//付款类型(前台自付)
+                doneTv,     //操作
+                expandTv,   //拓展
+                levelTv,    //级别
+                expecteFeeTv,//预计费用
+                idTypeTv, //身份类型
+                dateTv;//入住时间|返程时间
         RelativeLayout subRl;
 
-        public HotelViewHolder(ViewGroup viewGroup) {
-            this(getInflater().inflate(R.layout.item_bus_travel_hotel, viewGroup, false));
+        public BaseViewHlder(View itemView) {
+            super(itemView);
+            subRl = (RelativeLayout) itemView.findViewById(R.id.subRl);
+            codeTv = (TextView) itemView.findViewById(R.id.codeTv);
+            statusTv = (TextView) itemView.findViewById(R.id.statusTv);
+            nameTv = (TextView) itemView.findViewById(R.id.nameTv);
+            idCardTv = (TextView) itemView.findViewById(R.id.idCardTv);
+            seatTv = (TextView) itemView.findViewById(R.id.seatTv);
+            realFeeTv = (TextView) itemView.findViewById(R.id.realFeeTv);
+            payTypeTv = (TextView) itemView.findViewById(R.id.payTypeTv);
+            doneTv = (TextView) itemView.findViewById(R.id.doneTv);
+            expandTv = (TextView) itemView.findViewById(R.id.expandTv);
+            levelTv = (TextView) itemView.findViewById(R.id.levelTv);
+            expecteFeeTv = (TextView) itemView.findViewById(R.id.expecteFeeTv);
+            idTypeTv = (TextView) itemView.findViewById(R.id.idTypeTv);
+            dateTv = (TextView) itemView.findViewById(R.id.dateTv);
         }
+    }
 
-        public HotelViewHolder(View itemView) {
+
+    private class AirViewHolder extends BaseViewHlder {
+        TextView fromCityTv,
+                startDateTv,
+                startTimeTv,
+                orderTypeTv,//票据类型
+                toCityTv,
+                toDateTv,
+                toTimeTv,
+                tripTv,
+                changeTv;
+        TravelDirectionView mTravelDirectionView;
+
+        public AirViewHolder(ViewGroup viewGroup) {
+            this(getInflater().inflate(R.layout.item_bus_travel_air, viewGroup, false));
+        }
+
+        public AirViewHolder(View itemView) {
             super(itemView);
-            subRl = itemView.findViewById(R.id.subRl);
-            codeTv = itemView.findViewById(R.id.codeTv);
-            statusTv = itemView.findViewById(R.id.statusTv);
-            levelTv = itemView.findViewById(R.id.levelTv);
-            businessNameTv = itemView.findViewById(R.id.businessNameTv);
-            whenLongTv = itemView.findViewById(R.id.whenLongTv);
-            numberTv = itemView.findViewById(R.id.numberTv);
-            nameTv = itemView.findViewById(R.id.nameTv);
-            idTypeTv = itemView.findViewById(R.id.idTypeTv);
-            idCardTv = itemView.findViewById(R.id.idCardTv);
-            roomsTv = itemView.findViewById(R.id.roomsTv);
-            seatTv = itemView.findViewById(R.id.seatTv);
-            realFeeTv = itemView.findViewById(R.id.realFeeTv);
-            payTypeTv = itemView.findViewById(R.id.payTypeTv);
-            doneTv = itemView.findViewById(R.id.doneTv);
-            expandTv = itemView.findViewById(R.id.expandTv);
-            addressTv = itemView.findViewById(R.id.addressTv);
-            dateTv = itemView.findViewById(R.id.dateTv);
-            numberSubTv = itemView.findViewById(R.id.numberSubTv);
-            expecteFeeTv = itemView.findViewById(R.id.expecteFeeTv);
+            changeTv = itemView.findViewById(R.id.changeTv);
+            mTravelDirectionView = itemView.findViewById(R.id.mTravelDirectionView);
+            fromCityTv = (TextView) itemView.findViewById(R.id.fromCityTv);
+            startDateTv = (TextView) itemView.findViewById(R.id.startDateTv);
+            startTimeTv = (TextView) itemView.findViewById(R.id.startTimeTv);
+            toCityTv = (TextView) itemView.findViewById(R.id.toCityTv);
+            toDateTv = (TextView) itemView.findViewById(R.id.toDateTv);
+            toTimeTv = (TextView) itemView.findViewById(R.id.toTimeTv);
+            orderTypeTv = (TextView) itemView.findViewById(R.id.orderTypeTv);
+            tripTv = (TextView) itemView.findViewById(R.id.tripTv);
+
         }
     }
 
@@ -242,4 +274,12 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
         void click(int position, BusinessTravel model);
     }
 
+
+    private String longTime2Time(long time) {
+        long second = time / 1000;
+        long hh = second / 3600;
+        long mm = (second % 3600) / 60;
+        return hh + "小时" + mm + "分钟";
+    }
+
 }

+ 25 - 6
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/model/BusinessTravel.java

@@ -1,7 +1,7 @@
 package com.uas.appworks.OA.platform.model;
 
 import com.alibaba.fastjson.JSONObject;
-import com.common.LogUtil;
+import com.common.data.DateFormatUtil;
 import com.common.data.JSONUtil;
 
 
@@ -34,6 +34,7 @@ public class BusinessTravel {
     private String payType;
     private String businessName;
     private String remark;
+    private String title;
 
     public BusinessTravel() {
     }
@@ -60,15 +61,20 @@ public class BusinessTravel {
             payType = JSONUtil.getText(reimbursement, "fpd_pay_type");
             businessName = JSONUtil.getText(reimbursement, "fpd_business_name");
             remark = JSONUtil.getText(reimbursement, "fpd_remark");
-            if (type.equals("train") || type.equals("air")) {
+            if (type.equals("train")) {
+                title = "火车票";
+                this.type = AIR;
+            } else if (type.equals("air")) {
+                title = "飞机票";
                 this.type = AIR;
             } else if (type.equals("hotel")) {
+                title = "住宿";
                 this.type = HOTEL;
             } else {
+                title = "出差单号";
                 this.type = TITLE;
             }
         } catch (Exception e) {
-            LogUtil.i("e="+e.getMessage());
         }
     }
 
@@ -121,7 +127,7 @@ public class BusinessTravel {
     }
 
     public String getCode() {
-        return code==null?"":code;
+        return code == null ? "" : code;
     }
 
     public void setCode(String code) {
@@ -201,7 +207,7 @@ public class BusinessTravel {
     }
 
     public String getAddress() {
-        return address==null?"":address;
+        return address == null ? "" : address;
     }
 
     public void setAddress(String address) {
@@ -217,7 +223,7 @@ public class BusinessTravel {
     }
 
     public String getBusinessName() {
-        return businessName==null?"":businessName;
+        return businessName == null ? "" : businessName;
     }
 
     public void setBusinessName(String businessName) {
@@ -239,4 +245,17 @@ public class BusinessTravel {
     public void setRemark(String remark) {
         this.remark = remark;
     }
+
+    public boolean canChange() {
+        //TODO 判断时候可以改签
+        return true;
+    }
+
+    public String getTitle() {
+        return title + "   " + code;
+    }
+
+    public String getDate() {
+        return type==AIR?(DateFormatUtil.long2Str(endTime,"yyyy-MM-dd")):(DateFormatUtil.long2Str(startTime,"yyyy-MM-dd")+"-"+DateFormatUtil.long2Str(endTime,"yyyy-MM-dd"));
+    }
 }

+ 1 - 1
app_modular/appworks/src/main/res/drawable/text_frame_radian_hint_bg.xml

@@ -3,7 +3,7 @@
     <item>
         <shape>
             <solid android:color="@color/white" />
-            <corners android:radius="10dp" />
+            <corners android:radius="3dp" />
             <stroke android:width="@dimen/line" android:color="@color/text_hine" />
             <padding android:bottom="2dp" android:left="2dp" android:right="2dp" android:top="2dp" />
         </shape>

+ 1 - 1
app_modular/appworks/src/main/res/drawable/text_frame_radian_red_bg.xml

@@ -3,7 +3,7 @@
     <item>
         <shape>
             <solid android:color="@color/white" />
-            <corners android:radius="10dp" />
+            <corners android:radius="3dp" />
             <stroke android:width="@dimen/line" android:color="@color/indianred" />
             <padding android:bottom="2dp" android:left="2dp" android:right="2dp" android:top="2dp" />
         </shape>

+ 363 - 0
app_modular/appworks/src/main/res/layout/item_bus_travel_air.xml

@@ -0,0 +1,363 @@
+<?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"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginLeft="@dimen/padding"
+    android:layout_marginRight="@dimen/padding"
+    android:background="@color/base_bg"
+    android:orientation="vertical">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@drawable/radian_top_cui_bg"
+        android:paddingBottom="@dimen/padding">
+
+        <TextView
+            android:id="@+id/codeTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="@dimen/padding"
+            android:layout_marginTop="@dimen/padding"
+            android:gravity="center_horizontal"
+            android:paddingBottom="5dp"
+            android:paddingTop="5dp"
+            android:text="单程机票:671283"
+            android:textColor="@color/white"
+            android:textSize="@dimen/text_hine" />
+
+        <TextView
+            android:id="@+id/statusTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_alignTop="@id/codeTv"
+            android:layout_marginRight="@dimen/padding"
+            android:text="已提交"
+            android:textColor="@color/cui_yellow"
+            android:textSize="@dimen/text_hine" />
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:layout_below="@id/codeTv"
+            android:background="@color/white" />
+
+        <LinearLayout
+            android:id="@+id/fromLL"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/codeTv"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="@dimen/padding"
+            android:layout_marginTop="@dimen/padding"
+            android:gravity="center_horizontal"
+            android:orientation="vertical">
+
+            <TextView
+                android:id="@+id/fromCityTv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="上海"
+                android:textColor="@color/white"
+                android:textSize="@dimen/textXXL" />
+
+            <TextView
+                android:id="@+id/startDateTv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/fromCityTv"
+                android:lines="1"
+                android:text="2017-12-12"
+                android:textColor="@color/white"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/startTimeTv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="07:20"
+                android:textColor="@color/white"
+                android:textSize="@dimen/text_main" />
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/toLL"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_alignTop="@id/fromLL"
+            android:layout_marginLeft="@dimen/padding"
+            android:layout_marginRight="20dp"
+            android:gravity="center_horizontal"
+            android:orientation="vertical">
+
+            <TextView
+                android:id="@+id/toCityTv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_below="@id/codeTv"
+                android:text="深圳"
+                android:textColor="@color/white"
+                android:textSize="@dimen/textXXL" />
+
+            <TextView
+                android:id="@+id/toDateTv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_below="@id/fromCityTv"
+                android:gravity="center"
+                android:lines="1"
+                android:text="2017-12-12"
+                android:textColor="@color/white"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/toTimeTv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center_horizontal"
+                android:text="07:20"
+                android:textColor="@color/white"
+                android:textSize="@dimen/text_main" />
+        </LinearLayout>
+
+
+        <com.modular.apputils.widget.TravelDirectionView
+            android:id="@+id/mTravelDirectionView"
+            android:layout_width="match_parent"
+            android:layout_height="60dp"
+            android:layout_alignTop="@id/fromLL"
+            android:layout_toLeftOf="@id/toLL"
+            android:layout_toRightOf="@id/fromLL"
+            app:time="2小时20分"
+            app:timeSize="@dimen/text_hine"
+            app:title="D7890"
+            app:titleSize="@dimen/text_main" />
+
+
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:padding="@dimen/padding">
+
+        <TextView
+            android:id="@+id/nameTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginRight="@dimen/padding"
+            android:text="周炳"
+            android:textColor="@color/text_main"
+            android:textSize="@dimen/text_main" />
+
+        <TextView
+            android:id="@+id/idTypeTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_alignTop="@id/nameTv"
+            android:layout_marginLeft="@dimen/padding"
+            android:text="二代身份证"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+        <TextView
+            android:id="@+id/idCardTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="@dimen/padding"
+            android:layout_toLeftOf="@id/idTypeTv"
+            android:layout_toRightOf="@id/nameTv"
+            android:text="4501221994312319827"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+        <TextView
+            android:id="@+id/orderTypeTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/nameTv"
+            android:layout_marginBottom="@dimen/padding"
+            android:layout_marginTop="@dimen/padding"
+            android:text="1间"
+            android:textColor="@color/text_main"
+            android:textSize="@dimen/text_main" />
+
+        <TextView
+            android:id="@+id/seatTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignLeft="@id/idCardTv"
+            android:layout_alignTop="@id/orderTypeTv"
+            android:layout_marginRight="@dimen/padding"
+            android:text="A30H"
+            android:textColor="@color/indianred"
+            android:textSize="@dimen/text_main" />
+
+        <TextView
+            android:id="@+id/realFeeTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignTop="@id/orderTypeTv"
+            android:layout_marginLeft="30dp"
+            android:layout_toRightOf="@id/seatTv"
+            android:text="54元"
+            android:textColor="@color/indianred"
+            android:textSize="@dimen/text_main" />
+
+        <TextView
+            android:id="@+id/payTypeTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_alignTop="@id/orderTypeTv"
+            android:text="前台自付"
+            android:textColor="@color/indianred"
+            android:textSize="@dimen/text_main" />
+
+        <TextView
+            android:id="@+id/doneTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_below="@id/orderTypeTv"
+            android:background="@drawable/text_frame_radian_red_bg"
+            android:padding="4dp"
+            android:text="取消预约"
+            android:textColor="@color/indianred" />
+
+        <TextView
+            android:id="@+id/changeTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/orderTypeTv"
+            android:layout_marginRight="@dimen/padding"
+            android:layout_toLeftOf="@id/doneTv"
+            android:background="@drawable/text_frame_radian_hint_bg"
+            android:padding="4dp"
+            android:text="改签"
+            android:textColor="@color/text_hine" />
+
+        <TextView
+            android:id="@+id/expandTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignBottom="@id/doneTv"
+            android:drawableRight="@drawable/icon_more_down"
+            android:text="申请记录" />
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:layout_below="@id/doneTv" />
+
+    </RelativeLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/line"
+        android:background="@color/item_line" />
+
+    <RelativeLayout
+        android:id="@+id/subRl"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@drawable/radian_bottom_white_bg"
+        android:padding="6dp">
+
+        <TextView
+            android:id="@+id/addressTag"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginRight="@dimen/padding"
+            android:layout_marginTop="@dimen/padding"
+            android:text="行程"
+            android:textColor="@color/text_hine" />
+
+        <TextView
+            android:id="@+id/tripTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignTop="@id/addressTag"
+            android:layout_marginLeft="40dp"
+            android:layout_toRightOf="@id/addressTag"
+            android:ellipsize="end"
+            android:lines="1"
+            android:text="城市地址"
+            android:textColor="@color/text_main" />
+
+        <TextView
+            android:id="@+id/dateTag"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/addressTag"
+            android:layout_marginRight="@dimen/padding"
+            android:layout_marginTop="@dimen/padding"
+            android:text="返程时间:"
+            android:textColor="@color/text_hine" />
+
+        <TextView
+            android:id="@+id/dateTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignLeft="@id/tripTv"
+            android:layout_alignTop="@id/dateTag"
+            android:layout_toRightOf="@id/dateTag"
+            android:ellipsize="end"
+            android:lines="1"
+            android:text="城市地址"
+            android:textColor="@color/text_main" />
+
+        <TextView
+            android:id="@+id/numberTag"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/dateTag"
+            android:layout_marginRight="@dimen/padding"
+            android:layout_marginTop="@dimen/padding"
+            android:text="席别:"
+            android:textColor="@color/text_hine" />
+
+        <TextView
+            android:id="@+id/levelTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignLeft="@id/tripTv"
+            android:layout_alignTop="@id/numberTag"
+            android:layout_toRightOf="@id/numberTag"
+            android:ellipsize="end"
+            android:lines="1"
+            android:text="城市地址"
+            android:textColor="@color/text_main" />
+
+
+        <TextView
+            android:id="@+id/expecteFeeTag"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/numberTag"
+            android:layout_marginRight="@dimen/padding"
+            android:layout_marginTop="@dimen/padding"
+            android:text="预计费用:"
+            android:textColor="@color/text_hine" />
+
+        <TextView
+            android:id="@+id/expecteFeeTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignLeft="@id/tripTv"
+            android:layout_alignTop="@id/expecteFeeTag"
+            android:layout_toRightOf="@id/expecteFeeTag"
+            android:ellipsize="end"
+            android:lines="1"
+            android:text="预计费用"
+            android:textColor="@color/text_main" />
+    </RelativeLayout>
+</LinearLayout>

+ 48 - 28
app_modular/appworks/src/main/res/layout/item_bus_travel_hotel.xml

@@ -11,12 +11,14 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:background="@drawable/radian_top_cui_bg"
-        android:padding="6dp">
+        android:paddingBottom="@dimen/padding">
 
         <TextView
             android:id="@+id/codeTv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
+            android:layout_marginLeft="@dimen/padding"
+            android:layout_marginTop="@dimen/padding"
             android:gravity="center_horizontal"
             android:paddingBottom="5dp"
             android:paddingTop="5dp"
@@ -30,11 +32,8 @@
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
             android:layout_alignTop="@id/codeTv"
-            android:paddingBottom="5dp"
-            android:paddingLeft="10dp"
-            android:paddingRight="10dp"
-            android:paddingTop="5dp"
-            android:text="住宿"
+            android:layout_marginRight="@dimen/padding"
+            android:text="状态"
             android:textColor="@color/cui_yellow"
             android:textSize="@dimen/text_hine" />
 
@@ -51,6 +50,7 @@
             android:layout_alignLeft="@id/codeTv"
             android:layout_below="@id/codeTv"
             android:layout_marginTop="@dimen/padding"
+            android:text="标准单人间"
             android:textColor="@color/white"
             android:textSize="@dimen/textXXL" />
 
@@ -59,7 +59,9 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignBottom="@id/levelTv"
+            android:layout_marginLeft="@dimen/padding"
             android:layout_toRightOf="@id/levelTv"
+            android:text="香格里拉酒店"
             android:textColor="@color/white"
             android:textSize="@dimen/textXL" />
 
@@ -69,6 +71,8 @@
             android:layout_height="wrap_content"
             android:layout_alignLeft="@id/levelTv"
             android:layout_below="@id/levelTv"
+            android:layout_marginTop="@dimen/padding"
+            android:text="入住:12-10     离店:12-12    共两晚"
             android:textColor="@color/white"
             android:textSize="@dimen/text_hine" />
 
@@ -78,6 +82,8 @@
             android:layout_height="wrap_content"
             android:layout_alignLeft="@id/whenLongTv"
             android:layout_below="@id/whenLongTv"
+            android:layout_marginTop="@dimen/padding"
+            android:text="1人"
             android:textColor="@color/white"
             android:textSize="@dimen/text_hine" />
 
@@ -88,13 +94,14 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:background="@color/white"
-        android:padding="6dp">
+        android:padding="@dimen/padding">
 
         <TextView
             android:id="@+id/nameTv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginRight="@dimen/padding"
+            android:text="周炳"
             android:textColor="@color/text_main"
             android:textSize="@dimen/text_main" />
 
@@ -116,6 +123,7 @@
             android:layout_marginLeft="@dimen/padding"
             android:layout_toLeftOf="@id/idTypeTv"
             android:layout_toRightOf="@id/nameTv"
+            android:text="4501221994312319827"
             android:textColor="@color/text_hine"
             android:textSize="@dimen/text_hine" />
 
@@ -137,8 +145,8 @@
             android:layout_alignLeft="@id/idCardTv"
             android:layout_alignTop="@id/roomsTv"
             android:layout_marginRight="@dimen/padding"
-            android:text="1间"
-            android:textColor="@color/text_main"
+            android:text="A30H"
+            android:textColor="@color/indianred"
             android:textSize="@dimen/text_main" />
 
         <TextView
@@ -146,10 +154,10 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignTop="@id/roomsTv"
-            android:layout_marginLeft="@dimen/padding"
+            android:layout_marginLeft="30dp"
             android:layout_toRightOf="@id/seatTv"
-            android:text="1间"
-            android:textColor="@color/text_main"
+            android:text="54元"
+            android:textColor="@color/indianred"
             android:textSize="@dimen/text_main" />
 
         <TextView
@@ -158,8 +166,8 @@
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
             android:layout_alignTop="@id/roomsTv"
-            android:text="1间"
-            android:textColor="@color/text_main"
+            android:text="前台自付"
+            android:textColor="@color/indianred"
             android:textSize="@dimen/text_main" />
 
         <TextView
@@ -168,14 +176,16 @@
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
             android:layout_below="@id/roomsTv"
-            android:text="取消预约" />
+            android:background="@drawable/text_frame_radian_red_bg"
+            android:padding="4dp"
+            android:text="取消预约"
+            android:textColor="@color/indianred" />
 
         <TextView
             android:id="@+id/expandTv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignBottom="@id/doneTv"
-            android:layout_below="@id/roomsTv"
             android:drawableRight="@drawable/icon_more_down"
             android:text="申请记录" />
 
@@ -204,16 +214,20 @@
             android:layout_height="wrap_content"
             android:layout_marginRight="@dimen/padding"
             android:layout_marginTop="@dimen/padding"
-            android:text="城市地址" />
+            android:text="城市地址"
+            android:textColor="@color/text_hine" />
 
         <TextView
             android:id="@+id/addressTv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/padding"
+            android:layout_alignTop="@id/addressTag"
+            android:layout_marginLeft="40dp"
             android:layout_toRightOf="@id/addressTag"
             android:ellipsize="end"
-            android:lines="1" />
+            android:lines="1"
+            android:text="城市地址"
+            android:textColor="@color/text_main" />
 
         <TextView
             android:id="@+id/dateTag"
@@ -222,7 +236,8 @@
             android:layout_below="@id/addressTag"
             android:layout_marginRight="@dimen/padding"
             android:layout_marginTop="@dimen/padding"
-            android:text="入住日期:" />
+            android:text="入住日期:"
+            android:textColor="@color/text_hine" />
 
         <TextView
             android:id="@+id/dateTv"
@@ -230,10 +245,11 @@
             android:layout_height="wrap_content"
             android:layout_alignLeft="@id/addressTv"
             android:layout_alignTop="@id/dateTag"
-            android:layout_marginLeft="@dimen/padding"
             android:layout_toRightOf="@id/dateTag"
             android:ellipsize="end"
-            android:lines="1" />
+            android:lines="1"
+            android:text="城市地址"
+            android:textColor="@color/text_main" />
 
         <TextView
             android:id="@+id/numberTag"
@@ -242,7 +258,8 @@
             android:layout_below="@id/dateTag"
             android:layout_marginRight="@dimen/padding"
             android:layout_marginTop="@dimen/padding"
-            android:text="人数:" />
+            android:text="人数:"
+            android:textColor="@color/text_hine" />
 
         <TextView
             android:id="@+id/numberSubTv"
@@ -250,10 +267,11 @@
             android:layout_height="wrap_content"
             android:layout_alignLeft="@id/addressTv"
             android:layout_alignTop="@id/numberTag"
-            android:layout_marginLeft="@dimen/padding"
             android:layout_toRightOf="@id/numberTag"
             android:ellipsize="end"
-            android:lines="1" />
+            android:lines="1"
+            android:text="城市地址"
+            android:textColor="@color/text_main" />
 
 
         <TextView
@@ -263,7 +281,8 @@
             android:layout_below="@id/numberTag"
             android:layout_marginRight="@dimen/padding"
             android:layout_marginTop="@dimen/padding"
-            android:text="预计费用:" />
+            android:text="预计费用:"
+            android:textColor="@color/text_hine" />
 
         <TextView
             android:id="@+id/expecteFeeTv"
@@ -271,9 +290,10 @@
             android:layout_height="wrap_content"
             android:layout_alignLeft="@id/addressTv"
             android:layout_alignTop="@id/expecteFeeTag"
-            android:layout_marginLeft="@dimen/padding"
             android:layout_toRightOf="@id/expecteFeeTag"
             android:ellipsize="end"
-            android:lines="1" />
+            android:lines="1"
+            android:text="预计费用"
+            android:textColor="@color/text_main" />
     </RelativeLayout>
 </LinearLayout>

+ 1 - 0
app_modular/appworks/src/main/res/layout/item_bus_travel_title.xml

@@ -2,6 +2,7 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    android:background="@color/white"
     android:gravity="center_vertical"
     android:orientation="horizontal">