Browse Source

修改外勤打卡逻辑

Bitliker 8 years ago
parent
commit
ee73a491e2

+ 877 - 842
app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServiceAddActivity.java

@@ -4,6 +4,7 @@ import android.content.Intent;
 import android.os.Bundle;
 import android.text.TextUtils;
 import android.view.View;
+import android.view.WindowManager;
 import android.widget.Button;
 import android.widget.EditText;
 import android.widget.ImageView;
@@ -22,6 +23,7 @@ import com.core.app.Constants;
 import com.core.app.MyApplication;
 import com.core.base.OABaseActivity;
 import com.core.model.SelectBean;
+import com.core.net.utils.NetUtils;
 import com.core.utils.CommonUtil;
 import com.core.utils.ToastUtil;
 import com.core.utils.helper.AvatarHelper;
@@ -44,240 +46,242 @@ import de.hdodenhof.circleimageview.CircleImageView;
 import static com.common.data.JSONUtil.getJSONArray;
 
 public class BServiceAddActivity extends OABaseActivity implements View.OnClickListener {
-    private Button submit_btn;
-    private EditText et_book_notes, et_book_phone, et_book_name;//预约人的备注、电话、姓名
-    //餐饮
-    private TextView tv_food_times, tv_food_rooms, tv_food_peoples;//用餐时间、需要包厢、用餐人数
-    //  美容美发
-    private TextView tv_hair_times, tv_hair_rooms;//服务时间、服务项目
-    //  运动
-    private TextView tv_sport_time, tv_sport_rooms, tv_sport_peoples;//运动时间、运动项目、运动人数
-    //  医院挂号
-    private TextView tv_hospital_rooms, tag_hospital_doctor, tv_hospital_time;//科室、医生、时段
-    //  会所
-    private TextView tv_club_technician, tv_club_time, tv_club_peoples;//技师、时间、人数
-    //  KTV
-    private TextView tv_ktv_times, tv_ktv_rooms, tv_ktv_peoples;//时间、房间、人数
-    //抬头信息
-    private CircleImageView iv_header;
-    private ImageView max_img;
-    private TextView tv_title, tv_sub;
-    private SBListModel model;
-    private boolean submiting = false;
-    private String sb_userid, sb_username;
-    private String serviceId;//服务id
-    private String serviceName;//服务名称
-    private String dataService;//详情数据
-    private boolean isHasPerson;//是否指定了人员
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_bservice_add);
-        initView();
-        initData();
-    }
-
-
-    private void initView() {
-        submit_btn = (Button) findViewById(R.id.submit_btn);
-        et_book_notes = (EditText) findViewById(R.id.et_book_notes);
-        et_book_phone = (EditText) findViewById(R.id.et_book_phone);
-        et_book_name = (EditText) findViewById(R.id.et_book_name);
-
-        tv_food_times = (TextView) findViewById(R.id.tv_food_times);
-        tv_food_rooms = (TextView) findViewById(R.id.tv_food_rooms);
-        tv_food_peoples = (TextView) findViewById(R.id.tv_food_peoples);
-
-        tv_hair_rooms = (TextView) findViewById(R.id.tv_hair_rooms);
-        tv_hair_times = (TextView) findViewById(R.id.tv_hair_times);
-
-        tv_sport_peoples = (TextView) findViewById(R.id.tv_sport_peoples);
-        tv_sport_rooms = (TextView) findViewById(R.id.tv_sport_rooms);
-        tv_sport_time = (TextView) findViewById(R.id.tv_sport_time);
-
-        tv_hospital_rooms = (TextView) findViewById(R.id.tv_hospital_rooms);
-        tag_hospital_doctor = (TextView) findViewById(R.id.tag_hospital_doctor);
-        tv_hospital_time = (TextView) findViewById(R.id.tv_hospital_time);
-
-        tv_club_technician = (TextView) findViewById(R.id.tv_club_technician);
-        tv_club_time = (TextView) findViewById(R.id.tv_club_time);
-        tv_club_peoples = (TextView) findViewById(R.id.tv_club_peoples);
-
-        tv_ktv_times = (TextView) findViewById(R.id.tv_ktv_times);
-        tv_ktv_rooms = (TextView) findViewById(R.id.tv_ktv_rooms);
-        tv_ktv_peoples = (TextView) findViewById(R.id.tv_ktv_peoples);
-
-        iv_header = (CircleImageView) findViewById(R.id.iv_header);
-        max_img = (ImageView) findViewById(R.id.max_img);
-        tv_title = (TextView) findViewById(R.id.tv_title);
-        tv_sub = (TextView) findViewById(R.id.tv_sub);
-
-        submit_btn.setOnClickListener(this);
-        et_book_name.setText(CommonUtil.getName());
-        et_book_phone.setText(CommonUtil.getSharedPreferences(mContext, "user_phone"));
-    }
-
-    private boolean isEdited = true;
-
-    private void initData() {
-        Intent intent = getIntent();
-        if (intent != null) {
-            model = intent.getParcelableExtra("model");
-            isEdited = intent.getBooleanExtra("isEdited", true);
-            isHasPerson=intent.getBooleanExtra("isHasPerson",false);
-            dataService = intent.getStringExtra("dataService");
-            sb_userid = intent.getStringExtra("sb_userid");
-            sb_username = intent.getStringExtra("sb_username");
-            if (model != null) {
-                LogUtil.i(model.toString());
-                initType(model.getType());
-                if (isEdited) {
-                    submit_btn.setText("提交");
-                } else {
-                    submit_btn.setText("取消");
-                }
-                tv_title.setText(model.getName());
-                tv_sub.setText(model.getAddress());
-                getSupportActionBar().setTitle(model.getName());
-                AvatarHelper.getInstance().display(model.getUrl(), iv_header, true);
-                AvatarHelper.getInstance().display(model.getUrl(), max_img, true);
-
-            } else {
-                //TODO 由于该界面必须要转进来的对象,如果model缺失,应返回
-            }
-        } else {
-            //TODO 由于该界面必须要转进来的对象,如果model缺失,应返回
-        }
-    }
-
-
-    private TextView getTVByType(String type, int requestCode) {
-        if (type == null) return null;
-
-        switch (type) {
-            case "餐饮"://餐饮
-                switch (requestCode) {
-                    case NUMBER_SELECT://人数选择
-                        return tv_food_peoples;
-
-                    case TIME_SELECT://时间选择
-                        return tv_food_times;
-                    default:
-                        return tv_food_rooms;
-                }
-            case "美容美发"://  美容美发
-                switch (requestCode) {
-                    case SERVICE_SELECT:
-                        return tv_hair_rooms;
-                    case TIME_SELECT://时间选择
-                    default:
-                        return tv_hair_times;
-                }
-            case "运动健身":
-                switch (requestCode) {
-                    case SERVICE_SELECT:
-                        return tv_sport_rooms;
-                    case NUMBER_SELECT://人数选择
-                        return tv_sport_peoples;
-                    case TIME_SELECT://时间选择
-                    default:
-                        return tv_sport_time;
-                }
-            case "医疗":
-                switch (requestCode) {
-                    case MAN_SELECT:
-                        return tag_hospital_doctor;
-                    case SERVICE_SELECT:
-                        return tv_hospital_rooms;
-                    case TIME_SELECT://时间选择
-                    default:
-                        return tv_hospital_time;
-                }
-            case "会所":
-                switch (requestCode) {
-                    case SERVICE_SELECT://人数选择
-                        return tv_club_technician;
-                    case NUMBER_SELECT://人数选择
-                        return tv_club_peoples;
-                    case TIME_SELECT://时间选择
-                    default:
-                        return tv_club_time;
-                }
-            case "KTV":
-                switch (requestCode) {
-                    case SERVICE_SELECT://服务选择包间选择
-                        return tv_ktv_rooms;
-                    case NUMBER_SELECT://人数选择
-                        return tv_ktv_peoples;
-                    case TIME_SELECT://时间选择
-                    default:
-                        return tv_ktv_times;
-                }
-        }
-        return null;
-    }
-
-
-    private final int FOOD_ROOMS = 1;
-
-    private final int TIME_SELECT = 11//时间选择(包含时间段、时间点)
-            , NUMBER_SELECT = 12//人数选择(1~10以上)
-            , SERVICE_SELECT = 13//服务项目
-            , MAN_SELECT = 14//医生选择
-            ;
-
-    @Override
-    public void onClick(View v) {
-        int id = v.getId();
-        //选择时间(用餐时间、唱歌时间....)
-        if (id == R.id.tv_food_times
-                || id == R.id.tv_hair_times
-                || id == R.id.tv_sport_time
-                || id == R.id.tv_hospital_time
-                || id == R.id.tv_club_time
-                || id == R.id.tv_ktv_times
-                ) {
-            //TODO 这个类太长了,修改困难,
-            //TODO 现在的需求是
-            //TODO  1.当model.getBookType()==0的时候,只能选择开始时间,没有结束时间,当model.getBookType()==1的时候,可选开始时间和结束时间,时间间隔是 30分钟
-            //TODO  2.需要传进去商家的id或是ktv包厢的id,在里面请求,判断商家繁忙时刻 5.11、获取商家服务繁忙时间段
-            String serviceParam=null;
-            if (isHasPerson){
-                serviceParam=serviceId;
-            }else{
-                serviceParam=serviceName;
-            }
-            startActivityForResult(new Intent(mContext, SelectCalendarActivity.class)
-                            .putExtra("startDate", DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS))
-                            .putExtra("endDate", DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS))
-                            .putExtra("hasMenu", false)
-                            .putExtra("imId", model.getImid())
-                            .putExtra("bookType", model.getBookType())//TODO 根据1\0 判断是否有开始时间和结束时间
-                            .putExtra("companyId", model.getCompanyid())
-                            .putExtra("businessType", model.getType())
-                            .putExtra("startTime", model.getStarttime())
-                            .putExtra("endTime", model.getEndtime())
-                            .putExtra("serviceId", StringUtil.isEmpty(serviceId) == true ? "" : serviceId)
-                            .putExtra("type", 3)
-                    , TIME_SELECT);
-        }
-        //人数选择(1~10以上)
-        else if (id == R.id.tv_food_peoples
-                || id == R.id.tv_ktv_peoples
-                || id == R.id.tv_club_peoples
-                || id == R.id.tv_sport_peoples) {
-            ArrayList<SelectBean> formBeaan = new ArrayList<>();
-            for (int i = 1; i <= 10; i++) {
-                formBeaan.add(new SelectBean(i == 10 ? "10人以上" : i + "人"));
-            }
-            Intent intent = new Intent(this, SelectActivity.class)
-                    .putExtra("type", 2)
-                    .putExtra("title", getString(R.string.service_food_peoples))
-                    .putParcelableArrayListExtra("data", formBeaan);
-            startActivityForResult(intent, NUMBER_SELECT);
-        }
-        //是否包间(餐饮时候独有)
+	private Button submit_btn;
+	private EditText et_book_notes, et_book_phone, et_book_name;//预约人的备注、电话、姓名
+	//餐饮
+	private TextView tv_food_times, tv_food_rooms, tv_food_peoples;//用餐时间、需要包厢、用餐人数
+	//  美容美发
+	private TextView tv_hair_times, tv_hair_rooms;//服务时间、服务项目
+	//  运动
+	private TextView tv_sport_time, tv_sport_rooms, tv_sport_peoples;//运动时间、运动项目、运动人数
+	//  医院挂号
+	private TextView tv_hospital_rooms, tag_hospital_doctor, tv_hospital_time;//科室、医生、时段
+	//  会所
+	private TextView tv_club_technician, tv_club_time, tv_club_peoples;//技师、时间、人数
+	//  KTV
+	private TextView tv_ktv_times, tv_ktv_rooms, tv_ktv_peoples;//时间、房间、人数
+	//抬头信息
+	private CircleImageView iv_header;
+	private ImageView max_img;
+	private TextView tv_title, tv_sub;
+	private SBListModel model;
+	private boolean submiting = false;
+	private String sb_userid, sb_username;
+	private String serviceId;//服务id
+	private String serviceName;//服务名称
+	private String dataService;//详情数据
+	private boolean isHasPerson;//是否指定了人员
+
+	@Override
+	protected void onCreate(Bundle savedInstanceState) {
+		super.onCreate(savedInstanceState);
+		setContentView(R.layout.activity_bservice_add);
+		getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
+				| WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
+		initView();
+		initData();
+	}
+
+
+	private void initView() {
+		submit_btn = (Button) findViewById(R.id.submit_btn);
+		et_book_notes = (EditText) findViewById(R.id.et_book_notes);
+		et_book_phone = (EditText) findViewById(R.id.et_book_phone);
+		et_book_name = (EditText) findViewById(R.id.et_book_name);
+
+		tv_food_times = (TextView) findViewById(R.id.tv_food_times);
+		tv_food_rooms = (TextView) findViewById(R.id.tv_food_rooms);
+		tv_food_peoples = (TextView) findViewById(R.id.tv_food_peoples);
+
+		tv_hair_rooms = (TextView) findViewById(R.id.tv_hair_rooms);
+		tv_hair_times = (TextView) findViewById(R.id.tv_hair_times);
+
+		tv_sport_peoples = (TextView) findViewById(R.id.tv_sport_peoples);
+		tv_sport_rooms = (TextView) findViewById(R.id.tv_sport_rooms);
+		tv_sport_time = (TextView) findViewById(R.id.tv_sport_time);
+
+		tv_hospital_rooms = (TextView) findViewById(R.id.tv_hospital_rooms);
+		tag_hospital_doctor = (TextView) findViewById(R.id.tag_hospital_doctor);
+		tv_hospital_time = (TextView) findViewById(R.id.tv_hospital_time);
+
+		tv_club_technician = (TextView) findViewById(R.id.tv_club_technician);
+		tv_club_time = (TextView) findViewById(R.id.tv_club_time);
+		tv_club_peoples = (TextView) findViewById(R.id.tv_club_peoples);
+
+		tv_ktv_times = (TextView) findViewById(R.id.tv_ktv_times);
+		tv_ktv_rooms = (TextView) findViewById(R.id.tv_ktv_rooms);
+		tv_ktv_peoples = (TextView) findViewById(R.id.tv_ktv_peoples);
+
+		iv_header = (CircleImageView) findViewById(R.id.iv_header);
+		max_img = (ImageView) findViewById(R.id.max_img);
+		tv_title = (TextView) findViewById(R.id.tv_title);
+		tv_sub = (TextView) findViewById(R.id.tv_sub);
+
+		submit_btn.setOnClickListener(this);
+		et_book_name.setText(CommonUtil.getName());
+		et_book_phone.setText(CommonUtil.getSharedPreferences(mContext, "user_phone"));
+	}
+
+	private boolean isEdited = true;
+
+	private void initData() {
+		Intent intent = getIntent();
+		if (intent != null) {
+			model = intent.getParcelableExtra("model");
+			isEdited = intent.getBooleanExtra("isEdited", true);
+			isHasPerson = intent.getBooleanExtra("isHasPerson", false);
+			dataService = intent.getStringExtra("dataService");
+			sb_userid = intent.getStringExtra("sb_userid");
+			sb_username = intent.getStringExtra("sb_username");
+			if (model != null) {
+				LogUtil.i(model.toString());
+				initType(model.getType());
+				if (isEdited) {
+					submit_btn.setText("提交");
+				} else {
+					submit_btn.setText("取消");
+				}
+				tv_title.setText(model.getName());
+				tv_sub.setText(model.getAddress());
+				getSupportActionBar().setTitle(model.getName());
+				AvatarHelper.getInstance().display(model.getUrl(), iv_header, true);
+				AvatarHelper.getInstance().display(model.getUrl(), max_img, true);
+
+			} else {
+				//TODO 由于该界面必须要转进来的对象,如果model缺失,应返回
+			}
+		} else {
+			//TODO 由于该界面必须要转进来的对象,如果model缺失,应返回
+		}
+	}
+
+
+	private TextView getTVByType(String type, int requestCode) {
+		if (type == null) return null;
+
+		switch (type) {
+			case "餐饮"://餐饮
+				switch (requestCode) {
+					case NUMBER_SELECT://人数选择
+						return tv_food_peoples;
+
+					case TIME_SELECT://时间选择
+						return tv_food_times;
+					default:
+						return tv_food_rooms;
+				}
+			case "美容美发"://  美容美发
+				switch (requestCode) {
+					case SERVICE_SELECT:
+						return tv_hair_rooms;
+					case TIME_SELECT://时间选择
+					default:
+						return tv_hair_times;
+				}
+			case "运动健身":
+				switch (requestCode) {
+					case SERVICE_SELECT:
+						return tv_sport_rooms;
+					case NUMBER_SELECT://人数选择
+						return tv_sport_peoples;
+					case TIME_SELECT://时间选择
+					default:
+						return tv_sport_time;
+				}
+			case "医疗":
+				switch (requestCode) {
+					case MAN_SELECT:
+						return tag_hospital_doctor;
+					case SERVICE_SELECT:
+						return tv_hospital_rooms;
+					case TIME_SELECT://时间选择
+					default:
+						return tv_hospital_time;
+				}
+			case "会所":
+				switch (requestCode) {
+					case SERVICE_SELECT://人数选择
+						return tv_club_technician;
+					case NUMBER_SELECT://人数选择
+						return tv_club_peoples;
+					case TIME_SELECT://时间选择
+					default:
+						return tv_club_time;
+				}
+			case "KTV":
+				switch (requestCode) {
+					case SERVICE_SELECT://服务选择包间选择
+						return tv_ktv_rooms;
+					case NUMBER_SELECT://人数选择
+						return tv_ktv_peoples;
+					case TIME_SELECT://时间选择
+					default:
+						return tv_ktv_times;
+				}
+		}
+		return null;
+	}
+
+
+	private final int FOOD_ROOMS = 1;
+
+	private final int TIME_SELECT = 11//时间选择(包含时间段、时间点)
+			, NUMBER_SELECT = 12//人数选择(1~10以上)
+			, SERVICE_SELECT = 13//服务项目
+			, MAN_SELECT = 14//医生选择
+			;
+
+	@Override
+	public void onClick(View v) {
+		int id = v.getId();
+		//选择时间(用餐时间、唱歌时间....)
+		if (id == R.id.tv_food_times
+				|| id == R.id.tv_hair_times
+				|| id == R.id.tv_sport_time
+				|| id == R.id.tv_hospital_time
+				|| id == R.id.tv_club_time
+				|| id == R.id.tv_ktv_times
+				) {
+			//TODO 这个类太长了,修改困难,
+			//TODO 现在的需求是
+			//TODO  1.当model.getBookType()==0的时候,只能选择开始时间,没有结束时间,当model.getBookType()==1的时候,可选开始时间和结束时间,时间间隔是 30分钟
+			//TODO  2.需要传进去商家的id或是ktv包厢的id,在里面请求,判断商家繁忙时刻 5.11、获取商家服务繁忙时间段
+			String serviceParam = null;
+			if (isHasPerson) {
+				serviceParam = serviceId;
+			} else {
+				serviceParam = serviceName;
+			}
+			startActivityForResult(new Intent(mContext, SelectCalendarActivity.class)
+							.putExtra("startDate", DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS))
+							.putExtra("endDate", DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS))
+							.putExtra("hasMenu", false)
+							.putExtra("imId", model.getImid())
+							.putExtra("bookType", model.getBookType())//TODO 根据1\0 判断是否有开始时间和结束时间
+							.putExtra("companyId", model.getCompanyid())
+							.putExtra("businessType", model.getType())
+							.putExtra("startTime", model.getStarttime())
+							.putExtra("endTime", model.getEndtime())
+							.putExtra("serviceId", StringUtil.isEmpty(serviceId) == true ? "" : serviceId)
+							.putExtra("type", 3)
+					, TIME_SELECT);
+		}
+		//人数选择(1~10以上)
+		else if (id == R.id.tv_food_peoples
+				|| id == R.id.tv_ktv_peoples
+				|| id == R.id.tv_club_peoples
+				|| id == R.id.tv_sport_peoples) {
+			ArrayList<SelectBean> formBeaan = new ArrayList<>();
+			for (int i = 1; i <= 10; i++) {
+				formBeaan.add(new SelectBean(i == 10 ? "10人以上" : i + "人"));
+			}
+			Intent intent = new Intent(this, SelectActivity.class)
+					.putExtra("type", 2)
+					.putExtra("title", getString(R.string.service_food_peoples))
+					.putParcelableArrayListExtra("data", formBeaan);
+			startActivityForResult(intent, NUMBER_SELECT);
+		}
+		//是否包间(餐饮时候独有)
 //		else if (id == R.id.tv_food_rooms) {
 //			ArrayList<SelectBean> formBeaan = new ArrayList<>();
 //			formBeaan.add(new SelectBean("是"));
@@ -289,619 +293,650 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
 //			startActivityForResult(intent, FOOD_ROOMS);
 //		}
 
-        //服务项目
-        else if (id == R.id.tv_hair_rooms
-                || id == R.id.tv_sport_rooms
-                || id == R.id.tv_hospital_rooms
-                || id == R.id.tv_club_technician
-                || id == R.id.tv_ktv_rooms
-                || id == R.id.tv_food_rooms) {
-            loadStoreService();
-        }
-
-        //医疗
-        else if (id == R.id.tag_hospital_doctor) {//医生
-            Object tag = tv_hospital_rooms.getTag(R.id.tag_id);
-            if (tag != null) {
-                LogUtil.i("tag=" + tag.toString());
-                if (tag instanceof String) {
-                    loadServiceMan(tag.toString());
-                }
-            } else {
-                ToastUtil.showToast(ct, "请先选择科室");
-            }
-        } else if (id == R.id.submit_btn) {
-            if (((Button) v).getText().equals("提交")) {
-                save();
-            } else if (((Button) v).getText().equals("取消")) {
-                cancle(String.valueOf(model.getId()));
-            }
-        }
-    }
-        private static final String TAG = "BServiceAddActivity";
-        public void cancle(String id) {
-        LogUtil.d(TAG,"id:"+id);
-        HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL).build();
-        httpClient.Api().send(new HttpClient.Builder()
-                .url("user/appCancelService")
-                .add("id", id)
-                .add("token", MyApplication.getInstance().mAccessToken)
-                .method(Method.POST)
-                .build(), new ResultSubscriber<Object>(new ResultListener<Object>() {
-
-            @Override
-            public void onResponse(Object o) {
-                try {
-                    if (JSONUtil.validate(o.toString())) {
-                        if ("true".equals(JSON.parseObject(o.toString()).getString("result"))){
-                            ToastMessage("取消成功!");
-                            Intent intent = new Intent("com.modular.booking.BookingListActivity");
-                            intent.putExtra("curDate", model.getEndtime() == null ? "" : model.getEndtime());
-                            startActivity(intent);
-                        }
-                    } else {
-                        ToastMessage("操作失败!");
-                    }
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    ToastMessage("操作失败!");
-                }
-            }
-        }));
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-        if (data == null) {
-            return;
-        }
-        TextView tv = getTVByType(model.getType(), requestCode);
-        String tvMessage = null;
-        switch (requestCode) {
-            case FOOD_ROOMS://是否包间
-                String name = "";
-                SelectBean bean = data.getParcelableExtra("data");
-                if (bean != null && bean.getName() != null) {
-                    name = bean.getName();
-                }
-                if (tv == null) {
-                    tv = tv_food_rooms;
-                }
-                tv.setText(name);
-                break;
-            case TIME_SELECT://时间段设置
-                if ("0".equals(model.getBookType())) {//只能开始时间
-                    String startTime = data.getStringExtra("startDate");
-                    String displayDate = startTime;
+		//服务项目
+		else if (id == R.id.tv_hair_rooms
+				|| id == R.id.tv_sport_rooms
+				|| id == R.id.tv_hospital_rooms
+				|| id == R.id.tv_club_technician
+				|| id == R.id.tv_ktv_rooms
+				|| id == R.id.tv_food_rooms) {
+			loadStoreService(v.getContentDescription());
+		}
+
+		//医疗
+		else if (id == R.id.tag_hospital_doctor) {//医生
+			Object tag = tv_hospital_rooms.getTag(R.id.tag_id);
+			if (tag != null) {
+				LogUtil.i("tag=" + tag.toString());
+				if (tag instanceof String) {
+					loadServiceMan(tag.toString(), getString(R.string.service_hospital_rooms));
+				}
+			} else {
+				ToastUtil.showToast(ct, "请先选择科室");
+			}
+		} else if (id == R.id.submit_btn) {
+			if (((Button) v).getText().equals("提交")) {
+				save();
+			} else if (((Button) v).getText().equals("取消")) {
+				cancle(String.valueOf(model.getId()));
+			}
+		}
+	}
+
+	private static final String TAG = "BServiceAddActivity";
+
+	public void cancle(String id) {
+		LogUtil.d(TAG, "id:" + id);
+		HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL).build();
+		httpClient.Api().send(new HttpClient.Builder()
+				.url("user/appCancelService")
+				.add("id", id)
+				.add("token", MyApplication.getInstance().mAccessToken)
+				.method(Method.POST)
+				.build(), new ResultSubscriber<Object>(new ResultListener<Object>() {
+
+			@Override
+			public void onResponse(Object o) {
+				try {
+					if (JSONUtil.validate(o.toString())) {
+						if ("true".equals(JSON.parseObject(o.toString()).getString("result"))) {
+							ToastMessage("取消成功!");
+							Intent intent = new Intent("com.modular.booking.BookingListActivity");
+							intent.putExtra("curDate", model.getEndtime() == null ? "" : model.getEndtime());
+							startActivity(intent);
+						}
+					} else {
+						ToastMessage("操作失败!");
+					}
+				} catch (Exception e) {
+					e.printStackTrace();
+					ToastMessage("操作失败!");
+				}
+			}
+		}));
+	}
+
+	@Override
+	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+		super.onActivityResult(requestCode, resultCode, data);
+		if (data == null) {
+			return;
+		}
+		TextView tv = getTVByType(model.getType(), requestCode);
+		String tvMessage = null;
+		switch (requestCode) {
+			case FOOD_ROOMS://是否包间
+				String name = "";
+				SelectBean bean = data.getParcelableExtra("data");
+				if (bean != null && bean.getName() != null) {
+					name = bean.getName();
+				}
+				if (tv == null) {
+					tv = tv_food_rooms;
+				}
+				tv.setText(name);
+				break;
+			case TIME_SELECT://时间段设置
+				if ("0".equals(model.getBookType())) {//只能开始时间
+					String startTime = data.getStringExtra("startDate");
+					String displayDate = startTime;
 //					tv.setTag(R.id.tag_id2, endTime);
 //					tv.setTag(R.id.tag_id, startTime);
-                    tv.setText(displayDate);
-                } else {
-                    String startTime = data.getStringExtra("startDate");
-                    String endTime = data.getStringExtra("endDate");
-                    String displayDate = startTime + "-" + endTime.substring(11, 16);
-                    tv.setTag(R.id.tag_id2, endTime);
-                    tv.setTag(R.id.tag_id, startTime);
-                    tv.setText(displayDate);
-                }
-                break;
-            case NUMBER_SELECT://人数选择
-                String number = "";
-                SelectBean numberBean = data.getParcelableExtra("data");
-                if (numberBean != null && numberBean.getName() != null) {
-                    number = numberBean.getName();
-                }
-                tv.setText(number.substring(0, number.length() - 1));
-                break;
-            case SERVICE_SELECT:
-            case MAN_SELECT:
-                SelectBean service = data.getParcelableExtra("data");
-                if (service != null && service.getName() != null) {
-                    LogUtil.i("service=" + JSON.toJSONString(service));
-                    tvMessage = service.getName();
-                    serviceId = service.getFields();
-                    serviceName = service.getName();
-                    if (tv != null) {
-                        tv.setTag(R.id.tag_id, serviceId);
-                        tv.setTag(R.id.tag_id2, serviceName);
-                    }
-                }
-                break;
-        }
-        if (tvMessage != null && tv != null) {
-            if (tv == tv_hospital_rooms) {
-                tag_hospital_doctor.setText("");
-            }
-            tv.setText(tvMessage);
-        }
-    }
-
-    //load 服务项目
-    public void loadStoreService() {
-        progressDialog.show();
-        HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL)
-                .isDebug(BaseConfig.isDebug()).build();
-        httpClient.Api().send(new HttpClient.Builder()
-                .url("/user/appStoreService")
-                .add("companyid", model.getCompanyid())
-                .add("token", MyApplication.getInstance().mAccessToken)
-                .method(Method.GET)
-                .build(), new ResultSubscriber<>(new ResultListener<Object>() {
-            @Override
-            public void onResponse(Object o) {
-                LogUtil.i(o.toString());
-                if (JSONUtil.validateJSONObject(o.toString())) {
-                    JSONArray array = getJSONArray(o.toString(), "result");
-                    SelectBean bean = null;
-                    ArrayList<SelectBean> selectBeens = new ArrayList<SelectBean>();
-                    //TODO 测试数据
-                    if (ListUtils.isEmpty(array)) {
-                        array = JSONUtil.getJSONArray(TestString.STORE_SERVICE, "result");
-                    }
-                    if (!ListUtils.isEmpty(array)) {
-                        for (int i = 0; i < array.size(); i++) {
-                            JSONObject object = array.getJSONObject(i);
-                            bean = new SelectBean();
-                            int id = JSONUtil.getInt(object, "st_id");
-                            String name = JSONUtil.getText(object, "st_name");
-                            bean.setId(id);
-                            bean.setFields(String.valueOf(id));
-                            bean.setName(name);
-                            bean.setObject(object.toJSONString());
-                            selectBeens.add(bean);
-                        }
-                    }
-                    if (!ListUtils.isEmpty(selectBeens)) {
-                        Intent intent = new Intent(ct, SelectActivity.class)
-                                .putExtra("type", 2)
-                                .putExtra("title", getString(R.string.service_food_rooms))
-                                .putParcelableArrayListExtra("data", selectBeens);
-                        startActivityForResult(intent, SERVICE_SELECT);
-                    }
-                }
-                progressDialog.dismiss();
-            }
-        }));
-    }
-
-    //load 选择服务人员
-    public void loadServiceMan(String serviceId) {
-        progressDialog.show();
-        LogUtil.d("HttpLogs", "serviceId:" + serviceId);
-        LogUtil.d("HttpLogs", "companyid:" + model.getCompanyid());
-        HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL).isDebug(BaseConfig.isDebug()).build();
-        httpClient.Api().send(new HttpClient.Builder()
-                .url("user/appStoreman")
-                .add("companyid", model.getCompanyid())
-                .add("serviceid", serviceId)
-                .add("token", MyApplication.getInstance().mAccessToken)
-                .method(Method.GET)
-                .build(), new ResultSubscriber<>(new ResultListener<Object>() {
-            @Override
-            public void onResponse(Object o) {
-                LogUtil.i(o.toString());
-                if (JSONUtil.validateJSONObject(o.toString())) {
-                    JSONArray array = getJSONArray(o.toString(), "result");
-                    SelectBean bean = null;
-                    ArrayList<SelectBean> selectBeens = new ArrayList<SelectBean>();
-                    //TODO 测试数据
-                    if (ListUtils.isEmpty(array)) {
-                        array = JSONUtil.getJSONArray(TestString.STORE_SERVICE, "result");
-                    }
-                    if (!ListUtils.isEmpty(array)) {
-                        for (int i = 0; i < array.size(); i++) {
-                            JSONObject object = array.getJSONObject(i);
-                            bean = new SelectBean();
-                            int id = JSONUtil.getInt(object, "sm_userid");
-                            String name = JSONUtil.getText(object, "sm_username");
-                            bean.setId(id);
-                            bean.setFields(String.valueOf(id));
-                            bean.setName(name);
-                            selectBeens.add(bean);
-                        }
-                    }
-                    if (!ListUtils.isEmpty(selectBeens)) {
-                        Intent intent = new Intent(ct, SelectActivity.class)
-                                .putExtra("type", 2)
-                                .putExtra("title", getString(R.string.service_food_rooms))
-                                .putParcelableArrayListExtra("data", selectBeens);
-                        startActivityForResult(intent, MAN_SELECT);
-                    }
-                }
-                progressDialog.dismiss();
-            }
-        }));
-    }
-
-
-    private synchronized void save() {
-        if (submiting) {
-            return;
-        }
-        submiting = true;
-        progressDialog.show();
-        Map<String, Object> map = getServiceMap();
-        if (map == null) {
-            LogUtil.i("map == null");
-            submiting = false;
-            progressDialog.dismiss();
-            return;
-        } else {
-            LogUtil.i("map=" + JSONUtil.map2JSON(map));
+					tv.setText(displayDate);
+				} else {
+					String startTime = data.getStringExtra("startDate");
+					String endTime = data.getStringExtra("endDate");
+					String displayDate = startTime + "-" + endTime.substring(11, 16);
+					tv.setTag(R.id.tag_id2, endTime);
+					tv.setTag(R.id.tag_id, startTime);
+					tv.setText(displayDate);
+				}
+				break;
+			case NUMBER_SELECT://人数选择
+				String number = "";
+				SelectBean numberBean = data.getParcelableExtra("data");
+				if (numberBean != null && numberBean.getName() != null) {
+					number = numberBean.getName();
+				}
+				tv.setText(number.substring(0, number.length() - 1));
+				break;
+			case SERVICE_SELECT:
+			case MAN_SELECT:
+				SelectBean service = data.getParcelableExtra("data");
+				if (service != null && service.getName() != null) {
+					LogUtil.i("service=" + JSON.toJSONString(service));
+					tvMessage = service.getName();
+					serviceId = service.getFields();
+					serviceName = service.getName();
+					if (tv != null) {
+						tv.setTag(R.id.tag_id, serviceId);
+						tv.setTag(R.id.tag_id2, serviceName);
+					}
+				}
+				break;
+		}
+		if (tvMessage != null && tv != null) {
+			if (tv == tv_hospital_rooms) {
+				tag_hospital_doctor.setText("");
+			}
+			tv.setText(tvMessage);
+		}
+	}
+
+	//load 服务项目
+	public void loadStoreService(final CharSequence title) {
+		progressDialog.show();
+		HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL)
+				.isDebug(BaseConfig.isDebug()).build();
+		httpClient.Api().send(new HttpClient.Builder()
+				.url("/user/appStoreService")
+				.add("companyid", model.getCompanyid())
+				.add("token", MyApplication.getInstance().mAccessToken)
+				.method(Method.GET)
+				.build(), new ResultSubscriber<>(new ResultListener<Object>() {
+			@Override
+			public void onResponse(Object o) {
+				LogUtil.i(o.toString());
+				if (JSONUtil.validateJSONObject(o.toString())) {
+					JSONArray array = getJSONArray(o.toString(), "result");
+					SelectBean bean = null;
+					ArrayList<SelectBean> selectBeens = new ArrayList<SelectBean>();
+					if (ListUtils.isEmpty(array)) {
+						array = JSONUtil.getJSONArray(TestString.STORE_SERVICE, "result");
+					}
+					if (!ListUtils.isEmpty(array)) {
+						for (int i = 0; i < array.size(); i++) {
+							JSONObject object = array.getJSONObject(i);
+							bean = new SelectBean();
+							int id = JSONUtil.getInt(object, "st_id");
+							String name = JSONUtil.getText(object, "st_name");
+							if (StringUtil.isEmpty(name)) continue;
+							bean.setId(id);
+							bean.setFields(String.valueOf(id));
+							bean.setName(name);
+							bean.setObject(object.toJSONString());
+							selectBeens.add(bean);
+						}
+					}
+					if (!ListUtils.isEmpty(selectBeens)) {
+						Intent intent = new Intent(ct, SelectActivity.class)
+								.putExtra("type", 2)
+								.putExtra("title", title)
+								.putParcelableArrayListExtra("data", selectBeens);
+						startActivityForResult(intent, SERVICE_SELECT);
+					} else {
+						showToast("该商家当前无可选服务", R.color.load_error);
+					}
+				}
+				progressDialog.dismiss();
+			}
+		}));
+	}
+
+	//load 选择服务人员
+	public void loadServiceMan(String serviceId, final String title) {
+		progressDialog.show();
+		LogUtil.d("HttpLogs", "serviceId:" + serviceId);
+		LogUtil.d("HttpLogs", "companyid:" + model.getCompanyid());
+		HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL).isDebug(BaseConfig.isDebug()).build();
+		httpClient.Api().send(new HttpClient.Builder()
+				.url("user/appStoreman")
+				.add("companyid", model.getCompanyid())
+				.add("serviceid", serviceId)
+				.add("token", MyApplication.getInstance().mAccessToken)
+				.method(Method.GET)
+				.build(), new ResultSubscriber<>(new ResultListener<Object>() {
+			@Override
+			public void onResponse(Object o) {
+				LogUtil.i(o.toString());
+				if (JSONUtil.validateJSONObject(o.toString())) {
+					JSONArray array = getJSONArray(o.toString(), "result");
+					SelectBean bean = null;
+					ArrayList<SelectBean> selectBeens = new ArrayList<SelectBean>();
+					//TODO 测试数据
+					if (ListUtils.isEmpty(array)) {
+						array = JSONUtil.getJSONArray(TestString.STORE_SERVICE, "result");
+					}
+					if (!ListUtils.isEmpty(array)) {
+						for (int i = 0; i < array.size(); i++) {
+							JSONObject object = array.getJSONObject(i);
+							bean = new SelectBean();
+							int id = JSONUtil.getInt(object, "sm_userid");
+							String name = JSONUtil.getText(object, "sm_username");
+							if (StringUtil.isEmpty(name)) continue;
+							bean.setId(id);
+							bean.setFields(String.valueOf(id));
+							bean.setName(name);
+							selectBeens.add(bean);
+						}
+					}
+					if (!ListUtils.isEmpty(selectBeens)) {
+						Intent intent = new Intent(ct, SelectActivity.class)
+								.putExtra("type", 2)
+								.putExtra("title", title)
+								.putParcelableArrayListExtra("data", selectBeens);
+						startActivityForResult(intent, MAN_SELECT);
+					} else {
+						showToast("该商家当前无可选" + title, R.color.load_error);
+					}
+				}
+				progressDialog.dismiss();
+			}
+		}));
+	}
+
+
+	private synchronized void save() {
+		if (!NetUtils.isNetWorkConnected(ct)) {
+			showToast(R.string.networks_out, R.color.load_error);
+			return;
+		}
+		if (submiting) {
+			return;
+		}
+		submiting = true;
+		progressDialog.show();
+		Map<String, Object> map = getServiceMap();
+		if (map == null) {
+			LogUtil.i("map == null");
+			submiting = false;
+			progressDialog.dismiss();
+			return;
+		} else {
+			LogUtil.i("map=" + JSONUtil.map2JSON(map));
 //			if (1 == 1) {
 //				submiting = false;
 //				progressDialog.dismiss();
 //				return;
 //			}
-        }
-        final String startTime = map.get("sb_endtime").toString();
-        new HttpClient
-                .Builder(Constants.IM_BASE_URL)
-                .isDebug(BaseConfig.isDebug())
-                .build()
-                .Api()
-                .send(new HttpClient.Builder()
-                        .url("/user/appSaveService")
-                        .add("map", JSONUtil.map2JSON(map))
-                        .add("token", MyApplication.getInstance().mAccessToken)
-                        .method(Method.POST)
-                        .build(), new ResultSubscriber<>(new ResultListener<Object>() {
-                    @Override
-                    public void onResponse(Object o) {
-                        LogUtil.d("result", "result:" + o.toString());
-                        progressDialog.dismiss();
-                        submiting = true;
-                        //{"result":"true"}
-                        if (JSONUtil.validate(o.toString())) {
-                            String result = JSON.parseObject(o.toString()).getString("result");
-                            if ("true".equals(result)) {
-                                Intent intent = new Intent("com.modular.booking.BookingListActivity");
-                                intent.putExtra("curDate", startTime == null ? "" : startTime);
-                                startActivity(intent);
-                            } else {
-                                ToastMessage(getString(R.string.save_failed));
-                            }
-                        }
-
-                    }
-                }));
-    }
-
-    private Map<String, Object> getServiceMap() {
-        Map<String, Object> map = getMapFormType();
-        if (map == null) {
-            LogUtil.i("getServiceMap==nulll");
-            return map;
-        }
-        map.put("sb_recordid", MyApplication.getInstance().getLoginUserId());//当前用户ID
-        if (TextUtils.isEmpty(et_book_name.getText())) {
-            return null;
-        } else {
-            map.put("sb_recordor", StringUtil.getTextRexHttp(et_book_name));//姓名
-        }
-        if (TextUtils.isEmpty(et_book_phone.getText())) {
-            return null;
-        } else {
-            map.put("sb_telephone", StringUtil.getTextRexHttp(et_book_phone));//姓名
-        }
-        if (TextUtils.isEmpty(et_book_notes.getText())) {
-            return null;
-        } else {
-            map.put("sb_remark", StringUtil.getTextRexHttp(et_book_notes));//姓名
-        }
-
-        map.put("sb_industry", model.getIndustrycode());
-        map.put("sb_companyid", StringUtil.toHttpString(model.getCompanyid()));//商家ID
-        map.put("sb_companyname", StringUtil.toHttpString(model.getName()));//商家名称
-        map.put("sb_address", StringUtil.toHttpString(model.getAddress()));//地址
-        return map;
-    }
-
-    private Map<String, Object> getMapFormType() {
-        Map<String, Object> map = new HashMap<>();
-        switch (model.getType()) {
-            case "餐饮"://餐饮st_id
-                if (TextUtils.isEmpty(tv_food_peoples.getText())) {
-                    return null;
-                } else {
-                    map.put("sb_person", StringUtil.getTextRexHttp(tv_food_peoples));//姓名
-                }
-                if (TextUtils.isEmpty(tv_food_times.getText())) {
-                    return null;
-                } else {
-                    //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());
-                }
-                break;
-            case "美容美发":
-                if (TextUtils.isEmpty(tv_hair_rooms.getText()) || tv_hair_rooms.getTag(R.id.tag_id) == null) {
-                    return null;
-                } else {
-                    map.put("sb_stname", StringUtil.getTextRexHttp(tv_hair_rooms));//服务项目名称
-                    map.put("sb_stid", tv_hair_rooms.getTag(R.id.tag_id));//服务项目ID
-                }
-                if (TextUtils.isEmpty(tv_hair_times.getText())) {
-                    return null;
-                } else {
-                    setTime(map, tv_hair_times);
-                }
-                if (!StringUtil.isEmpty(sb_userid)) {
-                    map.put("sb_userid", sb_userid);//技师ID
-                }
-                if (!StringUtil.isEmpty(sb_username)) {
-                    map.put("sb_username", sb_username);//技师名字
-                }
-                map.put("sb_person", 1);//人数
-                break;
-            case "运动健身":
-                if (TextUtils.isEmpty(tv_sport_time.getText())) {
-                    return null;
-                } else {
-                    //sb_enddate的格式是yyyy-MM-dd HH:mm:ss
-                    setTime(map, tv_sport_time);
-                }
-                if (TextUtils.isEmpty(tv_sport_peoples.getText())) {
-                    return null;
-                } else {
-                    map.put("sb_person", StringUtil.getFirstInt(tv_sport_peoples.getText().toString(), 1));//人数
-                }
-                if (TextUtils.isEmpty(tv_sport_rooms.getText())) {
-                    return null;
-                } else {
-                    map.put("sb_spname", StringUtil.getTextRexHttp(tv_sport_peoples));//场地名称
-                }
-                break;
-            case "医疗":
-                if (TextUtils.isEmpty(tv_hospital_time.getText())) {
-                    return null;
-                } else {
-                    setTime(map, tv_hospital_time);
-                }
-                //|| tv_hospital_rooms.getTag(R.id.tag_id) == null
-                if (TextUtils.isEmpty(tv_hospital_rooms.getText())) {
-                    return null;
-                } else {
-                    map.put("sb_stname", StringUtil.getTextRexHttp(tv_hospital_rooms));//服务项目名称
-                    map.put("sb_stid", tv_hospital_rooms.getTag(R.id.tag_id));//服务项目ID
-                }
-                //|| tag_hospital_doctor.getTag(R.id.tag_id) == null
-                if (TextUtils.isEmpty(tag_hospital_doctor.getText())) {
-                    return null;
-                } else {
-                    map.put("sb_username", StringUtil.getTextRexHttp(tag_hospital_doctor));//服务项目名称
-                    map.put("sb_userid", tag_hospital_doctor.getTag(R.id.tag_id));//服务项目ID
-                }
-                break;
-            case "会所":
-                if (TextUtils.isEmpty(tv_club_time.getText())) {
-                    return null;
-                } else {
-                    setTime(map, tv_club_time);
-                }
-                if (TextUtils.isEmpty(tv_club_peoples.getText())) {
-                    return null;
-                } else {
-                    map.put("sb_person", StringUtil.getFirstInt(tv_club_peoples.getText().toString(), 1));//人数
-                }
-
-                if (TextUtils.isEmpty(tv_club_technician.getText()) || tv_club_technician.getTag(R.id.tag_id) == null) {
-                    return null;
-                } else {
-                    map.put("sb_stname", StringUtil.getTextRexHttp(tv_club_technician));//服务项目名称
-                    map.put("sb_stid", tv_club_technician.getTag(R.id.tag_id));//服务项目ID
-                }
-                if (!StringUtil.isEmpty(sb_userid)) {
-                    map.put("sb_userid", sb_userid);//技师ID
-                }
-                if (!StringUtil.isEmpty(sb_username)) {
-                    map.put("sb_username", sb_username);//技师名字
-                }
-                break;
-            case "KTV":
-                if (TextUtils.isEmpty(tv_ktv_times.getText())) {
-                    return null;
-                } else {
-                    setTime(map, tv_ktv_times);
-                }
-                if (TextUtils.isEmpty(tv_ktv_peoples.getText())) {
-                    return null;
-                } else {
-                    map.put("sb_person", StringUtil.getFirstInt(tv_ktv_peoples.getText().toString(), 1));//人数
-                }
-                if (TextUtils.isEmpty(tv_ktv_rooms.getText()) || tv_ktv_rooms.getTag(R.id.tag_id) == null) {
-                    return null;
-                } else {
-                    map.put("sb_spname", StringUtil.getTextRexHttp(tv_ktv_rooms));//服务项目名称
-                }
-                break;
-        }
-
-        return map;
-    }
-
-
-    private void setTime(Map<String, Object> map, TextView tv) {
-        //这个需要与选择时段相对应,有model确定选择的是时间点还是时段
-        if (tv == null || TextUtils.isEmpty(tv.getText())) {
-            return;
-        }
-        String message = tv.getText().toString();
-        if ("1".equals(model.getBookType())) {//时段
-            Object start = tv.getTag(R.id.tag_id);
-            Object end = tv.getTag(R.id.tag_id2);
-            if (start != null && start instanceof String) {
-                map.put("sb_starttime", start.toString() + ":00");
-            }
-            if (end != null && end instanceof String) {
-                map.put("sb_endtime", end.toString() + ":00");
-            }
-        } else {//时间点
-            map.put("sb_endtime", message + ":00");
-
-        }
-    }
-
-
-    private void initType(String type) {
-        if (type == null) return;
-        JSONObject data = null;
-        if (!isEdited) {
-            if (dataService != null) {
-                data = JSON.parseObject(dataService);
-            }
-            et_book_phone.setText(data.getString("sb_telephone"));
-            et_book_name.setText(data.getString("sb_recordor"));
-            et_book_notes.setText(data.getString("sb_remark"));
-            et_book_phone.setEnabled(false);
-            et_book_name.setEnabled(false);
-            et_book_notes.setEnabled(false);
-        }
-        switch (type) {
-            case "餐饮"://餐饮
-                findViewById(R.id.ll_food).setVisibility(View.VISIBLE);
-                if (isEdited) {
-                    tv_food_times.setOnClickListener(this);
-                    tv_food_rooms.setOnClickListener(this);
-                    tv_food_peoples.setOnClickListener(this);
-                } else {
-                    tv_food_times.setText(data.getString("sb_endtime"));
-                    tv_food_rooms.setText(data.getString("sb_stname"));
-                    tv_food_peoples.setText(data.getString("sb_person"));
-                }
-                break;
-            case "美容美发"://  美容美发
-                findViewById(R.id.ll_hair).setVisibility(View.VISIBLE);
-                if (isEdited) {
-                    tv_hair_rooms.setOnClickListener(this);
-                    tv_hair_times.setOnClickListener(this);
-                } else {
-                    tv_hair_times.setText(data.getString("sb_endtime"));
-                    tv_hair_rooms.setText(data.getString("sb_stname"));
-                }
-                break;
-            case "运动健身":
-                findViewById(R.id.ll_sport).setVisibility(View.VISIBLE);
-                if (isEdited) {
-                    tv_sport_peoples.setOnClickListener(this);
-                    tv_sport_rooms.setOnClickListener(this);
-                    tv_sport_time.setOnClickListener(this);
-                } else {
-                    tv_sport_time.setText(data.getString("sb_endtime"));
-                    tv_sport_rooms.setText(data.getString("sb_stname"));
-                    tv_sport_peoples.setText(data.getString("sb_person"));
-                }
-                break;
-            case "医疗":
-                findViewById(R.id.ll_hospital).setVisibility(View.VISIBLE);
-                if (isEdited) {
-                    tv_hospital_rooms.setOnClickListener(this);
-                    tag_hospital_doctor.setOnClickListener(this);
-                    tv_hospital_time.setOnClickListener(this);
-                } else {
-                    tv_hospital_time.setText(data.getString("sb_endtime"));
-                    tv_hospital_rooms.setText(data.getString("sb_stname"));
-                    tag_hospital_doctor.setText(data.getString("sb_username"));
-                }
-                break;
-            case "会所":
-                findViewById(R.id.ll_club).setVisibility(View.VISIBLE);
-                if (isEdited) {
-                    tv_club_technician.setOnClickListener(this);
-                    tv_club_time.setOnClickListener(this);
-                    tv_club_peoples.setOnClickListener(this);
-                } else {
-                    tv_club_time.setText(data.getString("sb_endtime"));
-                    tv_club_technician.setText(data.getString("sb_stname"));
-                    tv_club_peoples.setText(data.getString("sb_person"));
-                }
-                break;
-            case "KTV":
-                findViewById(R.id.ll_ktv).setVisibility(View.VISIBLE);
-                if (isEdited) {
-                    tv_ktv_times.setOnClickListener(this);
-                    tv_ktv_rooms.setOnClickListener(this);
-                    tv_ktv_peoples.setOnClickListener(this);
-                } else {
-                    tv_ktv_times.setText(data.getString("sb_endtime"));
-                    tv_ktv_rooms.setText(data.getString("sb_spname"));
-                    tv_ktv_peoples.setText(data.getString("sb_person"));
-                }
-                break;
-            case "10001"://医院
-                findViewById(R.id.ll_hospital).setVisibility(View.VISIBLE);
-                if (isEdited) {
-                    tv_hospital_rooms.setOnClickListener(this);
-                    tag_hospital_doctor.setOnClickListener(this);
-                    tv_hospital_time.setOnClickListener(this);
-                } else {
-                    tv_hospital_time.setText(data.getString("sb_endtime"));
-                    tv_hospital_rooms.setText(data.getString("sb_stname"));
-                    tag_hospital_doctor.setText(data.getString("sb_username"));
-                }
-                break;
-            case "10002"://运动健身
-                findViewById(R.id.ll_sport).setVisibility(View.VISIBLE);
-                if (isEdited) {
-                    tv_sport_peoples.setOnClickListener(this);
-                    tv_sport_rooms.setOnClickListener(this);
-                    tv_sport_time.setOnClickListener(this);
-                } else {
-                    tv_sport_time.setText(data.getString("sb_endtime"));
-                    tv_sport_rooms.setText(data.getString("sb_stname"));
-                    tv_sport_peoples.setText(data.getString("sb_person"));
-                }
-                break;
-            case "10003"://餐饮
-                findViewById(R.id.ll_food).setVisibility(View.VISIBLE);
-                if (isEdited) {
-                    tv_food_times.setOnClickListener(this);
-                    tv_food_rooms.setOnClickListener(this);
-                    tv_food_peoples.setOnClickListener(this);
-                } else {
-                    tv_food_times.setText(data.getString("sb_endtime"));
-                    tv_food_rooms.setText(data.getString("sb_spname"));
-                    tv_food_peoples.setText(data.getString("sb_person"));
-                }
-                break;
-            case "10004"://美容美发
-                findViewById(R.id.ll_hair).setVisibility(View.VISIBLE);
-                if (isEdited) {
-                    tv_hair_rooms.setOnClickListener(this);
-                    tv_hair_times.setOnClickListener(this);
-                } else {
-                    tv_hair_times.setText(data.getString("sb_endtime"));
-                    tv_hair_rooms.setText(data.getString("sb_stname"));
-                }
-                break;
-            case "10005"://会所
-                findViewById(R.id.ll_club).setVisibility(View.VISIBLE);
-                if (isEdited) {
-                    tv_club_technician.setOnClickListener(this);
-                    tv_club_time.setOnClickListener(this);
-                    tv_club_peoples.setOnClickListener(this);
-                } else {
-                    tv_club_time.setText(data.getString("sb_endtime"));
-                    tv_club_technician.setText(data.getString("sb_stname"));
-                    tv_club_peoples.setText(data.getString("sb_person"));
-                }
-                break;
-            case "10006"://ktv
-                findViewById(R.id.ll_ktv).setVisibility(View.VISIBLE);
-                if (isEdited) {
-                    tv_ktv_times.setOnClickListener(this);
-                    tv_ktv_rooms.setOnClickListener(this);
-                    tv_ktv_peoples.setOnClickListener(this);
-                } else {
-                    tv_ktv_times.setText(data.getString("sb_endtime"));
-                    tv_ktv_rooms.setText(data.getString("sb_spname"));
-                    tv_ktv_peoples.setText(data.getString("sb_person"));
-                }
-                break;
-
-        }
-    }
+		}
+		final String startTime = map.get("sb_endtime").toString();
+		new HttpClient
+				.Builder(Constants.IM_BASE_URL)
+				.isDebug(BaseConfig.isDebug())
+				.build()
+				.Api()
+				.send(new HttpClient.Builder()
+						.url("/user/appSaveService")
+						.add("map", JSONUtil.map2JSON(map))
+						.add("token", MyApplication.getInstance().mAccessToken)
+						.method(Method.POST)
+						.build(), new ResultSubscriber<>(new ResultListener<Object>() {
+					@Override
+					public void onResponse(Object o) {
+						LogUtil.d("result", "result:" + o.toString());
+						progressDialog.dismiss();
+						submiting = true;
+						//{"result":"true"}
+						if (JSONUtil.validate(o.toString())) {
+							String result = JSON.parseObject(o.toString()).getString("result");
+							if ("true".equals(result)) {
+								Intent intent = new Intent("com.modular.booking.BookingListActivity");
+								intent.putExtra("curDate", startTime == null ? "" : startTime);
+								startActivity(intent);
+							} else {
+								ToastMessage(getString(R.string.save_failed));
+							}
+						}
+
+					}
+				}));
+	}
+
+	private Map<String, Object> getServiceMap() {
+		Map<String, Object> map = getMapFormType();
+		if (map == null) {
+			LogUtil.i("getServiceMap==nulll");
+			return map;
+		}
+		map.put("sb_recordid", MyApplication.getInstance().getLoginUserId());//当前用户ID
+		if (TextUtils.isEmpty(et_book_name.getText())) {
+			showToast("姓名为必填项", R.color.load_error);
+			return null;
+		} else {
+			map.put("sb_recordor", StringUtil.getTextRexHttp(et_book_name));//姓名
+		}
+		if (TextUtils.isEmpty(et_book_phone.getText())) {
+			showToast("电话为必填项", R.color.load_error);
+			return null;
+		} else {
+			map.put("sb_telephone", StringUtil.getTextRexHttp(et_book_phone));//姓名
+		}
+		if (TextUtils.isEmpty(et_book_notes.getText())) {
+			showToast("备注为必填项", R.color.load_error);
+			return null;
+		} else {
+			map.put("sb_remark", StringUtil.getTextRexHttp(et_book_notes));//姓名
+		}
+
+		map.put("sb_industry", model.getIndustrycode());
+		map.put("sb_companyid", StringUtil.toHttpString(model.getCompanyid()));//商家ID
+		map.put("sb_companyname", StringUtil.toHttpString(model.getName()));//商家名称
+		map.put("sb_address", StringUtil.toHttpString(model.getAddress()));//地址
+		return map;
+	}
+
+	private Map<String, Object> getMapFormType() {
+		Map<String, Object> map = new HashMap<>();
+		switch (model.getType()) {
+			case "餐饮"://餐饮st_id
+				if (TextUtils.isEmpty(tv_food_peoples.getText())) {
+					showToast("用餐人数为必填项", R.color.load_error);
+					return null;
+				} else {
+					map.put("sb_person", StringUtil.getTextRexHttp(tv_food_peoples));//姓名
+				}
+				if (TextUtils.isEmpty(tv_food_times.getText())) {
+					showToast("用餐时间为必填项", R.color.load_error);
+					return null;
+				} else {
+					//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());
+				}
+				break;
+			case "美容美发":
+				if (TextUtils.isEmpty(tv_hair_rooms.getText()) || tv_hair_rooms.getTag(R.id.tag_id) == null) {
+					showToast("服务项目为必填项", R.color.load_error);
+					return null;
+				} else {
+					map.put("sb_stname", StringUtil.getTextRexHttp(tv_hair_rooms));//服务项目名称
+					map.put("sb_stid", tv_hair_rooms.getTag(R.id.tag_id));//服务项目ID
+				}
+				if (TextUtils.isEmpty(tv_hair_times.getText())) {
+					showToast("服务时间为必填项", R.color.load_error);
+					return null;
+				} else {
+					setTime(map, tv_hair_times);
+				}
+				if (!StringUtil.isEmpty(sb_userid)) {
+					map.put("sb_userid", sb_userid);//技师ID
+				}
+				if (!StringUtil.isEmpty(sb_username)) {
+					map.put("sb_username", sb_username);//技师名字
+				}
+				map.put("sb_person", 1);//人数
+				break;
+			case "运动健身":
+				if (TextUtils.isEmpty(tv_sport_time.getText())) {
+					showToast("运动时间为必填项", R.color.load_error);
+					return null;
+				} else {
+					//sb_enddate的格式是yyyy-MM-dd HH:mm:ss
+					setTime(map, tv_sport_time);
+				}
+				if (TextUtils.isEmpty(tv_sport_peoples.getText())) {
+					showToast("运动人数为必填项", R.color.load_error);
+					return null;
+				} else {
+					map.put("sb_person", StringUtil.getFirstInt(tv_sport_peoples.getText().toString(), 1));//人数
+				}
+				if (TextUtils.isEmpty(tv_sport_rooms.getText())) {
+					showToast("运动项目为必填项", R.color.load_error);
+					return null;
+				} else {
+					map.put("sb_spname", StringUtil.getTextRexHttp(tv_sport_peoples));//场地名称
+				}
+				break;
+			case "医疗":
+				if (TextUtils.isEmpty(tv_hospital_time.getText())) {
+					showToast("时段为必填项", R.color.load_error);
+					return null;
+				} else {
+					setTime(map, tv_hospital_time);
+				}
+				//|| tv_hospital_rooms.getTag(R.id.tag_id) == null
+				if (TextUtils.isEmpty(tv_hospital_rooms.getText())) {
+					showToast("科室为必填项", R.color.load_error);
+
+					return null;
+				} else {
+					map.put("sb_stname", StringUtil.getTextRexHttp(tv_hospital_rooms));//服务项目名称
+					map.put("sb_stid", tv_hospital_rooms.getTag(R.id.tag_id));//服务项目ID
+				}
+				//|| tag_hospital_doctor.getTag(R.id.tag_id) == null
+				if (TextUtils.isEmpty(tag_hospital_doctor.getText())) {
+					showToast("医生为必填项", R.color.load_error);
+					return null;
+				} else {
+					map.put("sb_username", StringUtil.getTextRexHttp(tag_hospital_doctor));//服务项目名称
+					map.put("sb_userid", tag_hospital_doctor.getTag(R.id.tag_id));//服务项目ID
+				}
+				break;
+			case "会所":
+				if (TextUtils.isEmpty(tv_club_time.getText())) {
+					showToast("服务时段为必填项", R.color.load_error);
+					return null;
+				} else {
+					setTime(map, tv_club_time);
+				}
+				if (TextUtils.isEmpty(tv_club_peoples.getText())) {
+					showToast("人数为必填项", R.color.load_error);
+					return null;
+				} else {
+					map.put("sb_person", StringUtil.getFirstInt(tv_club_peoples.getText().toString(), 1));//人数
+				}
+
+				if (TextUtils.isEmpty(tv_club_technician.getText()) || tv_club_technician.getTag(R.id.tag_id) == null) {
+					showToast("服务项目为必填项", R.color.load_error);
+					return null;
+				} else {
+					map.put("sb_stname", StringUtil.getTextRexHttp(tv_club_technician));//服务项目名称
+					map.put("sb_stid", tv_club_technician.getTag(R.id.tag_id));//服务项目ID
+				}
+				if (!StringUtil.isEmpty(sb_userid)) {
+					map.put("sb_userid", sb_userid);//技师ID
+				}
+				if (!StringUtil.isEmpty(sb_username)) {
+					map.put("sb_username", sb_username);//技师名字
+				}
+				break;
+			case "KTV":
+				if (TextUtils.isEmpty(tv_ktv_times.getText())) {
+					showToast("时段为必填项", R.color.load_error);
+					return null;
+				} else {
+					setTime(map, tv_ktv_times);
+				}
+				if (TextUtils.isEmpty(tv_ktv_peoples.getText())) {
+					showToast("人数为必填项", R.color.load_error);
+					return null;
+				} else {
+					map.put("sb_person", StringUtil.getFirstInt(tv_ktv_peoples.getText().toString(), 1));//人数
+				}
+				if (TextUtils.isEmpty(tv_ktv_rooms.getText()) || tv_ktv_rooms.getTag(R.id.tag_id) == null) {
+					showToast("包房为必填项", R.color.load_error);
+					return null;
+				} else {
+					map.put("sb_spname", StringUtil.getTextRexHttp(tv_ktv_rooms));//服务项目名称
+				}
+				break;
+		}
+
+		return map;
+	}
+
+
+	private void setTime(Map<String, Object> map, TextView tv) {
+		//这个需要与选择时段相对应,有model确定选择的是时间点还是时段
+		if (tv == null || TextUtils.isEmpty(tv.getText())) {
+			return;
+		}
+		String message = tv.getText().toString();
+		if ("1".equals(model.getBookType())) {//时段
+			Object start = tv.getTag(R.id.tag_id);
+			Object end = tv.getTag(R.id.tag_id2);
+			if (start != null && start instanceof String) {
+				map.put("sb_starttime", start.toString() + ":00");
+			}
+			if (end != null && end instanceof String) {
+				map.put("sb_endtime", end.toString() + ":00");
+			}
+		} else {//时间点
+			map.put("sb_endtime", message + ":00");
+
+		}
+	}
+
+
+	private void initType(String type) {
+		if (type == null) return;
+		JSONObject data = null;
+		if (!isEdited) {
+			if (dataService != null) {
+				data = JSON.parseObject(dataService);
+			}
+			et_book_phone.setText(data.getString("sb_telephone"));
+			et_book_name.setText(data.getString("sb_recordor"));
+			et_book_notes.setText(data.getString("sb_remark"));
+			et_book_phone.setEnabled(false);
+			et_book_name.setEnabled(false);
+			et_book_notes.setEnabled(false);
+		}
+		switch (type) {
+			case "餐饮"://餐饮
+				findViewById(R.id.ll_food).setVisibility(View.VISIBLE);
+				if (isEdited) {
+					tv_food_times.setOnClickListener(this);
+					tv_food_rooms.setOnClickListener(this);
+					tv_food_peoples.setOnClickListener(this);
+				} else {
+					tv_food_times.setText(data.getString("sb_endtime"));
+					tv_food_rooms.setText(data.getString("sb_stname"));
+					tv_food_peoples.setText(data.getString("sb_person"));
+				}
+				break;
+			case "美容美发"://  美容美发
+				findViewById(R.id.ll_hair).setVisibility(View.VISIBLE);
+				if (isEdited) {
+					tv_hair_rooms.setOnClickListener(this);
+					tv_hair_times.setOnClickListener(this);
+				} else {
+					tv_hair_times.setText(data.getString("sb_endtime"));
+					tv_hair_rooms.setText(data.getString("sb_stname"));
+				}
+				break;
+			case "运动健身":
+				findViewById(R.id.ll_sport).setVisibility(View.VISIBLE);
+				if (isEdited) {
+					tv_sport_peoples.setOnClickListener(this);
+					tv_sport_rooms.setOnClickListener(this);
+					tv_sport_time.setOnClickListener(this);
+				} else {
+					tv_sport_time.setText(data.getString("sb_endtime"));
+					tv_sport_rooms.setText(data.getString("sb_stname"));
+					tv_sport_peoples.setText(data.getString("sb_person"));
+				}
+				break;
+			case "医疗":
+				findViewById(R.id.ll_hospital).setVisibility(View.VISIBLE);
+				if (isEdited) {
+					tv_hospital_rooms.setOnClickListener(this);
+					tag_hospital_doctor.setOnClickListener(this);
+					tv_hospital_time.setOnClickListener(this);
+				} else {
+					tv_hospital_time.setText(data.getString("sb_endtime"));
+					tv_hospital_rooms.setText(data.getString("sb_stname"));
+					tag_hospital_doctor.setText(data.getString("sb_username"));
+				}
+				break;
+			case "会所":
+				findViewById(R.id.ll_club).setVisibility(View.VISIBLE);
+				if (isEdited) {
+					tv_club_technician.setOnClickListener(this);
+					tv_club_time.setOnClickListener(this);
+					tv_club_peoples.setOnClickListener(this);
+				} else {
+					tv_club_time.setText(data.getString("sb_endtime"));
+					tv_club_technician.setText(data.getString("sb_stname"));
+					tv_club_peoples.setText(data.getString("sb_person"));
+				}
+				break;
+			case "KTV":
+				findViewById(R.id.ll_ktv).setVisibility(View.VISIBLE);
+				if (isEdited) {
+					tv_ktv_times.setOnClickListener(this);
+					tv_ktv_rooms.setOnClickListener(this);
+					tv_ktv_peoples.setOnClickListener(this);
+				} else {
+					tv_ktv_times.setText(data.getString("sb_endtime"));
+					tv_ktv_rooms.setText(data.getString("sb_spname"));
+					tv_ktv_peoples.setText(data.getString("sb_person"));
+				}
+				break;
+			case "10001"://医院
+				findViewById(R.id.ll_hospital).setVisibility(View.VISIBLE);
+				if (isEdited) {
+					tv_hospital_rooms.setOnClickListener(this);
+					tag_hospital_doctor.setOnClickListener(this);
+					tv_hospital_time.setOnClickListener(this);
+				} else {
+					tv_hospital_time.setText(data.getString("sb_endtime"));
+					tv_hospital_rooms.setText(data.getString("sb_stname"));
+					tag_hospital_doctor.setText(data.getString("sb_username"));
+				}
+				break;
+			case "10002"://运动健身
+				findViewById(R.id.ll_sport).setVisibility(View.VISIBLE);
+				if (isEdited) {
+					tv_sport_peoples.setOnClickListener(this);
+					tv_sport_rooms.setOnClickListener(this);
+					tv_sport_time.setOnClickListener(this);
+				} else {
+					tv_sport_time.setText(data.getString("sb_endtime"));
+					tv_sport_rooms.setText(data.getString("sb_stname"));
+					tv_sport_peoples.setText(data.getString("sb_person"));
+				}
+				break;
+			case "10003"://餐饮
+				findViewById(R.id.ll_food).setVisibility(View.VISIBLE);
+				if (isEdited) {
+					tv_food_times.setOnClickListener(this);
+					tv_food_rooms.setOnClickListener(this);
+					tv_food_peoples.setOnClickListener(this);
+				} else {
+					tv_food_times.setText(data.getString("sb_endtime"));
+					tv_food_rooms.setText(data.getString("sb_spname"));
+					tv_food_peoples.setText(data.getString("sb_person"));
+				}
+				break;
+			case "10004"://美容美发
+				findViewById(R.id.ll_hair).setVisibility(View.VISIBLE);
+				if (isEdited) {
+					tv_hair_rooms.setOnClickListener(this);
+					tv_hair_times.setOnClickListener(this);
+				} else {
+					tv_hair_times.setText(data.getString("sb_endtime"));
+					tv_hair_rooms.setText(data.getString("sb_stname"));
+				}
+				break;
+			case "10005"://会所
+				findViewById(R.id.ll_club).setVisibility(View.VISIBLE);
+				if (isEdited) {
+					tv_club_technician.setOnClickListener(this);
+					tv_club_time.setOnClickListener(this);
+					tv_club_peoples.setOnClickListener(this);
+				} else {
+					tv_club_time.setText(data.getString("sb_endtime"));
+					tv_club_technician.setText(data.getString("sb_stname"));
+					tv_club_peoples.setText(data.getString("sb_person"));
+				}
+				break;
+			case "10006"://ktv
+				findViewById(R.id.ll_ktv).setVisibility(View.VISIBLE);
+				if (isEdited) {
+					tv_ktv_times.setOnClickListener(this);
+					tv_ktv_rooms.setOnClickListener(this);
+					tv_ktv_peoples.setOnClickListener(this);
+				} else {
+					tv_ktv_times.setText(data.getString("sb_endtime"));
+					tv_ktv_rooms.setText(data.getString("sb_spname"));
+					tv_ktv_peoples.setText(data.getString("sb_person"));
+				}
+				break;
+
+		}
+	}
 }

+ 602 - 601
app_modular/appbooking/src/main/res/layout/activity_bservice_add.xml

@@ -1,642 +1,643 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
+<ScrollView
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical"
+    android:fillViewport="true"
+    android:scrollbars="none"
     tools:context="com.modular.booking.activity.services.BServiceAddActivity">
 
-    <ScrollView
+    <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:fillViewport="true"
-        android:scrollbars="none"
-        >
+        android:background="@color/hine_bg"
+        android:focusable="true"
+        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: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:text="********"
+                    android:textColor="@color/black"
+                    android:textSize="14sp"/>
+            </LinearLayout>
+        </RelativeLayout>
+
+        <!--KTV-->
         <LinearLayout
+            android:id="@+id/ll_ktv"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@color/hine_bg"
-            android:focusable="true"
-            android:focusableInTouchMode="true"
-            android:orientation="vertical">
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            android:visibility="gone">
 
-            <!--抬头信息-->
             <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="80dp"
+                android:id="@+id/ktv_room_rl"
+                style="@style/item_menu"
+                android:layout_alignParentTop="true"
                 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"
+
+                <TextView
+                    android:id="@+id/tag_ktv_rooms"
+                    style="@style/item_menu_tag"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_ktv_rooms"
+                    android:textColor="@color/hintColor"/>
+
+                <TextView
+                    android:id="@+id/tv_ktv_rooms"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_ktv_rooms"
+                    android:contentDescription="@string/service_ktv_rooms"
+                    android:drawableRight="@drawable/oa_next"
+                    android:hint="@string/common_select"
+                    android:textColor="@color/hintColor"/>
+            </RelativeLayout>
+
+            <RelativeLayout
+                android:id="@+id/ktv_time_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_ktv_times"
+                    style="@style/item_menu_tag"
                     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:textColor="@color/black"
