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
3acc2de9
Commit
3acc2de9
authored
Feb 22, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、新增轉台
parent
57ee9e10
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
27 deletions
+49
-27
public-base/src/main/java/com/gingersoft/gsa/cloud/ui/widget/dialog/ChooseRestaurantDialog.java
+5
-1
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
+15
-3
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/TableActivity.java
+4
-0
table-mode/src/main/res/layout/table_activity_table.xml
+24
-23
user-login/src/main/java/com/gingersoft/gsa/cloud/user/login/mvp/ui/activity/LoginActivity.java
+1
-0
No files found.
public-base/src/main/java/com/gingersoft/gsa/cloud/ui/widget/dialog/ChooseRestaurantDialog.java
View file @
3acc2de9
...
@@ -28,9 +28,11 @@ import com.qmuiteam.qmui.widget.dialog.QMUIBottomSheet;
...
@@ -28,9 +28,11 @@ import com.qmuiteam.qmui.widget.dialog.QMUIBottomSheet;
import
com.qmuiteam.qmui.widget.section.QMUISection
;
import
com.qmuiteam.qmui.widget.section.QMUISection
;
import
com.qmuiteam.qmui.widget.section.QMUIStickySectionAdapter
;
import
com.qmuiteam.qmui.widget.section.QMUIStickySectionAdapter
;
import
com.qmuiteam.qmui.widget.section.QMUIStickySectionLayout
;
import
com.qmuiteam.qmui.widget.section.QMUIStickySectionLayout
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Objects
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
import
androidx.core.content.ContextCompat
;
import
androidx.core.content.ContextCompat
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
...
@@ -278,9 +280,11 @@ public class ChooseRestaurantDialog extends Dialog {
...
@@ -278,9 +280,11 @@ public class ChooseRestaurantDialog extends Dialog {
BasTextSectiontAdapter
.
ViewHolder
viewHolder
=
(
BasTextSectiontAdapter
.
ViewHolder
)
holder
;
BasTextSectiontAdapter
.
ViewHolder
viewHolder
=
(
BasTextSectiontAdapter
.
ViewHolder
)
holder
;
if
(
viewHolder
.
getTvName
().
getText
()
!=
null
)
{
if
(
viewHolder
.
getTvName
().
getText
()
!=
null
)
{
SectionTextItem
item
=
viewHolder
.
getSectionTextItem
(
position
);
SectionTextItem
item
=
viewHolder
.
getSectionTextItem
(
position
);
if
(
mOnItemClickListener
!=
null
)
if
(
mOnItemClickListener
!=
null
)
{
mOnItemClickListener
.
onItemClick
(
item
,
position
);
mOnItemClickListener
.
onItemClick
(
item
,
position
);
}
}
mDialog
.
dismiss
();
}
}
else
{
}
else
{
//點擊的頭部,折疊
//點擊的頭部,折疊
}
}
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
View file @
3acc2de9
...
@@ -213,10 +213,10 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -213,10 +213,10 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
});
});
}
}
public
void
openTable
(
int
i
d
)
{
public
void
openTable
(
int
tableI
d
)
{
RequestBody
requestBody
=
new
FormBody
.
Builder
()
RequestBody
requestBody
=
new
FormBody
.
Builder
()
.
add
(
"id"
,
String
.
valueOf
(
i
d
))
.
add
(
"id"
,
String
.
valueOf
(
tableI
d
))
.
build
();
.
build
();
mModel
.
openTable
(
requestBody
)
mModel
.
openTable
(
requestBody
)
...
@@ -232,7 +232,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -232,7 +232,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
public
void
onNext
(
@NonNull
BaseRespose
respose
)
{
public
void
onNext
(
@NonNull
BaseRespose
respose
)
{
if
(
respose
.
isSuccess
())
{
if
(
respose
.
isSuccess
())
{
//設置當前開台數據
//設置當前開台數據
TableBean
.
DataBean
openTableBean
=
getTableById
(
i
d
);
TableBean
.
DataBean
openTableBean
=
getTableById
(
tableI
d
);
OpenTableManage
.
getDefault
().
setTableBean
(
openTableBean
);
OpenTableManage
.
getDefault
().
setTableBean
(
openTableBean
);
if
(
respose
.
getData
()
!=
null
&&
respose
.
getData
().
getOrderDetails
()
!=
null
)
{
if
(
respose
.
getData
()
!=
null
&&
respose
.
getData
().
getOrderDetails
()
!=
null
)
{
...
@@ -270,10 +270,22 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -270,10 +270,22 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
if
(
result
.
isSuccess
())
{
if
(
result
.
isSuccess
())
{
TableBean
.
DataBean
tableBean
=
result
.
getData
();
TableBean
.
DataBean
tableBean
=
result
.
getData
();
if
(
originalTableId
==
0
)
{
if
(
originalTableId
==
0
)
{
if
(
tableBean
.
getUseStatus
()
==
1
)
{
mRootView
.
showMessage
(
"此檯使用中."
);
return
;
}
if
(
tableBean
.
getStatus
()
==
0
){
mRootView
.
showMessage
(
"此檯未開檯."
);
return
;
}
originalTableName
=
tableBean
.
getTableName
();
originalTableName
=
tableBean
.
getTableName
();
originalTableId
=
tableBean
.
getId
();
originalTableId
=
tableBean
.
getId
();
mRootView
.
setOperatContentText
(
"由: "
+
originalTableName
+
" 轉到 "
);
mRootView
.
setOperatContentText
(
"由: "
+
originalTableName
+
" 轉到 "
);
}
else
{
}
else
{
if
(
tableBean
.
getUseStatus
()
==
1
)
{
mRootView
.
showMessage
(
"此檯使用中."
);
return
;
}
targetTableName
=
tableBean
.
getTableName
();
targetTableName
=
tableBean
.
getTableName
();
targetTableId
=
tableBean
.
getId
();
targetTableId
=
tableBean
.
getId
();
mRootView
.
setOperatContentText
(
"由: "
+
originalTableName
+
" 轉到 "
+
mRootView
.
setOperatContentText
(
"由: "
+
originalTableName
+
" 轉到 "
+
...
...
table-mode/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/TableActivity.java
View file @
3acc2de9
...
@@ -285,6 +285,10 @@ public class TableActivity extends BaseActivity<TablePresenter> implements Table
...
@@ -285,6 +285,10 @@ public class TableActivity extends BaseActivity<TablePresenter> implements Table
ll_table_operat_content
.
setVisibility
(
View
.
INVISIBLE
);
ll_table_operat_content
.
setVisibility
(
View
.
INVISIBLE
);
rv_bottom_function
.
setVisibility
(
View
.
VISIBLE
);
rv_bottom_function
.
setVisibility
(
View
.
VISIBLE
);
tv_operat_hint
.
setText
(
""
);
tv_operat_content
.
setText
(
""
);
mTopBar
.
setTitle
(
"餐檯模式"
);
mPresenter
.
initTableParameter
();
mPresenter
.
initTableParameter
();
mPresenter
.
filterTableByOperatType
(
1
);
mPresenter
.
filterTableByOperatType
(
1
);
}
}
...
...
table-mode/src/main/res/layout/table_activity_table.xml
View file @
3acc2de9
...
@@ -4,30 +4,12 @@
...
@@ -4,30 +4,12 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<com.qmuiteam.qmui.widget.QMUITopBar
android:id=
"@+id/topbar"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/qmui_topbar_height"
app:qmui_topbar_title_color=
"@color/theme_white_color"
/>
<RelativeLayout
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
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"
>
<androidx.viewpager.widget.ViewPager
android:id=
"@+id/vp_table_type"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"?attr/qmui_topbar_height"
/>
<com.gingersoft.gsa.cloud.ui.view.PagerSlidingTabStrip
android:id=
"@+id/pts_table_type"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/qmui_topbar_height"
android:background=
"@color/theme_white_color"
/>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_table_operat_content"
android:id=
"@+id/ll_table_operat_content"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -57,14 +39,26 @@
...
@@ -57,14 +39,26 @@
android:textColor=
"@color/theme_white_color"
android:textColor=
"@color/theme_white_color"
android:textSize=
"@dimen/font_normal3"
/>
android:textSize=
"@dimen/font_normal3"
/>
</LinearLayout>
</LinearLayout>
<androidx.viewpager.widget.ViewPager
android:id=
"@+id/vp_table_type"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"?attr/qmui_topbar_height"
/>
<com.gingersoft.gsa.cloud.ui.view.PagerSlidingTabStrip
android:id=
"@+id/pts_table_type"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/qmui_topbar_height"
android:background=
"@color/theme_white_color"
/>
</RelativeLayout>
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_bottom_function"
android:id=
"@+id/rv_bottom_function"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:layout_gravity=
"bottom"
android:background=
"@color/theme_white_color"
android:background=
"@color/theme_white_color"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:padding=
"1dp"
/>
android:padding=
"1dp"
/>
...
@@ -73,10 +67,16 @@
...
@@ -73,10 +67,16 @@
android:id=
"@+id/btn_cancel_operat"
android:id=
"@+id/btn_cancel_operat"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_48"
android:layout_height=
"@dimen/dp_48"
android:textColor=
"@color/theme_white_color"
android:background=
"@color/theme_grey_color"
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:visibility=
"invisible"
android:background=
"@color/theme_grey_color"
android:text=
"取消"
/>
android:text=
"取消"
android:textColor=
"@color/theme_white_color"
android:visibility=
"invisible"
/>
<com.qmuiteam.qmui.widget.QMUITopBar
android:id=
"@+id/topbar"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/qmui_topbar_height"
app:qmui_topbar_title_color=
"@color/theme_white_color"
/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
user-login/src/main/java/com/gingersoft/gsa/cloud/user/login/mvp/ui/activity/LoginActivity.java
View file @
3acc2de9
...
@@ -157,6 +157,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter> implements Login
...
@@ -157,6 +157,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter> implements Login
public
void
onItemClick
(
SectionTextItem
item
,
int
position
)
{
public
void
onItemClick
(
SectionTextItem
item
,
int
position
)
{
GsaCloudApplication
.
setRestaurantId
(
LoginActivity
.
this
,
item
.
getId
());
GsaCloudApplication
.
setRestaurantId
(
LoginActivity
.
this
,
item
.
getId
());
jumpActivity
();
jumpActivity
();
killMyself
();
}
}
})
})
.
build
()
.
build
()
...
...
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