Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supplier
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王宇航
supplier
Commits
a1867471
Commit
a1867471
authored
Oct 31, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加skyokrder打印頁面UI
parent
6e91dc54
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
450 additions
and
59 deletions
+450
-59
base-module/build.gradle
+2
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/time/TimePickerUtils.java
+2
-2
base-module/src/main/java/com/gingersoft/gsa/cloud/ui/view/timeselect/BasePickerView.java
+0
-1
base-module/src/main/java/com/gingersoft/gsa/cloud/ui/view/timeselect/TimePickerView.java
+0
-1
base-module/src/main/res/drawable/shape_rect_radius_black_5.xml
+0
-0
base-module/src/main/res/drawable/shape_rect_radius_white_5.xml
+0
-0
base-module/src/main/res/drawable/shape_rect_top_radius_black_5.xml
+10
-0
base-module/src/main/res/drawable/shape_rect_top_radius_white_5.xml
+10
-0
base-module/src/main/res/layout/dialog_print_qrcode.xml
+4
-4
base-module/src/main/res/layout/table_dialog_intergral_keypad.xml
+2
-2
base-module/src/main/res/layout/table_dialog_pay_keypad.xml
+2
-2
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/mvp/ui/activity/SendOrderActivity.java
+43
-14
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/ui/activity/DeliveryOrderMainActivity.kt
+3
-3
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/action/ResetTableAction.java
+13
-7
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
+3
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/MealStandActivity.java
+1
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/DiscountAdapter.java
+0
-3
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/widget/SkyOrderDialog.java
+264
-0
table-module/src/main/res/layout/table_activity_meal_stand.xml
+0
-1
table-module/src/main/res/layout/table_activity_table.xml
+15
-15
table-module/src/main/res/layout/table_dialog_skyorder.xml
+76
-0
table-module/src/main/res/layout/table_input_skyorder_people_number.xml
+0
-0
No files found.
base-module/build.gradle
View file @
a1867471
...
...
@@ -110,6 +110,8 @@ dependencies {
api
rootProject
.
ext
.
dependencies
[
"loadsir"
]
//rxjava,rxbinding相關工具類
api
'com.github.xuexiangjys:RxUtil2:1.1.5'
//时间选择器
api
rootProject
.
ext
.
dependencies
[
"pickerview"
]
api
rootProject
.
ext
.
dependencies
[
"permissionx"
]
api
rootProject
.
ext
.
dependencies
[
"design"
]
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/time/TimePickerUtils.java
View file @
a1867471
...
...
@@ -3,9 +3,9 @@ package com.gingersoft.gsa.cloud.base.utils.time;
import
android.content.Context
;
import
android.graphics.Color
;
import
com.bigkoo.pickerview.builder.TimePickerBuilder
;
import
com.bigkoo.pickerview.listener.OnTimeSelectListener
;
import
com.bigkoo.pickerview.view.TimePickerView
;
import
com.gingersoft.gsa.cloud.ui.view.timeselect.TimePickerView
;
import
com.gingersoft.gsa.cloud.ui.view.timeselect.builder.TimePickerBuilder
;
import
java.util.Calendar
;
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/ui/view/timeselect/BasePickerView.java
View file @
a1867471
...
...
@@ -15,7 +15,6 @@ import android.view.Window;
import
android.view.animation.Animation
;
import
android.view.animation.AnimationUtils
;
import
android.widget.FrameLayout
;
import
com.bigkoo.pickerview.R
;
import
com.bigkoo.pickerview.configure.PickerOptions
;
import
com.bigkoo.pickerview.listener.OnDismissListener
;
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/ui/view/timeselect/TimePickerView.java
View file @
a1867471
...
...
@@ -8,7 +8,6 @@ import android.widget.Button;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
com.bigkoo.pickerview.R
;
import
com.bigkoo.pickerview.configure.PickerOptions
;
import
com.bigkoo.pickerview.listener.ISelectTimeCallback
;
...
...
base-module/src/main/res/drawable/shape_rect_
fillet_theme
_black_5.xml
→
base-module/src/main/res/drawable/shape_rect_
radius
_black_5.xml
View file @
a1867471
File moved
base-module/src/main/res/drawable/shape_rect_
fillet
_white_5.xml
→
base-module/src/main/res/drawable/shape_rect_
radius
_white_5.xml
View file @
a1867471
File moved
base-module/src/main/res/drawable/shape_rect_top_radius_black_5.xml
0 → 100644
View file @
a1867471
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#2B2B2B"
/>
<corners
android:topLeftRadius=
"@dimen/normal_space5"
/>
<corners
android:topRightRadius=
"@dimen/normal_space5"
/>
</shape>
\ No newline at end of file
base-module/src/main/res/drawable/shape_rect_top_radius_white_5.xml
0 → 100644
View file @
a1867471
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/theme_white_color"
/>
<corners
android:topLeftRadius=
"@dimen/normal_space5"
/>
<corners
android:topRightRadius=
"@dimen/normal_space5"
/>
</shape>
\ No newline at end of file
base-module/src/main/res/layout/dialog_print_qrcode.xml
View file @
a1867471
...
...
@@ -4,7 +4,7 @@
android:id=
"@+id/lLayout_bg"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_rect_
fillet_theme
_black_5"
android:background=
"@drawable/shape_rect_
radius
_black_5"
android:orientation=
"vertical"
android:paddingLeft=
"3dp"
android:paddingTop=
"@dimen/normal_space"
...
...
@@ -36,7 +36,7 @@
android:layout_gravity=
"right"
android:layout_marginLeft=
"@dimen/normal_space15"
android:layout_toRightOf=
"@+id/tv_table_name"
android:background=
"@drawable/shape_rect_
fillet
_white_5"
android:background=
"@drawable/shape_rect_
radius
_white_5"
android:ems=
"10"
android:enabled=
"false"
android:gravity=
"right|center_vertical"
...
...
@@ -90,7 +90,7 @@
android:layout_height=
"match_parent"
android:layout_marginLeft=
"20dp"
android:layout_weight=
"2"
android:background=
"@drawable/shape_rect_
fillet
_white_5"
android:background=
"@drawable/shape_rect_
radius
_white_5"
android:drawableRight=
"@drawable/ic_dropdown_black"
android:gravity=
"center"
android:paddingLeft=
"@dimen/normal_space"
...
...
@@ -115,7 +115,7 @@
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"2"
android:background=
"@drawable/shape_rect_
fillet
_white_5"
android:background=
"@drawable/shape_rect_
radius
_white_5"
android:drawableRight=
"@drawable/ic_dropdown_black"
android:gravity=
"center"
android:paddingLeft=
"@dimen/normal_space"
...
...
base-module/src/main/res/layout/table_dialog_intergral_keypad.xml
View file @
a1867471
...
...
@@ -3,7 +3,7 @@
android:id=
"@+id/lLayout_bg"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_rect_
fillet_theme
_black_5"
android:background=
"@drawable/shape_rect_
radius
_black_5"
android:orientation=
"vertical"
android:paddingBottom=
"@dimen/normal_space"
android:paddingLeft=
"3dp"
...
...
@@ -25,7 +25,7 @@
android:layout_below=
"@+id/tv_pay_method"
android:layout_centerInParent=
"true"
android:layout_marginTop=
"@dimen/dp_5"
android:background=
"@drawable/shape_rect_
fillet
_white_5"
android:background=
"@drawable/shape_rect_
radius
_white_5"
android:ems=
"10"
android:focusable=
"false"
android:gravity=
"right|center_vertical"
...
...
base-module/src/main/res/layout/table_dialog_pay_keypad.xml
View file @
a1867471
...
...
@@ -3,7 +3,7 @@
android:id=
"@+id/lLayout_bg"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_rect_
fillet_theme
_black_5"
android:background=
"@drawable/shape_rect_
radius
_black_5"
android:orientation=
"vertical"
android:paddingBottom=
"@dimen/normal_space"
android:paddingLeft=
"3dp"
...
...
@@ -25,7 +25,7 @@
android:layout_below=
"@+id/tv_pay_method"
android:layout_centerInParent=
"true"
android:layout_marginTop=
"@dimen/dp_5"
android:background=
"@drawable/shape_rect_
fillet
_white_5"
android:background=
"@drawable/shape_rect_
radius
_white_5"
android:ems=
"10"
android:focusable=
"false"
android:gravity=
"right|center_vertical"
...
...
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/mvp/ui/activity/SendOrderActivity.java
View file @
a1867471
...
...
@@ -8,7 +8,6 @@ import android.widget.ImageView;
import
android.widget.LinearLayout
;
import
android.widget.RadioGroup
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.constraintlayout.widget.Group
;
...
...
@@ -21,6 +20,7 @@ import com.gingersoft.gsa.cloud.base.order.billItem.BillOrderMoney;
import
com.gingersoft.gsa.cloud.base.order.cart.ShoppingCart
;
import
com.gingersoft.gsa.cloud.base.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.order.order.TakeawayOrder
;
import
com.gingersoft.gsa.cloud.base.utils.other.SPUtils
;
import
com.gingersoft.gsa.cloud.base.utils.other.TextUtil
;
import
com.gingersoft.gsa.cloud.base.utils.time.TimePickerUtils
;
import
com.gingersoft.gsa.cloud.base.utils.time.TimeUtils
;
...
...
@@ -42,16 +42,13 @@ import com.jess.arms.utils.ArmsUtils;
import
com.qmuiteam.qmui.widget.QMUITopBar
;
import
com.qmuiteam.qmui.widget.popup.QMUIPopup
;
import
com.qmuiteam.qmui.widget.popup.QMUIPopups
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Calendar
;
import
java.util.List
;
import
butterknife.BindView
;
import
butterknife.OnClick
;
import
static
com
.
jess
.
arms
.
utils
.
Preconditions
.
checkNotNull
;
/**
...
...
@@ -114,12 +111,16 @@ public class SendOrderActivity extends BaseActivity<SendOrderPresenter> implemen
@BindView
(
R2
.
id
.
group_time
)
Group
timeGroup
;
private
TakeawayOrder
mTakeawayOrder
;
private
ShoppingCart
mShoppingCart
;
private
final
int
SELECT_ADDRESS_REQUEST_CODE
=
1001
;
private
final
int
SELECT_ADDRESS_RESULT_CODE
=
1002
;
public
final
static
String
MEMBER_NAME_KEY
=
"memberName"
;
public
final
static
String
MEMBER_PHONE_KEY
=
"memberPhone"
;
public
final
static
String
MEMBER_ADDRESS_KEY
=
"memberAddress"
;
private
TakeawayOrder
mTakeawayOrder
;
private
ShoppingCart
mShoppingCart
;
private
List
<
OrderDetail
>
orderDetails
;
@Override
public
void
setupActivityComponent
(
@NonNull
AppComponent
appComponent
)
{
...
...
@@ -132,22 +133,24 @@ public class SendOrderActivity extends BaseActivity<SendOrderPresenter> implemen
}
@Override
public
int
initView
(
@Nullable
Bundle
savedInstanceState
)
{
return
R
.
layout
.
other_order_activity_send_order
;
}
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
mTakeawayOrder
=
TakeawayOrder
.
getInstance
();
mShoppingCart
=
mTakeawayOrder
.
getShoppingCart
();
orderDetails
=
mShoppingCart
.
getOrderCommodityList
();
super
.
onCreate
(
savedInstanceState
);
}
@Override
public
int
initView
(
@Nullable
Bundle
savedInstanceState
)
{
return
R
.
layout
.
other_order_activity_send_order
;
}
@Override
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
sendTime
=
deliveryTimes
.
get
(
0
);
List
<
OrderDetails
.
DataBean
.
PRODUCTNAMEBean
>
productnameBeans
=
mPresenter
.
productnameBeans
;
List
<
OrderDetail
>
orderDetails
=
mShoppingCart
.
getOrderCommodityList
();
for
(
int
i
=
0
;
i
<
orderDetails
.
size
();
i
++)
{
OrderDetail
orderDetail
=
orderDetails
.
get
(
i
);
long
foodId
=
orderDetail
.
getProductId
();
...
...
@@ -215,11 +218,24 @@ public class SendOrderActivity extends BaseActivity<SendOrderPresenter> implemen
billBean
.
setAmount
(
billOrderMoney
.
getMoney
());
}
billBeans
.
add
(
new
BillBean
(
"合計:"
,
mShoppingCart
.
getWholeAmount
(),
0
));
billBeans
.
add
(
new
BillBean
(
"應付金額:"
,
mShoppingCart
.
getTotalAmount
(),
0
));
billBeans
.
add
(
new
BillBean
(
"應付金額:"
,
mShoppingCart
.
getTotalAmount
(),
0
));
PayBillAdapter
payBillAdapter
=
new
PayBillAdapter
(
R
.
layout
.
item_pay_bill
,
billBeans
);
rvSendOrderBills
.
setAdapter
(
payBillAdapter
);
rvSendOrderBills
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
String
memberName
=
(
String
)
SPUtils
.
get
(
MEMBER_NAME_KEY
,
""
);
String
memberPhone
=
(
String
)
SPUtils
.
get
(
MEMBER_PHONE_KEY
,
""
);
String
memberAddress
=
(
String
)
SPUtils
.
get
(
MEMBER_ADDRESS_KEY
,
""
);
if
(
TextUtil
.
isNotEmptyOrNullOrUndefined
(
memberName
))
{
edSendOrderName
.
setText
(
memberName
);
}
if
(
TextUtil
.
isNotEmptyOrNullOrUndefined
(
memberPhone
))
{
edSendOrderPhone
.
setText
(
memberPhone
);
}
if
(
TextUtil
.
isNotEmptyOrNullOrUndefined
(
memberAddress
))
{
edSendOrderAddress
.
setText
(
memberAddress
);
}
}
private
OrderDetails
.
DataBean
.
PRODUCTNAMEBean
orderDetailTranProductnameBean
(
OrderDetail
orderDetail
)
{
...
...
@@ -313,6 +329,9 @@ public class SendOrderActivity extends BaseActivity<SendOrderPresenter> implemen
mPresenter
.
submitOrder
(
edSendOrderName
.
getText
().
toString
(),
edSendOrderPhone
.
getText
().
toString
(),
edSendOrderAddress
.
getText
().
toString
(),
sendTime
);
SPUtils
.
remove
(
MEMBER_NAME_KEY
);
SPUtils
.
remove
(
MEMBER_PHONE_KEY
);
SPUtils
.
remove
(
MEMBER_ADDRESS_KEY
);
}
else
{
showMessage
(
"請輸入送貨地址"
);
}
...
...
@@ -339,6 +358,15 @@ public class SendOrderActivity extends BaseActivity<SendOrderPresenter> implemen
showMessage
(
"請輸入顧客電話"
);
}
}
else
if
(
viewId
==
R
.
id
.
tv_continue_add_food
)
{
if
(
TextUtil
.
isNotEmptyOrNullOrUndefined
(
edSendOrderName
))
{
SPUtils
.
put
(
MEMBER_NAME_KEY
,
edSendOrderName
.
getText
().
toString
());
}
if
(
TextUtil
.
isNotEmptyOrNullOrUndefined
(
edSendOrderPhone
))
{
SPUtils
.
put
(
MEMBER_PHONE_KEY
,
edSendOrderPhone
.
getText
().
toString
());
}
if
(
TextUtil
.
isNotEmptyOrNullOrUndefined
(
edSendOrderAddress
))
{
SPUtils
.
put
(
MEMBER_ADDRESS_KEY
,
edSendOrderAddress
.
getText
().
toString
());
}
killMyself
();
}
else
if
(
viewId
==
R
.
id
.
iv_select_member_arrow
||
viewId
==
R
.
id
.
iv_select_address_arrow
)
{
if
(
mPresenter
.
addressData
==
null
)
{
...
...
@@ -408,4 +436,5 @@ public class SendOrderActivity extends BaseActivity<SendOrderPresenter> implemen
}
}
}
}
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/ui/activity/DeliveryOrderMainActivity.kt
View file @
a1867471
...
...
@@ -603,9 +603,9 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen
.
setActionName
(
"showMealStandActivity"
)
.
build
()
.
call
()
SPUtils
.
remove
(
mContext
,
SendOrderActivity
.
MEMBER_NAME_KEY
)
SPUtils
.
remove
(
mContext
,
SendOrderActivity
.
MEMBER_PHONE_KEY
)
SPUtils
.
remove
(
mContext
,
SendOrderActivity
.
MEMBER_ADDRESS_KEY
)
SPUtils
.
remove
(
SendOrderActivity
.
MEMBER_NAME_KEY
)
SPUtils
.
remove
(
SendOrderActivity
.
MEMBER_PHONE_KEY
)
SPUtils
.
remove
(
SendOrderActivity
.
MEMBER_ADDRESS_KEY
)
pop
!!
.
dismiss
()
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/action/ResetTableAction.java
View file @
a1867471
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
.
action
;
import
android.app.Activity
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.base.table.bean.TableBean
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.widget.SkyOrderDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
...
...
@@ -21,17 +24,20 @@ public class ResetTableAction extends TableAction {
@Override
public
void
action
(
TableBean
.
DataBean
dataBean
)
{
setOperatContentText
(
dataBean
.
getTableName
());
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
showSplitTableDialogAction
();
}
else
{
showActionTipDialog
(
dataBean
);
}
new
SkyOrderDialog
((
Activity
)
mContext
)
.
build
()
.
show
();
// setOperatContentText(dataBean.getTableName());
// if (dataBean.getSplitStatus() == 1) {
// showSplitTableDialogAction();
// } else {
// showActionTipDialog(dataBean);
// }
}
@Override
public
boolean
filterTableCondition
(
TableBean
.
DataBean
dataBean
)
{
return
dataBean
.
getUseStatus
()
==
1
||
dataBean
.
getSplitStatus
()
==
1
;
return
dataBean
.
getUseStatus
()
==
1
||
dataBean
.
getSplitStatus
()
==
1
;
}
public
void
showActionTipDialog
(
TableBean
.
DataBean
dataBean
)
{
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
View file @
a1867471
...
...
@@ -94,10 +94,11 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
protected
M
mModel
;
protected
V
mRootView
;
protected
BaseOrderPresenter
mBaseOrderPresenter
;
private
Activity
IActivity
;
private
MealStandActivity
mMealStandActivity
;
private
OrderContentActivity
mOrderContentActivity
;
protected
BaseOrderPresenter
mBaseOrderPresenter
;
private
MealStandPresenter
mMealStandPresenter
;
/**
...
...
@@ -1390,7 +1391,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
}
p
rotected
boolean
hasNesOrderFoods
()
{
p
ublic
boolean
hasNesOrderFoods
()
{
if
(
getNewOrderFoodLists
().
size
()
>
0
)
{
return
true
;
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/MealStandActivity.java
View file @
a1867471
...
...
@@ -22,7 +22,6 @@ import android.widget.LinearLayout;
import
android.widget.RelativeLayout
;
import
android.widget.ScrollView
;
import
android.widget.TextView
;
import
com.billy.cc.core.component.CC
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.common.bean.MemberInfo
;
...
...
@@ -837,7 +836,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
}
public
void
returnTableActivity
(
boolean
initTable
)
{
if
(
!
MyOrderManage
.
getInstance
().
isModifyOrder
()
&&
mPresenter
.
hasNesOrderFoods
())
{
if
(
mPresenter
.
hasNesOrderFoods
())
{
if
(
mPresenter
.
hasNesOrderFoods
())
{
//没有过重复下单提示且有未送单食品,提示用户
String
tip
=
LanguageUtils
.
get_language_system
(
this
,
"food.not.delivered.tip"
,
"有食品未送單, 確認離開?"
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/DiscountAdapter.java
View file @
a1867471
...
...
@@ -6,7 +6,6 @@ import android.text.TextUtils;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.TextView
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
import
com.gingersoft.gsa.cloud.table.R
;
...
...
@@ -15,9 +14,7 @@ import com.gingersoft.gsa.cloud.ui.view.BeveLabelView;
import
com.jess.arms.base.BaseHolder
;
import
com.jess.arms.base.DefaultAdapter
;
import
com.jess.arms.utils.ArmsUtils
;
import
java.util.List
;
import
butterknife.BindView
;
/**
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/widget/SkyOrderDialog.java
0 → 100644
View file @
a1867471
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
ui
.
widget
;
import
android.app.Activity
;
import
android.app.Dialog
;
import
android.os.Bundle
;
import
android.util.Log
;
import
android.view.Gravity
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.WindowManager
;
import
android.view.animation.AlphaAnimation
;
import
android.view.animation.Animation
;
import
android.view.animation.AnimationSet
;
import
android.view.animation.DecelerateInterpolator
;
import
android.view.animation.TranslateAnimation
;
import
android.widget.LinearLayout
;
import
android.widget.TableLayout
;
import
android.widget.TableRow
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
import
androidx.appcompat.widget.AppCompatCheckBox
;
import
androidx.constraintlayout.widget.ConstraintLayout
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.qmuiteam.qmui.QMUILog
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaTextView
;
import
com.qmuiteam.qmui.util.QMUIDisplayHelper
;
import
com.rengwuxian.materialedittext.MaterialEditText
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
/**
* @author : bin
* @create date: 2020-10-31
* @update date: 2020-10-31
* @description:
*/
public
class
SkyOrderDialog
extends
Dialog
{
private
static
final
String
TAG
=
"SkyOrderDialog"
;
private
Activity
mContext
;
@BindView
(
R2
.
id
.
cb_title
)
AppCompatCheckBox
cbTitle
;
@BindView
(
R2
.
id
.
tv_start_time
)
TextView
tvStartTime
;
@BindView
(
R2
.
id
.
tv_split
)
TextView
tvSplit
;
@BindView
(
R2
.
id
.
tv_end_time
)
TextView
tvEndTime
;
@BindView
(
R2
.
id
.
cl_time
)
ConstraintLayout
clTime
;
@BindView
(
R2
.
id
.
rv_summary
)
RecyclerView
rvSummary
;
@BindView
(
R2
.
id
.
tv_title
)
TextView
tvTitle
;
@BindView
(
R2
.
id
.
ed_value
)
MaterialEditText
edValue
;
@BindView
(
R2
.
id
.
btn_7
)
QMUIAlphaTextView
btn7
;
@BindView
(
R2
.
id
.
btn_8
)
QMUIAlphaTextView
btn8
;
@BindView
(
R2
.
id
.
btn_9
)
QMUIAlphaTextView
btn9
;
@BindView
(
R2
.
id
.
tableRow1
)
TableRow
tableRow1
;
@BindView
(
R2
.
id
.
btn_4
)
QMUIAlphaTextView
btn4
;
@BindView
(
R2
.
id
.
btn_5
)
QMUIAlphaTextView
btn5
;
@BindView
(
R2
.
id
.
btn_6
)
QMUIAlphaTextView
btn6
;
@BindView
(
R2
.
id
.
tableRow2
)
TableRow
tableRow2
;
@BindView
(
R2
.
id
.
btn_1
)
QMUIAlphaTextView
btn1
;
@BindView
(
R2
.
id
.
btn_2
)
QMUIAlphaTextView
btn2
;
@BindView
(
R2
.
id
.
btn_3
)
QMUIAlphaTextView
btn3
;
@BindView
(
R2
.
id
.
tableRow3
)
TableRow
tableRow3
;
@BindView
(
R2
.
id
.
btn_more
)
QMUIAlphaTextView
btnMore
;
@BindView
(
R2
.
id
.
btn_0
)
QMUIAlphaTextView
btn0
;
@BindView
(
R2
.
id
.
btn_clear
)
QMUIAlphaTextView
btnClear
;
@BindView
(
R2
.
id
.
tableRow4
)
TableRow
tableRow4
;
@BindView
(
R2
.
id
.
LL_keys
)
TableLayout
LLKeys
;
@BindView
(
R2
.
id
.
btn_cha
)
QMUIAlphaTextView
btnCha
;
@BindView
(
R2
.
id
.
btn_sure
)
QMUIAlphaTextView
btnSure
;
// 动画时长
private
final
static
int
mAnimationDuration
=
300
;
// 持有 ContentView,为了做动画
private
View
mContentView
;
private
boolean
mIsAnimating
=
false
;
public
SkyOrderDialog
(
Activity
context
)
{
super
(
context
,
R
.
style
.
QMUI_BottomSheet
);
this
.
mContext
=
context
;
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
//noinspection ConstantConditions
getWindow
().
getDecorView
().
setPadding
(
0
,
0
,
0
,
0
);
// 在底部,宽度撑满
WindowManager
.
LayoutParams
params
=
getWindow
().
getAttributes
();
params
.
height
=
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
;
params
.
gravity
=
Gravity
.
BOTTOM
|
Gravity
.
CENTER
;
int
screenWidth
=
QMUIDisplayHelper
.
getScreenWidth
(
getContext
());
int
screenHeight
=
QMUIDisplayHelper
.
getScreenHeight
(
getContext
());
params
.
width
=
screenWidth
<
screenHeight
?
screenWidth
:
screenHeight
;
getWindow
().
setAttributes
(
params
);
setCanceledOnTouchOutside
(
false
);
}
@Override
public
void
setContentView
(
int
layoutResID
)
{
mContentView
=
LayoutInflater
.
from
(
getContext
()).
inflate
(
layoutResID
,
null
);
super
.
setContentView
(
mContentView
);
}
@Override
public
void
setContentView
(
@NonNull
View
view
,
ViewGroup
.
LayoutParams
params
)
{
mContentView
=
view
;
super
.
setContentView
(
view
,
params
);
}
public
View
getContentView
()
{
return
mContentView
;
}
@Override
public
void
setContentView
(
@NonNull
View
view
)
{
mContentView
=
view
;
super
.
setContentView
(
view
);
}
/**
* BottomSheet升起动画
*/
private
void
animateUp
()
{
if
(
mContentView
==
null
)
{
return
;
}
TranslateAnimation
translate
=
new
TranslateAnimation
(
Animation
.
RELATIVE_TO_SELF
,
0
f
,
Animation
.
RELATIVE_TO_SELF
,
0
f
,
Animation
.
RELATIVE_TO_SELF
,
1
f
,
Animation
.
RELATIVE_TO_SELF
,
0
f
);
AlphaAnimation
alpha
=
new
AlphaAnimation
(
0
,
1
);
AnimationSet
set
=
new
AnimationSet
(
true
);
set
.
addAnimation
(
translate
);
set
.
addAnimation
(
alpha
);
set
.
setInterpolator
(
new
DecelerateInterpolator
());
set
.
setDuration
(
mAnimationDuration
);
set
.
setFillAfter
(
true
);
mContentView
.
startAnimation
(
set
);
}
/**
* BottomSheet降下动画
*/
private
void
animateDown
()
{
if
(
mContentView
==
null
)
{
return
;
}
TranslateAnimation
translate
=
new
TranslateAnimation
(
Animation
.
RELATIVE_TO_SELF
,
0
f
,
Animation
.
RELATIVE_TO_SELF
,
0
f
,
Animation
.
RELATIVE_TO_SELF
,
0
f
,
Animation
.
RELATIVE_TO_SELF
,
1
f
);
AlphaAnimation
alpha
=
new
AlphaAnimation
(
1
,
0
);
AnimationSet
set
=
new
AnimationSet
(
true
);
set
.
addAnimation
(
translate
);
set
.
addAnimation
(
alpha
);
set
.
setInterpolator
(
new
DecelerateInterpolator
());
set
.
setDuration
(
mAnimationDuration
);
set
.
setFillAfter
(
true
);
set
.
setAnimationListener
(
new
Animation
.
AnimationListener
()
{
@Override
public
void
onAnimationStart
(
Animation
animation
)
{
mIsAnimating
=
true
;
}
@Override
public
void
onAnimationEnd
(
Animation
animation
)
{
mIsAnimating
=
false
;
/**
* Bugfix: Attempting to destroy the window while drawing!
*/
mContentView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
// java.lang.IllegalArgumentException: View=com.android.internal.policy.PhoneWindow$DecorView{22dbf5b V.E...... R......D 0,0-1080,1083} not attached to window manager
// 在dismiss的时候可能已经detach了,简单try-catch一下
try
{
SkyOrderDialog
.
super
.
dismiss
();
}
catch
(
Exception
e
)
{
QMUILog
.
w
(
TAG
,
"dismiss error\n"
+
Log
.
getStackTraceString
(
e
));
}
}
});
}
@Override
public
void
onAnimationRepeat
(
Animation
animation
)
{
}
});
mContentView
.
startAnimation
(
set
);
}
@Override
public
void
show
()
{
super
.
show
();
animateUp
();
}
@Override
public
void
dismiss
()
{
super
.
dismiss
();
if
(
mIsAnimating
)
{
return
;
}
animateDown
();
}
public
SkyOrderDialog
build
()
{
View
contentView
=
buildViews
();
setContentView
(
contentView
,
new
LinearLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
(
int
)
(
QMUIDisplayHelper
.
getScreenHeight
(
mContext
)
*
0.7
)));
return
this
;
}
private
View
buildViews
()
{
View
view
=
View
.
inflate
(
mContext
,
getContentViewLayoutId
(),
null
);
ButterKnife
.
bind
(
view
);
return
view
;
}
protected
int
getContentViewLayoutId
()
{
return
R
.
layout
.
table_dialog_skyorder
;
}
}
table-module/src/main/res/layout/table_activity_meal_stand.xml
View file @
a1867471
...
...
@@ -566,7 +566,6 @@
android:divider=
"@null"
android:fadeScrollbars=
"false"
android:orientation=
"vertical"
android:layout_below=
"@+id/rv_combo"
android:visibility=
"visible"
/>
</RelativeLayout>
</ScrollView>
...
...
table-module/src/main/res/layout/table_activity_table.xml
View file @
a1867471
...
...
@@ -22,20 +22,20 @@
android:id=
"@+id/tv_show_popup"
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/dp_45"
android:
text=
"
"
android:
layout_alignParentRight=
"true"
/>
android:
layout_alignParentRight=
"true
"
android:
text=
""
/>
<com.qmuiteam.qmui.widget.tab.QMUITabSegment
android:id=
"@+id/tabSegment"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_45"
android:background=
"@drawable/shape_tab_panel_bg"
/>
android:background=
"@drawable/shape_tab_panel_bg"
/>
<androidx.viewpager.widget.ViewPager
android:id=
"@+id/contentViewPager"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/dp_45"
/>
android:layout_marginTop=
"@dimen/dp_45"
/>
<LinearLayout
android:id=
"@+id/ll_table_operat_content"
...
...
@@ -77,19 +77,18 @@
android:id=
"@+id/rv_bottom_function"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_alignParentBottom=
"true"
android:layout_gravity=
"bottom"
android:background=
"@drawable/table_shape_table_bottom_function_layout"
android:orientation=
"horizontal"
/>
<com.qmuiteam.qmui.layout.QMUIButton
android:id=
"@+id/btn_cancel_operat"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_55"
android:textColor=
"@color/theme_white_color"
android:background=
"@color/transparent"
android:layout_alignParentBottom=
"true"
android:visibility=
"invisible"
android:text=
"取消"
/>
<com.qmuiteam.qmui.layout.QMUIButton
android:id=
"@+id/btn_cancel_operat"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_55"
android:layout_alignParentBottom=
"true"
android:background=
"@color/transparent"
android:text=
"取消"
android:textColor=
"@color/theme_white_color"
android:visibility=
"invisible"
/>
</RelativeLayout>
\ No newline at end of file
table-module/src/main/res/layout/table_dialog_skyorder.xml
0 → 100644
View file @
a1867471
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
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"
android:background=
"@drawable/shape_rect_top_radius_white_5"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_time"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/dp_20"
android:orientation=
"vertical"
>
<androidx.appcompat.widget.AppCompatCheckBox
android:id=
"@+id/cb_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:checked=
"true"
android:text=
"截單時間: "
android:textColor=
"@color/theme_black"
android:textSize=
"@dimen/sp_14"
/>
<TextView
android:id=
"@+id/tv_start_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableRight=
"@drawable/qmui_popup_arrow_down"
android:drawablePadding=
"@dimen/dp_20"
android:drawableTint=
"@color/theme_hint_color"
android:gravity=
"center"
android:paddingStart=
"@dimen/dp_20"
android:text=
"22"
android:textColor=
"@color/theme_text_color"
android:textSize=
"@dimen/sp_16"
app:layout_constraintLeft_toRightOf=
"@+id/cb_title"
/>
<TextView
android:id=
"@+id/tv_split"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_20"
android:layout_marginEnd=
"@dimen/dp_20"
android:text=
":"
app:layout_constraintLeft_toRightOf=
"@+id/tv_start_time"
/>
<TextView
android:id=
"@+id/tv_end_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableRight=
"@drawable/qmui_popup_arrow_down"
android:drawablePadding=
"@dimen/dp_20"
android:drawableTint=
"@color/theme_hint_color"
android:gravity=
"center"
android:paddingStart=
"@dimen/dp_20"
android:paddingEnd=
"@dimen/dp_20"
android:text=
"30"
android:textColor=
"@color/theme_text_color"
android:textSize=
"@dimen/sp_16"
app:layout_constraintLeft_toRightOf=
"@+id/tv_split"
/>
<!-- </LinearLayout>-->
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_summary"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_20"
android:layout_marginRight=
"@dimen/dp_20"
app:layout_constraintTop_toBottomOf=
"@+id/cb_title"
/>
<include
layout=
"@layout/table_input_skyorder_people_number"
/>
</LinearLayout>
\ No newline at end of file
table-module/src/main/res/layout/table_input_skyorder_people_number.xml
0 → 100644
View file @
a1867471
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment