Kaynağa Gözat

Merge branch 'feature' of https://gitlab.com/Arisono/SkWeiChat-Baidu into feature_arison

# Conflicts:
#	WeiChat/version.properties
Arison 8 yıl önce
ebeveyn
işleme
d5137b0b5b
23 değiştirilmiş dosya ile 751 ekleme ve 77 silme
  1. 3 3
      WeiChat/version.properties
  2. 2 0
      app_modular/appbooking/src/main/AndroidManifest.xml
  3. 61 9
      app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServiceAddActivity.java
  4. 11 11
      app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServicesActivity.java
  5. 218 18
      app_modular/appbooking/src/main/java/com/modular/booking/activity/services/DishSelectActivity.java
  6. 60 0
      app_modular/appbooking/src/main/java/com/modular/booking/activity/test/BottomSheetActivity.java
  7. 73 0
      app_modular/appbooking/src/main/java/com/modular/booking/activity/test/ItemTestDataAdapter.java
  8. 51 0
      app_modular/appbooking/src/main/java/com/modular/booking/activity/test/ListPanel.java
  9. 3 0
      app_modular/appbooking/src/main/java/com/modular/booking/activity/utils/ShoppingCart.java
  10. 11 7
      app_modular/appbooking/src/main/java/com/modular/booking/adapter/ItemDishPinnedListAdapter.java
  11. 0 5
      app_modular/appbooking/src/main/java/com/modular/booking/adapter/LayoutShoppingCartItemAdapter.java
  12. 19 0
      app_modular/appbooking/src/main/res/layout/activity_bottom_sheet.xml
  13. 27 11
      app_modular/appbooking/src/main/res/layout/activity_dish_select.xml
  14. 98 0
      app_modular/appbooking/src/main/res/layout/dialog_dish_product.xml
  15. 3 3
      app_modular/appbooking/src/main/res/layout/item_dish_list.xml
  16. 13 0
      app_modular/appbooking/src/main/res/layout/item_test_data.xml
  17. 47 0
      app_modular/appbooking/src/main/res/layout/layout_test_bottomsheet.xml
  18. 15 4
      app_modular/appbooking/src/main/res/values-en/strings.xml
  19. 11 0
      app_modular/appbooking/src/main/res/values-zh-rCN/strings.xml
  20. 11 0
      app_modular/appbooking/src/main/res/values-zh-rTW/strings.xml
  21. 11 0
      app_modular/appbooking/src/main/res/values/strings.xml
  22. 2 5
      app_third/MPAndroidChart/build.gradle
  23. 1 1
      version.gradle

+ 3 - 3
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Fri Feb 02 16:51:21 CST 2018
-debugName=360
+#Thu Feb 08 14:29:12 CST 2018
+debugName=439
 versionName=613
-debugCode=360
+debugCode=439
 versionCode=152

+ 2 - 0
app_modular/appbooking/src/main/AndroidManifest.xml

@@ -19,6 +19,8 @@
         <activity android:name=".activity.utils.GridSelectActivity" />
         <activity android:name=".activity.utils.GridSelectDateActivity" />
         <activity android:name=".activity.services.DishSelectActivity"></activity>
+        <activity android:name=".activity.test.BottomSheetActivity"></activity>
+       
     </application>
 
 </manifest>

+ 61 - 9
app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServiceAddActivity.java

@@ -195,7 +195,7 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
         tvDSeatsTitle=(TextView)findViewById(R.id.tvDSeatsTitle);
          gvDSeats=(NScrollerGridView)findViewById(R.id.gvDSeats);
         food_dishs_rl=findViewById(R.id.food_dishs_rl);
-
+     //   food_dishs_rl.setEnabled(true);
         mDishList=findViewById(R.id.lv_dish);
         tv_food_dishs=findViewById(R.id.tv_food_dishs);
 
