raomeng 8 лет назад
Родитель
Сommit
42bbc5a50e

BIN
WeiChat/src/main/res/drawable-xhdpi/oa_rb.png


BIN
WeiChat/src/main/res/drawable-xhdpi/oa_rb_pass.png


+ 4 - 4
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Wed Nov 29 15:33:40 CST 2017
+#Tue Nov 28 17:53:50 CST 2017
 debugName=1
-versionName=651
-debugCode=90
-versionCode=151
+versionName=620
+debugCode=178
+versionCode=120

+ 310 - 0
app_core/common/src/main/java/com/core/utils/NoticeView.java

@@ -0,0 +1,310 @@
+package com.base.adev.view;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.Handler;
+import android.os.Message;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.util.TypedValue;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextSwitcher;
+import android.widget.TextView;
+import android.widget.ViewSwitcher;
+
+import com.base.adev.R;
+
+import java.util.ArrayList;
+import java.util.Timer;
+import java.util.TimerTask;
+
+/**
+ * 垂直滚动的广告栏
+ */
+public class NoticeView extends TextSwitcher implements ViewSwitcher.ViewFactory, View.OnTouchListener {
+
+    private static final String TAG = "SwitcherView";
+
+    private Handler handler = new Handler();
+    private Timer timer;   //计时器
+    /**
+     * 数据源
+     */
+    private ArrayList<String> dataSource = new ArrayList<>();
+    /**
+     * 滚动的位置
+     */
+    private int currentIndex = 0;
+    /**
+     * 文字大小
+     */
+    private int textSize = 0;
+    /**
+     * 默认文字大小
+     */
+    private static final int defaultTextSize = 16;
+    /**
+     * 默认颜色
+     */
+    private int textColor = 0xFF000000;
+    /**
+     * 时间周期
+     */
+    private int timePeriod = 3000;
+    /**
+     * 是否可以执行更换滚动动作
+     */
+    private boolean flag = true;
+    /**
+     * 点击事件
+     */
+    private OnItemClick onItemClick = null;
+
+    private TextView tView;
+    /**
+     * 暂停时间
+     */
+    private int time;
+
+    public NoticeView(Context context) {
+        this(context, null);
+    }
+
+    public NoticeView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init(context, attrs);
+    }
+
+    private void init(Context context, AttributeSet attrs) {
+        TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.NoticeView);
+        //获取xml文件中属性,如果没有用默认属性
+        textColor = ta.getColor(R.styleable.NoticeView_noticeTextColor, textColor);
+        timePeriod = ta.getInt(R.styleable.NoticeView_noticeRollingTime, timePeriod);
+        textSize = ta.getDimensionPixelSize(R.styleable.NoticeView_noticeTextSize, sp2px(defaultTextSize));
+        Log.i("----", textSize + "");
+        textSize = px2sp(textSize);
+        Log.i("----", textSize + "");
+        ta.recycle();
+
+        setOnTouchListener(this);
+    }
+
+    @Override
+    public View makeView() {
+        tView = new TextView(getContext());
+        tView.setLayoutParams(new LayoutParams(
+                ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
+        tView.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize);
+        tView.setTextColor(textColor);
+        tView.setSingleLine();
+        tView.setGravity(Gravity.CENTER_VERTICAL);
+        tView.setEllipsize(TextUtils.TruncateAt.END);
+        return tView;
+    }
+
+    /**
+     * 对数据进行赋值
+     *
+     * @param dataSource string数据集合
+     */
+    public void setResource(ArrayList<String> dataSource) {
+        this.dataSource = dataSource;
+    }
+
+    TimerTask timerTask;
+
+    private void updateTextSwitcher() {
+        if (dataSource != null && dataSource.size() > 0) {
+            String text = dataSource.get(currentIndex++);
+            Log.e("text", text);
+//            this.setText(dataSource.get(currentIndex++));
+            this.setText(text);
+            if (currentIndex > dataSource.size() - 1) {
+                currentIndex = 0;
+            }
+        }
+    }
+
+    /**
+     * 转动方法
+     */
+    public void startRolling() {
+        if (timer == null) {
+            this.setFactory(this);
+            this.setInAnimation(getContext(), R.anim.m_switcher_vertical_in);
+            this.setOutAnimation(getContext(), R.anim.m_switcher_vertical_out);
+            timer = new Timer();
+            timerTask = new TimerTask() {
+                @Override
+                public void run() {
+                    Message message = new Message();
+                    message.what = 1;
+                    handler_run.sendMessage(message);
+                }
+            };
+            timer.schedule(timerTask, 1000, time);
+        }
+    }
+
+    /**
+     * 获取指定item内容,根据需求进行封装修改
+     *
+     * @return 指定item内容
+     */
+    public String getCurrentItem() {
+        if (dataSource != null && dataSource.size() > 0) {
+            return dataSource.get(getCurrentIndex());
+        } else {
+            return "";
+        }
+    }
+
+    /**
+     * 获取点击序列号
+     *
+     * @return 点击序列号
+     */
+    public int getCurrentIndex() {
+        int index = currentIndex - 1;
+        if (index < 0) {
+            index = dataSource.size() - 1;
+        }
+        return index;
+    }
+
+    /**
+     * 停止销毁控件
+     */
+    public void onDestroy() {
+        handler.removeCallbacksAndMessages(null);
+        handler = null;
+        if (timer != null) {
+            timer.cancel();
+            timerTask.cancel();
+            timer = null;
+            timerTask = null;
+        }
+        if (dataSource != null && dataSource.size() > 0) {
+            dataSource.clear();
+            dataSource = null;
+        }
+        tView = null;
+    }
+
+    //初始点击
+    float startX, startY;
+    //移动长度
+    float x, y;
+    //是否执行点击事件
+    boolean go = true;
+    //开始时间
+    long startTime;
+
+    @Override
+    public boolean onTouch(View v, MotionEvent event) {
+
+        //判断移动坐标
+        if (event.getAction() == MotionEvent.ACTION_DOWN) {
+            //点击没有赋值时的反应,防止崩溃
+            go = true;
+            startX = event.getX();
+            startY = event.getY();
+            startTime = System.currentTimeMillis();
+            flag = false;
+        } else if (event.getAction() == MotionEvent.ACTION_MOVE) {
+            x = event.getX() - startX;
+            y = event.getY() - startY;
+            long moveTime = (System.currentTimeMillis() - startTime);//移动时间毫秒
+            Log.e("moveTime", moveTime + "");
+            //移动时间小于500毫秒,横纵移动小于50执行点击事件
+            if (moveTime > 500 || x > 50 || y > 50) {
+                go = false;
+            }
+        } else if (event.getAction() == MotionEvent.ACTION_UP) {
+            if (getCurrentIndex() != -1 && go) {
+                onItemClick.Click(getCurrentIndex());
+            }
+            flag = true;
+        }
+        //true能够执行整个移动过程,false只能执行到一个
+        return true;
+
+    }
+
+    public int sp2px(int spVal) {
+        return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, spVal, getResources().getDisplayMetrics());
+    }
+
+    public int dp2px(int dpVal) {
+        return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dpVal, getResources().getDisplayMetrics());
+
+    }
+
+    public int px2sp(float pxValue) {
+        final float fontScale = getResources().getDisplayMetrics().scaledDensity;
+        return (int) (pxValue / fontScale + 0.5f);
+    }
+
+
+    private Handler handler_run = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            if (flag) {
+                updateTextSwitcher();
+                startRolling();
+            }
+            // 要做的事情
+            super.handleMessage(msg);
+        }
+    };
+
+
+    /**
+     * @param time 持续时间
+     */
+    public void start(int time) {
+        this.time = time;
+        startRolling();
+
+    }
+
+    /**
+     * 重新启动
+     */
+    public void onResume() {
+        if (timer != null) {
+            timer.cancel();
+        }
+        timer = new Timer();
+        timerTask = new TimerTask() {
+            @Override
+            public void run() {
+                Message message = new Message();
+                message.what = 1;
+                handler_run.sendMessage(message);
+            }
+        };
+        timer.schedule(timerTask, 1000, time);
+    }
+
+    public void onStop() {
+        if (timer != null) {
+            timer.cancel();
+        }
+    }
+
+    /**
+     * 定义点击接口
+     */
+    public interface OnItemClick {
+        public void Click(int index);
+    }
+
+    public void setOnItemClick(OnItemClick onItemClick) {
+        this.onItemClick = onItemClick;
+    }
+}

+ 0 - 0
app_core/common/src/main/res/anim/anim_rotate_button2.xml → app_core/common/src/main/res/anim/anim_rotate_button_fold.xml


+ 0 - 0
app_core/common/src/main/res/anim/anim_rotate_button.xml → app_core/common/src/main/res/anim/anim_rotate_button_spread.xml


+ 0 - 0
app_modular/appworks/src/main/res/anim/announce_enter_bottom.xml → app_core/common/src/main/res/anim/announce_enter_bottom.xml


+ 0 - 0
app_modular/appworks/src/main/res/anim/announce_leave_top.xml → app_core/common/src/main/res/anim/announce_leave_top.xml


+ 3 - 0
app_core/common/src/main/res/values/colors.xml

@@ -338,4 +338,7 @@
     <color name="data_inquiry_gird_menu_color6">#68d2c9</color>
     <color name="data_inquiry_caption_textcolor">#999999</color>
     <color name="data_inquiry_value_textcolor">#333333</color>
+    
+    <!--服务预约-->
+    <color name="blue_seats_num">#2E94DD</color>
 </resources>

+ 109 - 7
app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServiceAddActivity.java

@@ -43,6 +43,7 @@ import com.core.utils.CommonUtil;
 import com.core.utils.ToastUtil;
 import com.core.utils.helper.AvatarHelper;
 import com.core.widget.view.Activity.SelectActivity;