-                        android:textStyle="bold"
-                        android:text="********"
-                        android:textSize="20sp"/>
-
-                    <TextView
-                        android:id="@+id/tv_sub"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:textColor="@color/black"
-                        android:text="********"
-                        android:textSize="14sp"/>
-                </LinearLayout>
+                    android:layout_alignParentTop="true"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_ktv_times"/>
+
+                <TextView
+                    android:id="@+id/tv_ktv_times"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_ktv_times"
+                    android:drawablePadding="6dp"
+                    android:drawableRight="@drawable/oa_next"
+                    android:ellipsize="end"
+                    android:hint="@string/common_select"/>
             </RelativeLayout>
 
-            <!--KTV-->
-            <LinearLayout
-                android:id="@+id/ll_ktv"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:visibility="gone">
 
-                <RelativeLayout
-                    android:id="@+id/ktv_room_rl"
-                    style="@style/item_menu"
+            <RelativeLayout
+                android:id="@+id/ktv_people_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_ktv_peoples"
+                    style="@style/item_menu_tag"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_ktv_peoples"/>
+
+                <TextView
+                    android:id="@+id/tv_ktv_peoples"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_ktv_peoples"
+                    android:drawablePadding="6dp"
+                    android:drawableRight="@drawable/oa_next"
+                    android:hint="@string/common_select"/>
+            </RelativeLayout>
+        </LinearLayout>
+
+        <!--会所-->
+        <LinearLayout
+            android:id="@+id/ll_club"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            android:visibility="gone">
+
+            <RelativeLayout
+                android:id="@+id/club_time_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_club_technician"
+                    style="@style/item_menu_tag"
+                    android:layout_alignParentLeft="true"
+                    android:layout_alignParentStart="true"
                     android:layout_alignParentTop="true"