@@ -474,11 +474,18 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
     public void onClick(View v) {
         int id = v.getId();
         if(id==R.id. food_dishs_rl){
-            startActivityForResult(new Intent(BServiceAddActivity.this,DishSelectActivity.class),DISHS_SELECT);
-            
+            try {
+                startActivityForResult(
+                        new Intent(BServiceAddActivity.this,DishSelectActivity.class)
+                        .putExtra("tvTitle",model.getName())
+                        .putExtra("tvSub",model.getAddress())
+                        .putExtra("headImgUrl",model.getUrl())
+                        ,DISHS_SELECT);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+
         }else if (id == R.id.tv_title) {
-            //简介
-//            ToastMessage("简介");
             try {
                 if (!StringUtil.isEmpty(dataService)) {
                     showDialog(JSON.parseObject(dataService).getString("sc_introduce"));
@@ -939,6 +946,23 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
 //				return;`
 //			}
         }
+
+
+     List<ShoppingEntity> shoppingEntities=  ShoppingCart.getInstance().getShoppingList();
+        List<Map<String,Object>>  shopMap=new ArrayList<>();
+        if(!ListUtils.isEmpty(shoppingEntities)){
+            for (int i = 0; i <shoppingEntities.size(); i++) {
+                //sd_name 菜名,sd_price价格,sd_number数量,sd_url
+                ShoppingEntity entity=shoppingEntities.get(i);
+                Map<String,Object> mapNode=new HashMap<String,Object>();
+                mapNode.put("sd_name",entity.getName());
+                mapNode.put("sd_price",entity.getUnitPrice());
+                mapNode.put("sd_number",entity.getQuantity());
+                mapNode.put("sd_url","");
+                shopMap.add(mapNode);
+            }
+        }
+            LogUtil.d(TAG,"save shop map:"+JSON.toJSONString(shopMap));
         final String startTime = map.get("sb_endtime").toString();
         new HttpClient
                 .Builder(Constants.IM_BASE_URL())
@@ -948,6 +972,7 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                 .send(new HttpClient.Builder()
                         .url("/user/appSaveService")
                         .add("map", JSONUtil.map2JSON(map))
+                        .add("mapdetail",JSON.toJSONString(shopMap))
                         .add("token", MyApplication.getInstance().mAccessToken)
                         .method(Method.POST)
                         .build(), new ResultSubscriber<>(new ResultListener<Object>() {
@@ -972,6 +997,7 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                             }
                         } catch (Exception e) {
                             e.printStackTrace();
+                            submiting = true;
                         }
 
                     }
@@ -1206,6 +1232,7 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
             data = JSON.parseObject(dataService);
         }
         if (!isEdited) {
+            food_dishs_rl.setEnabled(false);
             et_book_phone.setText(data.getString("sb_telephone"));
             et_book_name.setText(data.getString("sb_recordor"));
             if ("0".equals(data.getString("sb_sex"))){
@@ -1669,8 +1696,6 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
     //查询桌子余量
     public void searchSeatNumbers(String yearmonth,String companyid){
         //companyid,userid,yearmonth,token
-        
-    
         yearmonth=DateFormatUtil.getStrDate4Date(DateFormatUtil.getDate4StrDate(yearmonth,"yyyy-MM-dd HH:ss"),"yyyyMMdd");
         String peopleNumber=tv_food_peoples.getText().toString();
         String aType="小桌";
@@ -1684,14 +1709,15 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
             //小
             aType="小桌";
         }
-        final String  asType=aType;
-        LogUtil.i("座位:"+asType+"yearmonth:"+yearmonth+"  companyid:"+companyid+" peopleNumber:"+peopleNumber);
+          final String  asType=aType;
+          LogUtil.i(TAG,"座位:"+asType+"yearmonth:"+yearmonth+"  companyid:"+companyid+" peopleNumber:"+peopleNumber+" id:"+model.getId());
           HttpClient httpClient=new HttpClient.Builder(Constants.IM_BASE_URL()).build();
                  httpClient.Api().send(new HttpClient.Builder()
                  .url("/user/appLineList")
                  .add("companyid",companyid)
                  .add("userid",MyApplication.getInstance().mLoginUser.getUserId())
                  .add("yearmonth",yearmonth)
+                 .add("id",model.getId())
                  .add("token",MyApplication.getInstance().mAccessToken)
                  .method(Method.POST)
                  .build(),new ResultSubscriber<Object>(new ResultListener<Object>() {
@@ -1705,6 +1731,8 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                              boolean isEnter=false;
                              JSONArray deskbook=JSON.parseObject(o.toString()).getJSONArray("deskbook");
                              JSONArray desklist=JSON.parseObject(o.toString()).getJSONArray("desklist");
+                             JSONArray detaillist=JSON.parseObject(o.toString()).getJSONArray("detaillist");
+                             
                              if (!ListUtils.isEmpty(deskbook)){
                                  CommonUtil.textSpanForStyle(tvMSeatsNum,"前方"+"0"+"桌","0",ct.getResources().getColor(R.color.blue_seats_num));
                                  CommonUtil.textSpanForStyle(tvZSeatsNum,"前方"+"0"+"桌","0",ct.getResources().getColor(R.color.blue_seats_num));
@@ -1798,6 +1826,30 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                              }
                              
                              
+                             if (!ListUtils.isEmpty(detaillist)){
+                                 List<ShoppingEntity>  shoppingEntities= new ArrayList<>();
+                                 int totalNum=0;
+                                 int totalPrice=0;
+                                 for (int i = 0; i <detaillist.size() ; i++) {
+                                     JSONObject object=detaillist.getJSONObject(i);
+                                     ShoppingEntity model=new ShoppingEntity();
+                                     model.setName(object.getString("sd_name"));
+                                     model.setQuantity(Integer.valueOf(object.getString("sd_number")));
+                                     totalNum=totalNum+Integer.valueOf(object.getString("sd_number"));
+                                     model.setUnitPrice(Integer.valueOf(object.getString("sd_price")));
+                                     Integer totalModePrice=    Integer.valueOf(object.getString("sd_price"))*Integer.valueOf(object.getString("sd_number"));
+                                     totalPrice=totalPrice+totalModePrice;
+                                     shoppingEntities.add(model);
+                                 }
+
+                                 itemFoodsDishlistAdapter=new ItemFoodsDishlistAdapter(mContext,shoppingEntities);
+                                 mDishList.setAdapter(itemFoodsDishlistAdapter);
+
+                                 CommonUtil.textSpanForStyle(tv_food_dishs,"合计: "+totalNum+"份 ¥"+totalPrice,totalNum+"份 ¥"+totalPrice,ct.getResources().getColor(R.color.blue_seats_num));
+                             }else{
+                                 
+                             }
+                             
                          } catch (Exception e) {
                              e.printStackTrace();
                          }

+ 11 - 11
app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServicesActivity.java

@@ -143,17 +143,17 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
         menuModel.setUrl("");
         menuModel.setCode("10003");
         menuModel.setIcon(R.drawable.icon_food);
-        menuModel.setDesc("美味齐全");
+        menuModel.setDesc(getString(R.string.fulldelicious));
         menuModel.setDescColor(Color.parseColor("#FDC34F"));
-        menuModel.setTitle("餐饮");
+        menuModel.setTitle(getString(R.string.service_foods));
         menuModels.add(menuModel);
 
         menuModel = new SBMenuModel();
         menuModel.setUrl("");
         menuModel.setCode("10004");
         menuModel.setIcon(R.drawable.icon_hair);
-        menuModel.setDesc("时尚潮流");
-        menuModel.setTitle("美容美发");
+        menuModel.setDesc(getString(R.string.fashion));
+        menuModel.setTitle(getString(R.string.beautysalons));
         menuModel.setDescColor(Color.parseColor("#FE7F19"));
         menuModels.add(menuModel);
 
@@ -161,7 +161,7 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
         menuModel.setUrl("");
         menuModel.setCode("10006");
         menuModel.setIcon(R.drawable.icon_ktv);
-        menuModel.setDesc("音乐节");
+        menuModel.setDesc(getString(R.string.musicfestival));
         menuModel.setTitle("KTV");
         menuModel.setDescColor(Color.parseColor("#2ED3AE"));
         menuModels.add(menuModel);
@@ -170,8 +170,8 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
         menuModel.setUrl("");
         menuModel.setCode("10002");
         menuModel.setIcon(R.drawable.icon_sport);
-        menuModel.setDesc("hi起来");
-        menuModel.setTitle("运动健身");
+        menuModel.setDesc(getString(R.string.takeaction));
+        menuModel.setTitle(getString(R.string.exercise));
         menuModel.setDescColor(Color.parseColor("#F96173"));
         menuModels.add(menuModel);
 
@@ -179,8 +179,8 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
         menuModel.setUrl("");
         menuModel.setCode("10005");
         menuModel.setIcon(R.drawable.icon_club);
-        menuModel.setDesc("预约有优惠");
-        menuModel.setTitle("会所");
+        menuModel.setDesc(getString(R.string.discountforreservation));
+        menuModel.setTitle(getString(R.string.Club));
         menuModel.setDescColor(Color.parseColor("#65EA6E"));
         menuModels.add(menuModel);
 
@@ -188,8 +188,8 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
         menuModel.setUrl("");
         menuModel.setCode("10001");
         menuModel.setIcon(R.drawable.icon_hospital);
-        menuModel.setDesc("您的健康助手");
-        menuModel.setTitle("医院挂号");
+        menuModel.setDesc(getString(R.string.healthassistant));
+        menuModel.setTitle(getString(R.string.Hospitalregistration));
         menuModel.setDescColor(Color.parseColor("#D357DE"));
         menuModels.add(menuModel);
 

+ 218 - 18
app_modular/appbooking/src/main/java/com/modular/booking/activity/services/DishSelectActivity.java

@@ -1,17 +1,24 @@
 package com.modular.booking.activity.services;
 
+import android.content.Context;
 import android.content.Intent;
+import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
+import android.os.Handler;
 import android.os.Parcelable;
-import android.support.v7.app.ActionBar;
+import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.ViewGroup;
+import android.view.WindowManager;
 import android.widget.AbsListView;
 import android.widget.AdapterView;
 import android.widget.Button;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.PopupWindow;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
@@ -19,7 +26,10 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.common.LogUtil;
 import com.common.data.ListUtils;
+import com.common.system.DisplayUtil;
 import com.core.base.OABaseActivity;
+import com.core.utils.CommonUtil;
+import com.core.utils.helper.AvatarHelper;
 import com.core.widget.CustomerListView;
 import com.core.widget.DrawableCenterTextView;
 import com.core.widget.PinnedSectionListView;
@@ -33,10 +43,13 @@ import com.modular.booking.activity.utils.ShoppingCart;
 import com.modular.booking.activity.utils.ShoppingCartPanel;
 import com.modular.booking.adapter.ItemDishCategoryListAdapter;
 import com.modular.booking.adapter.ItemDishPinnedListAdapter;
+import com.modular.booking.adapter.LayoutShoppingCartItemAdapter;
 import com.modular.booking.model.Product;
 import com.modular.booking.model.ProductCategory;
+import com.modular.booking.model.ShoppingEntity;
 import com.modular.booking.utils.EventMessage;
 import com.modular.booking.utils.RxBus;
+import com.modular.booking.widget.ShoppingCountView;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -55,6 +68,7 @@ public class DishSelectActivity extends OABaseActivity {
     private CircleImageView iv_header;
     private TextView tv_title;
     private TextView tv_sub;
+    private TextView num_tv;
     private BottomSheetLayout  mBottmSheetLayout;
     private LinearLayout ll_bottom;
     private CustomerListView lv_product_category;
@@ -90,16 +104,16 @@ public class DishSelectActivity extends OABaseActivity {
     }
     
     private void initView(){
-        View view = LayoutInflater.from(ct).inflate(R.layout.action_book_service, null);
-        mBackImageView = (ImageView) view.findViewById(R.id.book_service_back);
-        mSearchTv = (DrawableCenterTextView) view.findViewById(R.id.book_service_et);
-        mRelativeTop = (RelativeLayout) view.findViewById(R.id.book_service_action);
-        ActionBar bar = this.getSupportActionBar();
-        bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
-        drawBg = getResources().getDrawable(R.color.antionbarcolor);
-        bar.setBackgroundDrawable(drawBg);
-        bar.setCustomView(view);
-        
+//        View view = LayoutInflater.from(ct).inflate(R.layout.action_book_service, null);
+//        mBackImageView = (ImageView) view.findViewById(R.id.book_service_back);
+//        mSearchTv = (DrawableCenterTextView) view.findViewById(R.id.book_service_et);
+//        mRelativeTop = (RelativeLayout) view.findViewById(R.id.book_service_action);
+//        ActionBar bar = this.getSupportActionBar();
+//        bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
+//        drawBg = getResources().getDrawable(R.color.antionbarcolor);
+//        bar.setBackgroundDrawable(drawBg);
+//        bar.setCustomView(view);
+   
         mShoppingCartPanel = new ShoppingCartPanel(this);
         lv_product_category= findViewById(R.id.lv_product_category);
         mBottmSheetLayout=findViewById(R.id.bottom_sheet_layout);
@@ -113,6 +127,7 @@ public class DishSelectActivity extends OABaseActivity {
         ivShopCar=findViewById(R.id.ivShopCar);
         tvShopSure=findViewById(R.id.tvShopSure);
         tvTotalPrice=findViewById(R.id.tvTotalPrice);
+        num_tv=findViewById(R.id.num_tv);
         
         itemDishCategoryListAdapter=new ItemDishCategoryListAdapter(DishSelectActivity.this,productCategories);
         lv_product_category.setAdapter( itemDishCategoryListAdapter);
@@ -123,11 +138,27 @@ public class DishSelectActivity extends OABaseActivity {
         itemDishPinnedListAdapter.setAnimTargetView(ivShopCar);
         lv_product.setAdapter(itemDishPinnedListAdapter);
 
-   
+        Intent data=getIntent();
+        if (data!=null) {
+             String sb_imageurl=   data.getStringExtra("headImgUrl");
+             String tvsub=    data.getStringExtra("tvSub");
+             String tvtitle=    data.getStringExtra("tvTitle");
+            getSupportActionBar().setTitle(tvtitle);
+            tv_title.setText(tvtitle);
+            tv_sub.setText(tvsub);
+            AvatarHelper.getInstance().display(sb_imageurl, iv_header, true);
+            AvatarHelper.getInstance().display(sb_imageurl, max_img, true);
+        }
 
     }
     private boolean isClickTrigger=true;
     private void initEvent(){
+        mBottmSheetLayout.addOnSheetStateChangeListener(new BottomSheetLayout.OnSheetStateChangeListener() {
+            @Override
+            public void onSheetStateChanged(BottomSheetLayout.State state) {
+                LogUtil.d(TAG,"BottomSheetLayout.State:"+state);
+            }
+        });
         tvShopSure.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
@@ -145,6 +176,7 @@ public class DishSelectActivity extends OABaseActivity {
             @Override
             public void onClick(View view) {
                 showShoppingCartPanel();
+                //showShopWindow(view);
             }
         });
 
@@ -194,12 +226,41 @@ public class DishSelectActivity extends OABaseActivity {
             }
         });
         
-//        lv_product.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-//            @Override
-//            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
-//
-//            }
-//        });
+        lv_product.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
+                if (view.getTag() instanceof  ItemDishPinnedListAdapter.ItemViewHolder){
+                    ItemDishPinnedListAdapter.ItemViewHolder itemViewHolder= (ItemDishPinnedListAdapter.ItemViewHolder) view.getTag();
+                    final Product product=itemViewHolder.product;
+                    itemViewHolder.img_product_photo.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            showPopupWindow(view,product);
+                        }
+                    });
+                    itemViewHolder.txt_product_name.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            showPopupWindow(view,product);
+                        }
+                    });
+                    itemViewHolder.txt_product_month_sales.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            showPopupWindow(view,product);
+                        }
+                    });
+                    
+                    itemViewHolder.txt_product_price.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            showPopupWindow(view,product);
+                        }
+                    });
+                }
+                
+            }
+        });
 
 
         mSubscription= RxBus.getInstance().toObservable()