+import com.core.widget.view.SwitchView;
 import com.core.widget.view.selectcalendar.SelectCalendarActivity;
 import com.core.xmpp.model.AddAttentionResult;
 import com.me.network.app.http.HttpClient;
@@ -91,6 +92,12 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
     private String dataService;//详情数据
     private boolean isHasPerson;//是否指定了人员
     private AddSubUtils addSubUtils;
+    private String sb_sex="0";//默认女士
+    
+    //餐饮
+    private TextView tvMSeatsName,tvMSeatsNum,tvZSeatsName,tvZSeatsNum,tvDSeatsName,tvDSeatsNum;
+    private TextView tv_food_seats;
+    private SwitchView sv_food_rooms;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -139,6 +146,18 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
         tv_title = (TextView) findViewById(R.id.tv_title);
         tv_sub = (TextView) findViewById(R.id.tv_sub);
 
+        tv_food_seats=(TextView) findViewById(R.id .tv_food_seats);
+        tvMSeatsName=(TextView) findViewById(R.id .tvMSeatsName);
+        tvMSeatsNum=(TextView) findViewById(R.id .tvMSeatsNum);
+
+        tvZSeatsName=(TextView) findViewById(R.id .tvZSeatsName);
+        tvZSeatsNum=(TextView) findViewById(R.id .tvZSeatsNum);
+
+        tvDSeatsName=(TextView) findViewById(R.id .tvDSeatsName);
+        tvDSeatsNum=(TextView) findViewById(R.id .tvDSeatsNum);
+
+        sv_food_rooms=(SwitchView)findViewById(R.id.sv_food_rooms);
+
         submit_btn.setOnClickListener(this);
         et_book_name.setText(CommonUtil.getName());
         et_book_phone.setText(MyApplication.getInstance().mLoginUser.getTelephone());
@@ -174,9 +193,11 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                 .setOnChangeValueListener(new AddSubUtils.OnChangeValueListener() {
                     @Override
                     public void onChangeValue(int value, int position) {
-                        // Toast.makeText(mContext, "当前值:" + value, Toast.LENGTH_SHORT).show();
                         tv_food_peoples.setText(String.valueOf(value));
                         tv_food_peoples.setVisibility(View.GONE);
+                        if (!StringUtil.isEmpty(tv_food_times.getText().toString())) {
+                            searchSeatNumbers(tv_food_times.getText().toString(), model.getCompanyid());
+                        }
                     }
                 });
         tv_food_peoples.setText("1");
@@ -186,6 +207,18 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
             public void onCheckedChanged(RadioGroup group, int checkedId) {
                 RadioButton radioButton = (RadioButton)findViewById(rg_sex.getCheckedRadioButtonId());
                 ToastMessage("id:"+radioButton.getId()+"text:"+radioButton.getText().toString());
+                if (radioButton.getText().toString().equals("先生")){
+                    sb_sex="0";
+                }else if(radioButton.getText().toString().equals("女士")){
+                    sb_sex="1";
+                }
+            }
+        });
+
+        sv_food_rooms.setOnCheckedChangeListener(new SwitchView.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(View view, boolean isChecked) {
+                ToastMessage("isChecked:"+isChecked);
             }
         });
     }
@@ -804,8 +837,10 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
             progressDialog.dismiss();
             return;
         } else {
+            map.put("sb_sex",sb_sex);
             LogUtil.i("map=1" + JSONUtil.map2JSON(map));
             LogUtil.i("map=2" + JSON.toJSONString(map));
+            
 //			if (1 == 1) {
 //				submiting = false;
 //				progressDialog.dismiss();
@@ -901,6 +936,7 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                     //sb_enddate的格式是yyyy-MM-dd HH:mm:ss
                     setTime(map, tv_food_times);
                 }
+                //选包间和选桌位
                 if (!TextUtils.isEmpty(tv_food_rooms.getText())) {
                     map.put("sb_spname", tv_food_rooms.getText());
                 }
@@ -1451,10 +1487,26 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
     }
     
     