-                    android:layout_centerHorizontal="true">
-
-                    <TextView
-                        android:id="@+id/tag_ktv_rooms"
-                        style="@style/item_menu_tag"
-                        android:gravity="center_vertical"
-                        android:text="@string/service_ktv_rooms"
-                        android:textColor="@color/hintColor"/>
-
-                    <TextView
-                        android:id="@+id/tv_ktv_rooms"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_ktv_rooms"
-                        android:drawableRight="@drawable/oa_next"
-                        android:hint="@string/common_select"
-                        android:textColor="@color/hintColor"/>
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/ktv_time_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_ktv_times"
-                        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_ktv_times"/>
-
-                    <TextView
-                        android:id="@+id/tv_ktv_times"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_ktv_times"
-                        android:drawablePadding="6dp"
-                        android:drawableRight="@drawable/oa_next"
-                        android:ellipsize="end"
-                        android:hint="@string/common_select"/>
-                </RelativeLayout>
-
-
-                <RelativeLayout
-                    android:id="@+id/ktv_people_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_ktv_peoples"
-                        style="@style/item_menu_tag"
-                        android:gravity="center_vertical"
-                        android:text="@string/service_ktv_peoples"/>
-
-                    <TextView
-                        android:id="@+id/tv_ktv_peoples"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_ktv_peoples"
-                        android:drawablePadding="6dp"
-                        android:drawableRight="@drawable/oa_next"
-                        android:hint="@string/common_select"/>
-                </RelativeLayout>
-            </LinearLayout>
+                    android:gravity="center_vertical"
+                    android:text="@string/service_club_list"/>
+
+                <TextView
+                    android:id="@+id/tv_club_technician"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_club_technician"
+                    android:contentDescription="@string/service_club_list"
+                    android:drawablePadding="6dp"
+                    android:drawableRight="@drawable/oa_next"
+                    android:ellipsize="end"
+                    android:hint="@string/common_select"/>
+            </RelativeLayout>
 
-            <!--会所-->
-            <LinearLayout
-                android:id="@+id/ll_club"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:visibility="gone">
+            <RelativeLayout
+                android:id="@+id/club_rooms_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_club_tim"
+                    style="@style/item_menu_tag"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_club_rooms"
+                    android:textColor="@color/hintColor"/>
+
+                <TextView
+                    android:id="@+id/tv_club_time"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_club_tim"
+                    android:drawableRight="@drawable/oa_next"
+                    android:hint="@string/common_select"
+                    android:textColor="@color/hintColor"/>
+            </RelativeLayout>
 
-                <RelativeLayout
-                    android:id="@+id/club_time_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_club_technician"
-                        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_club_list"/>
-
-                    <TextView
-                        android:id="@+id/tv_club_technician"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_club_technician"
-                        android:drawablePadding="6dp"
-                        android:drawableRight="@drawable/oa_next"
-                        android:ellipsize="end"
-                        android:hint="@string/common_select"/>
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/club_rooms_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_club_tim"
-                        style="@style/item_menu_tag"
-                        android:gravity="center_vertical"
-                        android:text="@string/service_club_rooms"
-                        android:textColor="@color/hintColor"/>
-
-                    <TextView
-                        android:id="@+id/tv_club_time"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_club_tim"
-                        android:drawableRight="@drawable/oa_next"
-                        android:hint="@string/common_select"
-                        android:textColor="@color/hintColor"/>
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/club_pepoles_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_club_peoples"
-                        style="@style/item_menu_tag"
-                        android:gravity="center_vertical"
-                        android:text="@string/service_ktv_peoples"/>
-
-                    <TextView
-                        android:id="@+id/tv_club_peoples"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_club_peoples"
-                        android:drawablePadding="6dp"
-                        android:drawableRight="@drawable/oa_next"
-                        android:hint="@string/common_select"/>
-                </RelativeLayout>
-            </LinearLayout>
+            <RelativeLayout
+                android:id="@+id/club_pepoles_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_club_peoples"
+                    style="@style/item_menu_tag"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_ktv_peoples"/>
+
+                <TextView
+                    android:id="@+id/tv_club_peoples"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_club_peoples"
+                    android:drawablePadding="6dp"
+                    android:drawableRight="@drawable/oa_next"
+                    android:hint="@string/common_select"/>
+            </RelativeLayout>
+        </LinearLayout>
 