@@ -211,6 +272,7 @@ public class DishSelectActivity extends OABaseActivity {
     }
  
     private void initData(){
+         
           HttpClient httpClient=new HttpClient.Builder("http://192.168.253.200:8080/Chapter/").build();
                  httpClient.Api().send(new HttpClient.Builder()
                  .url("data/dish")
@@ -268,6 +330,8 @@ public class DishSelectActivity extends OABaseActivity {
 //                         }
                      }
                  }));
+
+        refreshBottomUi();
     }
 
 
@@ -300,9 +364,12 @@ public class DishSelectActivity extends OABaseActivity {
         double totalPrice = shoppingCart.getTotalPrice();
         if (totalCount>0) {
             tvTotalPrice.setText("共¥" + totalPrice);
+            num_tv.setVisibility(View.VISIBLE);
+            num_tv.setText(String.valueOf(totalCount));
             ivShopCar.setBackgroundResource(R.drawable.icon_shop_car);
             ivShopCar.setImageDrawable(getResources().getDrawable(R.drawable.icon_shop_car));
         }else{
+            num_tv.setVisibility(View.GONE);
             tvTotalPrice.setText(getString(R.string.tv_shop_empty) );
             ivShopCar.setBackgroundResource(R.drawable.icon_shop_empty);
             ivShopCar.setImageDrawable(getResources().getDrawable(R.drawable.icon_shop_empty));
@@ -317,4 +384,137 @@ public class DishSelectActivity extends OABaseActivity {
             mSubscription.unsubscribe();
         }
     }
+
+
+
+    private PopupWindow popupWindow = null;
+    ImageView ivIconProduct = null;
+    TextView tvDishDesc = null;
+    TextView tvDishName = null;
+    TextView txtProductMonthSales = null;
+    TextView txtProductPrice = null;
+    TextView ptvShopSure = null;
+    ShoppingCountView shopping_count_view=null;
+    public void showPopupWindow(View parent,Product product) {
+        View view = null;
+        WindowManager windowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
+        if (popupWindow == null) {
+            LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+            view = layoutInflater.inflate(R.layout.dialog_dish_product, null);
+            ivIconProduct = (ImageView) view.findViewById( R.id.iv_icon_product );
+            tvDishDesc = (TextView)view.findViewById( R.id.tv_dish_desc );
+            tvDishName = (TextView)view.findViewById( R.id.tv_dish_name );
+            txtProductMonthSales = (TextView)view.findViewById( R.id.txt_product_month_sales );
+            txtProductPrice = (TextView)view.findViewById( R.id.txt_product_price );
+            ptvShopSure = (TextView)view.findViewById( R.id.tvShopSure );
+            shopping_count_view=view.findViewById(R.id.shopping_count_view);
+            popupWindow = new PopupWindow(view,  
+                    windowManager.getDefaultDisplay().getWidth() - CommonUtil.dip2px(mContext,70),
+                    LinearLayout.LayoutParams.MATCH_PARENT);
+        }
+        int num= ShoppingCart.getInstance().getQuantityForProduct(product);
+        if (num>0){
+            ptvShopSure.setVisibility(View.GONE);
+            shopping_count_view.setShoppingCount(num);
+            shopping_count_view.setVisibility(View.VISIBLE);
+        }else{
+            ptvShopSure.setVisibility(View.VISIBLE);
+            shopping_count_view.setVisibility(View.GONE);
+        }
+        AvatarHelper.getInstance().display("http://p0.meituan.net/deal/__16971854__3919079.jpg@380w_214h_1e_1c",ivIconProduct,false);
+        tvDishName.setText(product.getName());
+        txtProductMonthSales.setText("月售0");
+        txtProductPrice.setText("¥"+product.getUnitItems().get(0).getPrice());
+
+        ptvShopSure.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                ptvShopSure.setVisibility(View.GONE);
+                ptvShopSure.setEnabled(false);
+                if (!ShoppingCart.getInstance().add(product)) {
+                }
+                shopping_count_view.setShoppingCount(1);
+                shopping_count_view.setVisibility(View.VISIBLE);
+            }
+        });
+        shopping_count_view.setOnShoppingClickListener(new ShoppingCountView.ShoppingClickListener() {
+            @Override
+            public void onAddClick(int num) {
+                    if (!ShoppingCart.getInstance().add(product)) {
+                    }
+            }
+
+            @Override
+            public void onMinusClick(int num) {
+                if (!ShoppingCart.getInstance().delete(product)) {
+                }
+                if (num==0){
+                   new Handler().postDelayed(new Runnable() {
+                       @Override
+                       public void run() {
+                           ptvShopSure.setVisibility(View.VISIBLE);
+                           ptvShopSure.setEnabled(true);
+                           shopping_count_view.setVisibility(View.GONE);
+                       }
+                   },10);
+                }
+            }
+        });
+        tvDishDesc.setText(product.getName());
+        popupWindow.setFocusable(true);
+        popupWindow.setOutsideTouchable(true);
+        popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                DisplayUtil.backgroundAlpha(activity, 1f);
+            }
+        });
+        DisplayUtil.backgroundAlpha(this, 0.5f);
+        popupWindow.setBackgroundDrawable(new BitmapDrawable());
+        popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
+        // 显示的位置为:屏幕的宽度的一半-PopupWindow的高度的一半
+       // popupWindow.showAsDropDown(parent, windowManager.getDefaultDisplay().getWidth(), 0);
+        popupWindow .showAtLocation(activity.getWindow().getDecorView(), Gravity.CENTER, 0, 0);
+        
+    }
+    
+    
+    private PopupWindow pListWindow = null;
+    TextView mClearTxt;
+    ListView lv_data;
+    LayoutShoppingCartItemAdapter layoutShoppingCartItemAdapter;
+    public void showShopWindow(View parent){
+        View view = null;
+        WindowManager windowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
+        if (pListWindow == null) {
+            LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+            view = layoutInflater.inflate(R.layout.layout_shopping_cart_panel, null);
+            mClearTxt=view.findViewById(R.id.txt_clear);
+            lv_data=view.findViewById(R.id.lv_data);
+            layoutShoppingCartItemAdapter=new LayoutShoppingCartItemAdapter(mContext);
+            lv_data.setAdapter(layoutShoppingCartItemAdapter);
+            pListWindow= new PopupWindow(view,
+                    windowManager.getDefaultDisplay().getWidth(),
+                    windowManager.getDefaultDisplay().getHeight()/2);
+            
+        }
+        ShoppingCart shoppingCart = ShoppingCart.getInstance();
+        List<ShoppingEntity> entities = shoppingCart.getShoppingList();
+        LogUtil.d("ShopCar", "面板data:"+JSON.toJSONString(entities));
+        layoutShoppingCartItemAdapter.setItems(entities);
+        pListWindow.setFocusable(true);
+        pListWindow.setOutsideTouchable(true);
+        pListWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                DisplayUtil.backgroundAlpha(activity, 1f);
+            }
+        });
+        DisplayUtil.backgroundAlpha(this, 0.5f);
+        pListWindow.setBackgroundDrawable(new BitmapDrawable());
+        pListWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
+        // 显示的位置为:屏幕的宽度的一半-PopupWindow的高度的一半
+        pListWindow.showAsDropDown(parent, windowManager.getDefaultDisplay().getWidth(), 0);
+    }
+    
 }

+ 60 - 0
app_modular/appbooking/src/main/java/com/modular/booking/activity/test/BottomSheetActivity.java

@@ -0,0 +1,60 @@
+package com.modular.booking.activity.test;
+
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+import android.widget.Button;
+
+import com.core.widget.CustomerListView;
+import com.flipboard.bottomsheet.BottomSheetLayout;
+import com.modular.booking.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+
+public class BottomSheetActivity extends AppCompatActivity {
+   
+    BottomSheetLayout mBottomSheetLayout;
+    Button button;
+    ListPanel listPanel;
+    CustomerListView lv_left;
+    CustomerListView lv_right;
+    List<String> data=new ArrayList<>();
+    ItemTestDataAdapter itemTestDataAdapter;
+
+
+     @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.layout_test_bottomsheet);
+         mBottomSheetLayout=findViewById(R.id.bottom_sheet_layout);
+                 button=findViewById(R.id.bt_bottom);
+         lv_left =findViewById(R.id.lv_left);
+                 lv_right=findViewById(R.id.lv_right);
+        for (int i = 0; i <15; i++) {
+            data.add("姓名:"+i);
+        }
+        itemTestDataAdapter=new ItemTestDataAdapter(this,data);
+        lv_left.setAdapter(itemTestDataAdapter);
+        
+        lv_right.setAdapter(itemTestDataAdapter);
+        
+        
+        listPanel=new ListPanel(this);
+        mBottomSheetLayout.showWithSheetView(  listPanel);
+        
+        button.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (! mBottomSheetLayout.isSheetShowing()){
+                    listPanel.updateData(BottomSheetActivity.this);
+                    mBottomSheetLayout.showWithSheetView(  listPanel);
+                }else{
+                    mBottomSheetLayout.dismissSheet();
+                }
+            }
+        });
+    }
+}

