Commit f01b18c5 by 宁斌

1、餐檯管理調整

parent 39e33787
......@@ -81,6 +81,10 @@ public class TableBean {
private Long orderId;
private String qrCode;
private int seatCount;
/**最大就餐人數*/
private Integer maxSeatCount;
/**最小就餐人數*/
private Integer minSeatCount;
private String createTime;
private String createBy;
private String qrCodeImg;
......@@ -108,6 +112,12 @@ public class TableBean {
* 排序
*/
private int sort;
/**
0#堂食
1#外賣
2#自取
*/
private int type;
public DataBean() {
......@@ -120,6 +130,8 @@ public class TableBean {
this.restaurantId = dataBean.restaurantId;
this.qrCode = dataBean.qrCode;
this.seatCount = dataBean.seatCount;
this.maxSeatCount = dataBean.maxSeatCount;
this.minSeatCount = dataBean.minSeatCount;
this.createTime = dataBean.createTime;
this.createBy = dataBean.createBy;
this.qrCodeImg = dataBean.qrCodeImg;
......@@ -130,6 +142,7 @@ public class TableBean {
this.person = dataBean.person;
this.useStatus = dataBean.useStatus;
this.sort = dataBean.sort;
this.type = dataBean.type;
}
public int getPerson() {
......@@ -196,6 +209,22 @@ public class TableBean {
this.seatCount = seatCount;
}
public Integer getMaxSeatCount() {
return maxSeatCount;
}
public void setMaxSeatCount(Integer maxSeatCount) {
this.maxSeatCount = maxSeatCount;
}
public Integer getMinSeatCount() {
return minSeatCount;
}
public void setMinSeatCount(Integer minSeatCount) {
this.minSeatCount = minSeatCount;
}
public String getCreateTime() {
return createTime;
}
......@@ -259,5 +288,13 @@ public class TableBean {
public void setSort(int sort) {
this.sort = sort;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
}
}
......@@ -2,6 +2,7 @@ package com.gingersoft.gsa.cloud.ui.recylcler.event;
import android.graphics.Color;
import com.gingersoft.gsa.cloud.base.utils.log.LogUtil;
import com.jess.arms.base.DefaultAdapter;
import com.qmuiteam.qmui.widget.section.QMUIDefaultStickySectionAdapter;
import com.qmuiteam.qmui.widget.section.QMUISection;
......@@ -23,6 +24,7 @@ import androidx.recyclerview.widget.RecyclerView;
*/
public class RecyItemTouchHelperCallback<H extends QMUISection.Model<H>, T extends QMUISection.Model<T>> extends ItemTouchHelper.Callback {
private final String TAG = getClass().getSimpleName();
RecyclerView.Adapter mAdapter;
boolean isSwipeEnable;
boolean isFirstDragUnable;
......@@ -64,10 +66,11 @@ public class RecyItemTouchHelperCallback<H extends QMUISection.Model<H>, T exten
if (mAdapter instanceof QMUIStickySectionAdapter) {
QMUIStickySectionAdapter.ViewHolder holder = (QMUIStickySectionAdapter.ViewHolder) viewHolder;
int pos = holder.isForStickyHeader ? i : holder.getAdapterPosition();
int ItemIndex = ((QMUIStickySectionAdapter) mAdapter).getItemIndex(pos);
QMUISection<H, T> qmuiSections = ((QMUIStickySectionAdapter) mAdapter).getSection(ItemIndex);
int itemIndex = ((QMUIStickySectionAdapter) mAdapter).getItemIndex(pos);
LogUtil.d(TAG, "fromPosition:" + fromPosition + " toPosition:" + toPosition + " itemIndex: " + itemIndex + " pos: " + pos);
QMUISection<H, T> qmuiSections = ((QMUIStickySectionAdapter) mAdapter).getSection(pos);
List<?> list = qmuiSections.getItemList();
Collections.swap(list, ItemIndex, ItemIndex + 1);
Collections.swap(list, itemIndex, itemIndex + 1);
} else {
Collections.swap(((DefaultAdapter) mAdapter).getInfos(), i, i + 1);
}
......@@ -77,18 +80,17 @@ public class RecyItemTouchHelperCallback<H extends QMUISection.Model<H>, T exten
if (mAdapter instanceof QMUIStickySectionAdapter) {
QMUIStickySectionAdapter.ViewHolder holder = (QMUIStickySectionAdapter.ViewHolder) viewHolder;
int pos = holder.isForStickyHeader ? i : holder.getAdapterPosition();
int ItemIndex = ((QMUIStickySectionAdapter) mAdapter).getItemIndex(pos);
QMUISection<H, T> qmuiSections = ((QMUIStickySectionAdapter) mAdapter).getSection(ItemIndex);
int itemIndex = ((QMUIStickySectionAdapter) mAdapter).getItemIndex(pos);
LogUtil.d(TAG, "fromPosition:" + fromPosition + " toPosition:" + toPosition + " itemIndex: " + itemIndex + " pos: " + pos);
QMUISection<H, T> qmuiSections = ((QMUIStickySectionAdapter) mAdapter).getSection(pos);
List<?> list = qmuiSections.getItemList();
Collections.swap(list, ItemIndex, ItemIndex - 1);
Collections.swap(list, itemIndex, itemIndex - 1);
} else {
Collections.swap(((DefaultAdapter) mAdapter).getInfos(), i, i - 1);
Collections.swap(((DefaultAdapter) mAdapter).getInfos(), fromPosition, toPosition - 1);
}
}
}
mAdapter.notifyItemMoved(fromPosition, toPosition);
mAdapter.notifyItemChanged(toPosition);
mAdapter.notifyItemChanged(fromPosition);
return true;
}
......@@ -114,7 +116,10 @@ public class RecyItemTouchHelperCallback<H extends QMUISection.Model<H>, T exten
@Override
public void clearView(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
super.clearView(recyclerView, viewHolder);
viewHolder.itemView.setBackgroundColor(Color.WHITE);
// viewHolder.itemView.setBackgroundColor(Color.WHITE);
if (onMoveListener != null) {
onMoveListener.onMoveFinish();
}
}
@Override
......@@ -126,4 +131,14 @@ public class RecyItemTouchHelperCallback<H extends QMUISection.Model<H>, T exten
public boolean isItemViewSwipeEnabled() {
return isSwipeEnable;
}
private onMoveListener onMoveListener;
public void setOnMoveListener(RecyItemTouchHelperCallback.onMoveListener onMoveListener) {
this.onMoveListener = onMoveListener;
}
public interface onMoveListener {
void onMoveFinish();
}
}
\ No newline at end of file
/*
* Tencent is pleased to support the open source community by making QMUI_Android available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gingersoft.gsa.cloud.ui.view.qm;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import com.gingersoft.gsa.cloud.base.R;
import com.qmuiteam.qmui.layout.QMUIFrameLayout;
import androidx.customview.widget.ViewDragHelper;
/**
* Created by cgspine on 2018/3/22.
*/
public class QDShadowAdjustLayout extends QMUIFrameLayout {
ViewDragHelper viewDragHelper;
public QDShadowAdjustLayout(Context context) {
this(context, null);
}
public QDShadowAdjustLayout(Context context, AttributeSet attrs) {
super(context, attrs);
viewDragHelper = ViewDragHelper.create(this, new ViewDragHelper.Callback() {
@Override
public boolean tryCaptureView(View child, int pointerId) {
return child.getId() == R.id.layout_for_test;
}
@Override
public int clampViewPositionHorizontal(View child, int left, int dx) {
return left;
}
@Override
public int clampViewPositionVertical(View child, int top, int dy) {
return top;
}
});
}
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
return viewDragHelper.shouldInterceptTouchEvent(event);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
viewDragHelper.processTouchEvent(event);
return true;
}
}
......@@ -54,12 +54,10 @@ public class QDSectionHeaderView extends LinearLayout {
mTitleTv.setTextSize(16);
mTitleTv.setTextColor(Color.BLACK);
mTitleTv.setPadding(paddingHor, 0, paddingHor, 0);
addView(mTitleTv, new LinearLayout.LayoutParams(
0, ViewGroup.LayoutParams.WRAP_CONTENT, 1f));
addView(mTitleTv, new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1f));
mArrowView = new AppCompatImageView(context);
mArrowView.setImageDrawable(QMUIResHelper.getAttrDrawable(getContext(),
R.attr.qmui_common_list_item_chevron));
mArrowView.setImageDrawable(QMUIResHelper.getAttrDrawable(getContext(), R.attr.qmui_common_list_item_chevron));
mArrowView.setScaleType(ImageView.ScaleType.CENTER);
addView(mArrowView, new LinearLayout.LayoutParams(headerHeight, headerHeight));
}
......
package com.gingersoft.gsa.cloud.ui.widget.dialog;
import android.app.Activity;
import android.text.InputType;
import android.text.TextUtils;
import com.gingersoft.gsa.cloud.base.R;
......@@ -22,6 +23,7 @@ public class CommonTipDialog {
/**
* 提示dialog 確認后執行對應方法
*
* @param context
* @param msg
* @param c
......@@ -30,16 +32,16 @@ public class CommonTipDialog {
* @param parameterTypes
* @param parameters
*/
public static void showDoubtDialog(Activity context,String msg, Class c, Object object, String methodName, Class[] parameterTypes, Object[] parameters) {
public static void showDoubtDialog(Activity context, String msg, Class c, Object object, String methodName, Class[] parameterTypes, Object[] parameters) {
QMUIDialog.MessageDialogBuilder dialogBuilder = new QMUIDialog.MessageDialogBuilder(context);
dialogBuilder.setTitleIcon(R.drawable.qmui_icon_dialog_doubt);
dialogBuilder.setMessage(msg);
if(!TextUtils.isEmpty(methodName)) {
dialogBuilder.addAction(R.drawable.shape_3c_cancel_btn_bg,"取消", (dialog, index) -> dialog.dismiss());
if (!TextUtils.isEmpty(methodName)) {
dialogBuilder.addAction(R.drawable.shape_3c_cancel_btn_bg, "取消", (dialog, index) -> dialog.dismiss());
}
dialogBuilder.addAction(R.drawable.shape_red_five_radius_bg, "確認", QMUIDialogAction.ACTION_PROP_NEGATIVE, (dialog, index) -> {
dialog.dismiss();
if(TextUtils.isEmpty(methodName)){
if (TextUtils.isEmpty(methodName)) {
return;
}
try {
......@@ -59,6 +61,7 @@ public class CommonTipDialog {
/**
* 危險警示dialog 確認后執行對應方法
*
* @param context
* @param msg
* @param c
......@@ -67,16 +70,16 @@ public class CommonTipDialog {
* @param parameterTypes
* @param parameters
*/
public static void showSurpisedDialog(Activity context,String msg, Class c, Object object, String methodName, Class[] parameterTypes, Object[] parameters) {
public static void showSurpisedDialog(Activity context, String msg, Class c, Object object, String methodName, Class[] parameterTypes, Object[] parameters) {
QMUIDialog.MessageDialogBuilder dialogBuilder = new QMUIDialog.MessageDialogBuilder(context);
dialogBuilder.setMessage(msg);
dialogBuilder.setTitleIcon(R.drawable.qmui_icon_dialog_surprised);
if(!TextUtils.isEmpty(methodName)) {
if (!TextUtils.isEmpty(methodName)) {
dialogBuilder.addAction("取消", (dialog, index) -> dialog.dismiss());
}
dialogBuilder.addAction(0, "確認", QMUIDialogAction.ACTION_PROP_NEGATIVE, (dialog, index) -> {
dialog.dismiss();
if(TextUtils.isEmpty(methodName)){
if (TextUtils.isEmpty(methodName)) {
return;
}
try {
......@@ -96,6 +99,7 @@ public class CommonTipDialog {
/**
* 警示dialog 確認后執行對應方法
*
* @param context
* @param msg
* @param c
......@@ -104,16 +108,16 @@ public class CommonTipDialog {
* @param parameterTypes
* @param parameters
*/
public static void showWarnDialog(Activity context,String msg, Class c, Object object, String methodName, Class[] parameterTypes, Object[] parameters) {
public static void showWarnDialog(Activity context, String msg, Class c, Object object, String methodName, Class[] parameterTypes, Object[] parameters) {
QMUIDialog.MessageDialogBuilder dialogBuilder = new QMUIDialog.MessageDialogBuilder(context);
dialogBuilder.setMessage(msg);
dialogBuilder.setTitleIcon(R.drawable.qmui_icon_dialog_warn);
if(!TextUtils.isEmpty(methodName)) {
if (!TextUtils.isEmpty(methodName)) {
dialogBuilder.addAction("取消", (dialog, index) -> dialog.dismiss());
}
dialogBuilder.addAction(0, "確認", QMUIDialogAction.ACTION_PROP_NEGATIVE, (dialog, index) -> {
dialog.dismiss();
if(TextUtils.isEmpty(methodName)){
if (TextUtils.isEmpty(methodName)) {
return;
}
try {
......@@ -133,6 +137,7 @@ public class CommonTipDialog {
/**
* 取消 dialog 確認后執行對應方法
*
* @param context
* @param msg
* @param c
......@@ -141,16 +146,16 @@ public class CommonTipDialog {
* @param parameterTypes
* @param parameters
*/
public static void showCancelDialog(Activity context,String msg, Class c, Object object, String methodName, Class[] parameterTypes, Object[] parameters) {
public static void showCancelDialog(Activity context, String msg, Class c, Object object, String methodName, Class[] parameterTypes, Object[] parameters) {
QMUIDialog.MessageDialogBuilder dialogBuilder = new QMUIDialog.MessageDialogBuilder(context);
dialogBuilder.setMessage(msg);
dialogBuilder.setTitleIcon(R.drawable.qmui_icon_dialog_cancel);
if(!TextUtils.isEmpty(methodName)) {
if (!TextUtils.isEmpty(methodName)) {
dialogBuilder.addAction("取消", (dialog, index) -> dialog.dismiss());
}
dialogBuilder.addAction(0, "確認", QMUIDialogAction.ACTION_PROP_NEGATIVE, (dialog, index) -> {
dialog.dismiss();
if(TextUtils.isEmpty(methodName)){
if (TextUtils.isEmpty(methodName)) {
return;
}
try {
......@@ -177,4 +182,46 @@ public class CommonTipDialog {
dialogBuilder.create(R.style.MyDialogTheme2).show();
}
/**
* 輸入型 dialog 確認后執行對應方法
*
* @param context
* @param title
* @param placeholder
* @param c
* @param object
* @param methodName
* @param parameterTypes
* @param parameters
*/
public static void showEditTextDialog(Activity context, String title, String placeholder, Class c, Object object, String methodName, Class[] parameterTypes, Object[] parameters) {
final QMUIDialog.EditTextDialogBuilder dialogBuilder = new QMUIDialog.EditTextDialogBuilder(context);
dialogBuilder.setTitle(title);
dialogBuilder.setPlaceholder(placeholder);
dialogBuilder.setInputType(InputType.TYPE_CLASS_TEXT);
if (!TextUtils.isEmpty(methodName)) {
dialogBuilder.addAction("取消", (dialog, index) -> dialog.dismiss());
}
dialogBuilder.addAction(0, "確認", QMUIDialogAction.ACTION_PROP_NEGATIVE, (dialog, index) -> {
dialog.dismiss();
if (TextUtils.isEmpty(methodName)) {
return;
}
try {
Method method = c.getDeclaredMethod(methodName, parameterTypes);
method.setAccessible(true);
method.invoke(object, parameters);
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
});
dialogBuilder.create(R.style.MyDialogTheme2).show();
}
}
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/shape_id">
<!-- 正三角 -->
<rotate
android:fromDegrees="45"
android:toDegrees="45"
android:pivotX="100%"
android:pivotY="100%">
<shape android:shape="rectangle">
<solid android:color="@color/theme_white_color"/>
</shape>
</rotate>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="AvatarView">
<attr name="showLabel" format="boolean" />
<attr name="avatarSize" format="dimension" />
<attr name="avatarSrc" format="reference" />
<attr name="labelSrc" format="reference" />
</declare-styleable>
<declare-styleable name="TriangleLabelView">
<attr name="backgroundColor" format="color" />
<attr name="primaryTextColor" format="color" />
<attr name="secondaryTextColor" format="color" />
<attr name="primaryText" format="string" />
<attr name="secondaryText" format="string" />
<attr name="primaryTextSize" format="dimension" />
<attr name="secondaryTextSize" format="dimension" />
<attr name="labelTopPadding" format="dimension" />
<attr name="labelCenterPadding" format="dimension" />
<attr name="labelBottomPadding" format="dimension" />
<attr name="primaryTextStyle">
<enum name="normal" value="0" />
<enum name="italic" value="1" />
<enum name="bold" value="2" />
</attr>
<attr name="secondaryTextStyle">
<enum name="normal" value="0" />
<enum name="italic" value="1" />
<enum name="bold" value="2" />
</attr>
<attr name="corner">
<enum name="leftTop" value="1" />
<enum name="rightTop" value="2" />
<enum name="leftBottom" value="3" />
<enum name="rightBottom" value="4" />
</attr>
</declare-styleable>
<declare-styleable name="SwipeBackLayout">
<attr name="edge_flag">
<enum name="left" value="0" />
......
......@@ -22,5 +22,5 @@
<item name="topbar_right_change_button" type="id"/>
<item name="layout_for_test" type="id"/>
</resources>
\ No newline at end of file
......@@ -235,34 +235,31 @@ public class NewMainActivity extends BaseFragmentActivity<NewMainPresenter> impl
// }
List<Function> functions = new ArrayList<>();
if (!BuildConfig.DEBUG) {
// functions.addAll(FunctionManager.getDefault().getFunctionByResModule(this, ComponentMain.main.class, ComponentMain.main.order, "order"));
// if (!BuildConfig.DEBUG) {
functions.add(new Function((long) 150, 0, 5, "點餐", 0, 0));
functions.add(new Function((long) 138, 150, 5, "餐檯模式", R.drawable.ic_dining_table_mode, 0));
functions.add(new Function((long) 139, 150, 5, "外送模式", R.drawable.ic_delivery_mode_close, 0));
functions.add(new Function((long) 140, 150, 5, "外賣模式", R.drawable.ic_outsourcing_model_close, 0));
functions.add(new Function((long) 141, 150, 5, "預點餐模式", R.drawable.ic_pre_order_mode_close, 1));
// functions.addAll(FunctionManager.getDefault().getFunctionByResModule(this, ComponentMain.main.class, ComponentMain.main.manager, "manager"));
functions.add(new Function((long) 151, 0, 5, "管理", 0, 0));
//// functions.add(new Function((long) 142, 151, 5, "賬單管理", R.drawable.ic_meals_menu_management, 0));
functions.add(new Function((long) 142, 151, 5, "賬單管理", R.drawable.ic_meals_menu_management, 0));
functions.add(new Function((long) 142, 151, 5, "外賣接單", R.drawable.ic_takeaway_orders, 0));
// functions.add(new Function((long) 143, 151, 5, "餐臺管理", R.drawable.ic_dining_table_management, 0));
functions.add(new Function((long) 143, 151, 5, "餐檯管理", R.drawable.ic_dining_table_management, 0));
functions.add(new Function((long) 144, 151, 5, "打印管理", R.drawable.ic_print_management, 0));
//// functions.add(new Function((long) 145, 151, 5, "支付管理", R.drawable.ic_pay_management_close, 1));
//// functions.add(new Function((long) 146, 151, 5, "折扣管理", R.drawable.ic_discount_management_close, 1));
//// functions.add(new Function((long) 147, 151, 5, "沽清管理", R.drawable.ic_sell_off_manger, 0));
functions.add(new Function((long) 147, 151, 5, "沽清管理", R.drawable.ic_sell_off_manger, 0));
// functions.addAll(FunctionManager.getDefault().getFunctionByResModule(this, ComponentMain.main.class, ComponentMain.main.employee, "employee"));
functions.add(new Function((long) 152, 0, 5, "員工", 0, 0));
functions.add(new Function((long) 147, 152, 5, "員工管理", R.drawable.ic_staff_management_close, 1));
functions.add(new Function((long) 148, 152, 5, "權限管理", R.drawable.ic_authority_management_close, 1));
functions.add(new Function((long) 149, 152, 5, "操作記錄", R.drawable.ic_operation_record_close, 1));
} else {
functions.addAll(FunctionManager.getDefault().getFunctionByResModule(this, ComponentMain.main.class, ComponentMain.main.order, "order"));
functions.addAll(FunctionManager.getDefault().getFunctionByResModule(this, ComponentMain.main.class, ComponentMain.main.manager, "manager"));
functions.addAll(FunctionManager.getDefault().getFunctionByResModule(this, ComponentMain.main.class, ComponentMain.main.employee, "employee"));
}
// } else {
// functions.addAll(FunctionManager.getDefault().getFunctionByResModule(this, ComponentMain.main.class, ComponentMain.main.order, "order"));
// functions.addAll(FunctionManager.getDefault().getFunctionByResModule(this, ComponentMain.main.class, ComponentMain.main.manager, "manager"));
// functions.addAll(FunctionManager.getDefault().getFunctionByResModule(this, ComponentMain.main.class, ComponentMain.main.employee, "employee"));
// }
//將功能列表數據分組
SparseArray<String> parents = new SparseArray<>();
......@@ -303,14 +300,14 @@ public class NewMainActivity extends BaseFragmentActivity<NewMainPresenter> impl
}
private void functionClick(String name, int status) {
switch (status){
case STATUS_NONACTIVATED:
ToastUtils.show(mContext, "服務暫未開通,請前往開通");
return;
case STATUS_TIME_LIMIT:
ToastUtils.show(mContext, "服務已到期,請前往續費");
return;
}
// switch (status){
// case STATUS_NONACTIVATED:
// ToastUtils.show(mContext, "服務暫未開通,請前往開通");
// return;
// case STATUS_TIME_LIMIT:
// ToastUtils.show(mContext, "服務已到期,請前往續費");
// return;
// }
if (name.equals("餐檯模式")) {
CC.obtainBuilder("Component.Table")
.setActionName("showTableActivity")
......
......@@ -19,7 +19,6 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_8"
android:singleLine="true"
android:text="餐檯模式"
android:textColor="@color/normal_color"
android:textSize="@dimen/sp_12" />
......
package com.gingersoft.gsa.cloud.manager.mvp.contract;
import com.gingersoft.gsa.cloud.manager.mvp.model.bean.TableItem;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
import java.util.List;
/**
* ================================================
......@@ -20,6 +23,8 @@ public interface TableListContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
void showEmptyView(boolean isSuccess, int size, Throwable t);
List<TableItem> getTableList();
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
......
......@@ -34,6 +34,10 @@ public interface TableManageContract {
void queryTablesSuccess(List<TableItem> tables, int type);
void showEmptyView(boolean isSuccess, int size, Throwable t);
void onStartRefreshTableData();
void onPauseRefreshTableData();
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
......@@ -55,5 +59,10 @@ public interface TableManageContract {
Observable<BaseResult> queryTables();
Observable<BaseResult> changeAreaSort(RequestBody requestBody);
Observable<BaseResult> changeTableSort(RequestBody requestBody);
Observable<BaseResult> updateTableServiceCharge(RequestBody requestBody);
}
}
......@@ -158,4 +158,40 @@ public class TableManageModel extends BaseModel implements TableManageContract.M
.queryTable(restaurantId);
}
@Override
public Observable<BaseResult> changeAreaSort(RequestBody requestBody) {
return mRepositoryManager.obtainRetrofitService(TableManageService.class)
.changeAreaSort(requestBody);
}
@Override
public Observable<BaseResult> changeTableSort(RequestBody requestBody) {
return mRepositoryManager.obtainRetrofitService(TableManageService.class)
.changeTableSort(requestBody)
.flatMap(new Function<BaseResult, Observable<BaseResult>>() {
@Override
public Observable<BaseResult> apply(BaseResult info) throws Exception {
if (info != null && info.isSuccess()) {
return queryTables();
}
return null;
}
});
}
@Override
public Observable<BaseResult> updateTableServiceCharge(RequestBody requestBody) {
return mRepositoryManager.obtainRetrofitService(TableManageService.class)
.updateTableServiceCharge(requestBody)
.flatMap(new Function<BaseResult, Observable<BaseResult>>() {
@Override
public Observable<BaseResult> apply(BaseResult info) throws Exception {
if (info != null && info.isSuccess()) {
return queryTables();
}
return null;
}
});
}
}
\ No newline at end of file
......@@ -34,7 +34,7 @@ public class TableItem implements Serializable, QMUISection.Model<TableItem>{
* regionId : 1
*/
private int id;
private long id;
/**區域ID*/
private int regionId;
/**區域名稱*/
......@@ -43,7 +43,12 @@ public class TableItem implements Serializable, QMUISection.Model<TableItem>{
private int restaurantId;
private Long orderId;
private String qrCode;
/**默認就餐人數*/
private int seatCount;
/**最大就餐人數*/
private int maxSeatCount;
/**最小就餐人數*/
private int minSeatCount;
private String createTime;
private String createBy;
private String qrCodeImg;
......@@ -71,10 +76,29 @@ public class TableItem implements Serializable, QMUISection.Model<TableItem>{
* 排序
*/
private int sort;
/**
0:堂食
1:外賣
2:自取
*/
private int type = -1;
public static final int TABLE_TYPE_CANTEEN = 0;
public static final int TABLE_TYPE_TAKEAWAY = 1;
public static final int TABLE_TYPE_SELF_FETCHING = 2;
/**
* 自定義字段
*/
/**是否選中*/
private boolean isChecked = false;
/**
* UI类型:
* 餐台 0
* 新增(+) 1
*/
private int layoutType = 0;
public TableItem() {
}
......@@ -88,6 +112,8 @@ public class TableItem implements Serializable, QMUISection.Model<TableItem>{
this.restaurantId = dataBean.restaurantId;
this.qrCode = dataBean.qrCode;
this.seatCount = dataBean.seatCount;
this.maxSeatCount = dataBean.maxSeatCount;
this.minSeatCount = dataBean.minSeatCount;
this.createTime = dataBean.createTime;
this.createBy = dataBean.createBy;
this.qrCodeImg = dataBean.qrCodeImg;
......@@ -98,6 +124,7 @@ public class TableItem implements Serializable, QMUISection.Model<TableItem>{
this.person = dataBean.person;
this.useStatus = dataBean.useStatus;
this.sort = dataBean.sort;
this.type = dataBean.type;
this.isChecked = dataBean.isChecked;
}
......@@ -117,11 +144,11 @@ public class TableItem implements Serializable, QMUISection.Model<TableItem>{
this.useStatus = useStatus;
}
public int getId() {
public long getId() {
return id;
}
public void setId(int id) {
public void setId(long id) {
this.id = id;
}
......@@ -181,6 +208,30 @@ public class TableItem implements Serializable, QMUISection.Model<TableItem>{
this.seatCount = seatCount;
}
public int getMaxSeatCount() {
return maxSeatCount;
}
public void setMaxSeatCount(int maxSeatCount) {
this.maxSeatCount = maxSeatCount;
}
public int getMinSeatCount() {
return minSeatCount;
}
public void setMinSeatCount(int minSeatCount) {
this.minSeatCount = minSeatCount;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getCreateTime() {
return createTime;
}
......@@ -253,6 +304,14 @@ public class TableItem implements Serializable, QMUISection.Model<TableItem>{
isChecked = checked;
}
public int getLayoutType() {
return layoutType;
}
public void setLayoutType(int layoutType) {
this.layoutType = layoutType;
}
@Override
public TableItem cloneForDiff() {
return null;
......
......@@ -16,13 +16,22 @@ public class TableRequest {
private int regionId;
/**餐檯名*/
private String tableName;
/**座位数*/
private int seatCount;
/**默認就餐人數*/
private Integer seatCount;
/**最大就餐人數*/
private Integer maxSeatCount;
/**最小就餐人數*/
private Integer minSeatCount;
/**服務費*/
private Double serviceCharge;
/**排序*/
private int sort;
/**
0#堂食
1#外賣
2#自取
*/
private int type;
public int getRestaurantId() {
return restaurantId;
......@@ -56,6 +65,34 @@ public class TableRequest {
this.seatCount = seatCount;
}
public void setSeatCount(Integer seatCount) {
this.seatCount = seatCount;
}
public Integer getMaxSeatCount() {
return maxSeatCount;
}
public void setMaxSeatCount(Integer maxSeatCount) {
this.maxSeatCount = maxSeatCount;
}
public Integer getMinSeatCount() {
return minSeatCount;
}
public void setMinSeatCount(Integer minSeatCount) {
this.minSeatCount = minSeatCount;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public Double getServiceCharge() {
return serviceCharge;
}
......@@ -75,26 +112,36 @@ public class TableRequest {
public static class Update {
private int id;
private long id;
private int restaurantId;
/**區域ID*/
private int regionId;
/**餐檯名*/
private String tableName;
/**座位数*/
private int seatCount;
/**默認就餐人數*/
private Integer seatCount;
/**最大就餐人數*/
private Integer maxSeatCount;
/**最小就餐人數*/
private Integer minSeatCount;
/**服務費*/
private Double serviceCharge;
/**排序*/
private int sort;
/**
0:堂食
1:外賣
2:自取
*/
private int type = -1;
public int getId() {
public long getId() {
return id;
}
public void setId(int id) {
public void setId(long id) {
this.id = id;
}
......@@ -130,6 +177,34 @@ public class TableRequest {
this.seatCount = seatCount;
}
public void setSeatCount(Integer seatCount) {
this.seatCount = seatCount;
}
public Integer getMaxSeatCount() {
return maxSeatCount;
}
public void setMaxSeatCount(Integer maxSeatCount) {
this.maxSeatCount = maxSeatCount;
}
public Integer getMinSeatCount() {
return minSeatCount;
}
public void setMinSeatCount(Integer minSeatCount) {
this.minSeatCount = minSeatCount;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public Double getServiceCharge() {
return serviceCharge;
}
......@@ -147,4 +222,28 @@ public class TableRequest {
}
}
public static class UpdateServiceCharge {
private long id;
/**服務費*/
private Double serviceCharge;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public Double getServiceCharge() {
return serviceCharge;
}
public void setServiceCharge(Double serviceCharge) {
this.serviceCharge = serviceCharge;
}
}
}
......@@ -51,4 +51,13 @@ public interface TableManageService {
@POST("restaurant/exchangeSort" + RetrofitUrlManager.IDENTIFICATION_PATH_SIZE + 2)
Observable<BaseResult> changeAreaSort(@Body RequestBody requestBody);
@POST("restaurantTable/exchangeSort" + RetrofitUrlManager.IDENTIFICATION_PATH_SIZE + 2)
Observable<BaseResult> changeTableSort(@Body RequestBody requestBody);
@POST("restaurantTable/updateRestaurantTableBatch" + RetrofitUrlManager.IDENTIFICATION_PATH_SIZE + 2)
Observable<BaseResult> updateTableServiceCharge(@Body RequestBody requestBody);
}
......@@ -90,9 +90,22 @@ public class TableListPresenter extends BasePresenter<TableListContract.Model, T
/**
* 組合區域集合
*/
public List<TableArea> assembleAreaList(List<TableItem> tableList) {
public List<TableArea> assembleAreaList(List<TableArea> areaList, List<TableItem> tableList) {
removeOtherAreaItem(areaList);
if (areaList.size() > 0) {
for (TableItem table : tableList) {
if (table.getRegionId() == -1) {
//將沒有區域的檯 放到其他下面
TableArea newArea = new TableArea();
newArea.setId(-1);
newArea.setRegionName("其他");
areaList.add(newArea);
break;
}
}
return areaList;
}
boolean addOther = false;
List<TableArea> areaList = new ArrayList<>();
for (TableItem table : tableList) {
if (table.getRegionId() != -1) {
if (!equalsAreaId(areaList, table.getRegionId())) {
......@@ -124,6 +137,14 @@ public class TableListPresenter extends BasePresenter<TableListContract.Model, T
return false;
}
private void removeOtherAreaItem(List<TableArea> areaList) {
for (int i = areaList.size() - 1; i >= 0; i--) {
if (areaList.get(i).getRegionName().equals("其他")) {
areaList.remove(i);
}
}
}
public List<QMUISection<SectionHeader, TableItem>> tableAreaTransformToSection(List<TableArea> mItems) {
List<QMUISection<SectionHeader, TableItem>> qmuiSections = new ArrayList<>();
for (int i = 0; i < mItems.size(); i++) {
......@@ -139,6 +160,23 @@ public class TableListPresenter extends BasePresenter<TableListContract.Model, T
if (Objects.requireNonNull(tableArea.getTableItemList().size()) > 0) {
contents.addAll(tableArea.getTableItemList());
}
contents.add(createAddTableItem(tableArea));
return new QMUISection(header, contents, false);
}
/**
* 创建+按钮
*
* @return
*/
private TableItem createAddTableItem(TableArea tableArea) {
TableItem item = new TableItem();
item.setLayoutType(1);
item.setStatus(0);
item.setRegionId(tableArea.getId());
item.setRegionName(tableArea.getRegionName());
return item;
}
}
......@@ -79,6 +79,11 @@ import static com.jess.arms.utils.Preconditions.checkNotNull;
*/
public class TableManageActivity extends BaseFragmentActivity<TableManagePresenter> implements TableManageContract.View {
/**
* 輪訓刷新餐檯數據
*/
public static boolean isRefreshData = true;
public static final int ADD_TABLE_RESULT_SUCCESS = 100;
public static final int ADD_AREA_RESULT_SUCCESS = 200;
......@@ -92,7 +97,14 @@ public class TableManageActivity extends BaseFragmentActivity<TableManagePresent
public static final byte UPDATE_TABLE_SUCCESS = 22;
public static final byte QUERY_TABLE_SUCCESS = 23;
public static final byte CHANGE_AREA_SORT = 30;
public static final byte CHANGE_TABLE_SORT = 31;
public static final byte UPDATE_TABLE_SERVICE_CHARGE = 32;
private List<TableArea> mTableAreaList = new ArrayList<>();
private List<TableItem> mTableList = new ArrayList<>();
@Override
public void setupActivityComponent(@NonNull AppComponent appComponent) {
......@@ -115,6 +127,11 @@ public class TableManageActivity extends BaseFragmentActivity<TableManagePresent
if (findFragment(TableListFragment.class) == null) {
loadRootFragment(R.id.fl_container, TableListFragment.newInstance());
}
}
public void initGetTableTimer() {
mPresenter.initGetTableTimer();
}
@Override
......@@ -142,7 +159,7 @@ public class TableManageActivity extends BaseFragmentActivity<TableManagePresent
}
public void queryAreas(RefreshLayout refreshLayout) {
mPresenter.queryAreas(refreshLayout);
mPresenter.queryAreas(refreshLayout, true);
}
public void addTable(TableRequest.Add request) {
......@@ -158,7 +175,19 @@ public class TableManageActivity extends BaseFragmentActivity<TableManagePresent
}
public void queryTables(RefreshLayout refreshLayout) {
mPresenter.queryTables(refreshLayout);
mPresenter.queryTables(refreshLayout, true);
}
public void changeAreaSort(long id, long sort, long targetId, long targetSort) {
mPresenter.changeAreaSort(id, sort, targetId, targetSort);
}
public void changeTableSort() {
mPresenter.changeTableSort();
}
public void updateTableServiceCharge(List<TableRequest.UpdateServiceCharge> request) {
mPresenter.updateTableServiceCharge(request);
}
@Override
......@@ -233,11 +262,15 @@ public class TableManageActivity extends BaseFragmentActivity<TableManagePresent
switch (type) {
case ADD_AREA_SUCCESS:
case UPDATE_AREA_SUCCESS:
AddAreaFragment addAreaFragment = (AddAreaFragment) fragment;
addAreaFragment.pop();
AreaListFragment areaListFragment = findFragment(AreaListFragment.class);
AreaListFragment areaListFragment = (AreaListFragment) fragment;
if (areaListFragment != null) {
areaListFragment.updateAreaData(areas);
if (type == ADD_AREA_SUCCESS) {
areaListFragment.addSuccess();
}
}
TableListFragment tableListFragment = findFragment(TableListFragment.class);
if(tableListFragment != null){
tableListFragment.updateTableData(mTableAreaList, mTableList);
}
break;
case DELETE_AREA_SUCCESS:
......@@ -246,29 +279,43 @@ public class TableManageActivity extends BaseFragmentActivity<TableManagePresent
case QUERY_AREA_SUCCESS:
break;
case CHANGE_AREA_SORT:
break;
}
}
}
@Override
public void queryTablesSuccess(List<TableItem> tables, int type) {
if (mTableList.size() > 0) {
mTableList.clear();
}
this.mTableList.addAll(tables);
ISupportFragment fragment = getTopFragment();
if (fragment != null) {
if (fragment instanceof TableListFragment) {
TableListFragment tableListFragment = (TableListFragment) fragment;
tableListFragment.updateTableData(tables);
tableListFragment.updateTableData(mTableAreaList, tables);
}
TableListFragment tableListFragment = findFragment(TableListFragment.class);
switch (type) {
case ADD_TABLE_SUCCESS:
case UPDATE_TABLE_SUCCESS:
AddTableFragment addTableFragment = (AddTableFragment) fragment;
addTableFragment.pop();
TableListFragment tableListFragment = findFragment(TableListFragment.class);
if (tableListFragment != null) {
tableListFragment.updateTableData(tables);
tableListFragment.updateTableData(mTableAreaList, tables);
}
break;
case DELETE_TABLE_SUCCESS:
case UPDATE_TABLE_SERVICE_CHARGE:
if (fragment instanceof TableListFragment) {
tableListFragment.backEdit();
}
break;
case CHANGE_TABLE_SORT:
break;
case QUERY_TABLE_SUCCESS:
......@@ -290,8 +337,29 @@ public class TableManageActivity extends BaseFragmentActivity<TableManagePresent
}
}
@Override
public void onStartRefreshTableData() {
isRefreshData = true;
mPresenter.startTableTimer();
mPresenter.queryTables(null, false);
}
@Override
public void onPauseRefreshTableData() {
isRefreshData = false;
mPresenter.cancelTableTimer();
//立刻停止獲取餐檯接口
if (mPresenter.getGetTablesDataDisposable() != null && !mPresenter.getGetTablesDataDisposable().isDisposed()) {
mPresenter.getGetTablesDataDisposable().dispose();
}
}
public List<TableArea> getTableAreaList() {
return mTableAreaList;
}
public List<TableItem> getTableList() {
return mTableList;
}
}
package com.gingersoft.gsa.cloud.manager.mvp.ui.adapter;
import android.content.Context;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.TextView;
......@@ -50,12 +53,12 @@ public class AreaManageAdapter extends DefaultAdapter<TableArea> {
return R.layout.manager_item_manage_area;
}
class TopTableAreaItemHolder extends BaseHolder<TableArea> {
public class TopTableAreaItemHolder extends BaseHolder<TableArea> {
@BindView(R2.id.tv_name)
TextView tv_name;
// @BindView(R2.id.tv_edit)
// TextView tv_edit;
@BindView(R2.id.ed_name)
EditText ed_name;
// @BindView(R2.id.ed_input_name)
// TextView ed_input_name;
@BindView(R2.id.cb_checked)
CheckBox cb_checked;
......@@ -65,7 +68,18 @@ public class AreaManageAdapter extends DefaultAdapter<TableArea> {
@Override
public void setData(TableArea datasBean, int position) {
tv_name.setText(datasBean.getRegionName());
ed_name.setText(datasBean.getRegionName());
ed_name.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
String name = ed_name.getText().toString();
if (onTextChangedListener != null && !name.equals(datasBean.getRegionName())) {
onTextChangedListener.afterTextChanged(datasBean, name);
}
}
}
});
// tv_edit.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
......@@ -92,15 +106,15 @@ public class AreaManageAdapter extends DefaultAdapter<TableArea> {
isRadioEdit = radioEdit;
}
private OnClickListener onClickListener;
private OnTextChangedListener onTextChangedListener;
public void setOnClickListener(OnClickListener onClickListener) {
this.onClickListener = onClickListener;
public void addTextChangedListener(OnTextChangedListener onTextChangedListener) {
this.onTextChangedListener = onTextChangedListener;
}
public interface OnClickListener {
public interface OnTextChangedListener {
void onItemClick(View v, TableArea function);
void afterTextChanged(TableArea datasBean, String s);
}
}
......@@ -5,14 +5,22 @@ import android.graphics.Color;
import android.net.ParseException;
import android.os.Bundle;
import android.os.Message;
import android.text.Editable;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.gingersoft.gsa.cloud.base.application.GsaCloudApplication;
import com.gingersoft.gsa.cloud.base.utils.other.SPUtils;
import com.gingersoft.gsa.cloud.constans.PrintConstans;
import com.gingersoft.gsa.cloud.manager.R2;
......@@ -22,6 +30,8 @@ import com.gingersoft.gsa.cloud.manager.mvp.model.bean.request.AreaRequest;
import com.gingersoft.gsa.cloud.manager.mvp.ui.activity.TableManageActivity;
import com.gingersoft.gsa.cloud.manager.mvp.ui.adapter.AreaManageAdapter;
import com.gingersoft.gsa.cloud.ui.recylcler.decorator.DividerItemDecoration;
import com.gingersoft.gsa.cloud.ui.recylcler.event.OnRecyclerItemClickListener;
import com.gingersoft.gsa.cloud.ui.recylcler.event.RecyItemTouchHelperCallback;
import com.gingersoft.gsa.cloud.ui.widget.dialog.CommonTipDialog;
import com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog;
import com.google.gson.JsonIOException;
......@@ -40,6 +50,7 @@ import com.qmuiteam.qmui.alpha.QMUIAlphaFrameLayout;
import com.qmuiteam.qmui.alpha.QMUIAlphaTextView;
import com.qmuiteam.qmui.widget.QMUIEmptyView;
import com.qmuiteam.qmui.widget.QMUITopBarLayout;
import com.qmuiteam.qmui.widget.section.QMUIStickySectionAdapter;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
......@@ -63,6 +74,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.core.view.ViewCompat;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
......@@ -97,14 +109,22 @@ public class AreaListFragment extends BaseFragment<AreaListPresenter> implements
@BindView(R2.id.fl_add_area)
QMUIAlphaFrameLayout fl_add_area;
@BindView(R2.id.ll_add_area_layout)
LinearLayout ll_add_area_layout;
@BindView(R2.id.ll_bottom_operat)
LinearLayout ll_bottom_operat;
@BindView(R2.id.ed_area_name)
EditText ed_area_name;
@BindView(R2.id.cb_all_select)
CheckBox cb_all_select;
private TableManageActivity mActivity;
private AreaManageAdapter mAreaManageAdapter;
private List<TableArea> mTableAreaList = new ArrayList<>();
private boolean isSave = false;
private boolean isRadioEdit;
public static AreaListFragment newInstance() {
......@@ -135,6 +155,16 @@ public class AreaListFragment extends BaseFragment<AreaListPresenter> implements
initAdapter();
initRefreshLayout();
mActivity.queryAreas(null);
cb_all_select.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
for (int i = 0; i < mTableAreaList.size(); i++) {
mTableAreaList.get(i).setChecked(isChecked);
}
mAreaManageAdapter.notifyDataSetChanged();
}
});
}
@Override
......@@ -176,6 +206,26 @@ public class AreaListFragment extends BaseFragment<AreaListPresenter> implements
}
});
RecyItemTouchHelperCallback itemTouchHelperCallback = new RecyItemTouchHelperCallback(mAreaManageAdapter);
final ItemTouchHelper itemTouchHelper = new ItemTouchHelper(itemTouchHelperCallback);
itemTouchHelper.attachToRecyclerView(recycler_area);
recycler_area.addOnItemTouchListener(new OnRecyclerItemClickListener(recycler_area) {
@Override
public void onItemClick(RecyclerView.ViewHolder viewHolder) {
}
@Override
public void onLongClick(RecyclerView.ViewHolder viewHolder) {
AreaManageAdapter.TopTableAreaItemHolder viewHolder1 = (AreaManageAdapter.TopTableAreaItemHolder) viewHolder;
Toast.makeText(mActivity, "長按:" + viewHolder1.getAdapterPosition(), Toast.LENGTH_SHORT).show();
if (viewHolder.getLayoutPosition() != 0) {
itemTouchHelper.startDrag(viewHolder);
}
}
});
}
private void initAdapter() {
......@@ -185,13 +235,20 @@ public class AreaListFragment extends BaseFragment<AreaListPresenter> implements
mAreaManageAdapter.setOnItemClickListener(new DefaultAdapter.OnRecyclerViewItemClickListener() {
@Override
public void onItemClick(View view, int viewType, Object data, int position) {
if (isRadioEdit) {
TableArea tableArea = (TableArea) data;
tableArea.setChecked(!tableArea.isChecked());
mAreaManageAdapter.notifyDataSetChanged();
} else {
start(AddAreaFragment.newInstance((TableArea) data));
}
// if (isRadioEdit) {
// TableArea tableArea = (TableArea) data;
// tableArea.setChecked(!tableArea.isChecked());
// mAreaManageAdapter.notifyDataSetChanged();
// } else {
// start(AddAreaFragment.newInstance((TableArea) data));
// }
}
});
mAreaManageAdapter.addTextChangedListener(new AreaManageAdapter.OnTextChangedListener() {
@Override
public void afterTextChanged(TableArea datasBean, String name) {
mActivity.updateArea(createUpateAreaRequest(datasBean.getId(), name));
}
});
}
......@@ -207,11 +264,15 @@ public class AreaListFragment extends BaseFragment<AreaListPresenter> implements
recycler_area.setVisibility(View.VISIBLE);
}
public void addSuccess(){
ed_area_name.setText("");
}
@Override
public void setData(@Nullable Object data) {
}
private void initCheckedStatus(){
private void initCheckedStatus() {
for (int i = 0; i < mTableAreaList.size(); i++) {
mTableAreaList.get(i).setChecked(false);
}
......@@ -220,26 +281,37 @@ public class AreaListFragment extends BaseFragment<AreaListPresenter> implements
@OnClick(R2.id.fl_add_area)
void onClickAddArea() {
startForResult(AddAreaFragment.newInstance(null), ADD_AREA_RESULT_SUCCESS);
}
@OnClick(R2.id.btn_all_select)
void onClickAddSelect() {
for (int i = 0; i < mTableAreaList.size(); i++) {
mTableAreaList.get(i).setChecked(true);
if(ll_add_area_layout.getVisibility() == View.GONE){
ll_add_area_layout.setVisibility(View.VISIBLE);
}else {
ll_add_area_layout.setVisibility(View.GONE);
}
mAreaManageAdapter.notifyDataSetChanged();
}
@OnClick(R2.id.btn_anti_select)
void onClickAntiSelect() {
for (int i = 0; i < mTableAreaList.size(); i++) {
TableArea tableArea = mTableAreaList.get(i);
tableArea.setChecked(!tableArea.isChecked());
@OnClick(R2.id.btn_save_area)
void onClickSaveArea() {
if (addCondition()) {
mActivity.addArea(createAddAreaRequest());
}
mAreaManageAdapter.notifyDataSetChanged();
}
// @OnClick(R2.id.cb_all_select)
// void onClickAddSelect() {
// for (int i = 0; i < mTableAreaList.size(); i++) {
// mTableAreaList.get(i).setChecked(true);
// }
// mAreaManageAdapter.notifyDataSetChanged();
// }
// @OnClick(R2.id.btn_anti_select)
// void onClickAntiSelect() {
// for (int i = 0; i < mTableAreaList.size(); i++) {
// TableArea tableArea = mTableAreaList.get(i);
// tableArea.setChecked(!tableArea.isChecked());
// }
// mAreaManageAdapter.notifyDataSetChanged();
// }
@OnClick(R2.id.btn_sure)
void onClickSure() {
String ids = getDeleteIds();
......@@ -344,6 +416,30 @@ public class AreaListFragment extends BaseFragment<AreaListPresenter> implements
recycler_area.setAdapter(adapter);
}
public boolean addCondition() {
if (TextUtils.isEmpty(ed_area_name.getText().toString())) {
showMessage("請輸入區域名稱");
return false;
}
return true;
}
public AreaRequest.Add createAddAreaRequest() {
int restaurantId = GsaCloudApplication.getRestaurantId(mContext);
AreaRequest.Add areaRequest = new AreaRequest.Add();
areaRequest.setRestaurantId(restaurantId);
areaRequest.setRegionName(ed_area_name.getText().toString());
// areaRequest.setSort(Integer.parseInt(ed_area_sort.getText().toString()));
return areaRequest;
}
public AreaRequest.Update createUpateAreaRequest(int id, String name) {
AreaRequest.Update areaRequest = new AreaRequest.Update();
areaRequest.setId(id);
areaRequest.setRegionName(name);
// areaRequest.setSort(Integer.parseInt(ed_area_sort.getText().toString()));
return areaRequest;
}
private void showRadioEdit() {
if (isRadioEdit) {
......
......@@ -5,6 +5,6 @@
android:thicknessRatio="20"
android:useLevel="false">
<solid android:color="#FF3333" />
<solid android:color="#1196DB" />
</shape>
\ No newline at end of file
......@@ -5,57 +5,3 @@
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!--<?xml version="1.0" encoding="utf-8"?>-->
<!--<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"-->
<!-- xmlns:app="http://schemas.android.com/apk/res-auto"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:orientation="vertical">-->
<!-- <com.qmuiteam.qmui.widget.QMUITopBar-->
<!-- android:id="@+id/topbar"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="?attr/qmui_topbar_height"-->
<!-- app:qmui_topbar_title_color="@color/theme_white_color" />-->
<!-- <com.qmuiteam.qmui.widget.section.QMUIStickySectionLayout-->
<!-- android:id="@+id/section_layout"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_marginTop="?attr/qmui_topbar_height"/>-->
<!-- <com.qmuiteam.qmui.alpha.QMUIAlphaTextView-->
<!-- android:id="@+id/tv_area_list"-->
<!-- android:layout_width="@dimen/dp_65"-->
<!-- android:layout_height="@dimen/dp_65"-->
<!-- android:layout_toLeftOf="@+id/tv_add_table"-->
<!-- android:layout_marginRight="@dimen/dp_15"-->
<!-- android:layout_marginBottom="@dimen/dp_20"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:text="@string/manager_area"-->
<!-- android:textSize="@dimen/sp_14"-->
<!-- android:textColor="@color/theme_white_color"-->
<!-- android:gravity="center"-->
<!-- android:background="@drawable/ui_shape_theme_oval"/>-->
<!-- <com.qmuiteam.qmui.alpha.QMUIAlphaTextView-->
<!-- android:id="@+id/tv_add_table"-->
<!-- android:layout_width="@dimen/dp_65"-->
<!-- android:layout_height="@dimen/dp_65"-->
<!-- android:layout_marginBottom="@dimen/dp_20"-->
<!-- android:layout_marginRight="@dimen/dp_20"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_alignParentRight="true"-->
<!-- android:text="@string/manager_add"-->
<!-- android:textColor="@color/theme_white_color"-->
<!-- android:textSize="@dimen/sp_14"-->
<!-- android:gravity="center"-->
<!-- android:background="@drawable/manage_shape_add_btn_oval"/>-->
<!-- <FrameLayout-->
<!-- android:id="@+id/frameLayout"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_marginTop="?attr/qmui_topbar_height" />-->
<!--</RelativeLayout>-->
......@@ -10,90 +10,127 @@
android:layout_height="match_parent"
android:layout_marginTop="?attr/qmui_topbar_height">
<com.qmuiteam.qmui.widget.QMUIEmptyView
android:id="@+id/emptyView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true" />
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/refreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:srlEnableLoadMore="false">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_area"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:spanCount="1" />
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@color/theme_white_color">
<com.qmuiteam.qmui.widget.QMUIEmptyView
android:id="@+id/emptyView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_area"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:spanCount="1" />
<LinearLayout
android:id="@+id/ll_add_area_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
<EditText
android:id="@+id/ed_area_name"
android:layout_width="0dp"
android:layout_height="@dimen/dp_48"
android:layout_weight="1"
android:background="@null"
android:hint="請輸入打區域名稱"
android:maxLength="20"
android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_10"
android:singleLine="true"
android:textColor="@color/normal_color"
android:textColorHint="@color/hint_color"
android:textSize="@dimen/sp_16"
android:visibility="visible"/>
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
android:id="@+id/btn_save_area"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_38"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_gravity="right|center_vertical"
android:background="@color/theme_red_color"
android:text="保存"
android:textColor="@color/theme_white_color"
android:textSize="@dimen/sp_14"
app:qmui_backgroundColor="@color/theme_color"
app:qmui_radius="@dimen/dp_5" />
</LinearLayout>
</LinearLayout>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</FrameLayout>
<LinearLayout
android:id="@+id/ll_bottom_operat"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
android:layout_height="@dimen/dp_45"
android:layout_gravity="bottom"
android:background="@color/theme_white_color"
android:orientation="horizontal"
android:visibility="gone"
android:weightSum="3">
android:paddingLeft="@dimen/dp_15"
android:paddingRight="@dimen/dp_15"
android:visibility="gone">
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id="@+id/btn_all_select"
android:layout_width="@dimen/dp_0"
<CheckBox
android:id="@+id/cb_all_select"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/theme_color"
android:text="全選"
android:textColor="@color/theme_white_color"
android:textColor="@color/theme_black"
android:textSize="@dimen/sp_14" />
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id="@+id/btn_anti_select"
android:layout_width="@dimen/dp_0"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_1"
android:layout_weight="1"
android:background="@color/theme_color"
android:text="反選"
android:textColor="@color/theme_white_color"
android:textSize="@dimen/sp_14" />
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
android:id="@+id/btn_sure"
android:layout_width="@dimen/dp_0"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_1"
android:layout_weight="1"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_38"
android:layout_gravity="right|center_vertical"
android:background="@color/theme_red_color"
android:text="刪除"
android:textColor="@color/theme_white_color"
android:textSize="@dimen/sp_14" />
android:textSize="@dimen/sp_14"
app:qmui_backgroundColor="@color/theme_color"
app:qmui_radius="@dimen/dp_5" />
</LinearLayout>
<!-- <com.qmuiteam.qmui.alpha.QMUIAlphaTextView-->
<!-- android:id="@+id/tv_add_area"-->
<!-- android:layout_width="@dimen/dp_65"-->
<!-- android:layout_height="@dimen/dp_65"-->
<!-- android:layout_gravity="bottom|right"-->
<!-- android:layout_marginBottom="@dimen/dp_20"-->
<!-- android:layout_marginRight="@dimen/dp_20"-->
<!-- android:background="@drawable/manage_shape_add_btn_oval"-->
<!-- android:gravity="center"-->
<!-- android:text="+"-->
<!-- android:textColor="@color/theme_white_color"-->
<!-- android:textSize="@dimen/sp_14" />-->
<!-- <com.qmuiteam.qmui.alpha.QMUIAlphaTextView-->
<!-- android:id="@+id/tv_add_area"-->
<!-- android:layout_width="@dimen/dp_65"-->
<!-- android:layout_height="@dimen/dp_65"-->
<!-- android:layout_gravity="bottom|right"-->
<!-- android:layout_marginBottom="@dimen/dp_20"-->
<!-- android:layout_marginRight="@dimen/dp_20"-->
<!-- android:background="@drawable/manage_shape_add_btn_oval"-->
<!-- android:gravity="center"-->
<!-- android:text="+"-->
<!-- android:textColor="@color/theme_white_color"-->
<!-- android:textSize="@dimen/sp_14" />-->
<com.qmuiteam.qmui.alpha.QMUIAlphaFrameLayout
android:id="@+id/fl_add_area"
android:layout_width="@dimen/dp_65"
android:layout_height="@dimen/dp_65"
android:layout_gravity="bottom|right"
android:layout_marginBottom="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_45"
android:layout_marginRight="@dimen/dp_20"
android:background="@drawable/manage_shape_add_btn_oval">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -28,8 +28,7 @@
<com.qmuiteam.qmui.widget.section.QMUIStickySectionLayout
android:id="@+id/section_table"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/dp_10"/>
android:layout_height="wrap_content" />
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</FrameLayout>
......@@ -48,6 +47,7 @@
android:layout_marginBottom="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_20"
android:background="@drawable/manage_shape_add_btn_oval">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -55,60 +55,53 @@
android:src="@drawable/add_white" />
</com.qmuiteam.qmui.alpha.QMUIAlphaFrameLayout>
<com.qmuiteam.qmui.alpha.QMUIAlphaTextView
android:id="@+id/tv_area"
android:layout_width="@dimen/dp_65"
android:layout_height="@dimen/dp_65"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_15"
android:layout_toLeftOf="@+id/fl_add_table"
android:background="@drawable/ui_shape_theme_oval"
android:gravity="center"
android:text="@string/manager_area"
android:textColor="@color/theme_white_color"
android:textSize="@dimen/sp_14" />
<LinearLayout
android:id="@+id/ll_bottom_operat"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
android:weightSum="3"
android:layout_height="@dimen/dp_45"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:visibility="gone">
android:gravity="center_vertical"
android:paddingLeft="@dimen/dp_15"
android:paddingRight="@dimen/dp_15"
android:visibility="gone"
android:background="@color/theme_white_color">
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id="@+id/btn_all_select"
android:layout_width="@dimen/dp_0"
<CheckBox
android:id="@+id/cb_all_select"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:textColor="@color/theme_white_color"
android:textSize="@dimen/sp_14"
android:text="全選"
android:background="@color/theme_color"/>
android:textColor="@color/theme_black"
android:textSize="@dimen/sp_14" />
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id="@+id/btn_anti_select"
android:layout_width="@dimen/dp_0"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginLeft="@dimen/dp_1"
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
android:id="@+id/btn_modify_serviceCharge"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_38"
android:layout_gravity="right|center_vertical"
android:background="@color/theme_red_color"
android:text="批量修改服務費"
android:textColor="@color/theme_white_color"
android:textSize="@dimen/sp_14"
android:background="@color/theme_color"
android:text="反選"/>
android:layout_marginRight="@dimen/dp_10"
android:paddingRight="@dimen/dp_8"
android:paddingLeft="@dimen/dp_8"
app:qmui_backgroundColor="@color/theme_color"
app:qmui_radius="@dimen/dp_5" />
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id="@+id/btn_sure"
android:layout_width="@dimen/dp_0"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginLeft="@dimen/dp_1"
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
android:id="@+id/btn_delete"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_38"
android:layout_gravity="right|center_vertical"
android:background="@color/theme_red_color"
android:text="刪除"
android:textColor="@color/theme_white_color"
android:textSize="@dimen/sp_14"
android:background="@color/theme_red_color"
android:text="刪除"/>
app:qmui_backgroundColor="@color/theme_color"
app:qmui_radius="@dimen/dp_5" />
</LinearLayout>
</RelativeLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_48"
android:gravity="center_vertical"
android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_10">
<!--<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="vertical"-->
<!--&gt;-->
<TextView
android:id="@+id/tv_name"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:textColor="@color/theme_black"
android:textSize="@dimen/sp_14"
android:text="大廳"/>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_48"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_10">
<EditText
android:id="@+id/ed_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:maxLength="20"
android:singleLine="true"
android:text="大廳"
android:textColor="@color/theme_black"
android:textSize="@dimen/sp_16" />
<CheckBox
android:id="@+id/cb_checked"
......@@ -22,13 +32,33 @@
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_20"
android:visibility="gone" />
<!-- <com.qmuiteam.qmui.alpha.QMUIAlphaTextView-->
<!-- android:id="@+id/tv_edit"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="編輯"-->
<!-- android:textColor="@color/theme_color"-->
<!-- android:textSize="@dimen/sp_14" />-->
</LinearLayout>
<!-- <com.qmuiteam.qmui.alpha.QMUIAlphaTextView-->
<!-- android:id="@+id/tv_edit"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:textColor="@color/theme_color"-->
<!-- android:textSize="@dimen/sp_14"-->
<!-- android:text="編輯"/>-->
<!-- <View-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="@dimen/dp_1"-->
<!-- android:background="@color/theme_hint_color"/>-->
</LinearLayout>
\ No newline at end of file
<!-- <EditText-->
<!-- android:id="@+id/ed_input_name"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="@dimen/dp_48"-->
<!-- android:paddingLeft="@dimen/dp_10"-->
<!-- android:paddingRight="@dimen/dp_10"-->
<!-- android:background="@null"-->
<!-- android:hint="請輸入打區域名稱"-->
<!-- android:maxLength="20"-->
<!-- android:singleLine="true"-->
<!-- android:textColor="@color/normal_color"-->
<!-- android:textColorHint="@color/hint_color"-->
<!-- android:textSize="@dimen/sp_16"-->
<!-- android:visibility="gone">-->
<!-- </EditText>-->
<!--</LinearLayout>-->
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.qmuiteam.qmui.layout.QMUIRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/theme_background_color">
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@color/theme_white_color">
<LinearLayout
android:layout_width="@dimen/dp_100"
android:layout_height="wrap_content"
android:background="@drawable/ui_selector_item_background"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/dp_10"
android:layout_margin="@dimen/dp_10">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text=""
android:textColor="@color/theme_black"
android:textSize="@dimen/sp_16" />
<TextView
android:id="@+id/tv_service_fee"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_2"
android:text=""
android:textColor="@color/theme_text_pice_color"
android:textSize="@dimen/sp_16" />
<com.qmuiteam.qmui.alpha.QMUIAlphaRelativeLayout
android:id="@+id/rl_table"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_table"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:ellipsize="end"
android:maxLines="1"
android:text="Button"
android:textColor="#FF000000"
android:textSize="@dimen/dp_22" />
<TextView
android:id="@+id/tv_people"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_table"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_3"
android:text=""
android:textColor="@color/theme_white_color"
android:textSize="@dimen/sp_13"
android:visibility="visible" />
<TextView
android:id="@+id/tv_service_fee"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_2"
android:layout_below="@+id/tv_people"
android:text=""
android:textColor="@color/theme_text_pice_color"
android:textSize="@dimen/sp_16" />
<!-- <com.qmuiteam.qmui.alpha.QMUIAlphaButton-->
<!-- android:id="@+id/btn_showMain"-->
<!-- style="@style/ButtonBorderless"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="96dp"-->
<!-- android:layout_alignParentLeft="true"-->
<!-- android:layout_alignParentRight="true"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginLeft="0dp"-->
<!-- android:layout_marginTop="0dp"-->
<!-- android:text="Button"-->
<!-- android:textSize="@dimen/dp_16"-->
<!-- android:visibility="gone" />-->
<!-- <ImageView-->
<!-- android:id="@+id/iv_vip"-->
<!-- android:layout_width="50dp"-->
<!-- android:layout_height="50dp"-->
<!-- android:layout_alignParentLeft="true"-->
<!-- android:layout_alignParentTop="true"-->
<!-- android:scaleType="fitXY"-->
<!-- android:src="@drawable/qmui_icon_tip_new"-->
<!-- android:visibility="gone" />-->
<!-- <TextView-->
<!-- android:id="@+id/tv_scan_flag"-->
<!-- android:layout_width="25dp"-->
<!-- android:layout_height="25dp"-->
<!-- android:layout_alignParentTop="true"-->
<!-- android:layout_alignParentRight="true"-->
<!-- android:text="S"-->
<!-- android:background="@color/orange_700"-->
<!-- android:textColor="@color/theme_white_color"-->
<!-- android:gravity="center"-->
<!-- android:visibility="gone"-->
<!-- android:textSize="@dimen/font_normal2" />-->
<CheckBox
android:id="@+id/cb_checked"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_2"
android:visibility="gone" />
</LinearLayout>
</FrameLayout>
android:layout_centerHorizontal="true"
android:layout_below="@+id/tv_service_fee"
android:visibility="invisible" />
</com.qmuiteam.qmui.alpha.QMUIAlphaRelativeLayout>
<com.gingersoft.gsa.cloud.ui.view.TriangleLabelView
android:id="@+id/tlv_table_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
app:backgroundColor="@color/theme_white_color"
app:corner="rightBottom"
app:primaryText="堂"
app:primaryTextColor="#249B65"
app:primaryTextSize="10sp"
android:visibility="gone"/>
<FrameLayout
android:id="@+id/fl_add_table"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="+"
android:textColor="#ff3c3c3c"
android:textSize="31sp"/>
</FrameLayout>
</com.qmuiteam.qmui.layout.QMUIRelativeLayout>
......@@ -93,7 +93,6 @@ public class StateTableFragment extends BaseFragment<StateTablePresenter> implem
} else if(mContext instanceof OrderContentActivity){
mOrderContentActivity = (OrderContentActivity) mContext;
}
initRecycleScrollListener();
}
......
......@@ -12,11 +12,9 @@
android:id="@+id/recycle_all_table"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/theme_background_color"
android:overScrollMode="never" />
android:background="@color/theme_background_color" />
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
<com.qmuiteam.qmui.widget.QMUIEmptyView
android:id="@+id/emptyView"
android:layout_width="match_parent"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment