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
77361964
Commit
77361964
authored
Jun 24, 2020
by
Wyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
6.24 adapter升級,prj打印開啟,外賣接單UI佈局優化,切換環境優化
parent
2b3e65d7
Show whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
420 additions
and
394 deletions
+420
-394
base-module/src/main/java/com/gingersoft/gsa/cloud/base/adapter/print/BillAdapter.java
+7
-6
base-module/src/main/java/com/gingersoft/gsa/cloud/base/adapter/print/BillTypeAdapter.java
+3
-5
base-module/src/main/java/com/gingersoft/gsa/cloud/base/adapter/print/FoodAdapter.java
+1
-1
base-module/src/main/java/com/gingersoft/gsa/cloud/base/adapter/print/KitChenPrintFoodAdapter.java
+1
-1
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
+3
-3
base-module/src/main/java/com/gingersoft/gsa/cloud/base/common/bean/OrderBean.java
+5
-5
base-module/src/main/java/com/gingersoft/gsa/cloud/base/common/bean/OrderDetail.java
+1
-1
base-module/src/main/java/com/gingersoft/gsa/cloud/constans/HttpsConstans.java
+13
-15
base-module/src/main/java/com/gingersoft/gsa/cloud/ui/adapter/BillMethodAdapter.java
+1
-1
base-module/src/main/java/com/gingersoft/gsa/cloud/ui/adapter/BillMoneyAdapter.java
+2
-2
base-module/src/main/res/layout/print_item_bill.xml
+2
-2
config.gradle
+1
-1
login-module/src/main/java/com/gingersoft/gsa/cloud/login/mvp/ui/activity/mvp/ui/activity/SwitchServerActivity.java
+88
-80
login-module/src/main/res/layout/activity_switch_server.xml
+4
-4
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/activity/NewMainActivity.java
+11
-9
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/BusinessInfoAdapter.java
+2
-12
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/FoodRankingAdapter.java
+1
-1
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/MainOrderingAdapter.java
+1
-1
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/MainSideMenuAdapter.java
+1
-1
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/PaymentMethodAdapter.java
+1
-1
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/PaymentMethodColorAdapter.java
+1
-1
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/SortNumberingAdapter.java
+1
-1
other_order_mode/build.gradle
+0
-2
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/DeliveryBean.kt
+1
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/network/ServiceCreator.kt
+0
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/PageViewModel.kt
+2
-2
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/DeliverySettingActivity.kt
+0
-2
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/OrderDetailsActivity.kt
+4
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/OtherOrderActivity.kt
+11
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/DeliveryAdapter.kt
+11
-13
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/DeliveryListAdapter.kt
+12
-14
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/OrderDetailsAdapter.kt
+6
-6
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/OtherOrdersAdapter.kt
+5
-6
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/PayBillAdapter.kt
+10
-11
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/TextAdapter.kt
+6
-11
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/fragment/DeliveryFragment.kt
+3
-3
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/fragment/UpdateDeliveryFragment.kt
+6
-10
other_order_mode/src/main/res/layout/layout_other_order_item.xml
+146
-71
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrder.java
+1
-1
print-module/src/main/java/com/joe/print/mvp/print/service/PrjService.java
+3
-1
print-module/src/main/java/com/joe/print/mvp/ui/adapter/BillItemAdapter.java
+2
-9
print-module/src/main/java/com/joe/print/mvp/ui/adapter/DialogPrinterListAdapter.java
+1
-1
print-module/src/main/java/com/joe/print/mvp/ui/adapter/KitChenPrjPrintFoodAdapter.java
+1
-1
print-module/src/main/java/com/joe/print/mvp/ui/adapter/OtherOrderAdapter.java
+1
-1
print-module/src/main/java/com/joe/print/mvp/ui/adapter/PrintFailListAdapter.java
+1
-1
print-module/src/main/java/com/joe/print/mvp/ui/adapter/PrintFileBitmapAdapter.java
+1
-1
print-module/src/main/java/com/joe/print/mvp/ui/adapter/PrintModelAdapter.java
+1
-1
print-module/src/main/java/com/joe/print/mvp/ui/adapter/PrinterListAdapter.java
+6
-4
print-module/src/main/java/com/joe/print/mvp/ui/adapter/SelectPrintAdapter.java
+1
-1
print-module/src/main/java/com/joe/print/mvp/ui/fragment/IpPrintListActivityFragment.java
+9
-6
print-module/src/main/res/layout/printer_activity_list.xml
+0
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
+2
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderPayActivity.java
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/FoodReasonAdapter.java
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/OrderCenterDetailFoodAdapter.java
+2
-11
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/OrderCenterMoneyAdapter.java
+5
-8
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/widget/CancelFoodDialog.java
+7
-32
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/base/adapter/print/BillAdapter.java
View file @
77361964
package
com
.
gingersoft
.
gsa
.
cloud
.
base
.
adapter
.
print
;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.viewholder.BaseViewHolder
;
import
com.gingersoft.gsa.cloud.base.R
;
import
com.gingersoft.gsa.cloud.base.common.bean.BillingBean
;
import
java.util.List
;
import
androidx.annotation.Nullable
;
/**
* Created by Wyh on 2020/1/9.
*/
...
...
@@ -20,11 +21,11 @@ public class BillAdapter extends BaseQuickAdapter<BillingBean, BaseViewHolder> {
@Override
protected
void
convert
(
BaseViewHolder
helper
,
BillingBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_total_text
,
item
.
getOptionName
());
helper
.
setText
(
R
.
id
.
tv_
bill_
total_text
,
item
.
getOptionName
());
if
(
item
.
getTotalAmount
()
<
0
)
{
helper
.
setText
(
R
.
id
.
tv_total
,
"-$"
+
Math
.
abs
(
item
.
getTotalAmount
()));
helper
.
setText
(
R
.
id
.
tv_
bill_
total
,
"-$"
+
Math
.
abs
(
item
.
getTotalAmount
()));
}
else
if
(
item
.
getTotalAmount
()
>
0
){
helper
.
setText
(
R
.
id
.
tv_total
,
"$"
+
item
.
getTotalAmount
());
helper
.
setText
(
R
.
id
.
tv_
bill_
total
,
"$"
+
item
.
getTotalAmount
());
}
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/base/adapter/print/BillTypeAdapter.java
View file @
77361964
package
com
.
gingersoft
.
gsa
.
cloud
.
base
.
adapter
.
print
;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.base.R
;
import
com.gingersoft.gsa.cloud.base.common.bean.BillMethodBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.database.bean.Food
;
import
java.util.List
;
import
androidx.annotation.Nullable
;
/**
* Created by Wyh on 2020/1/9.
* 結賬方式
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/base/adapter/print/FoodAdapter.java
View file @
77361964
...
...
@@ -3,7 +3,7 @@ package com.gingersoft.gsa.cloud.base.adapter.print;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.base.R
;
import
com.gingersoft.gsa.cloud.base.common.bean.OrderDetail
;
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/base/adapter/print/KitChenPrintFoodAdapter.java
View file @
77361964
...
...
@@ -5,7 +5,7 @@ import android.widget.TextView;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.base.R
;
import
com.gingersoft.gsa.cloud.base.common.bean.OrderDetail
;
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
View file @
77361964
...
...
@@ -98,7 +98,7 @@ public class GsaCloudApplication extends BaseApplication {
CC
.
enableDebug
(
true
);
CC
.
enableRemoteCC
(
true
);
//初始化服務器地址
initDomainUrl
(
false
);
initDomainUrl
();
//初始化側滑回退
// QMUISwipeBackActivityManager.init(this);
...
...
@@ -148,8 +148,8 @@ public class GsaCloudApplication extends BaseApplication {
ClassicsFooter
.
REFRESH_FOOTER_NOTHING
=
getString
(
R
.
string
.
srl_footer_nothing
);
//"全部加载完成";
}
public
static
void
initDomainUrl
(
boolean
isSwitchServer
)
{
HttpsConstans
.
init
(
mAppContext
,
isSwitchServer
);
public
static
void
initDomainUrl
()
{
HttpsConstans
.
init
(
mAppContext
);
//需要單獨配置域名URL的,在接口上添加@Headers({"Domain-Name: settlement_report_server"}),不添加則是使用默認域名
setGlobalDomain
();
//清機報表請求地址
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/base/common/bean/OrderBean.java
View file @
77361964
...
...
@@ -185,7 +185,7 @@ public class OrderBean {
/**
* 打印設定, 用逗號分隔, *=切紙
*/
private
String
printSet
i
ng
;
private
String
printSet
I
ng
;
/**
* 是否参与折扣#0:不參與;1:參與;
*/
...
...
@@ -315,12 +315,12 @@ public class OrderBean {
this
.
orderId
=
orderId
;
}
public
String
getPrintSet
i
ng
()
{
return
printSet
i
ng
;
public
String
getPrintSet
I
ng
()
{
return
printSet
I
ng
;
}
public
void
setPrintSet
ing
(
String
printSeti
ng
)
{
this
.
printSet
ing
=
printSeti
ng
;
public
void
setPrintSet
Ing
(
String
printSetI
ng
)
{
this
.
printSet
Ing
=
printSetI
ng
;
}
public
long
getAblediscount
()
{
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/base/common/bean/OrderDetail.java
View file @
77361964
...
...
@@ -625,7 +625,7 @@ public class OrderDetail implements Serializable {
orderDetail
.
setNumber
(
orderDetailsBean
.
getNumber
());
orderDetail
.
setPrice
(
orderDetailsBean
.
getPrice
()
*
orderDetailsBean
.
getNumber
());
orderDetail
.
setVisible
(
orderDetailsBean
.
getStatus
()
==
0
);
orderDetail
.
setPrintseting
(
orderDetailsBean
.
getPrintSet
i
ng
());
orderDetail
.
setPrintseting
(
orderDetailsBean
.
getPrintSet
I
ng
());
// orderDetail.setAutomod(foods.getAutomod());
orderDetail
.
setIsfood
(
orderDetailsBean
.
getType
()
==
FOOD_TYPE
);
orderDetail
.
setNew
(
false
);
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/constans/HttpsConstans.java
View file @
77361964
...
...
@@ -67,13 +67,13 @@ public class HttpsConstans {
/**
* 修改這個值控制是否是正式
*
1
=正式
*
2
=香港
*
3
=友常
*
4
=世维
*
5
=石书
*
0
=正式
*
1
=香港
*
2
=友常
*
3
=世维
*
4
=石书
*/
public
static
int
isFormal
=
1
;
public
static
int
isFormal
=
0
;
//沽清控制地址
...
...
@@ -94,9 +94,8 @@ public class HttpsConstans {
//修改這個值,修改微信公眾號報表地址:首頁曲線圖數據,支付分析報表數據
public
static
String
WECHAR_REPORT_SERVER_ADDRESS
;
// = (isFormal ? WECHAR_REPORT_FORMAL_ADDRESS : WECHAR_REPORT_TEST_ADDRESS) + WECHAR_REPORT_PATH;//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
public
static
void
init
(
Context
context
,
boolean
isSwitchServer
)
{
isFormal
=
BuildConfig
.
DEBUG
?
2
:
1
;
isFormal
=
(
int
)
SPUtils
.
get
(
context
,
"isFormal"
,
1
);
public
static
void
init
(
Context
context
)
{
isFormal
=
(
int
)
SPUtils
.
get
(
context
,
"isFormal"
,
0
);
// if (!isSwitchServer) {
// }
// isFormal = 1;
...
...
@@ -107,9 +106,8 @@ public class HttpsConstans {
// ROOT_URL = isFormal ==1 ? ROOT_FORMAL_URL : ROOT_HK_TEST_URL;//正式:ROOT_FORMAL_URL 測試:ROOT_HK_TEST_URL
// REPORT_SERVER_ADDRESS = (isFormal ==1 ? REPORT_FORMAL_ADDRESS : REPORT_TEST_ADDRESS) + REPORT_PATH;//測試:REPORT_FORMAL_ADDRESS 正式:REPORT_TEST_ADDRESS
// WECHAR_REPORT_SERVER_ADDRESS = (isFormal == 1 ? WECHAR_REPORT_FORMAL_ADDRESS : WECHAR_REPORT_TEST_ADDRESS) + WECHAR_REPORT_PATH;//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
switch
(
isFormal
)
{
case
1
:
default
:
_SERVER_ADDRESS
=
HTTP_ADDRESS_URL_FORMAL
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
HTTP_ADDRESS_URL_FORMAL
;
ROOT_SERVER_ADDRESS_FORMAL
=
HTTP_ADDRESS_URL_FORMAL
+
PATH
;
...
...
@@ -117,7 +115,7 @@ public class HttpsConstans {
REPORT_SERVER_ADDRESS
=
REPORT_FORMAL_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_FORMAL_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
break
;
case
2
:
case
1
:
_SERVER_ADDRESS
=
"http://a.ricepon.com:61177"
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
HTTP_ADDRESS_URL_HK
+
PATH
;
...
...
@@ -125,7 +123,7 @@ public class HttpsConstans {
REPORT_SERVER_ADDRESS
=
REPORT_TEST_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_TEST_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
break
;
case
3
:
case
2
:
_SERVER_ADDRESS
=
ROOT_SERVER_YOU_CHANG_HK
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
ROOT_SERVER_YOU_CHANG_HK
;
...
...
@@ -133,7 +131,7 @@ public class HttpsConstans {
REPORT_SERVER_ADDRESS
=
REPORT_TEST_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_TEST_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
break
;
case
4
:
case
3
:
_SERVER_ADDRESS
=
ROOT_SERVER_SHI_WEI_HK
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
ROOT_SERVER_SHI_WEI_HK
;
...
...
@@ -141,7 +139,7 @@ public class HttpsConstans {
REPORT_SERVER_ADDRESS
=
REPORT_TEST_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_TEST_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
break
;
case
5
:
case
4
:
_SERVER_ADDRESS
=
ROOT_SERVER_SHI_SHU_HK
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
ROOT_SERVER_SHI_SHU_HK
;
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/ui/adapter/BillMethodAdapter.java
View file @
77361964
...
...
@@ -3,7 +3,7 @@ package com.gingersoft.gsa.cloud.ui.adapter;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.base.R
;
import
com.gingersoft.gsa.cloud.base.common.bean.PayMethod
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaTextView
;
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/ui/adapter/BillMoneyAdapter.java
View file @
77361964
...
...
@@ -5,7 +5,7 @@ import android.widget.LinearLayout;
import
android.widget.TextView
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.base.R
;
import
com.gingersoft.gsa.cloud.base.common.bean.PayMethod
;
...
...
@@ -46,7 +46,7 @@ public class BillMoneyAdapter extends BaseQuickAdapter<PayMethod, BaseViewHolder
tv_bill_method_name
.
setTextColor
(
datasBean
.
getPayMoneyTextColor
());
tv_bill_money
.
setTextColor
(
datasBean
.
getPayMoneyTextColor
());
if
(
select_position
==
helper
.
getPosition
())
{
if
(
select_position
==
helper
.
get
Adapter
Position
())
{
ll_container
.
setBackgroundResource
(
R
.
color
.
itemSelected
);
}
else
{
ll_container
.
setBackgroundResource
(
R
.
color
.
theme_background_color
);
...
...
base-module/src/main/res/layout/print_item_bill.xml
View file @
77361964
...
...
@@ -6,7 +6,7 @@
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_total_text"
android:id=
"@+id/tv_
bill_
total_text"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"0.7"
...
...
@@ -14,7 +14,7 @@
style=
"@style/Print_text_style"
/>
<TextView
android:id=
"@+id/tv_total"
android:id=
"@+id/tv_
bill_
total"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"0.3"
...
...
config.gradle
View file @
77361964
...
...
@@ -115,7 +115,7 @@ ext {
"arms"
:
"me.jessyan:arms:2.5.2"
,
"fastjson"
:
"com.alibaba:fastjson:1.2.46"
,
"zxing"
:
"cn.yipianfengye.android:zxing-library:2.2"
,
"BaseRecyclerViewAdapter"
:
"com.github.CymChad:BaseRecyclerViewAdapterHelper:
2.9.46
"
,
"BaseRecyclerViewAdapter"
:
"com.github.CymChad:BaseRecyclerViewAdapterHelper:
3.0.4
"
,
"yzjRecyclerView"
:
"com.yanzhenjie.recyclerview:x:1.3.2"
]
...
...
login-module/src/main/java/com/gingersoft/gsa/cloud/login/mvp/ui/activity/mvp/ui/activity/SwitchServerActivity.java
View file @
77361964
...
...
@@ -2,8 +2,8 @@ package com.gingersoft.gsa.cloud.login.mvp.ui.activity.mvp.ui.activity;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.util.Log
;
import
android.widget.Button
;
import
android.widget.CompoundButton
;
import
android.widget.RadioButton
;
import
android.widget.RadioGroup
;
import
android.widget.TextView
;
...
...
@@ -11,9 +11,9 @@ import android.widget.TextView;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
com.billy.cc.core.component.CC
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.utils.other.SPUtils
;
import
com.gingersoft.gsa.cloud.base.utils.toast.ToastUtils
;
import
com.gingersoft.gsa.cloud.constans.HttpsConstans
;
import
com.gingersoft.gsa.cloud.login.R
;
import
com.gingersoft.gsa.cloud.login.R2
;
...
...
@@ -82,93 +82,101 @@ public class SwitchServerActivity extends BaseActivity<SwitchServerPresenter> im
String
nowServer
=
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
;
tvNowServer
.
setText
(
"當前服務器:"
+
nowServer
);
setChecked
((
Integer
)
SPUtils
.
get
(
this
,
"isFormal"
,
2
));
int
defaultSelect
=
(
Integer
)
SPUtils
.
get
(
this
,
"isFormal"
,
-
1
);
if
(
defaultSelect
==
-
1
)
{
defaultSelect
=
HttpsConstans
.
isFormal
;
}
rbHK
.
setText
(
"測試服務器"
);
rbFormal
.
setText
(
"正式服務器"
);
((
RadioButton
)
radioGroup
.
getChildAt
(
defaultSelect
)).
setChecked
(
true
);
rbHK
.
setOnCheckedChangeListener
(
new
CompoundButton
.
OnCheckedChangeListener
()
{
@Override
public
void
onCheckedChanged
(
CompoundButton
buttonView
,
boolean
isChecked
)
{
setChecked
(
2
);
}
});
rbFormal
.
setOnCheckedChangeListener
(
new
CompoundButton
.
OnCheckedChangeListener
()
{
@Override
public
void
onCheckedChanged
(
CompoundButton
buttonView
,
boolean
isChecked
)
{
setChecked
(
1
);
}
});
rb_youchang
.
setOnCheckedChangeListener
(
new
CompoundButton
.
OnCheckedChangeListener
()
{
@Override
public
void
onCheckedChanged
(
CompoundButton
buttonView
,
boolean
isChecked
)
{
setChecked
(
3
);
}
});
rb_shiwei
.
setOnCheckedChangeListener
(
new
CompoundButton
.
OnCheckedChangeListener
()
{
@Override
public
void
onCheckedChanged
(
CompoundButton
buttonView
,
boolean
isChecked
)
{
setChecked
(
4
);
}
});
rb_shishu
.
setOnCheckedChangeListener
(
new
CompoundButton
.
OnCheckedChangeListener
()
{
@Override
public
void
onCheckedChanged
(
CompoundButton
buttonView
,
boolean
isChecked
)
{
setChecked
(
5
);
}
radioGroup
.
setOnCheckedChangeListener
((
group
,
checkedId
)
->
{
SPUtils
.
put
(
mContext
,
"isFormal"
,
group
.
indexOfChild
(
findViewById
(
checkedId
)));
ToastUtils
.
show
(
mContext
,
"已切換環境,下次重啟生效"
);
});
// rbHK.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
// @Override
// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// setChecked(2);
// }
// });
// rbFormal.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
// @Override
// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// setChecked(1);
// }
// });
// rb_youchang.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
// @Override
// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// setChecked(3);
// }
// });
// rb_shiwei.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
// @Override
// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// setChecked(4);
// }
// });
// rb_shishu.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
// @Override
// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// setChecked(5);
// }
// });
// });
switchServer
.
setOnClickListener
(
v
->
{
GsaCloudApplication
.
initDomainUrl
(
true
);
// GsaCloudApplication.initDomainUrl(
);
GsaCloudApplication
.
isLogin
=
false
;
CC
.
obtainBuilder
(
"User.Component.Login"
)
.
setActionName
(
"showActivityA"
)
.
build
()
.
call
();
finish
();
// CC.obtainBuilder("User.Component.Login")
// .setActionName("showActivityA")
// .build()
// .call();
// finish();
System
.
exit
(
0
);
});
}
private
void
setChecked
(
int
i
)
{
switch
(
i
)
{
case
1
:
rbHK
.
setChecked
(
false
);
rb_youchang
.
setChecked
(
false
);
rb_shiwei
.
setChecked
(
false
);
rb_shishu
.
setChecked
(
false
);
rbFormal
.
setChecked
(
true
);
break
;
case
2
:
rbFormal
.
setChecked
(
false
);
rb_youchang
.
setChecked
(
false
);
rb_shiwei
.
setChecked
(
false
);
rb_shishu
.
setChecked
(
false
);
rbHK
.
setChecked
(
true
);
break
;
case
3
:
rbHK
.
setChecked
(
false
);
rbFormal
.
setChecked
(
false
);
rb_shiwei
.
setChecked
(
false
);
rb_shishu
.
setChecked
(
false
);
rb_youchang
.
setChecked
(
true
);
break
;
case
4
:
rbHK
.
setChecked
(
false
);
rbFormal
.
setChecked
(
false
);
rb_youchang
.
setChecked
(
false
);
rb_shishu
.
setChecked
(
false
);
rb_shiwei
.
setChecked
(
true
);
break
;
case
5
:
rbHK
.
setChecked
(
false
);
rbFormal
.
setChecked
(
false
);
rb_youchang
.
setChecked
(
false
);
rb_shiwei
.
setChecked
(
false
);
rb_shishu
.
setChecked
(
true
);
break
;
}
SPUtils
.
put
(
this
,
"isFormal"
,
i
);
}
//
private void setChecked(int i) {
//
switch (i) {
//
case 1:
//
rbHK.setChecked(false);
//
rb_youchang.setChecked(false);
//
rb_shiwei.setChecked(false);
//
rb_shishu.setChecked(false);
//
rbFormal.setChecked(true);
//
break;
//
case 2:
//
rbFormal.setChecked(false);
//
rb_youchang.setChecked(false);
//
rb_shiwei.setChecked(false);
//
rb_shishu.setChecked(false);
//
rbHK.setChecked(true);
//
break;
//
case 3:
//
rbHK.setChecked(false);
//
rbFormal.setChecked(false);
//
rb_shiwei.setChecked(false);
//
rb_shishu.setChecked(false);
//
rb_youchang.setChecked(true);
//
break;
//
case 4:
//
rbHK.setChecked(false);
//
rbFormal.setChecked(false);
//
rb_youchang.setChecked(false);
//
rb_shishu.setChecked(false);
//
rb_shiwei.setChecked(true);
//
break;
//
case 5:
//
rbHK.setChecked(false);
//
rbFormal.setChecked(false);
//
rb_youchang.setChecked(false);
//
rb_shiwei.setChecked(false);
//
rb_shishu.setChecked(true);
//
break;
//
}
//
SPUtils.put(this, "isFormal", i);
//
}
@Override
...
...
login-module/src/main/res/layout/activity_switch_server.xml
View file @
77361964
...
...
@@ -11,20 +11,20 @@
android:layout_height=
"wrap_content"
>
<RadioButton
android:id=
"@+id/rb_server_
hk
"
android:id=
"@+id/rb_server_
formal
"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/dp_10"
android:text=
"
測試
環境"
android:text=
"
正式
環境"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/sp_16"
/>
<RadioButton
android:id=
"@+id/rb_server_
formal
"
android:id=
"@+id/rb_server_
hk
"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/dp_10"
android:text=
"
正式
環境"
android:text=
"
測試
環境"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/sp_16"
/>
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/activity/NewMainActivity.java
View file @
77361964
package
com
.
gingersoft
.
gsa
.
cloud
.
main
.
mvp
.
ui
.
activity
;
import
android.content.BroadcastReceiver
;
import
android.content.ClipData
;
import
android.content.ClipboardManager
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.IntentFilter
;
import
android.graphics.drawable.Drawable
;
import
android.graphics.drawable.GradientDrawable
;
import
android.os.Bundle
;
import
android.os.Message
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.util.SparseArray
;
import
android.view.KeyEvent
;
import
android.view.View
;
...
...
@@ -20,7 +17,6 @@ import android.widget.TextView;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.fragment.app.FragmentManager
;
import
androidx.localbroadcastmanager.content.LocalBroadcastManager
;
import
androidx.recyclerview.widget.GridLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
...
...
@@ -30,8 +26,8 @@ import com.gingersoft.gsa.cloud.base.application.GsaCloudApplication;
import
com.gingersoft.gsa.cloud.base.utils.JsonUtils
;
import
com.gingersoft.gsa.cloud.base.utils.RestaurantInfoUtils
;
import
com.gingersoft.gsa.cloud.base.utils.encryption.Aes
;
import
com.gingersoft.gsa.cloud.base.utils.other.SPUtils
;
import
com.gingersoft.gsa.cloud.base.utils.toast.ToastUtils
;
import
com.gingersoft.gsa.cloud.constans.AppConstans
;
import
com.gingersoft.gsa.cloud.database.bean.Function
;
import
com.gingersoft.gsa.cloud.main.BuildConfig
;
import
com.gingersoft.gsa.cloud.main.R
;
...
...
@@ -60,8 +56,6 @@ import java.util.List;
import
butterknife.BindView
;
import
butterknife.BindViews
;
import
butterknife.OnClick
;
import
io.reactivex.schedulers.Schedulers
;
import
me.jessyan.rxerrorhandler.handler.ErrorHandleSubscriber
;
import
static
com
.
jess
.
arms
.
utils
.
Preconditions
.
checkNotNull
;
...
...
@@ -144,8 +138,6 @@ public class NewMainActivity extends BaseFragmentActivity<NewMainPresenter> impl
FragmentManager
fragmentManager
=
getSupportFragmentManager
();
mainTopFragment
=
(
MainTopFragment
)
fragmentManager
.
findFragmentById
(
R
.
id
.
main_top_fragment
);
tv_version_name
.
setText
(
"v_"
+
DeviceUtils
.
getVersionName
(
this
));
tvStoreName
.
setText
(
GsaCloudApplication
.
getRestaurantName
(
mContext
));
refresh
.
setOnRefreshListener
(
refreshLayout
->
{
if
(
mainTopFragment
!=
null
)
{
...
...
@@ -171,6 +163,16 @@ public class NewMainActivity extends BaseFragmentActivity<NewMainPresenter> impl
});
}
@Override
protected
void
onResume
()
{
super
.
onResume
();
if
(((
int
)
SPUtils
.
get
(
mContext
,
"isFormal"
,
0
))
!=
0
){
tv_version_name
.
setText
(
"v_"
+
DeviceUtils
.
getVersionName
(
this
)
+
"\u1500Beta"
);
}
else
{
tv_version_name
.
setText
(
"v_"
+
DeviceUtils
.
getVersionName
(
this
));
}
}
/**
* 初始化側邊欄菜單項
*/
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/BusinessInfoAdapter.java
View file @
77361964
package
com
.
gingersoft
.
gsa
.
cloud
.
main
.
mvp
.
ui
.
adapter
;
import
android
.widget.BaseAdapter
;
import
android
x.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.main.R
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.BusinessBean
;
import
java.util.List
;
import
androidx.annotation.Nullable
;
/**
* Created by Wyh on 2020/2/24.
*/
...
...
@@ -18,16 +16,8 @@ public class BusinessInfoAdapter extends BaseQuickAdapter<BusinessBean, BaseView
public
BusinessInfoAdapter
(
@Nullable
List
<
BusinessBean
>
data
)
{
super
(
R
.
layout
.
report_business_info_item
,
data
);
}
// @Override
// public void setNewData(@Nullable List<BusinessBean> data) {
//// super.setNewData(data);
// this.mData = data;
// notifyDataSetChanged();
// }
@Override
protected
void
convert
(
BaseViewHolder
helper
,
BusinessBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_business_info_amount
,
item
.
getAmount
()
+
""
);
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/FoodRankingAdapter.java
View file @
77361964
...
...
@@ -5,7 +5,7 @@ import android.content.Context;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.main.R
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.SalesFoodsBean
;
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/MainOrderingAdapter.java
View file @
77361964
package
com
.
gingersoft
.
gsa
.
cloud
.
main
.
mvp
.
ui
.
adapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.database.bean.Function
;
import
com.gingersoft.gsa.cloud.main.R
;
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/MainSideMenuAdapter.java
View file @
77361964
package
com
.
gingersoft
.
gsa
.
cloud
.
main
.
mvp
.
ui
.
adapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.main.R
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.MainSideMenuBean
;
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/PaymentMethodAdapter.java
View file @
77361964
...
...
@@ -6,7 +6,7 @@ import android.os.Build;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.main.R
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.PaymentMethodBean
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.view.MyProgressBar
;
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/PaymentMethodColorAdapter.java
View file @
77361964
...
...
@@ -6,7 +6,7 @@ import android.graphics.drawable.GradientDrawable;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.main.R
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.PaymentMethodBean
;
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/SortNumberingAdapter.java
View file @
77361964
...
...
@@ -6,7 +6,7 @@ import android.view.View;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.main.R
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.SalesFoodsBean
;
...
...
other_order_mode/build.gradle
View file @
77361964
...
...
@@ -77,8 +77,6 @@ dependencies {
androidTestImplementation
'androidx.test.espresso:espresso-core:3.2.0'
implementation
'com.ethanhua:skeleton:1.1.2'
implementation
'io.supercharge:shimmerlayout:2.1.0'
implementation
'com.ditclear:bindinglistadapter:1.0.0'
if
(
project
.
ext
.
runAsApp
)
{
addComponent
'print-module'
}
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/DeliveryBean.kt
View file @
77361964
package
com.gingersoft.gsa.other_order_mode.data.model.bean
data class
DeliveryBean
(
val
data
:
List
<
Data
>,
data class
DeliveryBean
(
val
data
:
Mutable
List
<
Data
>,
val
success
:
Boolean
,
val
sysTime
:
Long
)
{
data class
Data
(
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/network/ServiceCreator.kt
View file @
77361964
package
com.gingersoft.gsa.other_order_mode.data.network
import
android.util.Log
import
com.gingersoft.gsa.cloud.constans.HttpsConstans
import
com.gingersoft.gsa.cloud.globalconfig.applyOptions.intercept.LoggingInterceptor
import
okhttp3.OkHttpClient
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/PageViewModel.kt
View file @
77361964
...
...
@@ -514,7 +514,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
val
recycler
=
hepler
.
getView
<
RecyclerView
>(
R
.
id
.
rv_delivery
)
recycler
.
layoutManager
=
GridLayoutManager
(
context
,
4
)
val
deliveryAdapter
=
DeliveryAdapter
(
context
,
deliveryBean
!!
.
data
)
val
deliveryAdapter
=
DeliveryAdapter
(
deliveryBean
!!
.
data
)
recycler
.
adapter
=
deliveryAdapter
deliveryAdapter
.
setOnItemClickListener
{
adapter
,
view
,
position
->
...
...
@@ -583,7 +583,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
cancelReasons
.
add
(
data
)
}
val
deliveryAdapter
=
DeliveryAdapter
(
c
ontext
,
c
ancelReasons
)
val
deliveryAdapter
=
DeliveryAdapter
(
cancelReasons
)
recycler
.
adapter
=
deliveryAdapter
deliveryAdapter
.
setOnItemClickListener
{
adapter
,
view
,
position
->
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/DeliverySettingActivity.kt
View file @
77361964
package
com.gingersoft.gsa.other_order_mode.ui.activity
import
android.os.Bundle
import
androidx.databinding.ObservableArrayList
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.data.model.bean.DeliveryConfig
import
com.gingersoft.gsa.other_order_mode.ui.base.BaseActivity
import
com.gingersoft.gsa.other_order_mode.ui.fragment.DeliveryFragment
import
com.gingersoft.gsa.other_order_mode.ui.fragment.UpdateDeliveryFragment
import
io.ditclear.bindingadapter.SingleTypeAdapter
import
kotlinx.android.synthetic.main.activity_delivery.*
class
DeliverySettingActivity
:
BaseActivity
()
{
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/OrderDetailsActivity.kt
View file @
77361964
...
...
@@ -104,8 +104,11 @@ class OrderDetailsActivity : BaseActivity() {
tv_order_state
.
setTextColor
(
resources
.
getColor
(
R
.
color
.
order_state1_color
))
}
orderStatusText
=
"製作中"
if
(
orderDetails
.
isDelete
!=
0
)
{
//不是第三方物流才顯示取消訂單
btnList
.
add
(
BtnBuilder
().
getCancelBtn
())
}
}
3
->
{
//外賣是送貨中,自取是待取餐
btnList
.
add
(
BtnBuilder
().
getPrintBtn
())
if
(
orderDetails
.
order_type
==
7
)
{
...
...
@@ -171,7 +174,7 @@ class OrderDetailsActivity : BaseActivity() {
//如果是在線支付的訂單,就直接修改訂單狀態
if
(
orderPayType
!=
1
)
{
gsUpdateOrderStatus
(
orderDetails
.
ID
.
toString
(),
orderDetails
.
order_type
)
{
status
,
isSuccess
->
if
(
isSuccess
)
{
if
(
isSuccess
)
{
finish
()
}
else
{
ToastUtils
.
show
(
this
@OrderDetailsActivity
,
"結賬失敗"
)
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/OtherOrderActivity.kt
View file @
77361964
...
...
@@ -25,7 +25,9 @@ import com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
import
com.gingersoft.gsa.cloud.base.utils.toast.ToastUtils
import
com.gingersoft.gsa.cloud.base.widget.DialogUtils
import
com.gingersoft.gsa.cloud.constans.AppConstans
import
com.gingersoft.gsa.cloud.constans.HttpsConstans
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.data.network.ServiceCreator
import
com.gingersoft.gsa.other_order_mode.databinding.ActivityOtherOrderBinding
import
com.gingersoft.gsa.other_order_mode.model.viewModel.PageViewModel
import
com.gingersoft.gsa.other_order_mode.service.GetInfoUpdateService
...
...
@@ -68,7 +70,7 @@ class OtherOrderActivity : BaseActivity() {
private
var
btnHeight
:
Float
=
0F
private
var
selectPosition
=
0
lateinit
var
mReceiver
:
ClearHeartBroadcastReceiver
lateinit
var
mReceiver
:
ClearHeartBroadcastReceiver
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
...
...
@@ -461,6 +463,14 @@ class OtherOrderActivity : BaseActivity() {
qm_other_order_bar
.
setBackgroundColor
(
resources
.
getColor
(
R
.
color
.
theme_color
))
}
override
fun
onStart
()
{
super
.
onStart
()
if
(
ServiceCreator
.
ROOT_URL
==
HttpsConstans
.
ROOT_HK_TEST_URL
)
{
//測試
qm_other_order_bar
.
setTitle
(
"(Beta) "
+
GsaCloudApplication
.
getRestaurantName
(
this
))
}
}
inner
class
ClearHeartBroadcastReceiver
:
BroadcastReceiver
()
{
override
fun
onReceive
(
context
:
Context
?,
intent
:
Intent
?)
{
finish
()
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/DeliveryAdapter.kt
View file @
77361964
package
com.gingersoft.gsa.other_order_mode.ui.adapter
import
android.content.Context
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.BaseViewHolder
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.data.model.bean.DeliveryBean
class
DeliveryAdapter
(
val
context
:
Context
,
data
:
List
<
DeliveryBean
.
Data
>)
:
BaseQuickAdapter
<
DeliveryBean
.
Data
,
BaseViewHolder
>(
R
.
layout
.
other_order_delivery_item
,
data
)
{
var
selectIndex
=
-
1
override
fun
convert
(
helper
:
BaseViewHolder
?,
item
:
DeliveryBean
.
Data
?)
{
helper
!!
.
setText
(
R
.
id
.
tv_delivery_name
,
item
!!
.
userName
)
if
(
helper
.
adapterPosition
==
selectIndex
)
{
helper
.
setBackgroundRes
(
R
.
id
.
layout_delivery_item
,
R
.
drawable
.
shape_delivery_item_btn
)
helper
.
setTextColor
(
R
.
id
.
tv_delivery_name
,
context
.
resources
.
getColor
(
R
.
color
.
order_state0_color
))
class
DeliveryAdapter
(
data
:
MutableList
<
DeliveryBean
.
Data
>)
:
BaseQuickAdapter
<
DeliveryBean
.
Data
,
BaseViewHolder
>(
R
.
layout
.
other_order_delivery_item
,
data
)
{
override
fun
convert
(
holder
:
BaseViewHolder
,
item
:
DeliveryBean
.
Data
)
{
holder
.
setText
(
R
.
id
.
tv_delivery_name
,
item
.
userName
)
if
(
holder
.
adapterPosition
==
selectIndex
)
{
holder
.
setBackgroundResource
(
R
.
id
.
layout_delivery_item
,
R
.
drawable
.
shape_delivery_item_btn
)
holder
.
setTextColor
(
R
.
id
.
tv_delivery_name
,
context
.
resources
.
getColor
(
R
.
color
.
order_state0_color
))
}
else
{
h
elper
.
setBackgroundRes
(
R
.
id
.
layout_delivery_item
,
R
.
drawable
.
shape_delivery_item_btn_normal
)
h
elp
er
.
setTextColor
(
R
.
id
.
tv_delivery_name
,
context
.
resources
.
getColor
(
R
.
color
.
color_c8
))
h
older
.
setBackgroundResource
(
R
.
id
.
layout_delivery_item
,
R
.
drawable
.
shape_delivery_item_btn_normal
)
h
old
er
.
setTextColor
(
R
.
id
.
tv_delivery_name
,
context
.
resources
.
getColor
(
R
.
color
.
color_c8
))
}
}
var
selectIndex
=
-
1
}
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/DeliveryListAdapter.kt
View file @
77361964
package
com.gingersoft.gsa.other_order_mode.ui.adapter
import
android.content.Context
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.ImageView
import
android.widget.TextView
import
androidx.databinding.DataBindingUtil
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.BaseViewHolder
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.data.model.bean.DeliveryConfig
import
com.gingersoft.gsa.other_order_mode.databinding.ItemDeliveryLayoutBinding
class
DeliveryListAdapter
(
val
context
:
Context
,
data
:
List
<
DeliveryConfig
.
Data
.
DeliveryInfo
>)
:
BaseQuickAdapter
<
DeliveryConfig
.
Data
.
DeliveryInfo
,
DeliveryListAdapter
.
ViewHolder
>(
data
)
{
class
DeliveryListAdapter
(
data
:
MutableList
<
DeliveryConfig
.
Data
.
DeliveryInfo
>)
:
BaseQuickAdapter
<
DeliveryConfig
.
Data
.
DeliveryInfo
,
DeliveryListAdapter
.
ViewHolder
>(
R
.
layout
.
item_delivery_layout
,
data
)
{
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
ViewHolder
{
val
view
=
LayoutInflater
.
from
(
parent
.
context
).
inflate
(
R
.
layout
.
item_delivery_layout
,
null
)
return
ViewHolder
(
view
)
}
override
fun
convert
(
helper
:
ViewHolder
?,
item
:
DeliveryConfig
.
Data
.
DeliveryInfo
?)
{
helper
?.
let
{
helper
->
override
fun
convert
(
holder
:
ViewHolder
,
item
:
DeliveryConfig
.
Data
.
DeliveryInfo
)
{
holder
.
let
{
helper
->
helper
.
binding
.
apply
{
deliveryType
=
when
(
item
!!
.
distributionType
)
{
deliveryType
=
when
(
item
.
distributionType
)
{
"SHORT_RANGE"
->
"短途送"
"STANDARD"
->
"中途送"
"LONG_DISTANCE"
->
"長途送"
...
...
@@ -38,14 +31,19 @@ class DeliveryListAdapter(val context: Context, data: List<DeliveryConfig.Data.D
}
}
helper
.
getView
<
ImageView
>(
R
.
id
.
iv_delete
).
setOnClickListener
{
onItemChildClickListener
?.
onItemChildClick
(
this
,
it
,
helper
.
adapterPosition
)
getOnItemChildClickListener
()
?.
onItemChildClick
(
this
,
it
,
helper
.
adapterPosition
)
}
helper
.
itemView
.
setOnClickListener
{
onItemChildClickListener
?.
onItemChildClick
(
this
,
it
,
helper
.
adapterPosition
)
getOnItemChildClickListener
()
?.
onItemChildClick
(
this
,
it
,
helper
.
adapterPosition
)
}
}
}
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
ViewHolder
{
val
view
=
LayoutInflater
.
from
(
parent
.
context
).
inflate
(
R
.
layout
.
item_delivery_layout
,
null
)
return
ViewHolder
(
view
)
}
class
ViewHolder
(
itemView
:
View
)
:
BaseViewHolder
(
itemView
)
{
var
binding
:
ItemDeliveryLayoutBinding
=
DataBindingUtil
.
bind
(
itemView
)
!!
}
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/OrderDetailsAdapter.kt
View file @
77361964
package
com.gingersoft.gsa.other_order_mode.ui.adapter
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.BaseViewHolder
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.data.model.bean.BtnBuilder
class
OrderDetailsAdapter
(
list
:
List
<
BtnBuilder
.
BtnBean
>)
:
BaseQuickAdapter
<
BtnBuilder
.
BtnBean
,
BaseViewHolder
>(
R
.
layout
.
item_btn
,
list
)
{
class
OrderDetailsAdapter
(
list
:
Mutable
List
<
BtnBuilder
.
BtnBean
>)
:
BaseQuickAdapter
<
BtnBuilder
.
BtnBean
,
BaseViewHolder
>(
R
.
layout
.
item_btn
,
list
)
{
override
fun
convert
(
h
elp
er
:
BaseViewHolder
,
item
:
BtnBuilder
.
BtnBean
)
{
h
elp
er
.
setText
(
R
.
id
.
tv_btn_content
,
item
.
btnContent
)
h
elper
.
setBackgroundRes
(
R
.
id
.
layout_btn_item
,
item
.
btnColor
)
h
elp
er
.
setImageResource
(
R
.
id
.
iv_btn_mark
,
item
.
btnImg
)
override
fun
convert
(
h
old
er
:
BaseViewHolder
,
item
:
BtnBuilder
.
BtnBean
)
{
h
old
er
.
setText
(
R
.
id
.
tv_btn_content
,
item
.
btnContent
)
h
older
.
setBackgroundResource
(
R
.
id
.
layout_btn_item
,
item
.
btnColor
)
h
old
er
.
setImageResource
(
R
.
id
.
iv_btn_mark
,
item
.
btnImg
)
}
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/OtherOrdersAdapter.kt
View file @
77361964
...
...
@@ -9,12 +9,13 @@ import android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.FrameLayout
import
androidx.core.content.ContextCompat
import
androidx.databinding.DataBindingUtil
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.RecyclerView.Adapter
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.data.model.bean.OrderList
import
com.gingersoft.gsa.other_order_mode.databinding.LayoutOtherOrderItem
New
Binding
import
com.gingersoft.gsa.other_order_mode.databinding.LayoutOtherOrderItemBinding
import
com.scwang.smartrefresh.layout.util.SmartUtil.dp2px
class
OtherOrdersAdapter
(
var
context
:
Context
)
:
Adapter
<
OtherOrdersAdapter
.
ViewHolder
>()
{
...
...
@@ -34,7 +35,7 @@ class OtherOrdersAdapter(var context: Context) : Adapter<OtherOrdersAdapter.View
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
ViewHolder
{
return
ViewHolder
(
LayoutInflater
.
from
(
parent
.
context
).
inflate
(
R
.
layout
.
layout_other_order_item
_new
,
parent
,
false
))
return
ViewHolder
(
LayoutInflater
.
from
(
parent
.
context
).
inflate
(
R
.
layout
.
layout_other_order_item
,
parent
,
false
))
}
...
...
@@ -164,12 +165,11 @@ class OtherOrdersAdapter(var context: Context) : Adapter<OtherOrdersAdapter.View
}
private
fun
getColor
(
color
:
Int
):
Int
{
return
context
.
resources
.
getColor
(
color
)
return
ContextCompat
.
getColor
(
context
,
color
)
}
class
ViewHolder
(
itemView
:
View
)
:
RecyclerView
.
ViewHolder
(
itemView
)
{
var
binding
:
LayoutOtherOrderItem
New
Binding
=
DataBindingUtil
.
bind
(
itemView
)
!!
var
binding
:
LayoutOtherOrderItemBinding
=
DataBindingUtil
.
bind
(
itemView
)
!!
var
flBorder
:
FrameLayout
=
itemView
.
findViewById
(
R
.
id
.
fl_border
)
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/PayBillAdapter.kt
View file @
77361964
package
com.gingersoft.gsa.other_order_mode.ui.adapter
import
androidx.core.content.ContextCompat
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.BaseViewHolder
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.data.model.bean.BillBean
class
PayBillAdapter
(
billBeans
:
List
<
BillBean
>)
:
BaseQuickAdapter
<
BillBean
,
BaseViewHolder
>(
R
.
layout
.
item_pay_bill
,
billBeans
)
{
class
PayBillAdapter
(
billBeans
:
Mutable
List
<
BillBean
>)
:
BaseQuickAdapter
<
BillBean
,
BaseViewHolder
>(
R
.
layout
.
item_pay_bill
,
billBeans
)
{
override
fun
convert
(
h
elp
er
:
BaseViewHolder
,
item
:
BillBean
)
{
h
elp
er
.
setText
(
R
.
id
.
tv_item_pay_name
,
item
.
name
)
h
elp
er
.
setText
(
R
.
id
.
tv_item_pay_amount
,
item
.
amount
.
toString
())
override
fun
convert
(
h
old
er
:
BaseViewHolder
,
item
:
BillBean
)
{
h
old
er
.
setText
(
R
.
id
.
tv_item_pay_name
,
item
.
name
)
h
old
er
.
setText
(
R
.
id
.
tv_item_pay_amount
,
item
.
amount
.
toString
())
if
(
item
.
isRed
==
0
){
h
elper
.
setTextColor
(
R
.
id
.
tv_item_pay_name
,
helper
.
itemView
.
context
.
resources
.
getColor
(
R
.
color
.
color_3c
))
h
elper
.
setTextColor
(
R
.
id
.
tv_item_pay_name
,
helper
.
itemView
.
context
.
resources
.
getColor
(
R
.
color
.
color_3c
))
h
older
.
setTextColor
(
R
.
id
.
tv_item_pay_name
,
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_3c
))
h
older
.
setTextColor
(
R
.
id
.
tv_item_pay_name
,
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_3c
))
}
else
{
h
elper
.
setTextColor
(
R
.
id
.
tv_item_pay_name
,
helper
.
itemView
.
context
.
resources
.
getColor
(
R
.
color
.
discount_red
))
h
elper
.
setTextColor
(
R
.
id
.
tv_item_pay_name
,
helper
.
itemView
.
context
.
resources
.
getColor
(
R
.
color
.
discount_red
))
h
older
.
setTextColor
(
R
.
id
.
tv_item_pay_name
,
ContextCompat
.
getColor
(
context
,
R
.
color
.
discount_red
))
h
older
.
setTextColor
(
R
.
id
.
tv_item_pay_name
,
ContextCompat
.
getColor
(
context
,
R
.
color
.
discount_red
))
}
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/TextAdapter.kt
View file @
77361964
package
com.gingersoft.gsa.other_order_mode.ui.adapter
import
android.widget.TextView
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.BaseViewHolder
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
import
com.gingersoft.gsa.other_order_mode.R
import
com.qmuiteam.qmui.alpha.QMUIAlphaTextView
class
TextAdapter
(
list
:
List
<
String
>)
:
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_textview
,
list
)
{
override
fun
convert
(
helper
:
BaseViewHolder
?,
item
:
String
?)
{
helper
?.
setText
(
R
.
id
.
tv_item
,
item
)
helper
?.
getView
<
TextView
>(
R
.
id
.
tv_item
)
!!
.
setOnClickListener
{
if
(
onItemClickListener
!=
null
)
{
onItemClickListener
.
onItemClick
(
this
,
it
,
helper
.
adapterPosition
)
}
}
class
TextAdapter
(
list
:
MutableList
<
String
>)
:
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_textview
,
list
)
{
override
fun
convert
(
holder
:
BaseViewHolder
,
item
:
String
)
{
holder
.
setText
(
R
.
id
.
tv_item
,
item
)
addChildClickViewIds
(
R
.
id
.
tv_item
)
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/fragment/DeliveryFragment.kt
View file @
77361964
...
...
@@ -42,14 +42,14 @@ class DeliveryFragment : BaseFragment() {
(
activity
as
DeliverySettingActivity
).
editDelivery
(
null
)
}
viewModel
.
otherInfo
.
observe
(
viewLifecycleOwner
,
Observer
{
it
->
viewModel
.
otherInfo
.
observe
(
viewLifecycleOwner
,
Observer
{
if
(
it
?.
data
?.
list
!=
null
&&
it
.
data
.
list
.
isNotEmpty
())
{
if
(
deliveryListAdapter
==
null
)
{
deliveryListAdapter
=
DeliveryListAdapter
(
context
!!
,
it
.
data
.
list
)
deliveryListAdapter
=
DeliveryListAdapter
(
it
.
data
.
list
)
rv_delivery
.
adapter
=
deliveryListAdapter
rv_delivery
.
layoutManager
=
LinearLayoutManager
(
context
!!
)
}
else
{
deliveryListAdapter
!!
.
setNew
Data
(
it
.
data
.
list
)
deliveryListAdapter
!!
.
setNew
Instance
(
it
.
data
.
list
)
}
deliveryListAdapter
!!
.
setOnItemChildClickListener
{
adapter
,
view
,
position
->
when
(
view
.
id
)
{
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/fragment/UpdateDeliveryFragment.kt
View file @
77361964
package
com.gingersoft.gsa.other_order_mode.ui.fragment
import
android.os.Bundle
import
android.util.Log
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
androidx.fragment.app.Fragment
import
androidx.lifecycle.ViewModelProvider
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
...
...
@@ -21,9 +20,7 @@ import com.jess.arms.utils.ArmsUtils
import
com.qmuiteam.qmui.util.QMUIDisplayHelper
import
com.qmuiteam.qmui.widget.popup.QMUIPopup
import
com.qmuiteam.qmui.widget.popup.QMUIPopups
import
com.zhy.autolayout.utils.ScreenUtils
import
kotlinx.android.synthetic.main.update_delivery_fragment.*
import
org.w3c.dom.Text
class
UpdateDeliveryFragment
:
BaseFragment
(
R
.
layout
.
update_delivery_fragment
)
{
...
...
@@ -144,12 +141,13 @@ class UpdateDeliveryFragment : BaseFragment(R.layout.update_delivery_fragment) {
}
var
adapter
:
TextAdapter
?
=
null
private
fun
showPopup
(
it
:
View
,
list
:
List
<
String
>)
{
private
fun
showPopup
(
it
:
View
,
list
:
Mutable
List
<
String
>)
{
if
(
pop
==
null
)
{
val
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
recyclerview
,
null
)
val
listView
=
view
.
findViewById
<
RecyclerView
>(
R
.
id
.
ryview
)
listView
.
layoutManager
=
LinearLayoutManager
(
context
)
adapter
=
TextAdapter
(
list
)
adapter
?.
setOnItemClickListener
{
_
,
_
,
_
->}
listView
.
layoutParams
.
width
=
(
ArmsUtils
.
getScreenWidth
(
context
)
*
0.7
).
toInt
()
listView
.
adapter
=
adapter
...
...
@@ -165,10 +163,10 @@ class UpdateDeliveryFragment : BaseFragment(R.layout.update_delivery_fragment) {
.
animStyle
(
QMUIPopup
.
ANIM_AUTO
)
.
show
(
it
)
}
else
{
adapter
!!
.
setNewData
(
list
)
pop
!!
.
show
(
it
)
adapter
?.
setNewInstance
(
list
)
pop
?
.
show
(
it
)
}
adapter
?.
setOnItemClickListener
{
adapter
,
view
,
position
->
adapter
?.
setOnItemClickListener
{
_
,
_
,
position
->
when
(
it
.
id
)
{
R
.
id
.
layout_delivery_type
->
{
//修改備送類型
...
...
@@ -183,8 +181,6 @@ class UpdateDeliveryFragment : BaseFragment(R.layout.update_delivery_fragment) {
}
pop
!!
.
dismiss
()
}
}
}
other_order_mode/src/main/res/layout/layout_other_order_item
_new
.xml
→
other_order_mode/src/main/res/layout/layout_other_order_item.xml
View file @
77361964
...
...
@@ -79,84 +79,104 @@
tools:text=
"外送"
tools:textColor=
"@color/theme_333_color"
/>
<LinearLayout
<FrameLayout
android:id=
"@+id/fl_payment_method"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:
orientation=
"vertical
"
android:
paddingStart=
"@dimen/dp_10
"
a
ndroid:paddingEnd=
"@dimen/dp_10
"
android:
layout_marginLeft=
"@dimen/dp_10
"
android:
layout_marginTop=
"@dimen/dp_5
"
a
pp:layout_constraintHorizontal_weight=
"1
"
app:layout_constraintLeft_toRightOf=
"@id/tv_delivery_method"
app:layout_constraintRight_to
RightOf=
"parent
"
app:layout_constraintRight_to
LeftOf=
"@id/tv_order_time
"
app:layout_constraintTop_toTopOf=
"parent"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_payment_method"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@{payMethodBg}"
android:paddingLeft=
"@dimen/dp_10"
android:paddingTop=
"@dimen/dp_2"
android:paddingRight=
"@dimen/dp_10"
android:layout_centerVertical=
"true"
android:paddingBottom=
"@dimen/dp_2"
android:text=
"@{payMethod}"
android:textColor=
"@color/white"
android:gravity=
"left"
android:layout_gravity=
"left"
android:textSize=
"@dimen/sp_10"
tools:text=
"支付方式支付方式支付方式支付方式
支付方式"
tools:text=
"
支付方式"
tools:textColor=
"@color/theme_333_color"
/>
</FrameLayout>
<TextView
android:id=
"@+id/tv_order_time"
style=
"@style/otherOrder_item_create_time_textStyle"
android:layout_width=
"wrap_content
"
android:layout_width=
"0dp
"
android:layout_height=
"wrap_content"
android:gravity=
"end"
android:layout_toEndOf=
"@id/tv_payment_method"
android:layout_alignParentEnd=
"true"
android:layout_marginEnd=
"@dimen/dp_10"
android:layout_toEndOf=
"@id/fl_payment_method"
android:gravity=
"right"
android:text=
"@{TimeUtils.parseTimeRepeat(data.cREATE_TIME,TimeUtils.DEFAULT_DATE_FORMAT)}"
android:textSize=
"@dimen/dp_10"
tools:text=
"下單時間下單時間下單時間下單時間"
app:layout_constraintBottom_toBottomOf=
"@id/fl_payment_method"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toRightOf=
"@id/fl_payment_method"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/fl_payment_method"
tools:text=
"下單時間"
tools:textColor=
"@color/theme_333_color"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
<androidx.constraintlayout.widget.Barrier
android:id=
"@+id/barrier_order_item_one"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_6"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
app:barrierDirection=
"bottom"
app:constraint_referenced_ids=
"fl_payment_method,tv_order_time"
/>
<TextView
android:id=
"@+id/tv_order_user_name"
android:layout_width=
"wrap_content
"
android:layout_width=
"0dp
"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_6"
android:layout_marginRight=
"@dimen/dp_10"
android:text=
"@{data.rECEIVER + @string/left_parenthesis+data.pHONE + @string/right_parenthesis}"
android:textColor=
"@color/theme_text_color"
android:textSize=
"@dimen/sp_14"
android:textStyle=
"bold"
tools:text=
"用戶名+手機號啊實打實啊實打實大阿達"
app:layout_constraintHorizontal_weight=
"3"
app:layout_constraintLeft_toLeftOf=
"@id/fl_payment_method"
app:layout_constraintRight_toLeftOf=
"@id/tv_delivery_state"
app:layout_constraintTop_toBottomOf=
"@id/barrier_order_item_one"
tools:text=
"用戶名+手機號啊實打實啊實打實大阿打哈阿薩德達"
tools:textColor=
"@color/theme_333_color"
/>
<TextView
android:id=
"@+id/tv_delivery_state"
style=
"@style/otherOrder_item_info_title_textStyle"
android:layout_width=
"wrap_content
"
android:layout_width=
"0dp
"
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_marginEnd=
"@dimen/dp_10"
android:layout_toEndOf=
"@id/tv_order_user_name"
android:gravity=
"end"
android:text=
"@{delivery_state}"
android:textColor=
"@color/color_3c"
tools:text=
"用戶名+手"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toRightOf=
"@id/tv_order_user_name"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/tv_order_user_name"
tools:text=
"用戶名"
tools:textColor=
"@color/theme_333_color"
/>
</RelativeLayout>
<androidx.constraintlayout.widget.Barrier
android:id=
"@+id/barrier_order_item_two"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
app:barrierDirection=
"bottom"
app:constraint_referenced_ids=
"tv_order_user_name,tv_delivery_state"
/>
<TextView
android:id=
"@+id/tv_delivery_time"
...
...
@@ -166,29 +186,58 @@
android:text=
"@{data.sendTime}"
android:textColor=
"#EC2D2D"
android:textSize=
"@dimen/dp_12"
android:visibility=
"visible"
android:visibility=
"@{(data.sendTime == null || data.sendTime.length() == 0)?View.GONE:View.VISIBLE}"
app:layout_constraintLeft_toLeftOf=
"@id/fl_payment_method"
app:layout_constraintTop_toBottomOf=
"@id/barrier_order_item_two"
tools:text=
"送達時間Adasd奧術大師大所多啊實打實大啊實打實大阿薩德"
tools:textColor=
"@color/theme_333_color"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_8"
>
<TextView
android:id=
"@+id/tv_order_num_text"
style=
"@style/otherOrder_item_info_title_textStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginTop=
"@dimen/dp_8"
android:text=
"取餐碼:"
app:layout_constraintLeft_toLeftOf=
"@id/fl_payment_method"
app:layout_constraintTop_toBottomOf=
"@id/tv_delivery_time"
/>
<TextView
android:id=
"@+id/tv_order_num"
style=
"@style/otherOrder_item_info_title_textStyle"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_5"
android:gravity=
"left"
android:text=
'@{data.takeFoodCode.equals("0")? @string/take_food_code_omit:data.takeFoodCode}'
android:textSize=
"@dimen/dp_14"
android:textStyle=
"bold"
app:layout_constraintHorizontal_weight=
"2"
app:layout_constraintLeft_toRightOf=
"@id/barrier_order_item_right"
app:layout_constraintRight_toLeftOf=
"@id/rl_order_state"
app:layout_constraintTop_toBottomOf=
"@id/tv_delivery_time"
app:layout_constraintTop_toTopOf=
"@id/tv_order_num_text"
tools:text=
"0112121121"
tools:textColor=
"@color/theme_333_color"
/>
<FrameLayout
android:id=
"@+id/rl_order_state"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:text=
"取餐碼:"
/>
android:layout_marginEnd=
"@dimen/dp_10"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toRightOf=
"@id/tv_order_num"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_delivery_time"
app:layout_constraintTop_toTopOf=
"@id/tv_order_num_text"
>
<TextView
android:id=
"@+id/tv_order_state"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_centerVertical=
"true"
android:layout_gravity=
"right"
android:background=
"@{stateBg}"
android:padding=
"@dimen/dp_5"
android:text=
"@{state}"
...
...
@@ -197,65 +246,91 @@
tools:text=
"訂單狀態"
tools:textColor=
"@color/theme_333_color"
/>
</FrameLayout>
<androidx.constraintlayout.widget.Barrier
android:id=
"@+id/barrier_order_item_three"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
app:barrierDirection=
"bottom"
app:constraint_referenced_ids=
"tv_order_num_text,tv_order_num,rl_order_state"
/>
<TextView
android:id=
"@+id/tv_order_num
"
android:id=
"@+id/tv_address_text
"
style=
"@style/otherOrder_item_info_title_textStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_toStartOf=
"@id/tv_order_state
"
android:layout_centerVertical=
"true
"
android:layout_toEndOf=
"@id/tv_order_num_text
"
android:text=
'@{data.takeFoodCode.equals("0")? @string/take_food_code_omit:data.takeFoodCode}'
android:textSize=
"@dimen/dp_14
"
android:textStyle=
"bold
"
tools:text=
"012121201阿達as244342313154446455443434242
"
android:layout_marginTop=
"@dimen/dp_9
"
android:layout_marginBottom=
"@dimen/dp_10
"
android:text=
"@{@string/address}
"
android:visibility=
"@{isSelf?View.GONE:View.VISIBLE}"
app:layout_constraintLeft_toLeftOf=
"@id/fl_payment_method
"
app:layout_constraintTop_toBottomOf=
"@id/barrier_order_item_three
"
tools:text=
"地址:
"
tools:textColor=
"@color/theme_333_color"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
<androidx.constraintlayout.widget.Barrier
android:id=
"@+id/barrier_order_item_right"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_9
"
android:layout_marginBottom=
"@dimen/dp_10"
>
app:barrierDirection=
"right
"
app:constraint_referenced_ids=
"tv_address_text,tv_order_num_text"
/
>
<TextView
android:id=
"@+id/tv_address_text
"
style=
"@style/otherOrder_item_info_title
_textStyle"
android:layout_width=
"wrap_content
"
android:id=
"@+id/tv_address
"
style=
"@style/otherOrder_item_info
_textStyle"
android:layout_width=
"0dp
"
android:layout_height=
"wrap_content"
android:text=
"@{@string/address}"
android:layout_marginStart=
"@dimen/dp_5"
android:layout_marginBottom=
"@dimen/dp_10"
android:layout_toStartOf=
"@id/tv_order_amount"
android:layout_toEndOf=
"@id/tv_address_text"
android:text=
"@{data.aDDRESS_DETAIL}"
android:gravity=
"left"
android:visibility=
"@{isSelf?View.GONE:View.VISIBLE}"
tools:text=
"地址:\u3000"
app:layout_constraintHorizontal_weight=
"2"
app:layout_constraintLeft_toRightOf=
"@id/barrier_order_item_right"
app:layout_constraintRight_toLeftOf=
"@id/tv_order_amount"
app:layout_constraintTop_toTopOf=
"@id/tv_address_text"
tools:text=
"收貨地址"
tools:textColor=
"@color/theme_333_color"
/>
<TextView
android:id=
"@+id/tv_order_amount"
android:layout_width=
"wrap_content
"
android:layout_width=
"0dp
"
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"@dimen/dp_3
"
android:layout_centerVertical=
"true
"
android:layout_marginStart=
"@dimen/dp_4"
android:layout_marginTop=
"@dimen/dp_9"
android:layout_marginEnd=
"@dimen/dp_10"
android:gravity=
"right"
android:text=
"@{@string/amount_unit + data.pAY_AMOUNT}"
android:textColor=
"@color/red_600"
android:layout_centerVertical=
"true"
android:textSize=
"@dimen/sp_16"
tools:text=
"$1412121"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toRightOf=
"@id/tv_address"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/barrier_order_item_three"
tools:text=
"$14142"
tools:textColor=
"@color/theme_333_color"
/>
<TextView
android:id=
"@+id/tv_address"
style=
"@style/otherOrder_item_info_textStyle
"
<androidx.constraintlayout.widget.Barrier
android:id=
"@+id/barrier_order_item_bottom
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_5
"
android:layout_toEndOf=
"@id/tv_address_text"
android:layout_toStartOf=
"@id/tv_order_amount"
android:text=
"@{data.aDDRESS_DETAIL}"
android:visibility=
"@{isSelf?View.GONE:View.VISIBLE}
"
tools:text=
"地址安居客收到貨卡和山東傻了發哈連接阿斯蒂芬
"
tools:textColor=
"@color/theme_333_color"
/>
</RelativeLayout>
</LinearLayout
>
app:barrierDirection=
"bottom
"
app:constraint_referenced_ids=
"tv_address,tv_order_amount"
/>
<View
android:layout_width=
"wrap_content
"
android:layout_height=
"0dp
"
android:layout_marginBottom=
"@dimen/dp_10"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/barrier_order_item_bottom"
/
>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.lihang.ShadowLayout>
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrder.java
View file @
77361964
...
...
@@ -250,7 +250,7 @@ public class PrintOtherOrder extends PrinterRoot {
// billData.add(getBillBean("總金額:", amountUnit + data.getTOTAL_AMOUNT()));
BillItemAdapter
adapter
=
new
BillItemAdapter
(
billData
,
context
);
BillItemAdapter
adapter
=
new
BillItemAdapter
(
billData
);
rvBill
.
setLayoutManager
(
new
LinearLayoutManager
(
context
));
rvBill
.
setAdapter
(
adapter
);
//總金額
...
...
print-module/src/main/java/com/joe/print/mvp/print/service/PrjService.java
View file @
77361964
...
...
@@ -121,7 +121,9 @@ public class PrjService extends Service implements PrintSocketHolder.OnStateChan
@Override
public
void
onNext
(
String
s
)
{
Log
.
e
(
"eee"
,
"請求到PRJ數據:"
+
s
);
Log
.
e
(
"eee"
,
"請求到PRJ數據:"
+
s
);
Log
.
e
(
"eee"
,
"請求到PRJ數據:"
+
s
);
Log
.
e
(
"eee"
,
"請求到PRJ數據:"
+
s
);
//請求到數據,停止輪詢,開始打印,在打印完之後再重新開始輪詢
startPrint
(
s
);
//開啟另一個定時,三十秒之後自動請求,避免上面的打印成功或失敗時沒有回調。
...
...
print-module/src/main/java/com/joe/print/mvp/ui/adapter/BillItemAdapter.java
View file @
77361964
package
com
.
joe
.
print
.
mvp
.
ui
.
adapter
;
import
android.content.Context
;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.gingersoft.gsa.cloud.base.common.bean.BillingBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.chad.library.adapter.base.viewholder.BaseViewHolder
;
import
com.joe.print.R
;
import
com.joe.print.mvp.model.bean.PrintBillBean
;
import
java.util.HashMap
;
import
java.util.List
;
/**
* Created by Wyh on 2020/1/16.
*/
public
class
BillItemAdapter
extends
BaseQuickAdapter
<
PrintBillBean
,
BaseViewHolder
>
{
private
Context
mContext
;
public
BillItemAdapter
(
@Nullable
List
<
PrintBillBean
>
data
,
Context
mContext
)
{
public
BillItemAdapter
(
@Nullable
List
<
PrintBillBean
>
data
)
{
super
(
R
.
layout
.
print_item_bill
,
data
);
this
.
mContext
=
mContext
;
}
@Override
...
...
print-module/src/main/java/com/joe/print/mvp/ui/adapter/DialogPrinterListAdapter.java
View file @
77361964
...
...
@@ -5,7 +5,7 @@ import android.content.Context;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.joe.print.R
;
...
...
print-module/src/main/java/com/joe/print/mvp/ui/adapter/KitChenPrjPrintFoodAdapter.java
View file @
77361964
...
...
@@ -5,7 +5,7 @@ import android.widget.TextView;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.base.R
;
import
com.gingersoft.gsa.cloud.base.common.bean.OrderDetail
;
import
com.joe.print.mvp.model.bean.PrjBean
;
...
...
print-module/src/main/java/com/joe/print/mvp/ui/adapter/OtherOrderAdapter.java
View file @
77361964
...
...
@@ -11,7 +11,7 @@ import android.widget.TextView;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.joe.print.R
;
...
...
print-module/src/main/java/com/joe/print/mvp/ui/adapter/PrintFailListAdapter.java
View file @
77361964
...
...
@@ -5,7 +5,7 @@ import android.view.View;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.joe.print.R
;
...
...
print-module/src/main/java/com/joe/print/mvp/ui/adapter/PrintFileBitmapAdapter.java
View file @
77361964
...
...
@@ -6,7 +6,7 @@ import android.widget.ImageView;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.joe.print.R
;
import
java.util.List
;
...
...
print-module/src/main/java/com/joe/print/mvp/ui/adapter/PrintModelAdapter.java
View file @
77361964
...
...
@@ -3,7 +3,7 @@ package com.joe.print.mvp.ui.adapter;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.joe.print.R
;
import
com.gingersoft.gsa.cloud.database.bean.PrintModelBean
;
...
...
print-module/src/main/java/com/joe/print/mvp/ui/adapter/PrinterListAdapter.java
View file @
77361964
...
...
@@ -7,7 +7,7 @@ import android.widget.RadioButton;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.base.utils.other.SPUtils
;
import
com.gingersoft.gsa.cloud.base.utils.toast.ToastUtils
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
...
...
@@ -41,9 +41,10 @@ public class PrinterListAdapter extends BaseQuickAdapter<PrinterDeviceBean, Base
helper
.
getView
(
R
.
id
.
tv_default_print
).
setVisibility
(
item
.
getStatus
()
==
2
?
View
.
VISIBLE
:
View
.
GONE
);
// helper.setOnItemSelectedClickListener(R.id.layout_delete,)
helper
.
addOnClickListener
(
R
.
id
.
layout_delete
);
}
// helper.addOnClickListener(R.id.layout_delete);
addChildClickViewIds
(
R
.
id
.
layout_delete
);
}
public
int
getSelectPosition
()
{
...
...
@@ -55,7 +56,8 @@ public class PrinterListAdapter extends BaseQuickAdapter<PrinterDeviceBean, Base
}
public
void
notifyData
(
List
<
PrinterDeviceBean
>
data
)
{
this
.
mData
=
data
;
// this.mData = data;
setNewInstance
(
data
);
super
.
notifyDataSetChanged
();
}
}
print-module/src/main/java/com/joe/print/mvp/ui/adapter/SelectPrintAdapter.java
View file @
77361964
...
...
@@ -5,7 +5,7 @@ import android.widget.RadioButton;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.joe.print.R
;
...
...
print-module/src/main/java/com/joe/print/mvp/ui/fragment/IpPrintListActivityFragment.java
View file @
77361964
...
...
@@ -3,6 +3,7 @@ package com.joe.print.mvp.ui.fragment;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Message
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -270,7 +271,9 @@ public class IpPrintListActivityFragment extends BaseFragment<IpPrintListActivit
});
// 监听拖拽和侧滑删除,更新UI和数据源。
printListAdapter
=
new
PrinterListAdapter
(
devicess
,
mContext
);
printListAdapter
.
setOnItemChildClickListener
((
adapter
,
view
,
position
)
->
new
AppDialog
().
showWaringDialog
(
mContext
,
"是否刪除打印機"
,
(
view1
,
dialog
)
->
{
printListAdapter
.
setOnItemChildClickListener
((
adapter
,
view
,
position
)
->
{
if
(
view
.
getId
()
==
R
.
id
.
layout_delete
)
{
new
AppDialog
().
showWaringDialog
(
mContext
,
"是否刪除打印機"
,
(
view1
,
dialog
)
->
{
//調用刪除接口
mPresenter
.
deletePrinter
(
devicess
.
get
(
position
).
getId
()
+
""
);
devicess
.
remove
(
position
);
...
...
@@ -281,13 +284,13 @@ public class IpPrintListActivityFragment extends BaseFragment<IpPrintListActivit
}
else
{
mTvAddPrint
.
setVisibility
(
View
.
GONE
);
}
}));
});
}
});
mRvPrintList
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
//分割线
// mRvPrintList.addItemDecoration(new DefaultItemDecoration(ContextCompat.getColor(mContext, R.color.line_color)));
mRvPrintList
.
setSwipeMenuCreator
(
mSwipeMenuCreator
);
// 菜单创建器。
// mRvPrintList.setAdapter(printListAdapter);
printListAdapter
.
bindToRecyclerView
(
mRvPrintList
);
mRvPrintList
.
setAdapter
(
printListAdapter
);
}
else
{
printListAdapter
.
notifyData
(
devicess
);
}
...
...
@@ -297,7 +300,7 @@ public class IpPrintListActivityFragment extends BaseFragment<IpPrintListActivit
Intent
intent
=
new
Intent
(
mContext
,
PrinterAddActivity
.
class
);
intent
.
putExtra
(
"printer_position"
,
adapterPosition
);
intent
.
putExtra
(
"printList"
,
(
Serializable
)
devicess
);
if
(
mPresenter
.
getPrintModelBeans
()
!=
null
)
{
if
(
mPresenter
.
getPrintModelBeans
()
!=
null
)
{
intent
.
putExtra
(
"printModelList"
,
(
Serializable
)
mPresenter
.
getPrintModelBeans
());
}
startActivity
(
intent
);
...
...
print-module/src/main/res/layout/printer_activity_list.xml
View file @
77361964
...
...
@@ -27,5 +27,4 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
\ No newline at end of file
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
View file @
77361964
...
...
@@ -775,7 +775,7 @@ public class BaseOrderPresenter<M extends BaseOrderContract.Model, V extends Bas
request
.
setNumber
(
item
.
getNumber
());
request
.
setPrice
(
item
.
getUnit_price
());
request
.
setType
(
item
.
getType
());
request
.
setPrintSet
i
ng
(
item
.
getPrintseting
());
request
.
setPrintSet
I
ng
(
item
.
getPrintseting
());
request
.
setAblediscount
(
item
.
getAblediscount
());
request
.
setDiscountId
(
getDiscountIdByParentId
(
foodList
,
mainProductId
));
request
.
setLunchboxPrice
(
0
);
...
...
@@ -859,7 +859,7 @@ public class BaseOrderPresenter<M extends BaseOrderContract.Model, V extends Bas
request
.
setNumber
(
item
.
getNumber
());
request
.
setPrice
(
item
.
getUnit_price
());
request
.
setType
(
item
.
getType
());
request
.
setPrintSet
i
ng
(
item
.
getPrintseting
());
request
.
setPrintSet
I
ng
(
item
.
getPrintseting
());
request
.
setAblediscount
(
item
.
getAblediscount
());
request
.
setDiscountId
(
getDiscountIdByParentId
(
foodList
,
mainParentId
));
request
.
setLunchboxPrice
(
0
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderPayActivity.java
View file @
77361964
...
...
@@ -226,7 +226,7 @@ public class OrderPayActivity extends BaseActivity<OrderPayPresenter> implements
// } else {
// btn_order_count.setVisibility(View.INVISIBLE);
// }
//
tv_whole.setText("合計 $" + mPresenter.getFoodTotal());
tv_whole
.
setText
(
"合計 $"
+
mPresenter
.
getFoodTotal
());
// tv_total.setText("$" + mPresenter.getTotalAmount());
// setDifferenceText();
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/FoodReasonAdapter.java
View file @
77361964
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
ui
.
adapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.
viewholder.
BaseViewHolder
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.FoodReason
;
import
com.gingersoft.gsa.cloud.ui.bean.view.SectionTextItem3
;
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/OrderCenterDetailFoodAdapter.java
View file @
77361964
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
ui
.
adapter
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.widget.TextView
;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.common.bean.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.common.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
com.chad.library.adapter.base.viewholder.BaseViewHolder
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.OrderDetailItem
;
import
com.gingersoft.gsa.cloud.ui.bean.view.SectionTextItem3
;
import
java.util.List
;
import
androidx.annotation.Nullable
;
public
class
OrderCenterDetailFoodAdapter
extends
BaseQuickAdapter
<
SectionTextItem3
,
BaseViewHolder
>
{
public
OrderCenterDetailFoodAdapter
(
@Nullable
List
<
SectionTextItem3
>
data
)
{
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/OrderCenterMoneyAdapter.java
View file @
77361964
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
ui
.
adapter
;
import
android.os.Build
;
import
android.view.Gravity
;
import
android.widget.TextView
;
import
androidx.annotation.Nullable
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.gingersoft.gsa.cloud.base.common.bean.OrderDetail
;
import
com.chad.library.adapter.base.viewholder.BaseViewHolder
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.ui.bean.view.SectionTextItem3
;
import
java.util.List
;
import
androidx.annotation.Nullable
;
public
class
OrderCenterMoneyAdapter
extends
BaseQuickAdapter
<
SectionTextItem3
,
BaseViewHolder
>
{
public
OrderCenterMoneyAdapter
(
@Nullable
List
<
SectionTextItem3
>
data
)
{
...
...
@@ -32,8 +29,8 @@ public class OrderCenterMoneyAdapter extends BaseQuickAdapter<SectionTextItem3,
TextView
tv_name
=
helper
.
getView
(
R
.
id
.
tv_name
);
TextView
tv_money
=
helper
.
getView
(
R
.
id
.
tv_money
);
tv_name
.
setTextAppearance
(
mContext
,
item
.
getLeftTextStyle
());
tv_money
.
setTextAppearance
(
mContext
,
item
.
getRightTextStyle
());
tv_name
.
setTextAppearance
(
getContext
()
,
item
.
getLeftTextStyle
());
tv_money
.
setTextAppearance
(
getContext
()
,
item
.
getRightTextStyle
());
}
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/widget/CancelFoodDialog.java
View file @
77361964
...
...
@@ -4,42 +4,29 @@ import android.app.Dialog;
import
android.content.Context
;
import
android.net.ParseException
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextWatcher
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewStub
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.FrameLayout
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.ProgressBar
;
import
android.widget.TextView
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
androidx.annotation.NonNull
;
import
androidx.core.content.ContextCompat
;
import
androidx.recyclerview.widget.GridLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.FoodReason
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.FoodReasonAdapter
;
import
com.gingersoft.gsa.cloud.ui.adapter.BasTextSectiontAdapter
;
import
com.gingersoft.gsa.cloud.ui.bean.mode.LoginBean
;
import
com.gingersoft.gsa.cloud.ui.bean.view.SectionHeader
;
import
com.gingersoft.gsa.cloud.ui.bean.view.SectionTextItem
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.ChooseRestaurantDialog
;
import
com.google.gson.JsonIOException
;
import
com.google.gson.JsonParseException
;
import
com.jess.arms.utils.AndroidWorkaround
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.qmuiteam.qmui.layout.QMUILinearLayout
;
import
com.qmuiteam.qmui.util.QMUIDisplayHelper
;
import
com.qmuiteam.qmui.widget.QMUIEmptyView
;
import
com.qmuiteam.qmui.widget.QMUISlider
;
import
com.qmuiteam.qmui.widget.QMUITopBar
;
import
com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
;
import
com.qmuiteam.qmui.widget.section.QMUISection
;
import
com.qmuiteam.qmui.widget.section.QMUIStickySectionAdapter
;
import
com.qmuiteam.qmui.widget.section.QMUIStickySectionLayout
;
import
org.json.JSONException
;
...
...
@@ -47,15 +34,6 @@ import java.net.SocketTimeoutException;
import
java.net.UnknownHostException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.core.content.ContextCompat
;
import
androidx.recyclerview.widget.GridLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
butterknife.BindView
;
/**
* 作者:ELEGANT_BIN
...
...
@@ -216,12 +194,9 @@ public class CancelFoodDialog extends Dialog {
if
(
mAdapter
==
null
)
{
mAdapter
=
new
FoodReasonAdapter
(
mItems
);
}
mAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
mAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
{
if
(
onClickListener
!=
null
)
onClickListener
.
onItemClick
(
mItems
.
get
(
position
),
position
,
getInputNumber
());
}
});
recycle_cancel_info
.
setLayoutManager
(
createLayoutManager
());
recycle_cancel_info
.
setAdapter
(
mAdapter
);
...
...
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