+ 73 - 0
app_modular/appbooking/src/main/java/com/modular/booking/activity/test/ItemTestDataAdapter.java

@@ -0,0 +1,73 @@
+package com.modular.booking.activity.test;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+import com.modular.booking.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ItemTestDataAdapter extends BaseAdapter {
+
+    private List<String> objects = new ArrayList<String>();
+
+    private Context context;
+    private LayoutInflater layoutInflater;
+
+    public ItemTestDataAdapter(Context context, List<String> objects) {
+        this.context = context;
+        this.layoutInflater = LayoutInflater.from(context);
+        this.objects=objects;
+    }
+
+    public List<String> getObjects() {
+        return objects;
+    }
+
+    public void setObjects(List<String> objects) {
+        this.objects = objects;
+        
+    }
+
+    @Override
+    public int getCount() {
+        return objects.size();
+    }
+
+    @Override
+    public String getItem(int position) {
+        return objects.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return position;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if (convertView == null) {
+            convertView = layoutInflater.inflate(R.layout.item_test_data, null);
+            convertView.setTag(new ViewHolder(convertView));
+        }
+        initializeViews((String)getItem(position), (ViewHolder) convertView.getTag());
+        return convertView;
+    }
+
+    private void initializeViews(String object, ViewHolder holder) {
+        //TODO implement
+    }
+
+    protected class ViewHolder {
+        private TextView tvName;
+
+        public ViewHolder(View view) {
+            tvName = (TextView) view.findViewById(R.id.tv_name);
+        }
+    }
+}

+ 51 - 0
app_modular/appbooking/src/main/java/com/modular/booking/activity/test/ListPanel.java

