|
|
@@ -114,6 +114,8 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
|
|
|
private TextView tvSeatsLeft;
|
|
|
private TextView tvSeatsRight;
|
|
|
private RelativeLayout notes_rl;
|
|
|
+ private LinearLayout ll_seats_panel;
|
|
|
+ private RelativeLayout food_seats_rl;
|
|
|
|
|
|
@Override
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
@@ -186,7 +188,9 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
|
|
|
llPanelWait=(LinearLayout)findViewById(R.id.llPanelWait);
|
|
|
llPanelBusiness=(LinearLayout)findViewById(R.id.llPanelBusiness);
|
|
|
notes_rl =(RelativeLayout)findViewById(R.id.notes_rl);
|
|
|
-
|
|
|
+ ll_seats_panel=(LinearLayout)findViewById(R.id.ll_seats_panel) ;
|
|
|
+ food_seats_rl=(RelativeLayout)findViewById(R.id.food_seats_rl);
|
|
|
+
|
|
|
submit_btn.setOnClickListener(this);
|
|
|
et_book_name.setText(CommonUtil.getName());
|
|
|
et_book_phone.setText(MyApplication.getInstance().mLoginUser.getTelephone());
|
|
|
@@ -991,21 +995,27 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
|
|
|
setTime(map, tv_food_times);
|
|
|
}
|
|
|
//选包间和选桌位
|
|
|
- if (!TextUtils.isEmpty(tv_food_rooms.getText())) {
|
|
|
- if (foodCheckRooms){
|
|
|
+// if (!TextUtils.isEmpty(tv_food_rooms.getText())) {
|
|
|
+ if (!TextUtils.isEmpty(tv_food_rooms.getText())){
|
|
|
//选包间
|
|
|
map.put("sb_spname", tv_food_rooms.getText());
|
|
|
}else{
|
|
|
- //选桌位
|
|
|
- if (((Integer)tv_food_seats.getTag(R.id.tag_id2))>0) {
|
|
|
- map.put("sb_stname", tv_food_seats.getTag(R.id.tag_id));
|
|
|
+ if (tv_food_seats.getTag(R.id.tag_id2)!=null){
|
|
|
+ //选桌位
|
|
|
+ if (((Integer)tv_food_seats.getTag(R.id.tag_id2))>0) {
|
|
|
+ map.put("sb_stname", tv_food_seats.getTag(R.id.tag_id));
|
|
|
+ }else{
|
|
|
+ ToastMessage("已无剩余桌位!");
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}else{
|
|
|
- ToastMessage("已无剩余桌位!");
|
|
|
+ tv_food_rooms.setHint(R.string.common_select);
|
|
|
+ ToastMessage("请选择包间!");
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+// }
|
|
|
break;
|
|
|
case "美容美发":
|
|
|
if (TextUtils.isEmpty(tv_hair_times.getText())) {
|
|
|
@@ -1660,7 +1670,7 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
|
|
|
if (asType.equals(king)){
|
|
|
if (bookednumber<=0){
|
|
|
bookednumber=0;
|
|
|
- ToastMessage("已无剩余桌量!");
|
|
|
+ // ToastMessage("已无剩余桌量!");
|
|
|
}
|
|
|
tv_food_seats.setTag(R.id.tag_id,deskcode);
|
|
|
tv_food_seats.setTag(R.id.tag_id2,bookednumber);//桌位数量
|
|
|
@@ -1674,6 +1684,10 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
|
|
|
}
|
|
|
}
|
|
|
if (desklist!=null){
|
|
|
+ if (deskbook.size()==0){
|
|
|
+ ll_seats_panel.setVisibility(View.GONE);
|
|
|
+ food_seats_rl.setVisibility(View.GONE);
|
|
|
+ }
|
|
|
for (int i = 0; i <desklist.size() ; i++) {
|
|
|
JSONObject object=desklist.getJSONObject(i);
|
|
|
String as_type= object.getString("as_type");
|
|
|
@@ -1687,7 +1701,7 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
|
|
|
//tv_food_seats.setText("仅剩"+as_number+"桌");
|
|
|
if (bookNum<=0){
|
|
|
bookNum=0;
|
|
|
- ToastMessage("已无剩余桌量!");
|
|
|
+ // ToastMessage("已无剩余桌量!");
|
|
|
}
|
|
|
CommonUtil.textSpanForStyle(tv_food_seats,"仅剩"+bookNum+"桌",String.valueOf(bookNum),ct.getResources().getColor(R.color.blue_seats_num));
|
|
|
LogUtil.d(TAG,"as_number:"+as_number+" as_deskcode:"+as_deskcode);
|
|
|
@@ -1715,10 +1729,12 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }else{
|
|
|
+ ll_seats_panel.setVisibility(View.GONE);
|
|
|
+ food_seats_rl.setVisibility(View.GONE);
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|