Commit 7878b112 by Wyh

Merge remote-tracking branch 'origin/dev' into dev

parents a09643b6 750a0147
......@@ -29,7 +29,7 @@ buildscript {
// classpath 'org.aspectj:aspectjtools:1.8.13' // add
// classpath 'org.aspectj:aspectjrt:1.8.13' // add
classpath fileTree(dir: 'plugins', include: ['*.jar'])
// classpath fileTree(dir: 'plugins', include: ['*.jar'])
}
}
......
......@@ -109,6 +109,14 @@ public class MyOrderManage {
*/
private boolean modifyOrder = false;
/**
* 訂單類型(0=堂食,1=外賣)
*/
private int orderType;
public static final int order_type_0 = 0;
public static final int order_type_1 = 1;
public long getOrderId() {
if (orderBean != null) {
return orderBean.getId();
......@@ -498,6 +506,14 @@ public class MyOrderManage {
}
}
public int getOrderType() {
return orderType;
}
public void setOrderType(int orderType) {
this.orderType = orderType;
}
public List<PayMethod> getBillMoney() {
return billMoney;
}
......
......@@ -4,6 +4,7 @@ import com.billy.cc.core.component.CC;
import com.billy.cc.core.component.CCResult;
import com.billy.cc.core.component.CCUtil;
import com.billy.cc.core.component.IComponent;
import com.gingersoft.gsa.cloud.bean.mvp.ui.activity.MealStandActivity;
import com.gingersoft.gsa.cloud.function.FModule;
import com.gingersoft.gsa.cloud.bean.mvp.ui.activity.SoldoutCtrlActivity;
import com.gingersoft.gsa.cloud.bean.mvp.ui.activity.orderManager.OrderCenterActivity;
......@@ -58,6 +59,9 @@ public class ComponentTable implements IComponent {
case "showTableActivity":
openTableActivity(cc);
break;
case "showMealStandActivity":
openMealStandActivity(cc);
break;
case "showOrderPayActivity":
openOrderPayActivity(cc);
break;
......@@ -117,6 +121,11 @@ public class ComponentTable implements IComponent {
CC.sendCCResult(cc.getCallId(), CCResult.success());
}
private void openMealStandActivity(CC cc) {
CCUtil.navigateTo(cc, MealStandActivity.class);
CC.sendCCResult(cc.getCallId(), CCResult.success());
}
private void openOrderPayActivity(CC cc) {
CCUtil.navigateTo(cc, OrderPayActivity.class);
CC.sendCCResult(cc.getCallId(), CCResult.success());
......
......@@ -231,6 +231,12 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
}
showDiscountDialog();
break;
case "送單信息":
CC.obtainBuilder("ComponentDeliveryPick")
.setActionName("SendOrder")
.build()
.call();
break;
}
}
......@@ -277,11 +283,17 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
// if (functions.size() > 0) {
// mFunctionList.addAll(functions);
// } else {
mFunctionList.add(new Function("送單", Color.parseColor("#FFFFFF"), Color.parseColor("#008131"), 24));
mFunctionList.add(new Function("印單", Color.parseColor("#FFFFFF"), Color.parseColor("#FF8E04"), 24));
mFunctionList.add(new Function("結賬", Color.parseColor("#FFFFFF"), Color.parseColor("#DC0000"), 24));
mFunctionList.add(new Function("轉移", Color.parseColor("#FFFFFF"), Color.parseColor("#FF4B9DFA"), 24));
mFunctionList.add(new Function("折扣", Color.parseColor("#FFFFFF"), Color.parseColor("#008577"), 24));
if (MyOrderManage.getInstance().getOrderType() == MyOrderManage.order_type_1) {
mFunctionList.add(new Function("折扣", Color.parseColor("#FFFFFF"), Color.parseColor("#008577"), 24));
mFunctionList.add(new Function("印單", Color.parseColor("#FFFFFF"), Color.parseColor("#FF8E04"), 24));
mFunctionList.add(new Function("送單信息", Color.parseColor("#FFFFFF"), Color.parseColor("#008131"), 24));
}else {
mFunctionList.add(new Function("送單", Color.parseColor("#FFFFFF"), Color.parseColor("#008131"), 24));
mFunctionList.add(new Function("印單", Color.parseColor("#FFFFFF"), Color.parseColor("#FF8E04"), 24));
mFunctionList.add(new Function("結賬", Color.parseColor("#FFFFFF"), Color.parseColor("#DC0000"), 24));
mFunctionList.add(new Function("轉移", Color.parseColor("#FFFFFF"), Color.parseColor("#FF4B9DFA"), 24));
mFunctionList.add(new Function("折扣", Color.parseColor("#FFFFFF"), Color.parseColor("#008577"), 24));
}
// }
}
}
......
......@@ -23,6 +23,7 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.billy.cc.core.component.CC;
import com.gingersoft.gsa.cloud.aspectj.XClickUtil;
import com.gingersoft.gsa.cloud.base.application.GsaCloudApplication;
import com.gingersoft.gsa.cloud.base.common.bean.MemberInfo;
......@@ -290,6 +291,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
public void initData(@Nullable Bundle savedInstanceState) {
initUIStyleConfiguration();
initTableDetail();
initViewMap();
//初始化Plu模式
setPluMode();
......@@ -311,7 +313,6 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
mPresenter.getCurrentSoldoutFood();
// setViewDrawableColor();
initTableDetail();
}
private void initUIStyleConfiguration() {
......@@ -327,6 +328,15 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
if (OpenTableManage.getDefault().getPeopleNumber() == 0) {
showChoosePeopleNumDialog(false);
}
if (MyOrderManage.getInstance().getOrderType() == MyOrderManage.order_type_1) {
TableBean.DataBean tableBean = new TableBean.DataBean();
tableBean.setPerson(1);
tableBean.setTableName("外賣");
OpenTableManage.getDefault().setPeopleNumber(1);
OpenTableManage.getDefault().setTableBean(tableBean);
btn_send_order.setText("送單信息");
}
}
@Override
......@@ -580,6 +590,13 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
@OnClick(R2.id.btn_table)
void onClickTable() {
if (MyOrderManage.getInstance().getOrderType() == MyOrderManage.order_type_1) {
CC.obtainBuilder("ComponentDeliveryPick")
.setActionName("SendOrder")
.build()
.call();
return;
}
//type取值:1:qrCdoetype,2:手機號,3:memberId
if (mUseMemberDialog == null) {
mUseMemberDialog = new UseMemberDialog(this)
......@@ -688,6 +705,9 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
int id = v.getId();
if (id == R.id.btn_numberman) {
if (MyOrderManage.getInstance().getOrderType() == MyOrderManage.order_type_1) {
return;
}
showChoosePeopleNumDialog(true);
} else if (id == R.id.btn_fid) {
//搜索
......
......@@ -4,7 +4,6 @@ import android.content.Intent;
import android.os.Bundle;
import android.os.Message;
import android.view.View;
import com.gingersoft.gsa.cloud.bean.R;
import com.gingersoft.gsa.cloud.bean.R2;
import com.gingersoft.gsa.cloud.bean.di.component.DaggerOrderCenterComponent;
......@@ -22,18 +21,14 @@ import com.qmuiteam.qmui.widget.QMUITopBar;
import com.qmuiteam.qmui.widget.tab.QMUITabIndicator;
import com.qmuiteam.qmui.widget.tab.QMUITabSegment;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import org.simple.eventbus.Subscriber;
import java.util.List;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import static com.jess.arms.utils.Preconditions.checkNotNull;
......
......@@ -8,12 +8,12 @@ import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.gingersoft.gsa.cloud.base.R2;
import com.gingersoft.gsa.cloud.base.application.GsaCloudApplication;
import com.gingersoft.gsa.cloud.base.order.bean.OrderDetail;
import com.gingersoft.gsa.cloud.base.order.bean.mealManger.MyOrderManage;
import com.gingersoft.gsa.cloud.base.utils.MoneyUtil;
import com.gingersoft.gsa.cloud.bean.R;
import com.gingersoft.gsa.cloud.bean.R2;
import com.gingersoft.gsa.cloud.bean.mvp.presenter.MealStandPresenter;
import com.gingersoft.gsa.cloud.bean.mvp.presenter.OrderContentPresenter;
import com.gingersoft.gsa.cloud.bean.mvp.ui.activity.MealStandActivity;
......
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