@@ -0,0 +1,51 @@
+package com.modular.booking.activity.test;
+
+import android.content.Context;
+import android.support.annotation.NonNull;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.ListView;
+
+import com.modular.booking.R;
+import com.modular.booking.adapter.LayoutShoppingCartItemAdapter;
+import com.modular.booking.model.ShoppingEntity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+
+/**
+ * Created by Arison on 2018/2/1.
+ */
+
+public class ListPanel extends FrameLayout {
+    
+    ListView lv_data;
+    List<String> data=new ArrayList<>();
+  
+    LayoutShoppingCartItemAdapter itemAdapter;
+    List<ShoppingEntity>  shoppingEntities=new ArrayList<>();
+    public ListPanel(@NonNull Context context) {
+        super(context);
+        View view= LayoutInflater.from(context).inflate(R.layout.activity_bottom_sheet, this);
+        lv_data=findViewById(R.id.lv_data);
+        updateData(context);
+    }
+
+    public  void updateData(@NonNull Context context) {
+        for (int i = 0; i <15; i++) {
+            data.add("姓名:"+i);
+            ShoppingEntity entity=new ShoppingEntity();
+            entity.setId("123"+i);
+            entity.setName("shangping"+i);
+            entity.setUnitPrice(12);
+            entity.setQuantity(2);
+            shoppingEntities.add(entity);
+        }
+        itemAdapter=new LayoutShoppingCartItemAdapter(context);
+        lv_data.setAdapter(itemAdapter);
+        itemAdapter.setItems(shoppingEntities);
+    }
+}

+ 3 - 0
app_modular/appbooking/src/main/java/com/modular/booking/activity/utils/ShoppingCart.java

@@ -181,4 +181,7 @@ public class ShoppingCart {
         return entities;
     }
 
+
+
+  
 }

+ 11 - 7
app_modular/appbooking/src/main/java/com/modular/booking/adapter/ItemDishPinnedListAdapter.java

@@ -6,6 +6,7 @@ import android.view.View;
 import android.view.ViewGroup;
 import android.widget.BaseAdapter;
 import android.widget.ImageView;
+import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
@@ -105,7 +106,7 @@ public class ItemDishPinnedListAdapter extends BaseAdapter implements PinnedSect
        
             final Product product=productCategory.getProduct();
            int quantity = ShoppingCart.getInstance().getQuantityForProduct(product);
-      
+            viewHolder.product=product;
            AvatarHelper.getInstance().display("http://p0.meituan.net/deal/__16971854__3919079.jpg@380w_214h_1e_1c",  viewHolder. img_product_photo,true);
         
            LogUtil.d("ShopCar","---item----"+position);
@@ -143,18 +144,21 @@ public class ItemDishPinnedListAdapter extends BaseAdapter implements PinnedSect
         }
     }
     
-    class ItemViewHolder{
-        ImageView img_product_photo;
-        TextView  txt_product_name;
-        TextView  txt_product_month_sales;
-        TextView  txt_product_price;
-        ShoppingCountView shoppingCountView;
+   public class ItemViewHolder{
+       public  ImageView img_product_photo;
+       public  TextView  txt_product_name;
+       public  TextView  txt_product_month_sales;
+       public  TextView  txt_product_price;
+       public  ShoppingCountView shoppingCountView;
+       public  RelativeLayout rl_dish_product ;
+       public  Product  product;
         public ItemViewHolder(View convertView) {
             img_product_photo=convertView.findViewById(R.id.img_product_photo);
             txt_product_name=convertView.findViewById(R.id.txt_product_name);
             txt_product_month_sales=convertView.findViewById(R.id.txt_product_month_sales);
             txt_product_price =convertView.findViewById(R.id.txt_product_price);
             shoppingCountView=convertView.findViewById(R.id.shopping_count_view);
+          rl_dish_product=convertView.findViewById(R.id.rl_dish_product);
         }
     }
 }

+ 0 - 5
app_modular/appbooking/src/main/java/com/modular/booking/adapter/LayoutShoppingCartItemAdapter.java

@@ -7,7 +7,6 @@ import android.view.ViewGroup;
 import android.widget.BaseAdapter;
 import android.widget.TextView;
 
-import com.common.LogUtil;
 import com.core.app.MyApplication;
 import com.modular.booking.R;
 import com.modular.booking.activity.utils.ShoppingCart;