-            <!--医院挂号-->
-            <LinearLayout
-                android:id="@+id/ll_hospital"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:visibility="gone">
+        <!--医院挂号-->
+        <LinearLayout
+            android:id="@+id/ll_hospital"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            android:visibility="gone">
 
-                <RelativeLayout
-                    android:id="@+id/hospital_time_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_hospital_time"
-                        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_hospital_times"/>
-
-                    <TextView
-                        android:id="@+id/tv_hospital_rooms"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_hospital_time"
-                        android:drawablePadding="6dp"
-                        android:drawableRight="@drawable/oa_next"
-                        android:ellipsize="end"
-                        android:hint="@string/common_select"/>
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/hospital_rooms_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_hospital_rooms"
-                        style="@style/item_menu_tag"
-                        android:gravity="center_vertical"
-                        android:text="@string/service_hospital_rooms"
-                        android:textColor="@color/hintColor"/>
-
-                    <TextView
-                        android:id="@+id/tag_hospital_doctor"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_hospital_rooms"
-                        android:drawableRight="@drawable/oa_next"
-                        android:hint="@string/common_select"
-                        android:textColor="@color/hintColor"/>
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/hospital_people_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_hospital_people"
-                        style="@style/item_menu_tag"
-                        android:gravity="center_vertical"
-                        android:text="@string/service_hospital_peoples"/>
-
-                    <TextView
-                        android:id="@+id/tv_hospital_time"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_hospital_people"
-                        android:drawablePadding="6dp"
-                        android:drawableRight="@drawable/oa_next"
-                        android:hint="@string/common_select"/>
-                </RelativeLayout>
-            </LinearLayout>
+            <RelativeLayout
+                android:id="@+id/hospital_time_rl"
+                style="@style/item_menu">
 
-            <!--运动健身-->
-            <LinearLayout
-                android:id="@+id/ll_sport"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:visibility="gone">
+                <TextView
+                    android:id="@+id/tag_hospital_time"
+                    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_hospital_times"/>
+
+                <TextView
+                    android:id="@+id/tv_hospital_rooms"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_hospital_time"
+                    android:contentDescription="@string/service_hospital_times"
+                    android:drawablePadding="6dp"
+                    android:drawableRight="@drawable/oa_next"
+                    android:ellipsize="end"
+                    android:hint="@string/common_select"/>
+            </RelativeLayout>
 
-                <RelativeLayout
-                    android:id="@+id/sport_time_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_sport_time"
-                        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_sport_times"/>
-
-                    <TextView
-                        android:id="@+id/tv_sport_time"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_sport_time"
-                        android:drawablePadding="6dp"
-                        android:drawableRight="@drawable/oa_next"
-                        android:ellipsize="end"
-                        android:hint="@string/common_select"/>
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/sport_rooms_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_sport_rooms"
-                        style="@style/item_menu_tag"
-                        android:gravity="center_vertical"
-                        android:text="@string/service_sport_rooms"
-                        android:textColor="@color/hintColor"/>
-
-                    <TextView
-                        android:id="@+id/tv_sport_rooms"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_sport_rooms"
-                        android:drawableRight="@drawable/oa_next"
-                        android:hint="@string/common_select"
-                        android:textColor="@color/hintColor"/>
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/sport_peoples_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_sport_peoples"
-                        style="@style/item_menu_tag"
-                        android:gravity="center_vertical"
-                        android:text="@string/service_ktv_peoples"/>
-
-                    <TextView
-                        android:id="@+id/tv_sport_peoples"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_sport_peoples"
-                        android:drawablePadding="6dp"
-                        android:drawableRight="@drawable/oa_next"
-                        android:hint="@string/common_select"/>
-                </RelativeLayout>
-            </LinearLayout>
+            <RelativeLayout
+                android:id="@+id/hospital_rooms_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_hospital_rooms"
+                    style="@style/item_menu_tag"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_hospital_rooms"
+                    android:textColor="@color/hintColor"/>
+
+                <TextView
+                    android:id="@+id/tag_hospital_doctor"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_hospital_rooms"
+                    android:drawableRight="@drawable/oa_next"
+                    android:hint="@string/common_select"
+                    android:textColor="@color/hintColor"/>
+            </RelativeLayout>
 
