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
9ae76d77
Commit
9ae76d77
authored
Mar 25, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、餐檯頁面UI調整
2、輸入餐檯頁面UI調整
parent
d9d4e87b
Show whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
939 additions
and
324 deletions
+939
-324
public-base/src/main/java/com/gingersoft/gsa/cloud/base/common/bean/TableBean.java
+36
-1
public-base/src/main/java/com/gingersoft/gsa/cloud/base/utils/time/TimeUtil.java
+73
-0
public-base/src/main/java/com/gingersoft/gsa/cloud/database/bean/Function.java
+36
-23
public-base/src/main/java/com/gingersoft/gsa/cloud/ui/view/SearchKeyBoardView.java
+0
-1
public-base/src/main/res/drawable-hdpi/arrow_down_black.png
+0
-0
public-base/src/main/res/drawable-hdpi/arrow_up_black.png
+0
-0
public-base/src/main/res/drawable-xhdpi/ic_clear_text.png
+0
-0
public-base/src/main/res/values/colors.xml
+5
-0
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/bean/OrderDetailItem.java
+31
-0
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/service/MealService.java
+1
-0
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/AllOrderPresenter.java
+4
-2
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/MealStandPresenter.java
+4
-3
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
+14
-10
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/TableActivity.java
+31
-19
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/orderManager/OrderCenterActivity.java
+1
-1
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/orderManager/OrderDetailActivity.java
+5
-5
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/BottomFunctionAdapter.java
+1
-7
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/TableAdapter.java
+94
-141
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/fragment/AllTableFragment.java
+3
-3
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/fragment/InputTableFragment.java
+94
-50
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/fragment/StateTableFragment.java
+4
-4
table-mode/src/main/res/drawable/table_shape_input_table_number_frame.xml
+10
-0
table-mode/src/main/res/drawable/table_shape_table_bottom_function_layout.xml
+44
-0
table-mode/src/main/res/drawable/table_shape_table_nomal.xml
+8
-0
table-mode/src/main/res/drawable/table_shape_table_print.xml
+8
-0
table-mode/src/main/res/drawable/table_shape_table_send.xml
+8
-0
table-mode/src/main/res/drawable/table_shape_table_use.xml
+8
-0
table-mode/src/main/res/layout/table_activity_meal_stand.xml
+0
-1
table-mode/src/main/res/layout/table_activity_table.xml
+3
-4
table-mode/src/main/res/layout/table_fragment_input_table.xml
+332
-1
table-mode/src/main/res/layout/table_include_number_input.xml
+1
-0
table-mode/src/main/res/layout/table_recycler_table.xml
+76
-47
table-mode/src/main/res/mipmap-xhdpi/ic_clear_text.png
+0
-0
table-mode/src/main/res/mipmap-xxhdpi/ic_table_open_time.png
+0
-0
table-mode/src/main/res/values/colors.xml
+2
-0
table-mode/src/main/res/values/strings.xml
+1
-0
user-login/src/main/res/layout/user_login_activity_login.xml
+1
-1
No files found.
public-base/src/main/java/com/gingersoft/gsa/cloud/base/common/bean/TableBean.java
View file @
9ae76d77
...
@@ -69,6 +69,7 @@ public class TableBean {
...
@@ -69,6 +69,7 @@ public class TableBean {
* serviceCharge : 0
* serviceCharge : 0
* memberId : 0
* memberId : 0
* status : 0
* status : 0
* person : 2
* useStatus: 0
* useStatus: 0
*/
*/
...
@@ -92,9 +93,42 @@ public class TableBean {
...
@@ -92,9 +93,42 @@ public class TableBean {
* 连台 6
* 连台 6
*/
*/
private
int
status
;
private
int
status
;
/**使用狀態*/
/**
* 用餐人數
*/
private
int
person
;
/**
* 使用狀態
*/
private
int
useStatus
;
private
int
useStatus
;
public
DataBean
()
{
}
public
DataBean
(
DataBean
dataBean
)
{
this
.
id
=
dataBean
.
id
;
this
.
tableName
=
dataBean
.
tableName
;
this
.
restaurantId
=
dataBean
.
restaurantId
;
this
.
qrCode
=
dataBean
.
qrCode
;
this
.
seatCount
=
dataBean
.
seatCount
;
this
.
createTime
=
dataBean
.
createTime
;
this
.
createBy
=
dataBean
.
createBy
;
this
.
qrCodeImg
=
dataBean
.
qrCodeImg
;
this
.
posTableId
=
dataBean
.
posTableId
;
this
.
serviceCharge
=
dataBean
.
serviceCharge
;
this
.
memberId
=
dataBean
.
memberId
;
this
.
status
=
dataBean
.
status
;
this
.
person
=
dataBean
.
person
;
this
.
useStatus
=
dataBean
.
useStatus
;
}
public
int
getPerson
()
{
return
person
;
}
public
void
setPerson
(
int
person
)
{
this
.
person
=
person
;
}
public
int
getUseStatus
()
{
public
int
getUseStatus
()
{
return
useStatus
;
return
useStatus
;
...
@@ -104,6 +138,7 @@ public class TableBean {
...
@@ -104,6 +138,7 @@ public class TableBean {
this
.
useStatus
=
useStatus
;
this
.
useStatus
=
useStatus
;
}
}
public
int
getId
()
{
public
int
getId
()
{
return
id
;
return
id
;
}
}
...
...
public-base/src/main/java/com/gingersoft/gsa/cloud/base/utils/time/TimeUtil.java
View file @
9ae76d77
...
@@ -533,6 +533,79 @@ public class TimeUtil {
...
@@ -533,6 +533,79 @@ public class TimeUtil {
}
}
/**
/**
* 两个时间相差距离多少天多少小时多少分多少秒
*
* @param str1 时间参数 1 格式:1990-01-01 12:00:00
* @param str2 时间参数 2 格式:2009-01-01 12:00:00
* @return long[] 返回值为:{天, 时, 分, 秒}
*/
public
static
long
[]
getDistanceTimes
(
String
str1
,
String
str2
)
{
DateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Date
one
;
Date
two
;
long
day
=
0
;
long
hour
=
0
;
long
min
=
0
;
long
sec
=
0
;
try
{
one
=
df
.
parse
(
str1
);
two
=
df
.
parse
(
str2
);
long
time1
=
one
.
getTime
();
long
time2
=
two
.
getTime
();
long
diff
;
if
(
time1
<
time2
)
{
diff
=
time2
-
time1
;
}
else
{
diff
=
time1
-
time2
;
}
day
=
diff
/
(
24
*
60
*
60
*
1000
);
hour
=
(
diff
/
(
60
*
60
*
1000
)
-
day
*
24
);
min
=
((
diff
/
(
60
*
1000
))
-
day
*
24
*
60
-
hour
*
60
);
sec
=
(
diff
/
1000
-
day
*
24
*
60
*
60
-
hour
*
60
*
60
-
min
*
60
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
long
[]
times
=
{
day
,
hour
,
min
,
sec
};
return
times
;
}
public
static
long
[]
getDistanceTimes2
(
String
str1
,
String
str2
)
{
DateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Date
one
;
Date
two
;
long
day
=
0
;
long
hour
=
0
;
long
min
=
0
;
long
sec
=
0
;
try
{
one
=
df
.
parse
(
str1
);
two
=
df
.
parse
(
str2
);
long
time1
=
one
.
getTime
();
long
time2
=
two
.
getTime
();
long
diff
;
if
(
time1
<
time2
)
{
diff
=
time2
-
time1
;
}
else
{
diff
=
time1
-
time2
;
}
day
=
diff
/
(
24
*
60
*
60
*
1000
);
hour
=
(
diff
/
(
60
*
60
*
1000
)
-
day
*
24
);
min
=
((
diff
/
(
60
*
1000
))
-
day
*
24
*
60
-
hour
*
60
);
sec
=
(
diff
/
1000
-
day
*
24
*
60
*
60
-
hour
*
60
*
60
-
min
*
60
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
// if (day != 0) {
// hour += day * 24;
// }
// if (hour != 0) {
// min += hour * 60;
// }
long
[]
times
=
{
hour
,
min
,
sec
};
return
times
;
}
/**
* 描述:获取本周一.
* 描述:获取本周一.
*
*
* @param format the format
* @param format the format
...
...
public-base/src/main/java/com/gingersoft/gsa/cloud/database/bean/Function.java
View file @
9ae76d77
...
@@ -54,7 +54,8 @@ public class Function {
...
@@ -54,7 +54,8 @@ public class Function {
private
int
backgroundColorRes
;
private
int
backgroundColorRes
;
@Transient
@Transient
private
int
textSizeRes
;
private
int
textSizeRes
;
@Transient
private
int
iconRes
;
@Generated
(
hash
=
816556116
)
@Generated
(
hash
=
816556116
)
public
Function
(
Long
dbid
,
@NotNull
Long
id
,
int
parentId
,
int
groupId
,
int
status
,
public
Function
(
Long
dbid
,
@NotNull
Long
id
,
int
parentId
,
int
groupId
,
int
status
,
...
@@ -75,14 +76,12 @@ public class Function {
...
@@ -75,14 +76,12 @@ public class Function {
public
Function
()
{
public
Function
()
{
}
}
public
Function
(
@NotNull
Long
id
,
int
status
,
long
effectiveTime
,
public
Function
(
Long
id
,
String
resName
,
int
textColorRes
,
int
textSizeRes
,
int
iconRes
)
{
String
resName
,
String
resUrl
,
String
imageURL
)
{
this
.
id
=
id
;
this
.
id
=
id
;
this
.
status
=
status
;
this
.
effectiveTime
=
effectiveTime
;
this
.
resName
=
resName
;
this
.
resName
=
resName
;
this
.
resUrl
=
resUrl
;
this
.
textColorRes
=
textColorRes
;
this
.
imageURL
=
imageURL
;
this
.
textSizeRes
=
textSizeRes
;
this
.
iconRes
=
iconRes
;
}
}
public
Function
(
String
resName
,
int
textColor
,
int
backgroundColor
,
int
textSize
)
{
public
Function
(
String
resName
,
int
textColor
,
int
backgroundColor
,
int
textSize
)
{
...
@@ -211,22 +210,12 @@ public class Function {
...
@@ -211,22 +210,12 @@ public class Function {
this
.
textSizeRes
=
textSizeRes
;
this
.
textSizeRes
=
textSizeRes
;
}
}
@Override
public
int
getIconRes
()
{
public
String
toString
()
{
return
iconRes
;
return
"Function{"
+
}
"id="
+
id
+
", status="
+
status
+
public
void
setIconRes
(
int
iconRes
)
{
", effectiveTime="
+
effectiveTime
+
this
.
iconRes
=
iconRes
;
", resName='"
+
resName
+
'\''
+
", resUrl='"
+
resUrl
+
'\''
+
", imageURL='"
+
imageURL
+
'\''
+
", textColor="
+
textColor
+
", backgroundColor="
+
backgroundColor
+
", textSize="
+
textSize
+
", textColorRes="
+
textColorRes
+
", backgroundColorRes="
+
backgroundColorRes
+
", textSizeRes="
+
textSizeRes
+
'}'
;
}
}
public
Long
getDbid
()
{
public
Long
getDbid
()
{
...
@@ -260,4 +249,28 @@ public class Function {
...
@@ -260,4 +249,28 @@ public class Function {
public
void
setIcRes
(
int
icRes
)
{
public
void
setIcRes
(
int
icRes
)
{
this
.
icRes
=
icRes
;
this
.
icRes
=
icRes
;
}
}
@Override
public
String
toString
()
{
return
"Function{"
+
"dbid="
+
dbid
+
", id="
+
id
+
", parentId="
+
parentId
+
", groupId="
+
groupId
+
", status="
+
status
+
", effectiveTime="
+
effectiveTime
+
", resName='"
+
resName
+
'\''
+
", resUrl='"
+
resUrl
+
'\''
+
", imageURL='"
+
imageURL
+
'\''
+
", icRes="
+
icRes
+
", textColor="
+
textColor
+
", backgroundColor="
+
backgroundColor
+
", textSize="
+
textSize
+
", nameRes="
+
nameRes
+
", textColorRes="
+
textColorRes
+
", backgroundColorRes="
+
backgroundColorRes
+
", textSizeRes="
+
textSizeRes
+
", iconRes="
+
iconRes
+
'}'
;
}
}
}
public-base/src/main/java/com/gingersoft/gsa/cloud/ui/view/SearchKeyBoardView.java
View file @
9ae76d77
...
@@ -16,7 +16,6 @@ import androidx.recyclerview.widget.GridLayoutManager;
...
@@ -16,7 +16,6 @@ import androidx.recyclerview.widget.GridLayoutManager;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.recyclerview.widget.RecyclerView
;
/**
/**
* Created by Wyh on 2019/9/20.
* Created by Wyh on 2019/9/20.
*/
*/
...
...
public-base/src/main/res/drawable-hdpi/arrow_down_black.png
0 → 100644
View file @
9ae76d77
406 Bytes
public-base/src/main/res/drawable-hdpi/arrow_up_black.png
0 → 100644
View file @
9ae76d77
386 Bytes
user-login/src/main/res/mipmap
-xhdpi/ic_clear_text.png
→
public-base/src/main/res/drawable
-xhdpi/ic_clear_text.png
View file @
9ae76d77
File moved
public-base/src/main/res/values/colors.xml
View file @
9ae76d77
...
@@ -41,6 +41,11 @@
...
@@ -41,6 +41,11 @@
<color
name=
"keyboard_fast_paybill_normal"
>
#FFA317
</color>
<color
name=
"keyboard_fast_paybill_normal"
>
#FFA317
</color>
<color
name=
"keyboard_fast_paybill_press"
>
#99FFA317
</color>
<color
name=
"keyboard_fast_paybill_press"
>
#99FFA317
</color>
<color
name=
"table_normal"
>
#FFFFFFFF
</color>
<color
name=
"table_send"
>
#FF249B65
</color>
<color
name=
"table_print"
>
#FFE5AC00
</color>
<color
name=
"table_use"
>
#FFD14141
</color>
<color
name=
"pay_load_success"
>
#03a44e
</color>
<color
name=
"pay_load_success"
>
#03a44e
</color>
<color
name=
"pay_load_failure"
>
#de0e26
</color>
<color
name=
"pay_load_failure"
>
#de0e26
</color>
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/bean/OrderDetailItem.java
View file @
9ae76d77
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
bean
;
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
bean
;
import
com.gingersoft.gsa.cloud.base.common.bean.OrderBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.OrderBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.OrderDetail
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
static
com
.
gingersoft
.
gsa
.
cloud
.
base
.
common
.
bean
.
OrderDetail
.
FOOD_TYPE
;
import
static
com
.
gingersoft
.
gsa
.
cloud
.
base
.
common
.
bean
.
OrderDetail
.
getItemType
;
/**
/**
* 作者:ELEGANT_BIN
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 版本:1.6.0
...
@@ -166,4 +171,30 @@ public class OrderDetailItem implements Serializable {
...
@@ -166,4 +171,30 @@ public class OrderDetailItem implements Serializable {
this
.
orderDetails
=
orderDetails
;
this
.
orderDetails
=
orderDetails
;
}
}
public
static
List
<
OrderDetail
>
orderTransOrderDetails
(
List
<
OrderBean
.
OrderDetailsBean
>
orderDetails
)
{
List
<
OrderDetail
>
orderDetailList
=
new
ArrayList
<>();
OrderDetail
parentOrderDetail
=
null
;
for
(
OrderBean
.
OrderDetailsBean
orderDetailsBean
:
orderDetails
)
{
OrderDetail
orderDetail
=
new
OrderDetail
();
orderDetail
.
setId
(
orderDetailsBean
.
getId
());
orderDetail
.
setProductId
(
orderDetailsBean
.
getProductId
());
orderDetail
.
setOrderId
(
orderDetailsBean
.
getOrderId
());
orderDetail
.
setParentId
(
orderDetailsBean
.
getParentId
());
orderDetail
.
setProductName
(
orderDetailsBean
.
getProductName
());
orderDetail
.
setNumber
(
orderDetailsBean
.
getNumber
());
orderDetail
.
setPrice
(
orderDetailsBean
.
getPrice
());
orderDetail
.
setVisible
(
orderDetailsBean
.
getStatus
()
==
0
);
// orderDetail.setAutomod(foods.getAutomod());
orderDetail
.
setIsfood
(
orderDetailsBean
.
getType
()
==
FOOD_TYPE
);
orderDetail
.
setNew
(
false
);
orderDetail
.
setType
(
orderDetailsBean
.
getType
());
orderDetail
.
setItemType
(
getItemType
(
orderDetailsBean
,
parentOrderDetail
));
orderDetailList
.
add
(
orderDetail
);
if
(
orderDetail
.
isIsfood
())
{
parentOrderDetail
=
orderDetail
;
}
}
return
orderDetailList
;
}
}
}
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/service/MealService.java
View file @
9ae76d77
...
@@ -20,6 +20,7 @@ import retrofit2.http.POST;
...
@@ -20,6 +20,7 @@ import retrofit2.http.POST;
* 描述:
* 描述:
*/
*/
public
interface
MealService
{
public
interface
MealService
{
@POST
(
"order/send"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
@POST
(
"order/send"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
BaseResult
>
createOrder
(
@Body
RequestBody
requestBody
);
Observable
<
BaseResult
>
createOrder
(
@Body
RequestBody
requestBody
);
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/AllOrderPresenter.java
View file @
9ae76d77
...
@@ -12,6 +12,7 @@ import com.gingersoft.gsa.cloud.base.common.bean.PayMethod;
...
@@ -12,6 +12,7 @@ import com.gingersoft.gsa.cloud.base.common.bean.PayMethod;
import
com.gingersoft.gsa.cloud.base.common.bean.TableBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.TableBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.mealManage.MyOrderManage
;
import
com.gingersoft.gsa.cloud.base.common.bean.mealManage.MyOrderManage
;
import
com.gingersoft.gsa.cloud.base.common.bean.mealManage.OpenTableManage
;
import
com.gingersoft.gsa.cloud.base.common.bean.mealManage.OpenTableManage
;
import
com.gingersoft.gsa.cloud.base.utils.time.TimeUtil
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.AllOrderContract
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.AllOrderContract
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.OrderDetailItem
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.OrderDetailItem
;
...
@@ -29,6 +30,7 @@ import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
...
@@ -29,6 +30,7 @@ import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
javax.inject.Inject
;
import
javax.inject.Inject
;
...
@@ -114,7 +116,7 @@ public class AllOrderPresenter extends BasePresenter<AllOrderContract.Model, All
...
@@ -114,7 +116,7 @@ public class AllOrderPresenter extends BasePresenter<AllOrderContract.Model, All
MyOrderManage
.
getInstance
().
setOrderBean
(
orderBean
);
MyOrderManage
.
getInstance
().
setOrderBean
(
orderBean
);
TableBean
.
DataBean
openTableBean
=
new
TableBean
.
DataBean
();
TableBean
.
DataBean
openTableBean
=
new
TableBean
.
DataBean
();
openTableBean
.
setCreateTime
(
datasBean
.
getCreateTime
(
));
openTableBean
.
setCreateTime
(
TimeUtil
.
getStringByFormat
(
new
Date
(
datasBean
.
getCreateTime
()),
TimeUtil
.
dateFormatYMDHM
));
openTableBean
.
setTableName
(
datasBean
.
getTableName
());
openTableBean
.
setTableName
(
datasBean
.
getTableName
());
openTableBean
.
setId
(
datasBean
.
getTableId
());
openTableBean
.
setId
(
datasBean
.
getTableId
());
OpenTableManage
.
getDefault
().
setTableBean
(
openTableBean
);
OpenTableManage
.
getDefault
().
setTableBean
(
openTableBean
);
...
@@ -153,7 +155,7 @@ public class AllOrderPresenter extends BasePresenter<AllOrderContract.Model, All
...
@@ -153,7 +155,7 @@ public class AllOrderPresenter extends BasePresenter<AllOrderContract.Model, All
OpenTableManage
.
getDefault
().
setPeopleNumber
(
orderDetailItem
.
getPerson
());
OpenTableManage
.
getDefault
().
setPeopleNumber
(
orderDetailItem
.
getPerson
());
TableBean
.
DataBean
dataBean
=
new
TableBean
.
DataBean
();
TableBean
.
DataBean
dataBean
=
new
TableBean
.
DataBean
();
dataBean
.
setTableName
(
orderDetailItem
.
getTableName
());
dataBean
.
setTableName
(
orderDetailItem
.
getTableName
());
dataBean
.
setCreateTime
(
orderDetailItem
.
getCreateTime
(
));
dataBean
.
setCreateTime
(
TimeUtil
.
getStringByFormat
(
new
Date
(
orderDetailItem
.
getCreateTime
()),
TimeUtil
.
dateFormatYMDHM
));
OpenTableManage
.
getDefault
().
setTableBean
(
dataBean
);
OpenTableManage
.
getDefault
().
setTableBean
(
dataBean
);
List
<
PayMethod
>
payMethodList
=
getPayMethodList
(
orderDetailItem
);
List
<
PayMethod
>
payMethodList
=
getPayMethodList
(
orderDetailItem
);
//設置打印所需支付方式
//設置打印所需支付方式
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/MealStandPresenter.java
View file @
9ae76d77
...
@@ -316,11 +316,11 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -316,11 +316,11 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
mRootView
.
setModifierTop
(
0
);
mRootView
.
setModifierTop
(
0
);
}
}
// if (food.getAutoMod() == 1) {
isSelectedMeal
=
isSelectedMeal
&&
(
comboItemList
.
size
()
>
0
||
modifierList
.
size
()
>
0
);
if
(
isSelectedMeal
||
comboItemList
.
size
()
>
0
||
modifierList
.
size
()
>
0
)
{
boolean
autoMod
=
food
.
getAutoMod
()
==
1
&&
(
comboItemList
.
size
()
>
0
||
modifierList
.
size
()
>
0
);
if
(
isSelectedMeal
||
autoMod
)
{
mRootView
.
showViewModeVisibility
(
MealConstant
.
combo_ViewMode
,
MealConstant
.
modifier_ViewMode
);
mRootView
.
showViewModeVisibility
(
MealConstant
.
combo_ViewMode
,
MealConstant
.
modifier_ViewMode
);
}
}
// }
}
}
private
void
loadModifierData
(
long
fid
)
{
private
void
loadModifierData
(
long
fid
)
{
...
@@ -402,6 +402,7 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -402,6 +402,7 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
/**
/**
* 打印上菜紙
* 打印上菜紙
*
* @param initTable 是否是開台
* @param initTable 是否是開台
*/
*/
private
void
printSendOrder
(
boolean
initTable
)
{
private
void
printSendOrder
(
boolean
initTable
)
{
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
View file @
9ae76d77
...
@@ -27,6 +27,7 @@ import com.jess.arms.di.scope.ActivityScope;
...
@@ -27,6 +27,7 @@ import com.jess.arms.di.scope.ActivityScope;
import
com.jess.arms.http.imageloader.ImageLoader
;
import
com.jess.arms.http.imageloader.ImageLoader
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.mvp.BasePresenter
;
import
com.jess.arms.mvp.BasePresenter
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
...
@@ -161,10 +162,11 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -161,10 +162,11 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
}
}
public
void
initBottomFunctionItem
()
{
public
void
initBottomFunctionItem
()
{
mBottomFunctionList
.
add
(
new
Function
((
long
)
1
,
1
,
2025
,
"重置檯號"
,
""
,
String
.
valueOf
(
R
.
mipmap
.
table_init
)));
mBottomFunctionList
.
add
(
new
Function
((
long
)
1
,
"重置檯號"
,
ArmsUtils
.
getColor
(
IActivity
,
R
.
color
.
theme_black
),
ArmsUtils
.
getDimens
(
IActivity
,
R
.
dimen
.
sp_14
),
R
.
mipmap
.
table_init
));
mBottomFunctionList
.
add
(
new
Function
((
long
)
2
,
1
,
2025
,
"轉檯"
,
""
,
String
.
valueOf
(
R
.
mipmap
.
table_move
)));
mBottomFunctionList
.
add
(
new
Function
((
long
)
2
,
"轉檯"
,
ArmsUtils
.
getColor
(
IActivity
,
R
.
color
.
theme_black
),
ArmsUtils
.
getDimens
(
IActivity
,
R
.
dimen
.
sp_14
),
R
.
mipmap
.
table_move
));
// mBottomFunctionList.add(new Function((long) 3, 1, 2025, "分檯", "", ""));
mBottomFunctionList
.
add
(
new
Function
((
long
)
3
,
"分檯"
,
ArmsUtils
.
getColor
(
IActivity
,
R
.
color
.
theme_black
),
ArmsUtils
.
getDimens
(
IActivity
,
R
.
dimen
.
sp_14
),
R
.
mipmap
.
table_splite
));
// mBottomFunctionList.add(new Function((long) 4, 1, 2025, "↑", "", ""));
mBottomFunctionList
.
add
(
new
Function
((
long
)
4
,
"skyorder"
,
ArmsUtils
.
getColor
(
IActivity
,
R
.
color
.
theme_black
),
ArmsUtils
.
getDimens
(
IActivity
,
R
.
dimen
.
sp_14
),
R
.
mipmap
.
table_skyorder
));
// mBottomFunctionList.add(new Function((long) 5, "上菜紙", ArmsUtils.getColor(IActivity,R.color.theme_black), ArmsUtils.getDimens(IActivity,R.dimen.sp_14), R.mipmap.table_paper));
}
}
public
void
getTables
(
boolean
show
)
{
public
void
getTables
(
boolean
show
)
{
...
@@ -225,13 +227,13 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -225,13 +227,13 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
@Override
@Override
public
void
onNext
(
@NonNull
BaseRespose
respose
)
{
public
void
onNext
(
@NonNull
BaseRespose
respose
)
{
if
(
respose
.
isSuccess
())
{
if
(
respose
.
isSuccess
())
{
//設置當前開台數據
//設置當前開台數據
1584427984728 1584428017196 1584428086282
TableBean
.
DataBean
openTable
Bean
=
getTableById
(
tableId
);
TableBean
.
DataBean
data
Bean
=
getTableById
(
tableId
);
//先將開台時間設置為當前時間
TableBean
.
DataBean
openTableBean
=
null
;
if
(
openTable
Bean
!=
null
)
{
if
(
data
Bean
!=
null
)
{
openTableBean
.
setCreateTime
(
TimeUtils
.
getTime
(
System
.
currentTimeMillis
(),
TimeUtils
.
DEFAULT_DATE_FORMAT
)
);
openTableBean
=
new
TableBean
.
DataBean
(
dataBean
);
}
}
OpenTableManage
.
getDefault
().
setPeopleNumber
(
0
);
OrderBean
orderBean
=
respose
.
getData
();
OrderBean
orderBean
=
respose
.
getData
();
if
(
orderBean
!=
null
&&
respose
.
getData
().
getOrderDetails
()
!=
null
)
{
if
(
orderBean
!=
null
&&
respose
.
getData
().
getOrderDetails
()
!=
null
)
{
if
(
respose
.
getData
().
getCreateTime
()
!=
null
&&
openTableBean
!=
null
)
{
if
(
respose
.
getData
().
getCreateTime
()
!=
null
&&
openTableBean
!=
null
)
{
...
@@ -251,7 +253,9 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -251,7 +253,9 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
MyOrderManage
.
getInstance
().
setOrderBean
(
null
);
MyOrderManage
.
getInstance
().
setOrderBean
(
null
);
MyOrderManage
.
getInstance
().
setOrderFoodList
(
new
ArrayList
<>());
MyOrderManage
.
getInstance
().
setOrderFoodList
(
new
ArrayList
<>());
}
}
if
(
openTableBean
!=
null
)
{
OpenTableManage
.
getDefault
().
setTableBean
(
openTableBean
);
OpenTableManage
.
getDefault
().
setTableBean
(
openTableBean
);
}
mRootView
.
startMealStandActivity
();
mRootView
.
startMealStandActivity
();
}
else
{
}
else
{
mRootView
.
showMessage
(
respose
.
getErrMsg
());
mRootView
.
showMessage
(
respose
.
getErrMsg
());
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/TableActivity.java
View file @
9ae76d77
...
@@ -38,6 +38,8 @@ import com.qmuiteam.qmui.alpha.QMUIAlphaImageButton;
...
@@ -38,6 +38,8 @@ import com.qmuiteam.qmui.alpha.QMUIAlphaImageButton;
import
com.qmuiteam.qmui.layout.QMUIButton
;
import
com.qmuiteam.qmui.layout.QMUIButton
;
import
com.qmuiteam.qmui.util.QMUIDisplayHelper
;
import
com.qmuiteam.qmui.util.QMUIDisplayHelper
;
import
com.qmuiteam.qmui.widget.QMUITopBar
;
import
com.qmuiteam.qmui.widget.QMUITopBar
;
import
com.qmuiteam.qmui.widget.tab.QMUITab
;
import
com.qmuiteam.qmui.widget.tab.QMUITabBuilder
;
import
com.qmuiteam.qmui.widget.tab.QMUITabIndicator
;
import
com.qmuiteam.qmui.widget.tab.QMUITabIndicator
;
import
com.qmuiteam.qmui.widget.tab.QMUITabSegment
;
import
com.qmuiteam.qmui.widget.tab.QMUITabSegment
;
...
@@ -348,11 +350,9 @@ public class TableActivity extends BaseActivity<TablePresenter> implements Table
...
@@ -348,11 +350,9 @@ public class TableActivity extends BaseActivity<TablePresenter> implements Table
rv_bottom_function
.
setAdapter
(
adapter
);
rv_bottom_function
.
setAdapter
(
adapter
);
}
}
private
GridLayoutManager
bottomFunctionRecycleLayoutManager
;
@Override
@Override
public
void
setBottomFunctionRecycleLayoutManager
(
int
orientation
)
{
public
void
setBottomFunctionRecycleLayoutManager
(
int
orientation
)
{
bottomFunctionRecycleLayoutManager
=
new
GridLayoutManager
(
this
,
GoldConstants
.
bottomFunctionColCount
,
orientation
,
false
);
GridLayoutManager
bottomFunctionRecycleLayoutManager
=
new
GridLayoutManager
(
this
,
GoldConstants
.
bottomFunctionColCount
,
orientation
,
false
);
rv_bottom_function
.
setLayoutManager
(
bottomFunctionRecycleLayoutManager
);
rv_bottom_function
.
setLayoutManager
(
bottomFunctionRecycleLayoutManager
);
rv_bottom_function
.
setItemAnimator
(
new
DefaultItemAnimator
());
rv_bottom_function
.
setItemAnimator
(
new
DefaultItemAnimator
());
}
}
...
@@ -382,19 +382,19 @@ public class TableActivity extends BaseActivity<TablePresenter> implements Table
...
@@ -382,19 +382,19 @@ public class TableActivity extends BaseActivity<TablePresenter> implements Table
if
(
allTableFragment
!=
null
)
{
if
(
allTableFragment
!=
null
)
{
return
allTableFragment
;
return
allTableFragment
;
}
}
allTableFragment
=
new
AllTableFragment
();
allTableFragment
=
AllTableFragment
.
newInstance
();
return
allTableFragment
;
return
allTableFragment
;
case
2
:
case
2
:
if
(
stateTableFragment
!=
null
)
{
if
(
stateTableFragment
!=
null
)
{
return
stateTableFragment
;
return
stateTableFragment
;
}
}
stateTableFragment
=
new
StateTableFragment
();
stateTableFragment
=
StateTableFragment
.
newInstance
();
return
stateTableFragment
;
return
stateTableFragment
;
default
:
default
:
if
(
inputTableFragment
!=
null
)
{
if
(
inputTableFragment
!=
null
)
{
return
inputTableFragment
;
return
inputTableFragment
;
}
}
inputTableFragment
=
new
InputTableFragment
();
inputTableFragment
=
InputTableFragment
.
newInstance
();
return
inputTableFragment
;
return
inputTableFragment
;
}
}
}
}
...
@@ -406,35 +406,47 @@ public class TableActivity extends BaseActivity<TablePresenter> implements Table
...
@@ -406,35 +406,47 @@ public class TableActivity extends BaseActivity<TablePresenter> implements Table
@Override
@Override
public
CharSequence
getPageTitle
(
int
position
)
{
public
CharSequence
getPageTitle
(
int
position
)
{
switch
(
position
)
{
return
""
;
case
1
:
return
tabTitles
[
1
];
case
2
:
return
tabTitles
[
2
];
default
:
return
tabTitles
[
0
];
}
}
}
};
};
QMUITabBuilder
builder
=
mTabSegment
.
tabBuilder
();
QMUITab
tab1
=
builder
.
setText
(
tabTitles
[
0
])
.
build
(
mContext
);
QMUITab
tab2
=
builder
.
setText
(
tabTitles
[
1
])
.
build
(
mContext
);
QMUITab
tab3
=
builder
.
setNormalDrawable
(
ContextCompat
.
getDrawable
(
mContext
,
R
.
drawable
.
arrow_down_black
))
.
setSelectedDrawable
(
ContextCompat
.
getDrawable
(
mContext
,
R
.
drawable
.
arrow_down_black
))
.
setIconPosition
(
QMUITab
.
ICON_POSITION_RIGHT
)
.
setText
(
tabTitles
[
2
])
.
build
(
mContext
);
mTabSegment
.
addTab
(
tab1
).
addTab
(
tab2
).
addTab
(
tab3
);
mContentViewPager
.
setAdapter
(
pagerAdapter
);
mContentViewPager
.
setAdapter
(
pagerAdapter
);
mContentViewPager
.
setCurrentItem
(
mCurrentPageIndex
);
mContentViewPager
.
setCurrentItem
(
mCurrentPageIndex
);
int
space
=
QMUIDisplayHelper
.
dp2px
(
this
,
16
);
int
space
=
QMUIDisplayHelper
.
dp2px
(
this
,
16
);
mTabSegment
.
setIndicator
(
new
QMUITabIndicator
(
QMUIDisplayHelper
.
dp2px
(
this
,
2
),
false
,
true
));
mTabSegment
.
setIndicator
(
new
QMUITabIndicator
(
QMUIDisplayHelper
.
dp2px
(
this
,
2
),
false
,
true
));
mTabSegment
.
setDefaultTextSize
(
QMUIDisplayHelper
.
dp2px
(
this
,
16
),
QMUIDisplayHelper
.
dp2px
(
this
,
16
));
mTabSegment
.
setDefaultTextSize
(
QMUIDisplayHelper
.
dp2px
(
this
,
16
),
QMUIDisplayHelper
.
dp2px
(
this
,
16
));
mTabSegment
.
setPadding
(
space
,
0
,
space
,
0
);
mTabSegment
.
setPadding
(
space
,
0
,
space
,
0
);
mTabSegment
.
setupWithViewPager
(
mContentViewPager
);
mTabSegment
.
setupWithViewPager
(
mContentViewPager
,
false
);
mTabSegment
.
addOnTabSelectedListener
(
new
QMUITabSegment
.
OnTabSelectedListener
()
{
mTabSegment
.
addOnTabSelectedListener
(
new
QMUITabSegment
.
OnTabSelectedListener
()
{
@Override
@Override
public
void
onTabSelected
(
int
index
)
{
public
void
onTabSelected
(
int
index
)
{
if
(
index
==
0
)
{
switch
(
index
){
setBottomFunctionVisibility
(
false
);
case
0
:
// setBottomFunctionVisibility(false);
//标号输入页面 暂停刷新餐台数据
//标号输入页面 暂停刷新餐台数据
onPauseRefreshTableData
();
onPauseRefreshTableData
();
}
else
{
break
;
setBottomFunctionVisibility
(
true
);
case
1
:
case
2
:
// setBottomFunctionVisibility(true);
//页面切换完成区域,状态页面恢复获取餐台数据
//页面切换完成区域,状态页面恢复获取餐台数据
onStartRefreshTableData
();
onStartRefreshTableData
();
break
;
}
}
mCurrentPageIndex
=
index
;
mCurrentPageIndex
=
index
;
}
}
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/orderManager/OrderCenterActivity.java
View file @
9ae76d77
...
@@ -215,7 +215,7 @@ public class OrderCenterActivity extends BaseActivity<OrderCenterPresenter> impl
...
@@ -215,7 +215,7 @@ public class OrderCenterActivity extends BaseActivity<OrderCenterPresenter> impl
killMyself
();
killMyself
();
}
}
});
});
mTopBar
.
setTitle
(
"
張
單管理"
);
mTopBar
.
setTitle
(
"
賬
單管理"
);
}
}
@Override
@Override
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/orderManager/OrderDetailActivity.java
View file @
9ae76d77
...
@@ -156,7 +156,7 @@ public class OrderDetailActivity extends BaseActivity<OrderDetailPresenter> impl
...
@@ -156,7 +156,7 @@ public class OrderDetailActivity extends BaseActivity<OrderDetailPresenter> impl
private
void
initOrderDetail
(
OrderDetailItem
orderDetailItem
)
{
private
void
initOrderDetail
(
OrderDetailItem
orderDetailItem
)
{
if
(
orderDetailItem
!=
null
)
{
if
(
orderDetailItem
!=
null
)
{
String
payBill
=
LanguageUtils
.
get_language_system
(
this
,
"opentable.paybill"
,
"結賬"
)
+
":"
;
String
payBill
=
LanguageUtils
.
get_language_system
(
this
,
"opentable.paybill"
,
"結賬"
)
+
":"
;
String
tableName
=
LanguageUtils
.
get_language_system
(
this
,
"table.number"
,
"檯號
̖
"
)
+
":"
;
String
tableName
=
LanguageUtils
.
get_language_system
(
this
,
"table.number"
,
"檯號"
)
+
":"
;
String
pax
=
LanguageUtils
.
get_language_system
(
this
,
"Meal.Mannumber"
,
"人數"
)
+
":"
;
String
pax
=
LanguageUtils
.
get_language_system
(
this
,
"Meal.Mannumber"
,
"人數"
)
+
":"
;
String
orderNumber
=
LanguageUtils
.
get_language_system
(
this
,
"order.number"
,
"訂單號"
)
+
":"
;
String
orderNumber
=
LanguageUtils
.
get_language_system
(
this
,
"order.number"
,
"訂單號"
)
+
":"
;
String
openTable
=
LanguageUtils
.
get_language_system
(
this
,
"open.table"
,
"開台"
)
+
":"
;
String
openTable
=
LanguageUtils
.
get_language_system
(
this
,
"open.table"
,
"開台"
)
+
":"
;
...
@@ -175,7 +175,7 @@ public class OrderDetailActivity extends BaseActivity<OrderDetailPresenter> impl
...
@@ -175,7 +175,7 @@ public class OrderDetailActivity extends BaseActivity<OrderDetailPresenter> impl
setOrderStatus
(
orderDetailItem
);
setOrderStatus
(
orderDetailItem
);
mOrderDetailList
=
OrderAssemblyUtil
.
assemblyOrder
(
OrderDetail
.
orderTransOrderDetails
(
orderDetailItem
.
getOrderDetails
()));
mOrderDetailList
=
OrderAssemblyUtil
.
assemblyOrder
(
OrderDetail
Item
.
orderTransOrderDetails
(
orderDetailItem
.
getOrderDetails
()));
setOrderDetailFoodAdapter
(
mOrderDetailList
);
setOrderDetailFoodAdapter
(
mOrderDetailList
);
setOrderPayMethodAdapter
(
orderDetailItem
);
setOrderPayMethodAdapter
(
orderDetailItem
);
}
}
...
@@ -276,14 +276,14 @@ public class OrderDetailActivity extends BaseActivity<OrderDetailPresenter> impl
...
@@ -276,14 +276,14 @@ public class OrderDetailActivity extends BaseActivity<OrderDetailPresenter> impl
MyOrderManage
.
getInstance
().
setOrderBean
(
orderBean
);
MyOrderManage
.
getInstance
().
setOrderBean
(
orderBean
);
TableBean
.
DataBean
openTableBean
=
new
TableBean
.
DataBean
();
TableBean
.
DataBean
openTableBean
=
new
TableBean
.
DataBean
();
openTableBean
.
setCreateTime
(
datasBean
.
getCreateTime
(
));
openTableBean
.
setCreateTime
(
TimeUtil
.
getStringByFormat
(
new
Date
(
datasBean
.
getCreateTime
()),
TimeUtil
.
dateFormatYMDHM
));
openTableBean
.
setTableName
(
datasBean
.
getTableName
());
openTableBean
.
setTableName
(
datasBean
.
getTableName
());
openTableBean
.
setId
(
datasBean
.
getTableId
());
openTableBean
.
setId
(
datasBean
.
getTableId
());
OpenTableManage
.
getDefault
().
setTableBean
(
openTableBean
);
OpenTableManage
.
getDefault
().
setTableBean
(
openTableBean
);
OpenTableManage
.
getDefault
().
setPeopleNumber
(
datasBean
.
getPerson
());
OpenTableManage
.
getDefault
().
setPeopleNumber
(
datasBean
.
getPerson
());
List
<
OrderBean
.
OrderDetailsBean
>
orderDetailsBeans
=
datasBean
.
getOrderDetails
();
List
<
OrderBean
.
OrderDetailsBean
>
orderDetailsBeans
=
datasBean
.
getOrderDetails
();
List
<
OrderDetail
>
orderDetailList
=
OrderAssemblyUtil
.
assemblyOrder
(
OrderDetail
.
orderTransOrderDetails
(
orderDetailsBeans
));
List
<
OrderDetail
>
orderDetailList
=
OrderAssemblyUtil
.
assemblyOrder
(
OrderDetail
Item
.
orderTransOrderDetails
(
orderDetailsBeans
));
MyOrderManage
.
getInstance
().
setOrderFoodList
(
orderDetailList
);
MyOrderManage
.
getInstance
().
setOrderFoodList
(
orderDetailList
);
Intent
intent
=
new
Intent
(
this
,
MealStandActivity
.
class
);
Intent
intent
=
new
Intent
(
this
,
MealStandActivity
.
class
);
...
@@ -302,7 +302,7 @@ public class OrderDetailActivity extends BaseActivity<OrderDetailPresenter> impl
...
@@ -302,7 +302,7 @@ public class OrderDetailActivity extends BaseActivity<OrderDetailPresenter> impl
OpenTableManage
.
getDefault
().
setPeopleNumber
(
orderDetailItem
.
getPerson
());
OpenTableManage
.
getDefault
().
setPeopleNumber
(
orderDetailItem
.
getPerson
());
TableBean
.
DataBean
dataBean
=
new
TableBean
.
DataBean
();
TableBean
.
DataBean
dataBean
=
new
TableBean
.
DataBean
();
dataBean
.
setTableName
(
orderDetailItem
.
getTableName
());
dataBean
.
setTableName
(
orderDetailItem
.
getTableName
());
dataBean
.
setCreateTime
(
orderDetailItem
.
getCreateTime
(
));
dataBean
.
setCreateTime
(
TimeUtil
.
getStringByFormat
(
new
Date
(
orderDetailItem
.
getCreateTime
()),
TimeUtil
.
dateFormatYMDHM
));
OpenTableManage
.
getDefault
().
setTableBean
(
dataBean
);
OpenTableManage
.
getDefault
().
setTableBean
(
dataBean
);
CC
.
obtainBuilder
(
"Component.Print"
)
CC
.
obtainBuilder
(
"Component.Print"
)
.
setActionName
(
"printActivity"
)
.
setActionName
(
"printActivity"
)
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/BottomFunctionAdapter.java
View file @
9ae76d77
...
@@ -69,14 +69,8 @@ public class BottomFunctionAdapter extends DefaultAdapter<Function> {
...
@@ -69,14 +69,8 @@ public class BottomFunctionAdapter extends DefaultAdapter<Function> {
private
void
initItemData
(
Function
item
)
{
private
void
initItemData
(
Function
item
)
{
tv_name
.
setText
(
item
.
getResName
());
tv_name
.
setText
(
item
.
getResName
());
iv_icon
.
setImageResource
(
Integer
.
parseInt
(
item
.
getImageURL
()
));
iv_icon
.
setImageResource
(
item
.
getIconRes
(
));
}
}
private
void
initItemTableClick
(
TableBean
.
DataBean
item
,
int
position
)
{
}
}
}
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/TableAdapter.java
View file @
9ae76d77
...
@@ -3,22 +3,31 @@ package com.gingersoft.gsa.cloud.table.mvp.ui.adapter;
...
@@ -3,22 +3,31 @@ package com.gingersoft.gsa.cloud.table.mvp.ui.adapter;
import
android.content.Context
;
import
android.content.Context
;
import
android.graphics.drawable.GradientDrawable
;
import
android.graphics.drawable.GradientDrawable
;
import
android.graphics.drawable.StateListDrawable
;
import
android.graphics.drawable.StateListDrawable
;
import
android.text.TextUtils
;
import
android.view.Gravity
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.Button
;
import
android.widget.FrameLayout
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.gingersoft.gsa.cloud.aspectj.SingleClick
;
import
com.gingersoft.gsa.cloud.aspectj.SingleClick
;
import
com.gingersoft.gsa.cloud.aspectj.XClickUtil
;
import
com.gingersoft.gsa.cloud.aspectj.XClickUtil
;
import
com.gingersoft.gsa.cloud.base.utils.time.TimeUtil
;
import
com.gingersoft.gsa.cloud.base.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.base.common.bean.TableBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.TableBean
;
import
com.jess.arms.base.BaseHolder
;
import
com.jess.arms.base.BaseHolder
;
import
com.jess.arms.base.DefaultAdapter
;
import
com.jess.arms.base.DefaultAdapter
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaRelativeLayout
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaTextView
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
butterknife.BindView
;
import
butterknife.BindView
;
...
@@ -55,7 +64,7 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
...
@@ -55,7 +64,7 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
this
.
mContext
=
context
;
this
.
mContext
=
context
;
this
.
mFunction
=
function
;
this
.
mFunction
=
function
;
this
.
mDiaplayScreenHeight
=
diaplayScreenHeight
;
this
.
mDiaplayScreenHeight
=
diaplayScreenHeight
;
this
.
mTableTextSize
=
38
;
this
.
mTableTextSize
=
20
;
initItemDispalyHeight
();
initItemDispalyHeight
();
}
}
...
@@ -81,18 +90,26 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
...
@@ -81,18 +90,26 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
return
R
.
layout
.
table_recycler_table
;
return
R
.
layout
.
table_recycler_table
;
}
}
private
Date
date
;
class
TableItemHolder
extends
BaseHolder
<
TableBean
.
DataBean
>
{
class
TableItemHolder
extends
BaseHolder
<
TableBean
.
DataBean
>
{
@BindView
(
R2
.
id
.
fl_container
)
@BindView
(
R2
.
id
.
ll_container
)
RelativeLayout
fl_container
;
LinearLayout
ll_container
;
@BindView
(
R2
.
id
.
rl_table
)
QMUIAlphaRelativeLayout
rl_table
;
@BindView
(
R2
.
id
.
btn_table
)
@BindView
(
R2
.
id
.
btn_table
)
Button
btn_table
;
TextView
btn_table
;
@BindView
(
R2
.
id
.
btn_showMain
)
@BindView
(
R2
.
id
.
tv_people
)
Button
btn_showMain
;
TextView
tv_people
;
@BindView
(
R2
.
id
.
iv_vip
)
@BindView
(
R2
.
id
.
tv_open_duration
)
ImageView
iv_vip
;
TextView
tv_open_duration
;
@BindView
(
R2
.
id
.
tv_scan_flag
)
// @BindView(R2.id.btn_showMain)
TextView
tv_scan_flag
;
// Button btn_showMain;
// @BindView(R2.id.iv_vip)
// ImageView iv_vip;
// @BindView(R2.id.tv_scan_flag)
// TextView tv_scan_flag;
public
TableItemHolder
(
View
itemView
)
{
public
TableItemHolder
(
View
itemView
)
{
super
(
itemView
);
super
(
itemView
);
...
@@ -111,50 +128,23 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
...
@@ -111,50 +128,23 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
btn_table
.
setText
(
item
.
getTableName
());
btn_table
.
setText
(
item
.
getTableName
());
// if (item.getMainshowtable().equals("")) {
if
(
item
.
getStatus
()
!=
0
)
{
// if (btn_showMain.getVisibility() != View.GONE) {
tv_people
.
setVisibility
(
View
.
VISIBLE
);
// btn_showMain.setVisibility(View.GONE);
tv_people
.
setText
(
item
.
getPerson
()
+
"人"
);
// }
String
createDate
=
item
.
getCreateTime
();
if
(
btn_table
.
getGravity
()
!=
Gravity
.
CENTER
)
{
String
createTime
=
TimeUtil
.
getStringByFormat
(
new
Date
(
createDate
),
TimeUtil
.
dateFormatYMDHMS
);
btn_table
.
setGravity
(
Gravity
.
CENTER
);
String
currentTime
=
TimeUtil
.
getStringByFormat
(
System
.
currentTimeMillis
(),
TimeUtil
.
dateFormatYMDHMS
);
RelativeLayout
.
LayoutParams
lp
=
(
RelativeLayout
.
LayoutParams
)
btn_table
.
getLayoutParams
();
long
[]
difference
=
TimeUtil
.
getDistanceTimes2
(
createTime
,
currentTime
);
lp
.
height
=
ItemColHeight
;
if
(
difference
[
0
]
!=
0
)
{
btn_table
.
setLayoutParams
(
lp
);
tv_open_duration
.
setText
(
difference
[
0
]
+
":"
+
difference
[
1
]
+
":"
+
difference
[
2
]);
}
else
{
tv_open_duration
.
setText
(
difference
[
1
]
+
":"
+
difference
[
2
]);
}
tv_open_duration
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
tv_people
.
setVisibility
(
View
.
GONE
);
tv_open_duration
.
setVisibility
(
View
.
GONE
);
}
}
RelativeLayout
.
LayoutParams
lp
=
(
RelativeLayout
.
LayoutParams
)
btn_table
.
getLayoutParams
();
btn_table
.
setLayoutParams
(
lp
);
// } else {
// if (btn_showMain.getVisibility() == View.VISIBLE) {
// return;
// }
// btn_showMain.setVisibility(View.VISIBLE);
// btn_showMain.setText("(" + item.getMainshowtable() + ")");
// RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) btn_table.getLayoutParams();
// int heee = (int) Math.ceil(ItemColHeight * 70 / 100);
// lp.height = heee;
// btn_table.setLayoutParams(lp);
//
// lp = (RelativeLayout.LayoutParams) btn_showMain.getLayoutParams();
// lp.height = ItemColHeight - heee;//(int)Math.ceil(this.height*30/100)+1;
// btn_showMain.setLayoutParams(lp);
//
// if (style != 0) {
// btn_table.setTextSize(20);
// }
// }
// if (!TextUtils.isEmpty(item.getQrCode())) {
// setTableFlagDispalyLayout(item);
// tv_scan_flag.setVisibility(View.VISIBLE);
// } else {
// //不是skyorder台才显示vip标识
// if (item.getMemberId() != 0) {
// iv_vip.setVisibility(View.VISIBLE);
// } else {
// iv_vip.setVisibility(View.GONE);
// }
// tv_scan_flag.setVisibility(View.GONE);
// }
}
}
private
void
initTableBackground
(
TableBean
.
DataBean
item
)
{
private
void
initTableBackground
(
TableBean
.
DataBean
item
)
{
...
@@ -168,23 +158,23 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
...
@@ -168,23 +158,23 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
// setBackGroundWork(item, "888", R.drawable.tablebutton_splite, R.drawable.tablebutton_splite_new, R.color.black);
// setBackGroundWork(item, "888", R.drawable.tablebutton_splite, R.drawable.tablebutton_splite_new, R.color.black);
// } else {
// } else {
if
(
item
.
getUseStatus
()
==
1
)
{
if
(
item
.
getUseStatus
()
==
1
)
{
setBackGroundWork
(
item
,
"999"
,
R
.
drawable
.
table
button_red
,
R
.
drawable
.
tablebutton_red_new
,
R
.
color
.
black
);
setBackGroundWork
(
item
,
"999"
,
R
.
drawable
.
table
_shape_table_use
,
R
.
drawable
.
tablebutton_red_new
,
R
.
color
.
theme_white_color
);
}
else
{
}
else
{
switch
(
item
.
getStatus
())
{
switch
(
item
.
getStatus
())
{
case
0
:
case
0
:
setBackGroundWork
(
item
,
"0"
,
R
.
drawable
.
table
button_skyblue
,
R
.
drawable
.
tablebutton_skyblue_new
,
R
.
color
.
theme_white_color
);
setBackGroundWork
(
item
,
"0"
,
R
.
drawable
.
table
_shape_table_nomal
,
R
.
drawable
.
tablebutton_skyblue_new
,
R
.
color
.
black
);
break
;
break
;
case
1
:
case
1
:
setBackGroundWork
(
item
,
"1"
,
R
.
drawable
.
tablebutton_default
,
R
.
drawable
.
tablebutton_default_new
,
R
.
color
.
theme_white_color
);
setBackGroundWork
(
item
,
"1"
,
R
.
drawable
.
tablebutton_default
,
R
.
drawable
.
tablebutton_default_new
,
R
.
color
.
theme_white_color
);
break
;
break
;
case
2
:
case
2
:
setBackGroundWork
(
item
,
"2"
,
R
.
drawable
.
table
button_glassgreen
,
R
.
drawable
.
tablebutton_glassgreen_new
,
R
.
color
.
theme_black
);
setBackGroundWork
(
item
,
"2"
,
R
.
drawable
.
table
_shape_table_send
,
R
.
drawable
.
tablebutton_glassgreen_new
,
R
.
color
.
theme_white_color
);
break
;
break
;
case
3
:
case
3
:
setBackGroundWork
(
item
,
"3"
,
R
.
drawable
.
table
button_yellow
,
R
.
drawable
.
tablebutton_yellow_new
,
R
.
color
.
theme_black
);
setBackGroundWork
(
item
,
"3"
,
R
.
drawable
.
table
_shape_table_print
,
R
.
drawable
.
tablebutton_yellow_new
,
R
.
color
.
theme_white_color
);
break
;
break
;
case
4
:
case
4
:
setBackGroundWork
(
item
,
"4"
,
R
.
drawable
.
tablebutton_violet
,
R
.
drawable
.
tablebutton_violet_new
,
R
.
color
.
theme_
black
);
setBackGroundWork
(
item
,
"4"
,
R
.
drawable
.
tablebutton_violet
,
R
.
drawable
.
tablebutton_violet_new
,
R
.
color
.
theme_
white_color
);
break
;
break
;
case
5
:
case
5
:
setBackGroundWork
(
item
,
"5"
,
R
.
drawable
.
tablebutton_default
,
R
.
drawable
.
tablebutton_default_new
,
R
.
color
.
theme_white_color
);
setBackGroundWork
(
item
,
"5"
,
R
.
drawable
.
tablebutton_default
,
R
.
drawable
.
tablebutton_default_new
,
R
.
color
.
theme_white_color
);
...
@@ -197,11 +187,11 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
...
@@ -197,11 +187,11 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
}
}
private
void
initItemTableClick
(
TableBean
.
DataBean
item
,
int
position
)
{
private
void
initItemTableClick
(
TableBean
.
DataBean
item
,
int
position
)
{
btn
_table
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
rl
_table
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
if
(
XClickUtil
.
isFastDoubleClick
(
v
,
1000
))
{
if
(
XClickUtil
.
isFastDoubleClick
(
v
,
1000
))
{
return
;
return
;
}
}
if
(
mOnItemClickListener
!=
null
)
{
if
(
mOnItemClickListener
!=
null
)
{
...
@@ -212,69 +202,33 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
...
@@ -212,69 +202,33 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
}
}
private
void
initItemDispalyMetrics
()
{
private
void
initItemDispalyMetrics
()
{
if
(
btn_table
.
getGravity
()
!=
Gravity
.
CENTER
)
{
rl_table
.
setGravity
(
Gravity
.
CENTER
);
LinearLayout
.
LayoutParams
lp
=
(
LinearLayout
.
LayoutParams
)
rl_table
.
getLayoutParams
();
lp
.
height
=
ItemColHeight
;
rl_table
.
setLayoutParams
(
lp
);
}
LinearLayout
.
LayoutParams
lp
=
(
LinearLayout
.
LayoutParams
)
rl_table
.
getLayoutParams
();
rl_table
.
setLayoutParams
(
lp
);
btn_table
.
setMinimumHeight
(
ItemColHeight
);
rl_table
.
setMinimumHeight
(
ItemColHeight
);
btn_table
.
setHeight
(
ItemColHeight
);
btn_table
.
setTextSize
(
mTableTextSize
);
RelativeLayout
.
LayoutParams
relativeLayout
=
new
RelativeLayout
.
LayoutParams
(
RelativeLayout
.
LayoutParams
.
MATCH_PARENT
,
Relative
Layout
.
LayoutParams
.
MATCH_PARENT
);
LinearLayout
.
LayoutParams
relativeLayout
=
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
Linear
Layout
.
LayoutParams
.
MATCH_PARENT
);
relativeLayout
.
height
=
ItemColHeight
;
relativeLayout
.
height
=
ItemColHeight
;
btn_table
.
setLayoutParams
(
relativeLayout
);
rl_table
.
setLayoutParams
(
relativeLayout
);
}
private
void
setTableFlagDispalyLayout
(
TableBean
.
DataBean
item
)
{
// GradientDrawable drawable = new GradientDrawable();
// drawable.setColor(Color.parseColor(GSAApplication.androidSetting.getQRTable_FlagTextBackGroup()));
// tv_scan_flag.setBackground(drawable);
//
// RelativeLayout.LayoutParams relativeLayout = (RelativeLayout.LayoutParams) tv_scan_flag.getLayoutParams();
// relativeLayout.height = ArmsUtils.dip2px(mContext, GSAApplication.androidSetting.getQRTable_FlagHeight());
// relativeLayout.width = ArmsUtils.dip2px(mContext, GSAApplication.androidSetting.getQRTable_FlagWith());
// tv_scan_flag.setLayoutParams(relativeLayout);
//
// tv_scan_flag.setText(GSAApplication.androidSetting.getQRTable_FlagText());
// tv_scan_flag.setTextSize(GSAApplication.androidSetting.getQRTable_FlagTextSize());
//
// if (!TextUtils.isEmpty(item.getQrCode())) {
// if (item.getMemberId() != 0) {
// //未登入会员
// if (item.getOrderid() > 0 && item.getRiceponorderid() > 0) {
// //已送单(橙色底黑色“S”)
// //橙色底黑色字“S”=SKY ORDER未登錄會員
// tv_scan_flag.setTextColor(Color.parseColor("#000000"));
// tv_scan_flag.setBackgroundColor(Color.parseColor("#FF7F04"));
// }else {
// //未送单(蓝色底黑色“S”)
// //藍色底黑色字“S”=SKY ORDER未登錄會員
// tv_scan_flag.setTextColor(Color.parseColor("#000000"));
// tv_scan_flag.setBackgroundColor(Color.parseColor("#0404FF"));
// }
// } else {
// //已登入会员
// if (item.getOrderid() > 0 && item.getRiceponorderid() > 0) {
// //已送单(橙色底白色“S”)
// tv_scan_flag.setTextColor(Color.parseColor("#FFFFFF"));
// tv_scan_flag.setBackgroundColor(Color.parseColor("#FF7F04"));
// } else {
// //未送单(蓝色底白色“S”)
// tv_scan_flag.setTextColor(Color.parseColor("#FFFFFF"));
// tv_scan_flag.setBackgroundColor(Color.parseColor("#0404FF"));
// }
// }
// }
}
}
private
void
setBackGroundWork
(
TableBean
.
DataBean
item
,
String
workstatu
,
int
defaultMainback
,
int
defaultChildBack
,
int
defaultFontColor
)
{
private
void
setBackGroundWork
(
TableBean
.
DataBean
item
,
String
workstatu
,
int
defaultMainback
,
int
defaultChildBack
,
int
defaultFontColor
)
{
String
tableName
=
item
.
getTableName
();
String
tableName
=
item
.
getTableName
();
if
(
defaultMainback
!=
-
1
)
{
if
(
defaultMainback
!=
-
1
)
{
fl_container
.
setBackgroundDrawable
(
mContext
.
getResources
().
getDrawable
(
defaultMainback
));
ll_container
.
setBackground
(
mContext
.
getResources
().
getDrawable
(
defaultMainback
));
}
if
(
defaultChildBack
!=
-
1
)
{
btn_table
.
setBackgroundDrawable
(
mContext
.
getResources
().
getDrawable
(
defaultChildBack
));
btn_showMain
.
setBackgroundDrawable
(
mContext
.
getResources
().
getDrawable
(
defaultChildBack
));
}
}
// if (defaultChildBack != -1) {
// btn_table.setBackground(mContext.getResources().getDrawable(defaultMainback));
// btn_showMain.setBackground(mContext.getResources().getDrawable(defaultMainback));
// }
btn_table
.
setTextColor
(
mContext
.
getResources
().
getColor
(
defaultFontColor
));
btn_table
.
setTextColor
(
mContext
.
getResources
().
getColor
(
defaultFontColor
));
btn_showMain
.
setTextColor
(
mContext
.
getResources
().
getColor
(
defaultFontColor
));
//
btn_showMain.setTextColor(mContext.getResources().getColor(defaultFontColor));
/**
/**
* 可使用 0
* 可使用 0
...
@@ -284,33 +238,33 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
...
@@ -284,33 +238,33 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
* 已结账 4
* 已结账 4
* 连台 6
* 连台 6
*/
*/
StateListDrawable
bgShape
=
(
StateListDrawable
)
btn_table
.
getBackground
();
//
StateListDrawable bgShape = (StateListDrawable) btn_table.getBackground();
GradientDrawable
d
=
(
GradientDrawable
)
bgShape
.
getCurrent
();
//
GradientDrawable d = (GradientDrawable) bgShape.getCurrent();
switch
(
workstatu
)
{
//
switch (workstatu) {
case
"0"
:
//
case "0":
d
.
setColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
app_color_blue
));
// d.setColor(ArmsUtils.getColor(mContext, R.color.table_normal
));
break
;
//
break;
case
"1"
:
//
case "1":
case
"2"
:
//
case "2":
d
.
setColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
green_500
));
// d.setColor(ArmsUtils.getColor(mContext, R.color.table_send
));
break
;
//
break;
case
"3"
:
//
case "3":
d
.
setColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
yellow_500
));
// d.setColor(ArmsUtils.getColor(mContext, R.color.table_print
));
break
;
//
break;
case
"4"
:
//
case "4":
d
.
setColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
app_color_blue
));
// d.setColor(ArmsUtils.getColor(mContext, R.color.table_normal
));
break
;
//
break;
case
"5"
:
//
case "5":
d
.
setColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
app_color_blue
));
// d.setColor(ArmsUtils.getColor(mContext, R.color.table_normal
));
break
;
//
break;
case
"6"
:
//
case "6":
d
.
setColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
Violet
));
//
d.setColor(ArmsUtils.getColor(mContext, R.color.Violet));
break
;
//
break;
case
"999"
:
//
case "999":
d
.
setColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
red
));
// d.setColor(ArmsUtils.getColor(mContext, R.color.table_use
));
break
;
//
break;
//
}
//
}
// com.elegant.bin.gsa.mvp.main.model.bean.Color.DatasBean cs;
// com.elegant.bin.gsa.mvp.main.model.bean.Color.DatasBean cs;
//
//
// for (TableWorkStatusColor tws : GSAApplication.androidSetting.getTableWorkStatusColors()) {
// for (TableWorkStatusColor tws : GSAApplication.androidSetting.getTableWorkStatusColors()) {
...
@@ -422,7 +376,6 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
...
@@ -422,7 +376,6 @@ public class TableAdapter extends DefaultAdapter<TableBean.DataBean> {
this
.
style
=
style
;
this
.
style
=
style
;
}
}
private
OnItemClickListener
mOnItemClickListener
;
private
OnItemClickListener
mOnItemClickListener
;
public
void
setOnItemClickListener
(
OnItemClickListener
onItemClickListener
)
{
public
void
setOnItemClickListener
(
OnItemClickListener
onItemClickListener
)
{
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/fragment/AllTableFragment.java
View file @
9ae76d77
...
@@ -207,9 +207,9 @@ public class AllTableFragment extends BaseFragment<AllTablePresenter> implements
...
@@ -207,9 +207,9 @@ public class AllTableFragment extends BaseFragment<AllTablePresenter> implements
// } else {
// } else {
mAllTableRecycleLayoutManager
=
new
GridLayoutManager
(
getActivity
(),
4
,
LinearLayoutManager
.
VERTICAL
,
false
);
mAllTableRecycleLayoutManager
=
new
GridLayoutManager
(
getActivity
(),
4
,
LinearLayoutManager
.
VERTICAL
,
false
);
recycle_all_table
.
setLayoutManager
(
mAllTableRecycleLayoutManager
);
recycle_all_table
.
setLayoutManager
(
mAllTableRecycleLayoutManager
);
// recycle_all_table.addItemDecoration(new GridDividerItemDecoration(ArmsUtils.dip2px(getActivity(),1), ArmsUtils.getColor(getActivity(), R.color.
red
)));
// recycle_all_table.addItemDecoration(new GridDividerItemDecoration(ArmsUtils.dip2px(getActivity(),1), ArmsUtils.getColor(getActivity(), R.color.
theme_grey_color
)));
recycle_all_table
.
addItemDecoration
(
new
DividerItemDecoration
(
getActivity
(),
LinearLayoutManager
.
HORIZONTAL
));
//
recycle_all_table.addItemDecoration(new DividerItemDecoration(getActivity(), LinearLayoutManager.HORIZONTAL));
recycle_all_table
.
addItemDecoration
(
new
DividerItemDecoration
(
getActivity
(),
LinearLayoutManager
.
VERTICAL
));
//
recycle_all_table.addItemDecoration(new DividerItemDecoration(getActivity(), LinearLayoutManager.VERTICAL));
// }
// }
}
}
}
}
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/fragment/InputTableFragment.java
View file @
9ae76d77
...
@@ -3,11 +3,14 @@ package com.gingersoft.gsa.cloud.table.mvp.ui.fragment;
...
@@ -3,11 +3,14 @@ package com.gingersoft.gsa.cloud.table.mvp.ui.fragment;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Message
;
import
android.os.Message
;
import
android.text.Editable
;
import
android.text.TextWatcher
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.widget.Button
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
com.gingersoft.gsa.cloud.base.common.bean.TableBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.TableBean
;
import
com.gingersoft.gsa.cloud.base.utils.VibratorUtils
;
import
com.gingersoft.gsa.cloud.base.utils.VibratorUtils
;
...
@@ -21,6 +24,7 @@ import com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity;
...
@@ -21,6 +24,7 @@ import com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity;
import
com.jess.arms.base.BaseFragment
;
import
com.jess.arms.base.BaseFragment
;
import
com.jess.arms.di.component.AppComponent
;
import
com.jess.arms.di.component.AppComponent
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaButton
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -50,39 +54,41 @@ public class InputTableFragment extends BaseFragment<InputTablePresenter> implem
...
@@ -50,39 +54,41 @@ public class InputTableFragment extends BaseFragment<InputTablePresenter> implem
@BindView
(
R2
.
id
.
ed_value
)
@BindView
(
R2
.
id
.
ed_value
)
EditText
ed_value
;
EditText
ed_value
;
@BindView
(
R2
.
id
.
iv_clear_account
)
ImageView
iv_clear_account
;
@BindView
(
R2
.
id
.
btn_0
)
@BindView
(
R2
.
id
.
btn_0
)
Button
btn_0
;
QMUIAlpha
Button
btn_0
;
@BindView
(
R2
.
id
.
btn_1
)
@BindView
(
R2
.
id
.
btn_1
)
Button
btn_1
;
QMUIAlpha
Button
btn_1
;
@BindView
(
R2
.
id
.
btn_2
)
@BindView
(
R2
.
id
.
btn_2
)
Button
btn_2
;
QMUIAlpha
Button
btn_2
;
@BindView
(
R2
.
id
.
btn_3
)
@BindView
(
R2
.
id
.
btn_3
)
Button
btn_3
;
QMUIAlpha
Button
btn_3
;
@BindView
(
R2
.
id
.
btn_4
)
@BindView
(
R2
.
id
.
btn_4
)
Button
btn_4
;
QMUIAlpha
Button
btn_4
;
@BindView
(
R2
.
id
.
btn_5
)
@BindView
(
R2
.
id
.
btn_5
)
Button
btn_5
;
QMUIAlpha
Button
btn_5
;
@BindView
(
R2
.
id
.
btn_6
)
@BindView
(
R2
.
id
.
btn_6
)
Button
btn_6
;
QMUIAlpha
Button
btn_6
;
@BindView
(
R2
.
id
.
btn_7
)
@BindView
(
R2
.
id
.
btn_7
)
Button
btn_7
;
QMUIAlpha
Button
btn_7
;
@BindView
(
R2
.
id
.
btn_8
)
@BindView
(
R2
.
id
.
btn_8
)
Button
btn_8
;
QMUIAlpha
Button
btn_8
;
@BindView
(
R2
.
id
.
btn_9
)
@BindView
(
R2
.
id
.
btn_9
)
Button
btn_9
;
QMUIAlpha
Button
btn_9
;
@BindView
(
R2
.
id
.
btn_clear
)
@BindView
(
R2
.
id
.
btn_clear
)
Button
btn_clear
;
QMUIAlpha
Button
btn_clear
;
@BindView
(
R2
.
id
.
btn_A
)
@BindView
(
R2
.
id
.
btn_A
)
Button
btn_A
;
QMUIAlpha
Button
btn_A
;
@BindView
(
R2
.
id
.
btn_B
)
@BindView
(
R2
.
id
.
btn_B
)
Button
btn_B
;
QMUIAlpha
Button
btn_B
;
@BindView
(
R2
.
id
.
btn_C
)
@BindView
(
R2
.
id
.
btn_C
)
Button
btn_C
;
QMUIAlpha
Button
btn_C
;
@BindView
(
R2
.
id
.
btn_more
)
@BindView
(
R2
.
id
.
btn_more
)
Button
btn_more
;
QMUIAlpha
Button
btn_more
;
@BindView
(
R2
.
id
.
btn_right
)
@BindView
(
R2
.
id
.
btn_right
)
Button
btn_right
;
QMUIAlpha
Button
btn_right
;
private
TableActivity
mActivity
;
private
TableActivity
mActivity
;
private
List
<
TableBean
.
DataBean
>
mTableList
=
new
ArrayList
<>();
private
List
<
TableBean
.
DataBean
>
mTableList
=
new
ArrayList
<>();
...
@@ -124,8 +130,44 @@ public class InputTableFragment extends BaseFragment<InputTablePresenter> implem
...
@@ -124,8 +130,44 @@ public class InputTableFragment extends BaseFragment<InputTablePresenter> implem
mActivity
=
(
TableActivity
)
getActivity
();
mActivity
=
(
TableActivity
)
getActivity
();
ed_value
.
setOnFocusChangeListener
(
mOnFocusChangeListener
);
ed_value
.
addTextChangedListener
(
new
TextWatcher
()
{
@Override
public
void
beforeTextChanged
(
CharSequence
s
,
int
start
,
int
count
,
int
after
)
{
}
@Override
public
void
onTextChanged
(
CharSequence
s
,
int
start
,
int
before
,
int
count
)
{
if
(
ed_value
.
getText
().
toString
().
equals
(
""
))
{
iv_clear_account
.
setVisibility
(
View
.
GONE
);
}
else
{
iv_clear_account
.
setVisibility
(
View
.
VISIBLE
);
}
}
@Override
public
void
afterTextChanged
(
Editable
s
)
{
}
}
});
}
private
View
.
OnFocusChangeListener
mOnFocusChangeListener
=
new
View
.
OnFocusChangeListener
()
{
@Override
public
void
onFocusChange
(
View
v
,
boolean
hasFocus
)
{
if
(
v
.
getId
()
==
R
.
id
.
ed_value
&&
hasFocus
)
{
//賬號框獲得焦點
if
(
ed_value
.
getText
()
!=
null
&&
ed_value
.
getText
().
toString
().
length
()
>
0
)
{
iv_clear_account
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
iv_clear_account
.
setVisibility
(
View
.
GONE
);
}
}
else
{
iv_clear_account
.
setVisibility
(
View
.
GONE
);
}
}
};
private
void
initDefalutText
()
{
private
void
initDefalutText
()
{
if
(
letter
.
length
()
>
1
)
if
(
letter
.
length
()
>
1
)
...
@@ -169,17 +211,43 @@ public class InputTableFragment extends BaseFragment<InputTablePresenter> implem
...
@@ -169,17 +211,43 @@ public class InputTableFragment extends BaseFragment<InputTablePresenter> implem
}
}
@OnClick
({
R2
.
id
.
btn_0
,
R2
.
id
.
btn_1
,
R2
.
id
.
btn_2
,
R2
.
id
.
btn_3
,
R2
.
id
.
btn_4
,
R2
.
id
.
btn_5
,
R2
.
id
.
btn_6
,
R2
.
id
.
btn_7
,
R2
.
id
.
btn_8
@OnClick
({
R2
.
id
.
btn_0
,
R2
.
id
.
btn_1
,
R2
.
id
.
btn_2
,
R2
.
id
.
btn_3
,
R2
.
id
.
btn_4
,
R2
.
id
.
btn_5
,
R2
.
id
.
btn_6
,
R2
.
id
.
btn_7
,
R2
.
id
.
btn_8
,
R2
.
id
.
btn_9
,
R2
.
id
.
btn_A
,
R2
.
id
.
btn_B
,
R2
.
id
.
btn_C
,
R2
.
id
.
btn_more
,
R2
.
id
.
btn_right
,
R2
.
id
.
btn_clear
})
,
R2
.
id
.
btn_9
,
R2
.
id
.
btn_A
,
R2
.
id
.
btn_B
,
R2
.
id
.
btn_C
,
R2
.
id
.
btn_more
,
R2
.
id
.
btn_right
,
R2
.
id
.
btn_clear
,
R2
.
id
.
iv_clear_account
})
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
int
i
=
Integer
.
parseInt
(
v
.
getTag
().
toString
());
Button
btn
=
(
Button
)
v
;
String
s
=
btn
.
getText
().
toString
();
VibratorUtils
.
pressButtonSound
(
getActivity
());
VibratorUtils
.
pressButtonSound
(
getActivity
());
// GSAApplication.tableContract.setIsSplite(false);
// GSAApplication.tableContract.setIsSplite(false);
// GSAApplication.tableContract.setTableno_split("");
// GSAApplication.tableContract.setTableno_split("");
if
(
v
.
getId
()
==
R
.
id
.
iv_clear_account
)
{
if
(
inputstr
.
length
()
>
0
)
{
String
sr
=
inputstr
.
substring
(
inputstr
.
length
()
-
1
,
inputstr
.
length
());
//将获取到的sr进行对比
String
ss
=
""
;
if
(
sr
.
equals
(
"-"
))
{
Splitemodal
=
false
;
}
if
(
Splitemodal
)
{
ss
=
t_name
.
substring
(
t_name
.
length
()
-
1
,
t_name
.
length
());
if
(
t_splite
.
length
()
>
0
)
{
String
ss1
=
t_splite
.
substring
(
t_splite
.
length
()
-
1
,
t_splite
.
length
());
if
(
ss1
.
equals
(
sr
))
{
t_splite
=
t_splite
.
substring
(
0
,
t_splite
.
length
()
-
1
);
}
}
}
else
{
if
(
ss
.
equals
(
sr
))
{
t_name
=
t_name
.
substring
(
0
,
t_name
.
length
()
-
1
);
}
}
inputstr
=
inputstr
.
substring
(
0
,
inputstr
.
length
()
-
1
);
ed_value
.
setText
(
inputstr
);
}
}
else
{
int
i
=
Integer
.
parseInt
(
v
.
getTag
().
toString
());
Button
btn
=
(
Button
)
v
;
String
s
=
btn
.
getText
().
toString
();
switch
(
i
)
{
switch
(
i
)
{
case
0
:
case
0
:
case
1
:
case
1
:
...
@@ -245,38 +313,14 @@ public class InputTableFragment extends BaseFragment<InputTablePresenter> implem
...
@@ -245,38 +313,14 @@ public class InputTableFragment extends BaseFragment<InputTablePresenter> implem
ed_value
.
setText
(
""
);
ed_value
.
setText
(
""
);
break
;
break
;
case
99
:
//clear button
case
99
:
//clear button
if
(
inputstr
.
length
()
>
0
)
{
inputstr
=
""
;
String
sr
=
inputstr
.
substring
(
inputstr
.
length
()
-
1
,
inputstr
.
length
());
ed_value
.
setText
(
""
);
//将获取到的sr进行对比
String
ss
=
""
;
if
(
sr
.
equals
(
"-"
))
{
Splitemodal
=
false
;
}
if
(
Splitemodal
)
{
ss
=
t_name
.
substring
(
t_name
.
length
()
-
1
,
t_name
.
length
());
if
(
t_splite
.
length
()
>
0
)
{
String
ss1
=
t_splite
.
substring
(
t_splite
.
length
()
-
1
,
t_splite
.
length
());
if
(
ss1
.
equals
(
sr
))
{
t_splite
=
t_splite
.
substring
(
0
,
t_splite
.
length
()
-
1
);
}
}
}
else
{
if
(
ss
.
equals
(
sr
))
{
t_name
=
t_name
.
substring
(
0
,
t_name
.
length
()
-
1
);
}
}
inputstr
=
inputstr
.
substring
(
0
,
inputstr
.
length
()
-
1
);
ed_value
.
setText
(
inputstr
);
// if (inputstr.length() > 0) {
// GSAApplication.tableContract.setTableno(inputstr);
// } else {
// GSAApplication.tableContract.setTableno("");
// }
}
break
;
break
;
}
}
}
}
}
private
void
goToMealStandBefore
()
{
private
void
goToMealStandBefore
()
{
if
(
Splitemodal
)
{
if
(
Splitemodal
)
{
Splitemodal
=
false
;
Splitemodal
=
false
;
...
@@ -286,9 +330,9 @@ public class InputTableFragment extends BaseFragment<InputTablePresenter> implem
...
@@ -286,9 +330,9 @@ public class InputTableFragment extends BaseFragment<InputTablePresenter> implem
TableBean
.
DataBean
table
=
getTableByName
(
t_name
);
TableBean
.
DataBean
table
=
getTableByName
(
t_name
);
if
(
table
!=
null
)
{
if
(
table
!=
null
)
{
mActivity
.
clickTableItem
(
table
);
mActivity
.
clickTableItem
(
table
);
}
else
{
}
else
{
showMessage
(
"未找到該檯號!"
);
showMessage
(
"未找到該檯號!"
);
}
}
}
}
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/fragment/StateTableFragment.java
View file @
9ae76d77
...
@@ -136,7 +136,7 @@ public class StateTableFragment extends BaseFragment<StateTablePresenter> implem
...
@@ -136,7 +136,7 @@ public class StateTableFragment extends BaseFragment<StateTablePresenter> implem
status
=
((
Message
)
data
).
arg1
;
status
=
((
Message
)
data
).
arg1
;
if
(
mPresenter
!=
null
)
{
if
(
mPresenter
!=
null
)
{
//recycleView正在滑动
//recycleView正在滑动
if
(
recycle_state_table
.
getScrollState
()
!=
0
)
{
if
(
recycle_state_table
!=
null
&&
recycle_state_table
.
getScrollState
()
!=
0
)
{
}
else
{
}
else
{
mPresenter
.
updateAllTableData
(
mActivity
,
datasBeans
,
status
);
mPresenter
.
updateAllTableData
(
mActivity
,
datasBeans
,
status
);
}
}
...
@@ -146,7 +146,7 @@ public class StateTableFragment extends BaseFragment<StateTablePresenter> implem
...
@@ -146,7 +146,7 @@ public class StateTableFragment extends BaseFragment<StateTablePresenter> implem
datasBeans
=
(
List
<
TableBean
.
DataBean
>)
((
Message
)
data
).
obj
;
datasBeans
=
(
List
<
TableBean
.
DataBean
>)
((
Message
)
data
).
obj
;
if
(
mPresenter
!=
null
)
{
if
(
mPresenter
!=
null
)
{
//recycleView正在滑动
//recycleView正在滑动
if
(
recycle_state_table
.
getScrollState
()
!=
0
)
{
if
(
recycle_state_table
!=
null
&&
recycle_state_table
.
getScrollState
()
!=
0
)
{
}
else
{
}
else
{
mPresenter
.
updataTableItem
(
datasBeans
);
mPresenter
.
updataTableItem
(
datasBeans
);
}
}
...
@@ -207,8 +207,8 @@ public class StateTableFragment extends BaseFragment<StateTablePresenter> implem
...
@@ -207,8 +207,8 @@ public class StateTableFragment extends BaseFragment<StateTablePresenter> implem
mStateTableRecycleLayoutManager
=
new
GridLayoutManager
(
getActivity
(),
4
,
LinearLayoutManager
.
VERTICAL
,
false
);
mStateTableRecycleLayoutManager
=
new
GridLayoutManager
(
getActivity
(),
4
,
LinearLayoutManager
.
VERTICAL
,
false
);
recycle_state_table
.
setLayoutManager
(
mStateTableRecycleLayoutManager
);
recycle_state_table
.
setLayoutManager
(
mStateTableRecycleLayoutManager
);
// recycle_state_table.addItemDecoration(new GridDividerItemDecoration(ArmsUtils.dip2px(getActivity(),1), ArmsUtils.getColor(getActivity(), R.color.theme_grey_color)));
// recycle_state_table.addItemDecoration(new GridDividerItemDecoration(ArmsUtils.dip2px(getActivity(),1), ArmsUtils.getColor(getActivity(), R.color.theme_grey_color)));
recycle_state_table
.
addItemDecoration
(
new
DividerItemDecoration
(
getActivity
(),
LinearLayoutManager
.
HORIZONTAL
));
//
recycle_state_table.addItemDecoration(new DividerItemDecoration(getActivity(), LinearLayoutManager.HORIZONTAL));
recycle_state_table
.
addItemDecoration
(
new
DividerItemDecoration
(
getActivity
(),
LinearLayoutManager
.
VERTICAL
));
//
recycle_state_table.addItemDecoration(new DividerItemDecoration(getActivity(), LinearLayoutManager.VERTICAL));
// }
// }
}
}
}
}
table-mode/src/main/res/drawable/table_shape_input_table_number_frame.xml
0 → 100644
View file @
9ae76d77
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<stroke
android:width=
"1px"
android:color=
"@color/theme_hint_color"
/>
<corners
android:radius=
"@dimen/dp_5"
/>
</shape>
\ No newline at end of file
table-mode/src/main/res/drawable/table_shape_table_bottom_function_layout.xml
0 → 100644
View file @
9ae76d77
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape
android:shape=
"rectangle"
>
<padding
android:top=
"1px"
/>
<solid
android:color=
"#0DCCCCCC"
/>
</shape>
</item>
<item>
<shape
android:shape=
"rectangle"
>
<padding
android:top=
"1px"
/>
<solid
android:color=
"#10CCCCCC"
/>
</shape>
</item>
<item>
<shape
android:shape=
"rectangle"
>
<padding
android:top=
"1px"
/>
<solid
android:color=
"#15CCCCCC"
/>
</shape>
</item>
<item>
<shape
android:shape=
"rectangle"
>
<padding
android:top=
"1px"
/>
<solid
android:color=
"#20CCCCCC"
/>
</shape>
</item>
<item>
<shape
android:shape=
"rectangle"
>
<padding
android:top=
"1px"
/>
<solid
android:color=
"#30CCCCCC"
/>
</shape>
</item>
<item>
<shape>
<solid
android:color=
"#FFFFFF"
/>
</shape>
</item>
</layer-list>
\ No newline at end of file
table-mode/src/main/res/drawable/table_shape_table_nomal.xml
0 → 100644
View file @
9ae76d77
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/dp_5"
/>
<solid
android:color=
"#FFFFFFFF"
/>
</shape>
\ No newline at end of file
table-mode/src/main/res/drawable/table_shape_table_print.xml
0 → 100644
View file @
9ae76d77
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/dp_5"
/>
<solid
android:color=
"#FFE5AC00"
/>
</shape>
\ No newline at end of file
table-mode/src/main/res/drawable/table_shape_table_send.xml
0 → 100644
View file @
9ae76d77
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/dp_5"
/>
<solid
android:color=
"#FF249B65"
/>
</shape>
\ No newline at end of file
table-mode/src/main/res/drawable/table_shape_table_use.xml
0 → 100644
View file @
9ae76d77
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/dp_5"
/>
<solid
android:color=
"#FFD14141"
/>
</shape>
\ No newline at end of file
table-mode/src/main/res/layout/table_activity_meal_stand.xml
View file @
9ae76d77
...
@@ -488,7 +488,6 @@
...
@@ -488,7 +488,6 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/ll_meals"
android:layout_below=
"@+id/ll_meals"
android:layout_above=
"@+id/ll_stand_oper"
android:divider=
"@null"
android:divider=
"@null"
android:fadeScrollbars=
"false"
android:fadeScrollbars=
"false"
android:orientation=
"vertical"
android:orientation=
"vertical"
...
...
table-mode/src/main/res/layout/table_activity_table.xml
View file @
9ae76d77
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_above=
"@+id/rv_bottom_function"
android:layout_above=
"@+id/rv_bottom_function"
android:layout_marginTop=
"?attr/qmui_topbar_height"
android:layout_marginTop=
"?attr/qmui_topbar_height"
android:background=
"
@color/theme_white_color
"
>
android:background=
"
#FFE8E8E8
"
>
<com.qmuiteam.qmui.widget.tab.QMUITabSegment
<com.qmuiteam.qmui.widget.tab.QMUITabSegment
android:id=
"@+id/tabSegment"
android:id=
"@+id/tabSegment"
...
@@ -66,9 +66,8 @@
...
@@ -66,9 +66,8 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_gravity=
"bottom"
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:background=
"@color/theme_white_color"
android:background=
"@drawable/table_shape_table_bottom_function_layout"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
/>
android:padding=
"1dp"
/>
<com.qmuiteam.qmui.layout.QMUIButton
<com.qmuiteam.qmui.layout.QMUIButton
android:id=
"@+id/btn_cancel_operat"
android:id=
"@+id/btn_cancel_operat"
...
...
table-mode/src/main/res/layout/table_fragment_input_table.xml
View file @
9ae76d77
...
@@ -4,7 +4,337 @@
...
@@ -4,7 +4,337 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<!-- <include layout="@layout/table_include_number_input"/>-->
<include
layout=
"@layout/table_include_number_input"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_80"
android:background=
"@color/theme_white_color"
>
<EditText
android:id=
"@+id/ed_value"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_60"
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_marginRight=
"@dimen/dp_15"
android:background=
"@drawable/table_shape_input_table_number_frame"
android:ems=
"10"
android:enabled=
"false"
android:hint=
"@string/please_input_table_number"
android:textSize=
"@dimen/sp_28"
android:paddingLeft=
"@dimen/dp_8"
android:paddingRight=
"@dimen/dp_40"
android:layout_centerInParent=
"true"
android:gravity=
"right|center_vertical"
android:inputType=
"numberDecimal"
android:singleLine=
"true"
android:textColor=
"@color/table_input_table_keypad"
android:textColorHint=
"@color/theme_hint_color"
android:textStyle=
"bold"
/>
<ImageView
android:id=
"@+id/iv_clear_account"
android:layout_width=
"@dimen/dp_30"
android:layout_height=
"@dimen/dp_30"
android:padding=
"@dimen/dp_2"
android:layout_marginRight=
"@dimen/dp_25"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:src=
"@mipmap/ic_clear_text"
android:visibility=
"gone"
/>
</RelativeLayout>
<TableLayout
android:id=
"@+id/LL_keys"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/dp_80"
android:background=
"#FFF6F5F8"
android:stretchColumns=
"*"
>
<TableRow
android:id=
"@+id/tableRow1"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_A"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"2dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:gravity=
"center"
android:layerType=
"software"
android:tag=
"55"
android:text=
"A"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_7"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"2dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:layerType=
"software"
android:tag=
"7"
android:text=
"@string/Key_7"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_8"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"2dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:layerType=
"software"
android:tag=
"8"
android:text=
"@string/Key_8"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_9"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_weight=
"1"
android:focusable=
"true"
android:layerType=
"software"
android:tag=
"9"
android:text=
"@string/Key_9"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
</TableRow>
<TableRow
android:id=
"@+id/tableRow2"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_B"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"2dp"
android:layout_marginTop=
"1dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:layerType=
"software"
android:tag=
"56"
android:text=
"@string/Key_7"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_4"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"2dp"
android:layout_marginTop=
"1dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:layerType=
"software"
android:tag=
"4"
android:text=
"@string/Key_4"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_5"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"2dp"
android:layout_marginTop=
"1dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:layerType=
"software"
android:tag=
"5"
android:text=
"@string/Key_5"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_6"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginTop=
"1dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:layerType=
"software"
android:tag=
"6"
android:text=
"@string/Key_6"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
</TableRow>
<TableRow
android:id=
"@+id/tableRow3"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_C"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"2dp"
android:layout_marginTop=
"1dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:layerType=
"software"
android:tag=
"57"
android:text=
"@string/Key_7"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_1"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"2dp"
android:layout_marginTop=
"1dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:layerType=
"software"
android:tag=
"1"
android:text=
"@string/Key_1"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_2"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"2dp"
android:layout_marginTop=
"1dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:layerType=
"software"
android:tag=
"2"
android:text=
"@string/Key_2"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_3"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginTop=
"1dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:layerType=
"software"
android:tag=
"3"
android:text=
"@string/Key_3"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
</TableRow>
<TableRow
android:id=
"@+id/tableRow4"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"0.2"
android:background=
"#FFDDEDFE"
>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_more"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"2dp"
android:layout_marginTop=
"1dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:gravity=
"center"
android:layerType=
"software"
android:tag=
"58"
android:text=
"..."
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_clear"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"2dp"
android:layout_marginTop=
"1dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:gravity=
"center"
android:layerType=
"software"
android:longClickable=
"true"
android:tag=
"99"
android:text=
"@string/Key_clear"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"30sp"
android:textStyle=
"bold"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_0"
style=
"@style/ButtonBorderless"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"2dp"
android:layout_marginTop=
"1dp"
android:layout_weight=
"1"
android:focusable=
"true"
android:gravity=
"center"
android:layerType=
"software"
android:tag=
"0"
android:text=
"@string/Key_0"
android:textColor=
"@color/table_input_table_keypad"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_right"
android:layout_width=
"1dip"
android:layout_height=
"fill_parent"
android:layout_marginTop=
"1dp"
android:layout_weight=
"1"
android:background=
"@color/table_input_table_keypad"
android:focusable=
"true"
android:gravity=
"center"
android:layerType=
"software"
android:tag=
"98"
android:text=
"@string/Key_right"
android:textColor=
"@color/theme_white_color"
android:textSize=
"40dp"
android:textStyle=
"bold"
/>
</TableRow>
</TableLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>
\ No newline at end of file
table-mode/src/main/res/layout/table_include_number_input.xml
View file @
9ae76d77
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
android:gravity=
"right"
android:gravity=
"right"
android:inputType=
"numberDecimal"
android:inputType=
"numberDecimal"
android:singleLine=
"true"
android:singleLine=
"true"
android:text=
""
android:textColorHint=
"#FF0000"
android:textColorHint=
"#FF0000"
android:textSize=
"30dip"
android:textSize=
"30dip"
android:textStyle=
"bold"
>
android:textStyle=
"bold"
>
...
...
table-mode/src/main/res/layout/table_recycler_table.xml
View file @
9ae76d77
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<
Relative
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/
f
l_container"
android:id=
"@+id/
l
l_container"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"vertical"
android:layout_margin=
"@dimen/dp_2"
>
<RelativeLayout
<
com.qmuiteam.qmui.alpha.QMUIAlpha
RelativeLayout
android:id=
"@+id/rl_
container
"
android:id=
"@+id/rl_
table
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
>
<
Button
<
TextView
android:id=
"@+id/btn_table"
android:id=
"@+id/btn_table"
style=
"@style/ButtonBorderless"
android:layout_width=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_alignParentTop=
"true"
android:text=
"Button"
android:textColor=
"@color/theme_white_color"
android:textSize=
"@dimen/dp_38"
/>
<Button
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:text=
"Button"
android:textSize=
"@dimen/dp_16"
android:maxLines=
"1"
android:visibility=
"gone"
/>
android:ellipsize=
"end"
</RelativeLayout>
android:layout_centerHorizontal=
"true"
android:textColor=
"#FF000000"
android:textSize=
"@dimen/dp_22"
/>
<ImageView
<TextView
android:id=
"@+id/iv_vip"
android:id=
"@+id/tv_people"
android:layout_width=
"50dp"
android:layout_width=
"wrap_content"
android:layout_height=
"50dp"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"2人"
android:layout_alignParentTop=
"true"
android:layout_below=
"@+id/btn_table"
android:scaleType=
"fitXY"
android:layout_centerHorizontal=
"true"
android:src=
"@drawable/qmui_icon_tip_new"
android:textSize=
"@dimen/sp_13"
android:visibility=
"gone"
/>
android:layout_marginTop=
"@dimen/dp_3"
android:textColor=
"@color/theme_white_color"
android:visibility=
"gone"
/>
<TextView
<TextView
android:id=
"@+id/tv_scan_flag"
android:id=
"@+id/tv_open_duration"
android:layout_width=
"25dp"
android:layout_width=
"wrap_content"
android:layout_height=
"25dp"
android:layout_height=
"wrap_content"
android:layout_alignParentTop=
"true"
android:text=
"30:00"
android:layout_alignParentRight=
"true"
android:layout_below=
"@+id/tv_people"
android:text=
"S"
android:textSize=
"@dimen/sp_12"
android:background=
"@color/orange_700"
android:layout_centerHorizontal=
"true"
android:drawableLeft=
"@mipmap/ic_table_open_time"
android:layout_marginTop=
"@dimen/dp_2"
android:drawablePadding=
"@dimen/dp_3"
android:textColor=
"@color/theme_white_color"
android:textColor=
"@color/theme_white_color"
android:gravity=
"center"
android:visibility=
"gone"
/>
android:visibility=
"gone"
android:textSize=
"@dimen/font_normal2"
/>
<!-- <com.qmuiteam.qmui.alpha.QMUIAlphaButton-->
</RelativeLayout>
<!-- 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" />-->
</com.qmuiteam.qmui.alpha.QMUIAlphaRelativeLayout>
<!-- <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" />-->
</LinearLayout>
table-mode/src/main/res/mipmap-xhdpi/ic_clear_text.png
0 → 100644
View file @
9ae76d77
522 Bytes
table-mode/src/main/res/mipmap-xxhdpi/ic_table_open_time.png
0 → 100644
View file @
9ae76d77
744 Bytes
table-mode/src/main/res/values/colors.xml
View file @
9ae76d77
...
@@ -3,4 +3,6 @@
...
@@ -3,4 +3,6 @@
<color
name=
"table_colorPrimary"
>
#008577
</color>
<color
name=
"table_colorPrimary"
>
#008577
</color>
<color
name=
"table_colorPrimaryDark"
>
#00574B
</color>
<color
name=
"table_colorPrimaryDark"
>
#00574B
</color>
<color
name=
"table_colorAccent"
>
#D81B60
</color>
<color
name=
"table_colorAccent"
>
#D81B60
</color>
<color
name=
"table_input_table_keypad"
>
#FF4B9DFA
</color>
</resources>
</resources>
table-mode/src/main/res/values/strings.xml
View file @
9ae76d77
...
@@ -85,6 +85,7 @@
...
@@ -85,6 +85,7 @@
<string
name=
"detailmode"
>
细微模式
</string>
<string
name=
"detailmode"
>
细微模式
</string>
<string
name=
"malnumber"
>
請選擇按鍵錄入數量
</string>
<string
name=
"malnumber"
>
請選擇按鍵錄入數量
</string>
<string
name=
"input_pay_money"
>
請輸入支付金額
</string>
<string
name=
"input_pay_money"
>
請輸入支付金額
</string>
<string
name=
"please_input_table_number"
>
請輸入檯號
</string>
<string
name=
"waring"
>
警告
</string>
<string
name=
"waring"
>
警告
</string>
<string
name=
"presssound"
>
按鍵音量
</string>
<string
name=
"presssound"
>
按鍵音量
</string>
<string
name=
"Vibration"
>
震動強度
</string>
<string
name=
"Vibration"
>
震動強度
</string>
...
...
user-login/src/main/res/layout/user_login_activity_login.xml
View file @
9ae76d77
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
android:layout_width=
"@dimen/dp_30"
android:layout_width=
"@dimen/dp_30"
android:layout_height=
"@dimen/dp_30"
android:layout_height=
"@dimen/dp_30"
android:padding=
"@dimen/dp_5"
android:padding=
"@dimen/dp_5"
android:src=
"@
mipmap
/ic_clear_text"
android:src=
"@
drawable
/ic_clear_text"
android:visibility=
"gone"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"@id/ed_login_user_account"
app:layout_constraintBottom_toBottomOf=
"@id/ed_login_user_account"
app:layout_constraintLeft_toRightOf=
"@id/ed_login_user_account"
app:layout_constraintLeft_toRightOf=
"@id/ed_login_user_account"
...
...
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