@@ -68,16 +67,13 @@ public class LayoutShoppingCartItemAdapter extends BaseAdapter {
     private void initializeViews(ShoppingEntity entity, ViewHolder holder) {
         holder.mNameTxt.setText(entity.getName());
         holder.mPriceTxt.setText(MyApplication.getInstance().getString(R.string.label_price, entity.getTotalPrice()));
-
         final Product finalProduct = entity.getProduct();
         int quantity = ShoppingCart.getInstance().getQuantityForProduct(finalProduct);
-        LogUtil.d("ShopCar","更新商品数量:"+quantity);
         holder. mShoppingCountView.setShoppingCount(quantity);
         holder. mShoppingCountView.setOnShoppingClickListener(new ShoppingCountView.ShoppingClickListener() {
             @Override
             public void onAddClick(int num) {
                 if (!ShoppingCart.getInstance().add(finalProduct)) {
-                    LogUtil.d("ShopCar","添加商品失败!");
                     int oldQuantity = ShoppingCart.getInstance().getQuantityForProduct(finalProduct);
                     holder.  mShoppingCountView.setShoppingCount(oldQuantity);
                 }
@@ -86,7 +82,6 @@ public class LayoutShoppingCartItemAdapter extends BaseAdapter {
             @Override
             public void onMinusClick(int num) {
                 if (!ShoppingCart.getInstance().delete(finalProduct)) {
-
                     int oldQuantity = ShoppingCart.getInstance().getQuantityForProduct(finalProduct);
                     holder. mShoppingCountView.setShoppingCount(oldQuantity);
                 }

+ 19 - 0
app_modular/appbooking/src/main/res/layout/activity_bottom_sheet.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="#FFFFFF"
+    android:orientation="vertical">
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="50dp" 
+        android:gravity="center"
+        android:text="标题栏"
+        android:background="@color/black"/>
+<ListView
+    android:id="@+id/lv_data"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+</ListView>
+</LinearLayout>

+ 27 - 11
app_modular/appbooking/src/main/res/layout/activity_dish_select.xml

@@ -4,9 +4,7 @@
     android:layout_height="match_parent"
     android:orientation="vertical"
     android:background="#EDEDED">
-    <include layout="@layout/include_add_top"
-        android:id="@+id/dish_layout_top"
-        ></include>
+    <include layout="@layout/include_add_top" android:id="@+id/dish_layout_top"></include>
 <!-- android:layout_below="@+id/dish_layout_top"-->
     <com.flipboard.bottomsheet.BottomSheetLayout
         android:id="@+id/bottom_sheet_layout"
@@ -22,12 +20,15 @@
             android:layout_width="100dp"
             android:layout_height="match_parent"
             android:scrollbars="none"
+            android:scrollingCache="false"
             />
         <com.core.widget.PinnedSectionListView
             android:id="@+id/lv_dish_product"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:background="@color/white"
+            android:fadingEdge="none"
+            android:scrollbars="none"
             android:scrollingCache="false"
             android:cacheColorHint="#00000000" />
     </LinearLayout>
@@ -75,13 +76,28 @@
                 android:gravity="center"
                 android:text="选好了"/>
         </LinearLayout>
-        <ImageView
-            android:id="@+id/ivShopCar"
-            android:layout_width="60dp"
-            android:layout_height="60dp"
-            android:layout_gravity="bottom"
-            android:layout_marginLeft="7dp"
-            android:layout_marginBottom="7dp"
-            android:src="@drawable/icon_shop_empty"/>
+       <FrameLayout
+           android:layout_width="wrap_content"
+           android:layout_height="wrap_content">
+  
+           <ImageView
+               android:id="@+id/ivShopCar"
+               android:layout_width="60dp"
+               android:layout_height="60dp"
+               android:layout_gravity="bottom"
+               android:layout_marginLeft="7dp"
+               android:layout_marginBottom="7dp"
+               android:src="@drawable/icon_shop_empty"/>
+           <TextView
+               android:id="@+id/num_tv"
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:layout_gravity="top|right"
+               android:background="@drawable/tab_unread_bg"
+               android:gravity="center"
+               android:text="1"
+               android:textColor="@android:color/white"
+               android:textSize="10.0dip" />
+       </FrameLayout>
     </FrameLayout>
 </RelativeLayout>

+ 98 - 0
app_modular/appbooking/src/main/res/layout/dialog_dish_product.xml

@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical" 
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:background="@color/white">
+<RelativeLayout
+    android:layout_width="match_parent"
+    android:layout_height="250dp">
+    <ImageView
+        android:id="@+id/iv_icon_product"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:scaleType="fitXY"
+        android:src="@drawable/defaultpic"/>
+    <TextView
+        android:id="@+id/tv_dish_desc"
+        android:layout_width="match_parent"
+        android:layout_alignParentBottom="true"
+        android:text="**************************************************************"
+        android:background="#80000000"
+        android:textSize="@dimen/sp_16"
+        android:textColor="@color/white"
+        android:padding="10dp"
+        android:layout_height="40dp" />
+</RelativeLayout>
+    <TextView
+        android:id="@+id/tv_dish_name"
+        android:layout_width="match_parent"
+        android:layout_height="40dp"
+        android:padding="10dp"
+        android:text="***********************"
+        android:textSize="@dimen/sp_16"
+        android:textColor="@color/black"/>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:weightSum="2">
+        <LinearLayout
+        android:layout_width="0dp"
+        android:layout_weight="1"
+        android:layout_height="match_parent"
+            android:orientation="vertical">
+            <TextView
+                android:id="@+id/txt_product_month_sales"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="14sp"
+                android:layout_marginTop="8dp"
+                android:layout_marginLeft="10dp"
+                android:textColor="#CBCBCB"
+                android:text="月销售0"
+                />
+            <TextView
+                android:id="@+id/txt_product_price"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="10dp"
+                android:layout_marginTop="@dimen/dp_4"
+                android:layout_marginBottom="10dp"
+                android:layout_below="@+id/txt_product_month_sales"
+                android:textSize="16sp"
+                android:text="¥0"
+                android:textColor="@color/orange" />
+        </LinearLayout>
+        <RelativeLayout
+            android:layout_width="0dp"
+            android:layout_weight="1"
+            android:layout_height="match_parent">
+            <TextView
+                android:id="@+id/tvShopSure"
+                android:layout_width="100dp"
+               android:layout_marginRight="@dimen/dp_10"
+                android:layout_height="wrap_content"
+                android:layout_centerInParent="true"
+                android:background="@drawable/shape_btn_blue_gradient"
+                android:textColor="@color/white"
+                android:padding="8dp"
+                android:text="加入购物车"
+                android:layout_alignParentRight="true" />
+            <com.modular.booking.widget.ShoppingCountView
+                android:id="@+id/shopping_count_view"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_centerInParent="true"
+                android:layout_marginRight="15dp"
+                app:scv_add_btn_bg_color="#3499DF"
+                app:scv_add_btn_text_color="@color/white"
+                app:scv_minus_btn_bg_color="@color/white"
+                app:scv_minus_btn_text_color="#3499DF"
+                android:visibility="gone">
+            </com.modular.booking.widget.ShoppingCountView>
+        </RelativeLayout>
+    </LinearLayout>
+</LinearLayout>

+ 3 - 3
app_modular/appbooking/src/main/res/layout/item_dish_list.xml

@@ -1,8 +1,8 @@
 <?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:id="@+id/rl_dish_product"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:background="@color/white">
@@ -27,7 +27,7 @@
 
         <TextView
             android:id="@+id/txt_product_name"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:textSize="14sp"
             android:textColor="#464646"
@@ -48,7 +48,7 @@
 
             <TextView
                 android:id="@+id/txt_product_month_sales"
-                android:layout_width="wrap_content"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:textSize="12sp"
                 android:textColor="#CBCBCB"

+ 13 - 0
app_modular/appbooking/src/main/res/layout/item_test_data.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical" android:layout_width="match_parent"
+    android:layout_height="match_parent">
+<TextView
+    android:id="@+id/tv_name"
+    android:layout_width="match_parent"
+    android:layout_height="50dp" 
+    android:layout_gravity="center"
+    android:gravity="center"
+    android:textSize="18sp"
+    android:text="湖畔"/>
+</LinearLayout>

+ 47 - 0
app_modular/appbooking/src/main/res/layout/layout_test_bottomsheet.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <com.flipboard.bottomsheet.BottomSheetLayout
+        android:id="@+id/bottom_sheet_layout"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginBottom="50dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@color/colorAccent">
+
+            <com.core.widget.CustomerListView
+                android:id="@+id/lv_left"
+                android:layout_width="100dp"
+                android:layout_height="match_parent"
+                android:fadingEdge="none"
+                android:scrollbars="none">
+
+            </com.core.widget.CustomerListView>
+
+        
+
+            <com.core.widget.CustomerListView
+                android:id="@+id/lv_right"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:fadingEdge="none"
+                android:scrollbars="none"
+                android:scrollingCache="false"
+                android:cacheColorHint="#00000000">
+
+            </com.core.widget.CustomerListView>
+        </LinearLayout>
+    </com.flipboard.bottomsheet.BottomSheetLayout>
+
+    <Button
+        android:id="@+id/bt_bottom"
+        android:layout_width="match_parent"
+        android:layout_height="50dp"
+        android:layout_alignParentBottom="true" />
+</RelativeLayout>

+ 15 - 4
app_modular/appbooking/src/main/res/values-en/strings.xml

@@ -29,10 +29,10 @@
     <string name="service_food_peoples">用餐人数</string>
     
     <!--预约功能-->
-    <string name="booking_personal">个人预约</string>
-    <string name="booking_business">商务预约</string>
-    <string name="booking_service">服务预约</string>
-    <string name="booking_share">共享预约</string>
+    <string name="booking_personal">Personal appointment</string>
+    <string name="booking_business">Business appointment</string>
+    <string name="booking_service">Service appointment</string>
+    <string name="booking_share">Sharing appointment</string>
 
     <string name="booking_add_company">企业</string>
     <string name="unspecified_hair_stylist">不指定发型师,预约门店</string>
@@ -41,6 +41,17 @@
     <string name="booking_serivce_technician">特聘技师</string>
     <string name="book_shopcart_clear">清空</string>
     <string name="tv_foods_dish">点菜</string>
+    <string name="fulldelicious">full delicious</string>
+    <string name="service_foods">餐饮</string>
+    <string name="fashion">时尚潮流</string>
+    <string name="beautysalons">beauty salons</string>
+    <string name="musicfestival">music festival</string>
+    <string name="takeaction">take action</string>
+    <string name="exercise">exercise</string>
+    <string name="discountforreservation">discount for reservation</string>
+    <string name="Club">club</string>
+    <string name="healthassistant">health assistant</string>
+    <string name="Hospitalregistration">hospital registration</string>
 
 
     <string-array name="booking_reject">

+ 11 - 0
app_modular/appbooking/src/main/res/values-zh-rCN/strings.xml

@@ -41,6 +41,17 @@
     <string name="booking_serivce_technician">特聘技师</string>
     <string name="book_shopcart_clear">清空</string>
     <string name="tv_foods_dish">点菜</string>
+    <string name="fulldelicious">美味齐全</string>
+    <string name="service_foods">餐饮</string>
+    <string name="fashion">时尚潮流</string>
+    <string name="beautysalons">美容美发</string>
+    <string name="musicfestival">音乐节</string>
+    <string name="takeaction">hi起来</string>
+    <string name="exercise">运动健身</string>
+    <string name="discountforreservation">预约有优惠</string>
+    <string name="Club">会所</string>
+    <string name="healthassistant">您的健康助手</string>
+    <string name="Hospitalregistration">医院挂号</string>
 
 
     <string-array name="booking_reject">

+ 11 - 0
app_modular/appbooking/src/main/res/values-zh-rTW/strings.xml

@@ -41,6 +41,17 @@
     <string name="booking_serivce_technician">特聘技师</string>
     <string name="book_shopcart_clear">清空</string>
     <string name="tv_foods_dish">点菜</string>
+    <string name="fulldelicious">美味齐全</string>
+    <string name="service_foods">餐饮</string>
+    <string name="fashion">时尚潮流</string>
+    <string name="beautysalons">美容美发</string>
+    <string name="musicfestival">音乐节</string>
+    <string name="takeaction">hi起来</string>
+    <string name="exercise">运动健身</string>
+    <string name="discountforreservation">预约有优惠</string>
+    <string name="Club">会所</string>
+    <string name="healthassistant">您的健康助手</string>
+    <string name="Hospitalregistration">医院挂号</string>
 
 
     <string-array name="booking_reject">

+ 11 - 0
app_modular/appbooking/src/main/res/values/strings.xml

@@ -55,4 +55,15 @@
     <string name="dialog_clear_shopping_cart_message">你确认清空购物车?一旦清空将不可恢复</string>
     <string name="tv_shop_empty">您的购物车空空如洗哦</string>
     <string name="tv_foods_dish">点菜</string>
+    <string name="fulldelicious">美味齐全</string>
+    <string name="service_foods">餐饮</string>
+    <string name="fashion">时尚潮流</string>
+    <string name="beautysalons">美容美发</string>
+    <string name="musicfestival">音乐节</string>
+    <string name="takeaction">hi起来</string>
+    <string name="exercise">运动健身</string>
+    <string name="discountforreservation">预约有优惠</string>
+    <string name="Club">会所</string>
+    <string name="healthassistant">您的健康助手</string>
+    <string name="Hospitalregistration">医院挂号</string>
 </resources>

+ 2 - 5
app_third/MPAndroidChart/build.gradle

@@ -1,8 +1,8 @@
 apply plugin: 'com.android.library'
 
 android {
-    compileSdkVersion rootProject.ext.android.compileSdkVersion
-    buildToolsVersion rootProject.ext.android.buildToolsVersion
+    compileSdkVersion 26
+    buildToolsVersion '27.0.0'
     defaultConfig {
         minSdkVersion rootProject.ext.android.minSdkVersion
         targetSdkVersion rootProject.ext.android.targetSdkVersion
@@ -18,7 +18,4 @@ android {
 }
 
 dependencies {
-    compile fileTree(dir: 'libs', include: ['*.jar'])
-    testCompile deps.junit
-    compile deps.appcompatV7
 }

+ 1 - 1
version.gradle

@@ -50,7 +50,7 @@ ext {
             smartRefreshLayoutVersion           : '1.0.4',
             rxJava2Version                      : '2.0.7',
             rxAndroid2Version                   : '2.0.1',
-            bottomsheetVersion                  : '1.5.0'
+            bottomsheetVersion                  : '1.5.3'
     ]
 
     deps = [