-            <!--美容美发-->
-            <LinearLayout
-                android:id="@+id/ll_hair"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical"
+            <RelativeLayout
+                android:id="@+id/hospital_people_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_hospital_people"
+                    style="@style/item_menu_tag"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_hospital_peoples"/>
+
+                <TextView
+                    android:id="@+id/tv_hospital_time"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_hospital_people"
+                    android:drawablePadding="6dp"
+                    android:drawableRight="@drawable/oa_next"
+                    android:hint="@string/common_select"/>
+            </RelativeLayout>
+        </LinearLayout>
+
+        <!--运动健身-->
+        <LinearLayout
+            android:id="@+id/ll_sport"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            android:visibility="gone">
+
+            <RelativeLayout
+                android:id="@+id/sport_time_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_sport_time"
+                    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_sport_times"/>
+
+                <TextView
+                    android:id="@+id/tv_sport_time"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_sport_time"
+                    android:drawablePadding="6dp"
+                    android:drawableRight="@drawable/oa_next"
+                    android:ellipsize="end"
+                    android:hint="@string/common_select"/>
+            </RelativeLayout>
+
+            <RelativeLayout
+                android:id="@+id/sport_rooms_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_sport_rooms"
+                    style="@style/item_menu_tag"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_sport_rooms"
+                    android:textColor="@color/hintColor"/>
+
+                <TextView
+                    android:id="@+id/tv_sport_rooms"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_sport_rooms"
+                    android:contentDescription="@string/service_sport_rooms"
+                    android:drawableRight="@drawable/oa_next"
+                    android:hint="@string/common_select"
+                    android:textColor="@color/hintColor"/>
+            </RelativeLayout>
+
+            <RelativeLayout
+                android:id="@+id/sport_peoples_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_sport_peoples"
+                    style="@style/item_menu_tag"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_ktv_peoples"/>
+
+                <TextView
+                    android:id="@+id/tv_sport_peoples"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_sport_peoples"
+                    android:drawablePadding="6dp"
+                    android:drawableRight="@drawable/oa_next"
+                    android:hint="@string/common_select"/>
+            </RelativeLayout>
+        </LinearLayout>
+
+        <!--美容美发-->
+        <LinearLayout
+            android:id="@+id/ll_hair"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            android:visibility="gone">
+
+            <RelativeLayout
+                android:id="@+id/hair_times_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_hair_times"
+                    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_hair_times"/>
+
+                <TextView
+                    android:id="@+id/tv_hair_times"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_alignParentEnd="true"
+                    android:layout_alignParentRight="true"
+                    android:layout_alignParentTop="true"
+                    android:layout_toRightOf="@id/tag_hair_times"
+                    android:drawablePadding="6dp"
+                    android:drawableRight="@drawable/oa_next"
+                    android:ellipsize="end"
+                    android:hint="@string/common_select"/>
+            </RelativeLayout>
+
+            <RelativeLayout
+                android:id="@+id/hair_rooms_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_hair_rooms"
+                    style="@style/item_menu_tag"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_hair_rooms"
+                    android:textColor="@color/hintColor"/>
+
+                <TextView
+                    android:id="@+id/tv_hair_rooms"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_alignParentEnd="true"
+                    android:layout_alignParentRight="true"
+                    android:layout_alignParentTop="true"
+                    android:layout_toRightOf="@+id/tag_hair_rooms"
+                    android:contentDescription="@string/service_hair_rooms"
+                    android:drawableRight="@drawable/oa_next"
+                    android:hint="@string/common_select"
+                    android:textColor="@color/hintColor"/>
+            </RelativeLayout>
+
+            <RelativeLayout
+                android:id="@+id/hair_peoples_rl"
+                style="@style/item_menu"
                 android:visibility="gone">
 
-                <RelativeLayout
-                    android:id="@+id/hair_times_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_hair_times"
-                        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_hair_times"/>
-
-                    <TextView
-                        android:id="@+id/tv_hair_times"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_alignParentEnd="true"
-                        android:layout_alignParentRight="true"
-                        android:layout_alignParentTop="true"
-                        android:layout_toRightOf="@id/tag_hair_times"
-                        android:drawablePadding="6dp"
-                        android:drawableRight="@drawable/oa_next"
-                        android:ellipsize="end"
-                        android:hint="@string/common_select"/>
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/hair_rooms_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_hair_rooms"
-                        style="@style/item_menu_tag"
-                        android:gravity="center_vertical"
-                        android:text="@string/service_hair_rooms"
-                        android:textColor="@color/hintColor"/>
-
-                    <TextView
-                        android:id="@+id/tv_hair_rooms"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_alignParentEnd="true"
-                        android:layout_alignParentRight="true"
-                        android:layout_alignParentTop="true"
-                        android:layout_toRightOf="@+id/tag_hair_rooms"
-                        android:drawableRight="@drawable/oa_next"
-                        android:hint="@string/common_select"
-                        android:textColor="@color/hintColor"/>
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/hair_peoples_rl"
-                    style="@style/item_menu"
-                    android:visibility="gone">
-
-                    <TextView
-                        style="@style/item_menu_tag"
-                        android:gravity="center_vertical"
-                        android:text="@string/service_ktv_peoples"/>
-
-                    <TextView
-                        android:id="@+id/tv_hair_peoples"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/company_tag"
-                        android:drawablePadding="6dp"
-                        android:drawableRight="@drawable/oa_next"
-                        android:hint="@string/common_select"/>
-                </RelativeLayout>
-            </LinearLayout>
+                <TextView
+                    style="@style/item_menu_tag"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_ktv_peoples"/>
+
+                <TextView
+                    android:id="@+id/tv_hair_peoples"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/company_tag"
+                    android:drawablePadding="6dp"
+                    android:drawableRight="@drawable/oa_next"
+                    android:hint="@string/common_select"/>
+            </RelativeLayout>
+        </LinearLayout>
 
-            <!--餐饮-->
-            <LinearLayout
-                android:id="@+id/ll_food"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:visibility="gone"
-               >
-
-                <RelativeLayout
-                    android:id="@+id/food_peoples_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_food_peoples"
-                        style="@style/item_menu_tag"
-                        android:gravity="center_vertical"
-                        android:text="@string/service_food_peoples"/>
-
-                    <TextView
-                        android:id="@+id/tv_food_peoples"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_food_peoples"
-                        android:drawablePadding="6dp"
-                        android:drawableRight="@drawable/oa_next"
-                        android:hint="@string/common_select"/>
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/food_times_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_food_times"
-                        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_food_times"/>
-
-                    <TextView
-                        android:id="@+id/tv_food_times"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_food_times"
-                        android:drawablePadding="6dp"
-                        android:drawableRight="@drawable/oa_next"
-                        android:ellipsize="end"
-                        android:hint="@string/common_select"/>
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/food_rooms_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_food_rooms"
-                        style="@style/item_menu_tag"
-                        android:gravity="center_vertical"
-                        android:text="@string/service_food_rooms"
-                        android:textColor="@color/hintColor"/>
-
-                    <TextView
-                        android:id="@+id/tv_food_rooms"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_alignParentEnd="true"
-                        android:layout_alignParentRight="true"
-                        android:layout_alignParentTop="true"
-                        android:layout_toRightOf="@id/tag_food_rooms"
-                        android:drawableRight="@drawable/oa_next"
-                        android:hint="@string/common_select"
-                        android:text="否"
-                        android:textColor="@color/hintColor"/>
-                </RelativeLayout>
+        <!--餐饮-->
+        <LinearLayout
+            android:id="@+id/ll_food"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            android:visibility="gone"
+            >
 
-            </LinearLayout>
+            <RelativeLayout
+                android:id="@+id/food_peoples_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_food_peoples"
+                    style="@style/item_menu_tag"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_food_peoples"/>
+
+                <TextView
+                    android:id="@+id/tv_food_peoples"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_food_peoples"
+                    android:drawablePadding="6dp"
+                    android:drawableRight="@drawable/oa_next"
+                    android:hint="@string/common_select"/>
+            </RelativeLayout>
 
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="10dp"/>
+            <RelativeLayout
+                android:id="@+id/food_times_rl"
+                style="@style/item_menu">
 
+                <TextView
+                    android:id="@+id/tag_food_times"
+                    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_food_times"/>
+
+                <TextView
+                    android:id="@+id/tv_food_times"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_food_times"
+                    android:drawablePadding="6dp"
+                    android:drawableRight="@drawable/oa_next"
+                    android:ellipsize="end"
+                    android:hint="@string/common_select"/>
+            </RelativeLayout>
 
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical">
+            <RelativeLayout
+                android:id="@+id/food_rooms_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_food_rooms"
+                    style="@style/item_menu_tag"
+                    android:gravity="center_vertical"
+                    android:text="@string/service_food_rooms"
+                    android:textColor="@color/hintColor"/>
+
+                <TextView
+                    android:id="@+id/tv_food_rooms"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_alignParentEnd="true"
+                    android:layout_alignParentRight="true"
+                    android:layout_alignParentTop="true"
+                    android:layout_toRightOf="@id/tag_food_rooms"
+                    android:contentDescription="@string/service_food_rooms"
+                    android:drawableRight="@drawable/oa_next"
+                    android:hint="@string/common_select"
+                    android:text="否"
+                    android:textColor="@color/hintColor"/>
+            </RelativeLayout>
 
-                <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/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="290dp"
-                        android:layout_toRightOf="@id/tag_book_phone"
-                        android:drawablePadding="6dp"
-                        android:ellipsize="end"
-                        android:hint="@string/common_input2"
-                        android:inputType="phone"/>
-
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/notes_rl"
-                    style="@style/item_menu">
-
-                    <TextView
-                        android:id="@+id/tag_book_notes"
-                        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_notes"/>
-
-                    <EditText
-                        android:id="@+id/et_book_notes"
-                        style="@style/item_menu_input"
-                        android:layout_width="290dp"
-                        android:layout_toRightOf="@id/tag_book_notes"
-                        android:drawablePadding="6dp"
-                        android:ellipsize="end"
-                        android:hint="@string/common_input2"/>
-
-
-                </RelativeLayout>
-            </LinearLayout>
+        </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:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_marginBottom="30dp"
-                android:layout_marginTop="60dp">
+                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/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="290dp"
+                    android:layout_toRightOf="@id/tag_book_phone"
+                    android:drawablePadding="6dp"
+                    android:ellipsize="end"
+                    android:hint="@string/common_input2"
+                    android:inputType="phone"/>
+
+            </RelativeLayout>
+
+            <RelativeLayout
+                android:id="@+id/notes_rl"
+                style="@style/item_menu">
+
+                <TextView
+                    android:id="@+id/tag_book_notes"
+                    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_notes"/>
+
+                <EditText
+                    android:id="@+id/et_book_notes"
+                    style="@style/item_menu_input"
+                    android:layout_width="290dp"
+                    android:layout_toRightOf="@id/tag_book_notes"
+                    android:drawablePadding="6dp"
+                    android:ellipsize="end"
+                    android:hint="@string/common_input"/>
+
 
-                <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>
-</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>
+</ScrollView>