+    //人数默认是1  小桌
+    //选择时间
     //查询桌子余量
     public void searchSeatNumbers(String yearmonth,String companyid){
         //companyid,userid,yearmonth,token
-        LogUtil.i("yearmonth:"+yearmonth+"  companyid:"+companyid);
+        showLoading();
+        String peopleNumber=tv_food_peoples.getText().toString();
+        String aType="小桌";
+        if (Integer.valueOf(peopleNumber)>2&&Integer.valueOf(peopleNumber)<=5){
+            //中
+            aType="中桌";
+        }else  if(Integer.valueOf(peopleNumber)>5){
+            //大
+            aType="大桌";
+        }else{
+            //小
+            aType="小桌";
+        }
+        final String  asType=aType;
+        LogUtil.i("座位:"+asType+"yearmonth:"+yearmonth+"  companyid:"+companyid+" peopleNumber:"+peopleNumber);
           HttpClient httpClient=new HttpClient.Builder(Constants.IM_BASE_URL()).build();
                  httpClient.Api().send(new HttpClient.Builder()
                  .url("/user/appLineList")
@@ -1467,19 +1519,69 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
           
                      @Override
                      public void onResponse(Object o) {
+                         dimssLoading();
                          try {
                              LogUtil.i(TAG,o.toString());
                              JSONArray deskbook=JSON.parseObject(o.toString()).getJSONArray("deskbook");
-                             if (deskbook==null){
-                                 //隐藏桌子余量
+                             JSONArray desklist=JSON.parseObject(o.toString()).getJSONArray("desklist");
+                             if (!ListUtils.isEmpty(deskbook)){
+                                 for (int i = 0; i <deskbook.size() ; i++) {
+                                     JSONObject object=deskbook.getJSONObject(i);
+                                     String number= object.getString("number");//预约量
+                                     String booknumber=object.getString("booknumber");//总预约量
+                                     String deskcode=object.getString("deskcode");//桌位编号
+                                     Integer bookednumber=Integer.valueOf(booknumber)-Integer.valueOf(number);
+                                     //tv_food_seats.setText("仅剩"+bookednumber+"桌");
+                                     tv_food_seats.setTag(0,bookednumber);
+                                     tv_food_seats.setTag(1,deskcode);
+                                     CommonUtil.textSpanForStyle(tv_food_seats,"仅剩"+bookednumber+"桌",String.valueOf(bookednumber),ct.getResources().getColor(R.color.blue_seats_num));
+                                 }
+                             }else{
+                                 //隐藏
                              }
-                             if (deskbook.size()==0){
-                                 //隐藏桌子余量
+                             if (desklist!=null){
+//                                         "as_booknumber":"70",
+//                                         "as_companyid":"10002",
+//                                         "as_deskcode":"C",
+//                                         "as_id":"3",
+//                                         "as_number":"30",
+//                                         "as_remark":"1-2人",
+//                                         "as_type":"小桌"
+                                 for (int i = 0; i <desklist.size() ; i++) {
+                                     JSONObject object=desklist.getJSONObject(i);
+                                    String as_type= object.getString("as_type");
+                                    String as_number=object.getString("as_number");
+                                    String as_remark=object.getString("as_remark");
+                                    String as_deskcode=object.getString("as_deskcode");
+                                    if (ListUtils.isEmpty(deskbook)) {
+                                        if (as_type.equals(asType)) {
+                                            //tv_food_seats.setText("仅剩"+as_number+"桌");
+                                            CommonUtil.textSpanForStyle(tv_food_seats,"仅剩"+as_number+"桌",as_number,ct.getResources().getColor(R.color.blue_seats_num));
+                                            tv_food_seats.setTag(0,as_number);
+                                            tv_food_seats.setTag(1,as_deskcode);//桌位编号
+                                        }
+                                    }
+                                    if ("小桌".equals(as_type)){
+                                        tvMSeatsName.setText("小桌("+as_remark+")");
+                                       // CommonUtil.textSpanForStyle( tvMSeatsName,"小桌("+as_remark+")",as_remark,ct.getResources().getColor(R.color.yellow_home));
+                                        //tvMSeatsNum.setText("前方"+as_number+"桌");
+                                        CommonUtil.textSpanForStyle(tvMSeatsNum,"前方"+as_number+"桌",as_number,ct.getResources().getColor(R.color.blue_seats_num));
+                                    }
+                                    if ("中桌".equals(as_type)){
+                                        tvZSeatsName.setText("中桌("+as_remark+")");
+                                        //tvZSeatsNum.setText("前方"+as_number+"桌");
+                                        CommonUtil.textSpanForStyle(tvZSeatsNum,"前方"+as_number+"桌",as_number,ct.getResources().getColor(R.color.blue_seats_num));
+                                    }
+                                    if ("大桌".equals(as_type)){
+                                        tvDSeatsName.setText("大桌("+as_remark+")");
+                                       // tvDSeatsNum.setText("前方"+as_number+"桌");
+                                        CommonUtil.textSpanForStyle(tvDSeatsNum,"前方"+as_number+"桌",as_number,ct.getResources().getColor(R.color.blue_seats_num));
+                                    }
+                                 }
                              }
                              
                              
                              
-                             
                          } catch (Exception e) {
                              e.printStackTrace();
                          }

+ 16 - 0
app_modular/appbooking/src/main/res/drawable/shape_sample_one_1dp.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+    <corners
+        android:topLeftRadius="6dp"
+        android:topRightRadius="6dp"
+        android:bottomRightRadius="6dp"
+        android:bottomLeftRadius="6dp">
+    </corners>
+    <stroke
+        android:width="1dp"
+        android:color="#C2E1F8">
+    </stroke>
+    <solid
+        android:color="#D9EFFF">
+    </solid>
+</shape>

+ 83 - 202
app_modular/appbooking/src/main/res/layout/activity_bservice_add.xml

@@ -7,7 +7,7 @@
     android:fillViewport="true"
     android:scrollbars="none"
     tools:context="com.modular.booking.activity.services.BServiceAddActivity">
-
+    
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
@@ -16,61 +16,7 @@
         android:focusableInTouchMode="true"
         android:orientation="vertical">
 
-        <!--抬头信息-->
-        <RelativeLayout
-            android:layout_width="match_parent"
-            android:layout_height="80dp"
-            android:layout_centerHorizontal="true">
-
-            <ImageView
-                android:id="@+id/max_img"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:alpha="0.16"
-                android:scaleType="fitXY" />
-
-            <de.hdodenhof.circleimageview.CircleImageView
-                android:id="@+id/iv_header"
-                android:layout_width="55dp"
-                android:layout_height="55dp"
-                android:layout_alignParentLeft="true"
-                android:layout_alignParentStart="true"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="12dp"
-                android:layout_marginStart="12dp"
-                android:background="@null"
-                android:src="@drawable/defaultpic"></de.hdodenhof.circleimageview.CircleImageView>
-
-            <LinearLayout
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="15dp"
-                android:layout_toRightOf="@+id/iv_header"
-                android:orientation="vertical">
-
-                <TextView
-                    android:id="@+id/tv_title"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:drawableLeft="@drawable/icon_detail"
-                    android:gravity="center_vertical"
-                    android:text="********"
-                    android:textColor="@color/black"
-                    android:textSize="20sp"
-                    android:textStyle="bold" />
-
-                <TextView
-                    android:id="@+id/tv_sub"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:drawableLeft="@drawable/icon_map"
-                    android:gravity="center_vertical"
-                    android:text="********"
-                    android:textColor="@color/black"
-                    android:textSize="14sp" />
-            </LinearLayout>
-        </RelativeLayout>
+        <include layout="@layout/include_add_top"></include>
 
         <!--KTV-->
         <LinearLayout
@@ -464,8 +410,7 @@
             android:id="@+id/ll_food"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:orientation="vertical"
-            >
+            android:orientation="vertical">
 
             <RelativeLayout
                 android:id="@+id/food_peoples_rl"
@@ -583,160 +528,96 @@
                     android:text="仅限1桌"
                     android:textColor="@color/hintColor" />
             </RelativeLayout>
-        </LinearLayout>
-
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="10dp" />
-
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-
-            <RelativeLayout
-                android:id="@+id/name_rl"
-                style="@style/item_menu">
-
-                <TextView
-                    android:id="@+id/tag_book_name"
-                    style="@style/item_menu_tag"
-                    android:layout_alignParentLeft="true"
-                    android:layout_alignParentStart="true"
-                    android:layout_alignParentTop="true"
-                    android:gravity="center_vertical"
-                    android:text="@string/service_name" />
-
-                <EditText
-                    android:id="@+id/et_book_name"
-                    style="@style/item_menu_input"
-                    android:layout_width="290dp"
-                    android:layout_toRightOf="@id/tag_book_name"
-                    android:drawablePadding="6dp"
-                    android:ellipsize="end"
-                    android:hint="@string/common_input2" />
-
-            </RelativeLayout>
-
-            <RelativeLayout
-                android:id="@+id/sex_rl"
-                style="@style/item_menu">
-
-                <TextView
-                    android:id="@+id/tag_book_sex"
-                    style="@style/item_menu_tag"
-                    android:layout_alignParentLeft="true"
-                    android:layout_alignParentStart="true"
-                    android:layout_alignParentTop="true"
-                    android:gravity="center_vertical"
-                    android:text="性别" />
 
-                <RadioGroup
-                    android:id="@+id/rg_sex"
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:gravity="center"
-                    android:layout_toRightOf="@+id/tag_book_sex"
-                    android:orientation="horizontal" >
-
-                    <RadioButton
-                        android:id="@+id/rb_boy"
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@color/me_menu_item_normal"
+                android:layout_marginTop="10dp"
+                android:orientation="vertical">
+                  <TextView
+                      android:layout_width="wrap_content"
+                      android:layout_height="wrap_content" 
+                      android:layout_margin="10dp"
+                      
+                      android:textColor="#6EAEE4"
+                      android:textStyle="bold"
+                      android:text="排队实况"/>
+
+                <RelativeLayout
+                    style="@style/item_menu"
+                    android:layout_margin="5dp"
+                    android:background="@drawable/shape_sample_one_1dp">
+                    <TextView
+                        android:id="@+id/tvMSeatsName"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content" 
+                        android:layout_centerVertical="true"
+                        android:textStyle="bold"
+                        android:text="小桌(1-2人)"
+                        android:layout_alignParentLeft="true"/>
+
+                    <TextView
+                        android:id="@+id/tvMSeatsNum"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_marginLeft="130dp"
-                        android:checked="true"
-                        android:button="@null"
-                        android:drawableLeft="@drawable/oa_rb_button_bg"
-                        android:text="先生" />
-
-                    <RadioButton
-                        android:id="@+id/rb_girl"
+                        android:layout_centerVertical="true"
+                        android:textStyle="bold"
+                        android:text="前方8桌"
+                        android:layout_alignParentRight="true"/>
+                </RelativeLayout>
+
+                <RelativeLayout
+                    android:background="@drawable/shape_sample_one_1dp"
+                    android:layout_margin="5dp"
+                    style="@style/item_menu">
+                    <TextView
+                        android:id="@+id/tvZSeatsName"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_marginLeft="20dp"
-      
-                        android:button="@null"
-                        android:drawableLeft="@drawable/oa_rb_button_bg"
-                        android:text="女士" />
-                </RadioGroup>
-
-            </RelativeLayout>
-            <RelativeLayout
-                android:id="@+id/phone_rl"
-                style="@style/item_menu">
-
-                <TextView
-                    android:id="@+id/tag_book_phone"
-                    style="@style/item_menu_tag"
-                    android:layout_alignParentLeft="true"
-                    android:layout_alignParentStart="true"
-                    android:layout_alignParentTop="true"
-                    android:gravity="center_vertical"
-                    android:text="@string/service_phone" />
-
-                <EditText
-                    android:id="@+id/et_book_phone"
-                    style="@style/item_menu_input"
-                    android:layout_width="110dp"
-                    android:drawableLeft="@drawable/icon_tel"
-                    android:drawablePadding="2dp"
-                    android:ellipsize="end"
-                    android:hint="@string/common_input2"
-                    android:inputType="phone"
-                    android:textColor="#0CB88C" />
-
-            </RelativeLayout>
-            <RelativeLayout
-                android:id="@+id/notes_rl"
-                android:layout_marginTop="10dp"
-                android:layout_height="wrap_content"
-                style="@style/item_menu">
-
-                <TextView
-                    android:id="@+id/tag_book_notes"
-                    style="@style/item_menu_tag"
-                    android:layout_width="50dp"
-                    android:layout_alignParentLeft="true"
-                    android:layout_alignParentStart="true"
-                    android:layout_alignParentTop="true"
-                    android:gravity="center_vertical"
-                    android:text="@string/service_notes" />
-
-                <EditText
-                    android:id="@+id/et_book_notes"
-                    style="@style/item_menu_input"
-                    android:gravity="top|left"
-                    android:layout_width="match_parent"
-                    android:layout_height="100dp"
-                    android:layout_toRightOf="@id/tag_book_notes"
-                    android:drawablePadding="6dp"
-                    android:hint="请输入您的要求,我们会尽量满足" />
+                        android:layout_centerVertical="true"
+                        android:textStyle="bold"
+                        android:text="中桌(3-5人)"
+                        android:layout_alignParentLeft="true"/>
 
+                    <TextView
+                        android:id="@+id/tvZSeatsNum"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_centerVertical="true"
+                        android:textStyle="bold"
+                        android:text="前方8桌"
+                        android:layout_alignParentRight="true"/>
+                </RelativeLayout>
+
+                <RelativeLayout
+                    android:background="@drawable/shape_sample_one_1dp"
+                    android:layout_margin="5dp"
+                    style="@style/item_menu">
+                    <TextView
+                        android:id="@+id/tvDSeatsName"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_centerVertical="true"
+                        android:textStyle="bold"
+                        android:text="大桌(6人以上)"
+                        android:layout_alignParentLeft="true"/>
 
-            </RelativeLayout>
+                    <TextView
+                        android:id="@+id/tvDSeatsNum"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_centerVertical="true"
+                        android:textStyle="bold"
+                        android:text="前方8桌"
+                        android:layout_alignParentRight="true"/>
+                </RelativeLayout>
+            </LinearLayout>
         </LinearLayout>
 
-        <RelativeLayout
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_marginBottom="30dp"
-            android:layout_marginTop="60dp">
+  
+     <include layout="@layout/include_add_bottom"></include>
 
-            <Button
-                android:id="@+id/submit_btn"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_alignParentBottom="true"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="20dp"
-                android:layout_marginRight="20dp"
-                android:background="@drawable/bg_bule_btn"
-                android:padding="10dp"
-                android:text="@string/app_button_commit"
-                android:textColor="@color/white"
-                android:textSize="@dimen/text_main" />
-        </RelativeLayout>
     </LinearLayout>
 
 </ScrollView>

+ 156 - 0
app_modular/appbooking/src/main/res/layout/include_add_bottom.xml

@@ -0,0 +1,156 @@
+<?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">
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="10dp" />
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <RelativeLayout
+            android:id="@+id/name_rl"
+            style="@style/item_menu">
+
+            <TextView
+                android:id="@+id/tag_book_name"
+                style="@style/item_menu_tag"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_alignParentTop="true"
+                android:gravity="center_vertical"
+                android:text="@string/service_name" />
+
+            <EditText
+                android:id="@+id/et_book_name"
+                style="@style/item_menu_input"
+                android:layout_width="290dp"
+                android:layout_toRightOf="@id/tag_book_name"
+                android:drawablePadding="6dp"
+                android:ellipsize="end"
+                android:hint="@string/common_input2" />
+
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/sex_rl"
+            style="@style/item_menu">
+
+            <TextView
+                android:id="@+id/tag_book_sex"
+                style="@style/item_menu_tag"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_alignParentTop="true"
+                android:gravity="center_vertical"
+                android:text="性别" />
+
+            <RadioGroup
+                android:id="@+id/rg_sex"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:gravity="center"
+                android:layout_toRightOf="@+id/tag_book_sex"
+                android:orientation="horizontal" >
+
+                <RadioButton
+                    android:id="@+id/rb_boy"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="130dp"
+                    android:checked="true"
+                    android:button="@null"
+                    android:drawableLeft="@drawable/oa_rb_button_bg"
+                    android:text="先生" />
+
+                <RadioButton
+                    android:id="@+id/rb_girl"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="20dp"
+
+                    android:button="@null"
+                    android:drawableLeft="@drawable/oa_rb_button_bg"
+                    android:text="女士" />
+            </RadioGroup>
+
+        </RelativeLayout>
+        <RelativeLayout
+            android:id="@+id/phone_rl"
+            style="@style/item_menu">
+
+            <TextView
+                android:id="@+id/tag_book_phone"
+                style="@style/item_menu_tag"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_alignParentTop="true"
+                android:gravity="center_vertical"
+                android:text="@string/service_phone" />
+
+            <EditText
+                android:id="@+id/et_book_phone"
+                style="@style/item_menu_input"
+                android:layout_width="110dp"
+                android:drawableLeft="@drawable/icon_tel"
+                android:drawablePadding="2dp"
+                android:ellipsize="end"
+                android:hint="@string/common_input2"
+                android:inputType="phone"
+                android:textColor="#0CB88C" />
+
+        </RelativeLayout>
+        <RelativeLayout
+            android:id="@+id/notes_rl"
+            android:layout_marginTop="10dp"
+            android:layout_height="wrap_content"
+            style="@style/item_menu">
+
+            <TextView
+                android:id="@+id/tag_book_notes"
+                style="@style/item_menu_tag"
+                android:layout_width="50dp"
+                android:layout_height="wrap_content"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_alignParentTop="true"
+                android:gravity="center_vertical"
+                android:text="@string/service_notes" />
+
+            <EditText
+                android:id="@+id/et_book_notes"
+                style="@style/item_menu_input"
+                android:gravity="top|left"
+                android:layout_width="match_parent"
+                android:layout_height="100dp"
+                android:layout_toRightOf="@id/tag_book_notes"
+                android:drawablePadding="6dp"
+                android:hint="请输入您的要求,我们会尽量满足" />
+
+
+        </RelativeLayout>
+    </LinearLayout>
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginBottom="30dp"
+        android:layout_marginTop="60dp">
+
+        <Button
+            android:id="@+id/submit_btn"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_alignParentBottom="true"
+            android:layout_marginBottom="10dp"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"
+            android:background="@drawable/bg_bule_btn"
+            android:padding="10dp"
+            android:text="@string/app_button_commit"
+            android:textColor="@color/white"
+            android:textSize="@dimen/text_main" />
+    </RelativeLayout>
+</LinearLayout>

+ 60 - 0
app_modular/appbooking/src/main/res/layout/include_add_top.xml

@@ -0,0 +1,60 @@
+<?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">
+    <!--抬头信息-->
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="80dp"
+        android:layout_centerHorizontal="true">
+
+        <ImageView
+            android:id="@+id/max_img"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:alpha="0.16"
+            android:scaleType="fitXY" />
+
+        <de.hdodenhof.circleimageview.CircleImageView
+            android:id="@+id/iv_header"
+            android:layout_width="55dp"
+            android:layout_height="55dp"
+            android:layout_alignParentLeft="true"
+            android:layout_alignParentStart="true"
+            android:layout_centerVertical="true"
+            android:layout_marginLeft="12dp"
+            android:layout_marginStart="12dp"
+            android:background="@null"
+            android:src="@drawable/defaultpic"></de.hdodenhof.circleimageview.CircleImageView>
+
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:layout_marginLeft="15dp"
+            android:layout_toRightOf="@+id/iv_header"
+            android:orientation="vertical">
+
+            <TextView
+                android:id="@+id/tv_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:drawableLeft="@drawable/icon_detail"
+                android:gravity="center_vertical"
+                android:text="********"
+                android:textColor="@color/black"
+                android:textSize="20sp"
+                android:textStyle="bold" />
+
+            <TextView
+                android:id="@+id/tv_sub"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:drawableLeft="@drawable/icon_map"
+                android:gravity="center_vertical"
+                android:text="********"
+                android:textColor="@color/black"
+                android:textSize="14sp" />
+        </LinearLayout>
+    </RelativeLayout>
+</LinearLayout>

+ 1 - 1
app_modular/appcontact/src/main/java/com/uas/appcontact/manager/ContactsManager.java

@@ -124,7 +124,7 @@ public class ContactsManager implements OnHttpResultListener {
 
     @Override
     public void error(int what, String message, Bundle bundle) {
-
+             
     }
 
 

+ 1 - 0
app_modular/appcontact/src/main/java/com/uas/appcontact/ui/fragment/ContactsFragment.java

@@ -330,6 +330,7 @@ public class ContactsFragment extends EasyFragment
     @Override
     public void callback(List<EmployeesEntity> employees) {
         try {
+            dimssLoading();
             final List<BaseSortModel<Friend>> friends = getFriendsByErpDB(employees);
             ThreadUtil.getInstance().addTask(new Runnable() {
                 @Override

+ 45 - 0
app_modular/appworks/src/main/java/com/uas/appworks/activity/CommonDataFormActivity.java

@@ -19,6 +19,7 @@ import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.AdapterView;
 import android.widget.BaseAdapter;
 import android.widget.Button;
 import android.widget.EditText;
@@ -39,9 +40,11 @@ import com.common.data.StringUtil;
 import com.common.preferences.PreferenceUtils;
 import com.common.ui.CameraUtil;
 import com.common.ui.ImageUtil;
+import com.core.api.wxapi.ApiBase;
 import com.core.api.wxapi.ApiPlatform;
 import com.core.api.wxapi.ApiUtils;
 import com.core.app.AppConfig;
+import com.core.app.AppConstant;
 import com.core.app.Constants;
 import com.core.app.MyApplication;
 import com.core.base.BaseActivity;
@@ -52,6 +55,7 @@ import com.core.utils.ToastUtil;
 import com.core.utils.pictureselector.ComPictureAdapter;
 import com.core.utils.time.wheel.DateTimePicker;
 import com.core.widget.view.Activity.ImgFileListActivity;
+import com.core.widget.view.Activity.MultiImagePreviewActivity;
 import com.core.widget.view.Activity.SelectActivity;
 import com.core.widget.view.ListViewInScroller;
 import com.core.widget.view.MyGridView;
@@ -1153,6 +1157,17 @@ public class CommonDataFormActivity extends BaseActivity implements View.OnClick
                         cAdapter.setmPhotoList(mPhotoList);
                         cAdapter.setMaxSiz(9);
                         grid_view.setAdapter(cAdapter);
+                        grid_view.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+                            @Override
+                            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                                int viewType = cAdapter.getItemViewType(position);
+                                if (viewType == 1) {
+                                    showSelectPictureDialog();//添加
+                                } else {
+                                    showPictureActionDialog(position); //删除
+                                }
+                            }
+                        });
                         select_img_layout.setVisibility(View.VISIBLE);
                     }
 
@@ -2715,4 +2730,34 @@ public class CommonDataFormActivity extends BaseActivity implements View.OnClick
 
     }
 
+
+    private void showPictureActionDialog(final int position) {
+        
+//        ToastMessage("删除的位置是:position:"+position);
+        String[] items = new String[]{getString(R.string.look_over), getString(R.string.common_delete)};
+        android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(this).setTitle(R.string.pictures)
+                .setSingleChoiceItems(items, 0, new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                        if (which == 0) {// 查看
+                            Intent intent = new Intent(CommonDataFormActivity.this, MultiImagePreviewActivity.class);
+                            intent.putExtra(AppConstant.EXTRA_IMAGES, mPhotoList);
+                            intent.putExtra(AppConstant.EXTRA_POSITION, position);
+                            intent.putExtra(AppConstant.EXTRA_CHANGE_SELECTED, false);
+                            startActivity(intent);
+                        } else {// 删除
+                            try {
+                                cAdapter.getmPhotoList().remove(position);
+                                cAdapter.notifyDataSetChanged();
+                                mAdapter.notifyDataSetChanged();
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                        }
+                        dialog.dismiss();
+                    }
+                });
+        builder.show();
+    }
+
 }

+ 1 - 1
version.gradle

@@ -9,7 +9,7 @@ ext {
             compileSdkVersion: 26,
             buildToolsVersion: '27.0.0',
             minSdkVersion    : 14,
-            targetSdkVersion : 26,
+            targetSdkVersion : 26,\
             javaVersion      : JavaVersion.VERSION_1_8,
             versionCode      : 130,
             versionName      : '6.0.6',