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
1c6d730d
Commit
1c6d730d
authored
May 30, 2020
by
Wyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5.30 提交
parent
04c3d010
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
63 changed files
with
1343 additions
and
193 deletions
+1343
-193
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
+4
-2
base-module/src/main/java/com/gingersoft/gsa/cloud/base/widget/DialogUtils.java
+20
-24
base-module/src/main/java/com/gingersoft/gsa/cloud/constans/HttpsConstans.java
+77
-14
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/OrderDetails.kt
+8
-1
base-module/src/main/res/drawable-xhdpi/ic_add.png
+0
-0
base-module/src/main/res/drawable-xhdpi/icon_topbar_overflow.png
+0
-0
base-module/src/main/res/drawable/shape_order_border.xml
+2
-1
base-module/src/main/res/values/colors.xml
+4
-0
base-module/src/main/res/values/ids.xml
+5
-0
login-module/src/main/java/com/gingersoft/gsa/cloud/login/mvp/presenter/BaseLoginPresenter.java
+2
-2
login-module/src/main/java/com/gingersoft/gsa/cloud/login/mvp/ui/activity/mvp/ui/activity/SwitchServerActivity.java
+12
-28
login-module/src/main/java/com/gingersoft/gsa/cloud/login/mvp/ui/activity/mvp/ui/activity/WelcomeActivity.java
+1
-0
login-module/src/main/res/layout/activity_switch_server.xml
+1
-19
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/FoodRankingAdapter.java
+2
-1
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/fragment/BusinessReportFragment.java
+0
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/fragment/SalesFragment.java
+3
-1
other_order_mode/build.gradle
+1
-0
other_order_mode/src/main/AndroidManifest.xml
+3
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/DeliveryRepository.kt
+36
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/HistoryOrderRepository.kt
+3
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/WeatherRepository.kt
+13
-3
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/CancelLogisticsBean.kt
+5
-2
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/Data.kt
+6
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/EstimatedBean.kt
+8
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/OrderGoupNumBean.kt
+6
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/OrderList.kt
+3
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/network/CoolWeatherNetwork.kt
+3
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/network/DeliveryNetwork.kt
+61
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/network/api/DeliveryService.kt
+17
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/network/api/WeatherService.kt
+5
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/factory/DeliveryFactory.kt
+16
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/BaseViewModel.kt
+31
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/DeliveryViewModel.kt
+19
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/HistoryOrderViewModel.kt
+2
-2
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/PageViewModel.kt
+98
-24
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/DeliverySettingActivity.kt
+26
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/HistoryOrderActivity.kt
+54
-6
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/OtherOrderActivity.kt
+104
-8
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/DeliveryListAdapter.kt
+50
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/OtherOrdersAdapter.kt
+7
-11
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/fragment/DeliveryFragment.kt
+51
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/fragment/PlaceholderFragment.kt
+37
-9
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/fragment/UpdateDeliveryFragment.kt
+37
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/InjectorUtil.kt
+5
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/OtherOrderUtils.kt
+18
-3
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/ViewUtil.kt
+8
-0
other_order_mode/src/main/res/drawable/shape_restaurant_state_bg.xml
+8
-0
other_order_mode/src/main/res/layout/activity_delivery.xml
+24
-0
other_order_mode/src/main/res/layout/activity_history_order.xml
+67
-3
other_order_mode/src/main/res/layout/activity_other_order.xml
+38
-17
other_order_mode/src/main/res/layout/fragment_delivery_list.xml
+22
-0
other_order_mode/src/main/res/layout/item_delivery_layout.xml
+126
-0
other_order_mode/src/main/res/layout/layout_history_order_item.xml
+2
-2
other_order_mode/src/main/res/layout/layout_more_popup.xml
+36
-0
other_order_mode/src/main/res/layout/layout_order_info_dialog_new.xml
+71
-3
other_order_mode/src/main/res/layout/layout_other_order_item.xml
+0
-0
other_order_mode/src/main/res/layout/popup_layout_restaurant_state.xml
+32
-0
other_order_mode/src/main/res/layout/update_delivery_fragment.xml
+21
-0
other_order_mode/src/main/res/values/strings.xml
+10
-0
other_order_mode/src/main/res/values/styles.xml
+9
-1
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrder.java
+1
-1
print-module/src/main/java/com/joe/print/mvp/print/PrinterRoot.java
+1
-0
print-module/src/main/res/layout/print_confirm_order_view.xml
+1
-1
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
View file @
1c6d730d
...
...
@@ -146,13 +146,15 @@ public class GsaCloudApplication extends BaseApplication {
ClassicsFooter
.
REFRESH_FOOTER_NOTHING
=
getString
(
R
.
string
.
srl_footer_nothing
);
//"全部加载完成";
}
private
void
initDomainUrl
()
{
public
static
void
initDomainUrl
()
{
HttpsConstans
.
isFormal
=
(
boolean
)
SPUtils
.
get
(
getAppContext
(),
"isFormal"
,
true
);
HttpsConstans
.
init
();
//需要單獨配置域名URL的,在接口上添加@Headers({"Domain-Name: settlement_report_server"}),不添加則是使用默認域名
setGlobalDomain
();
//清機報表請求地址
RetrofitUrlManager
.
getInstance
().
putDomain
(
"settlement_report_server"
,
HttpsConstans
.
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
);
//gsa報表請求地址
RetrofitUrlManager
.
getInstance
().
putDomain
(
"gsa_report"
,
HttpsConstans
.
REPORT_SERVER_ADDRESS
);
RetrofitUrlManager
.
getInstance
().
putDomain
(
"gsa_report"
,
HttpsConstans
.
REPORT_SERVER_ADDRESS
);
//DEFAULT_REPORT_ADDRESS
//微信報表請求地址
RetrofitUrlManager
.
getInstance
().
putDomain
(
"wechat_report"
,
HttpsConstans
.
WECHAR_REPORT_SERVER_ADDRESS
);
//沽清控制請求地址
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/base/widget/DialogUtils.java
View file @
1c6d730d
...
...
@@ -30,7 +30,7 @@ import com.gingersoft.gsa.cloud.base.R;
*/
public
abstract
class
DialogUtils
{
private
Context
mContext
;
private
Dialog
dialog2
=
null
;
private
static
Dialog
dialog
;
private
View
view
;
private
int
style
=
R
.
style
.
PhotoDialog
;
private
int
mWidth
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
;
...
...
@@ -43,14 +43,6 @@ public abstract class DialogUtils {
view
=
LayoutInflater
.
from
(
mContext
).
inflate
(
xmlLayout
,
null
);
}
private
Dialog
getInstance
()
{
synchronized
(
this
)
{
if
(
dialog2
==
null
)
{
dialog2
=
new
Dialog
(
mContext
,
style
);
}
return
dialog2
;
}
}
public
DialogUtils
(
Context
mContext
,
View
view
)
{
this
.
mContext
=
mContext
;
...
...
@@ -73,18 +65,21 @@ public abstract class DialogUtils {
}
public
DialogUtils
createDialogView
()
{
if
(
dialog
!=
null
)
{
dialog
.
dismiss
();
}
dialog
=
new
Dialog
(
mContext
);
viewHepler
=
getViewHepler
();
initLayout
(
viewHepler
,
getInstance
());
getInstance
().
setContentView
(
viewHepler
.
getContentView
());
Window
dialogWindow
=
getInstance
().
getWindow
();
initLayout
(
viewHepler
,
dialog
);
dialog
.
setContentView
(
viewHepler
.
getContentView
());
Window
dialogWindow
=
dialog
.
getWindow
();
// WindowManager.LayoutParams lp = dialogWindow.getAttributes();
dialogWindow
.
setGravity
(
Gravity
.
CENTER
);
//将对话框的大小按屏幕大小的百分比设置
// WindowManager m = activity.getWindowManager();
// Display d = m.getDefaultDisplay(); // 获取屏幕宽、高用
WindowManager
.
LayoutParams
p
=
dialogWindow
.
getAttributes
();
// 获取对话框当前的参数值
Window
window
=
getInstance
()
.
getWindow
();
Window
window
=
dialog
.
getWindow
();
if
(
window
!=
null
)
{
window
.
setBackgroundDrawable
(
new
ColorDrawable
(
Color
.
TRANSPARENT
));
window
.
getDecorView
().
setBackgroundResource
(
android
.
R
.
color
.
transparent
);
...
...
@@ -105,32 +100,33 @@ public abstract class DialogUtils {
dialogWindow
.
setAttributes
(
p
);
// android Activity改成dialog样式后 怎设置点击空白处关闭窗体,点击窗体以外的地方关闭窗体
getInstance
()
.
setCanceledOnTouchOutside
(
true
);
getInstance
()
.
setCancelable
(
true
);
dialog
.
setCanceledOnTouchOutside
(
true
);
dialog
.
setCancelable
(
true
);
// dialog.show();
return
this
;
}
public
Dialog
getDialog
()
{
return
getInstance
()
;
return
dialog
;
}
public
DialogUtils
dismiss
()
{
getInstance
().
dismiss
();
if
(
dialog
!=
null
)
dialog
.
dismiss
();
return
this
;
}
public
DialogUtils
setGravity
(
int
gravity
)
{
if
(
getInstance
()
.
getWindow
()
!=
null
)
{
getInstance
()
.
getWindow
().
setGravity
(
gravity
);
if
(
dialog
.
getWindow
()
!=
null
)
{
dialog
.
getWindow
().
setGravity
(
gravity
);
}
return
this
;
}
public
DialogUtils
show
()
{
dismiss
();
getInstance
()
.
show
();
dialog
.
show
();
return
this
;
}
...
...
@@ -143,11 +139,11 @@ public abstract class DialogUtils {
}
public
boolean
isShowing
()
{
return
getInstance
()
!=
null
&&
getInstance
()
.
isShowing
();
return
dialog
!=
null
&&
dialog
.
isShowing
();
}
public
DialogUtils
setOnDismissListener
(
DialogInterface
.
OnDismissListener
dismissListener
)
{
getInstance
()
.
setOnDismissListener
(
dismissListener
);
dialog
.
setOnDismissListener
(
dismissListener
);
return
this
;
}
...
...
@@ -159,7 +155,7 @@ public abstract class DialogUtils {
public
DialogUtils
setCanceledOnTouchOutside
(
boolean
cancel
)
{
getInstance
()
.
setCanceledOnTouchOutside
(
cancel
);
dialog
.
setCanceledOnTouchOutside
(
cancel
);
return
this
;
}
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/constans/HttpsConstans.java
View file @
1c6d730d
...
...
@@ -5,26 +5,88 @@ package com.gingersoft.gsa.cloud.constans;
*/
public
class
HttpsConstans
{
public
static
String
ROOT_ADDRESS_FORMAL
=
"https://m.ricepon.com:8444/ricepon-cloud-gsa/api/"
;
//正式服務器
public
static
final
String
ROOT_SERVER_ADDRESS_FORMAL_SZ
=
"http://gingersoft.tpddns.cn:58201/ricepon-cloud-gsa/api/"
;
//深圳服务器
public
static
final
String
ROOT_SERVER_ADDRESS_FORMAL_HK
=
"http://a.ricepon.com:58201/ricepon-cloud-gsa/api/"
;
//香港服务器
// public static String ROOT_ADDRESS_FORMAL = "https://m.ricepon.com:8444/ricepon-cloud-gsa/api/";//正式服務器
// public static final String ROOT_SERVER_ADDRESS_FORMAL_SZ = "http://gingersoft.tpddns.cn:58201/ricepon-cloud-gsa/api/";//深圳服务器
// public static final String ROOT_SERVER_ADDRESS_FORMAL_HK = "http://a.ricepon.com:58201/ricepon-cloud-gsa/api/";//香港服务器
// public static String ROOT_SERVER_YOU_CHANG_HK = "http://192.168.1.142:9012/api/"; //友常本地
// public static String ROOT_SERVER_SHI_WEI_HK = "http://192.168.1.154:9012/api/"; //世維本地
// //默認為正式
// public static String ROOT_SERVER_ADDRESS_FORMAL = ROOT_SERVER_ADDRESS_FORMAL_HK;
//
// //外賣接單
// public static final String ROOT_SZ_URL = "http://192.168.1.74:6060";//友常本地
// public static final String ROOT_HK_TEST_URL = "https://hktest.ricepon.com:64377";//香港測試
// public static final String ROOT_FORMAL_URL = "https://m.ricepon.com";//正式
// public static String ROOT_URL = HttpsConstans.ROOT_HK_TEST_URL;
//
// //清機接口地址
// public static String ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL = "http://a.ricepon.com:58201/";
// //報表地址
// public static String REPORT_SERVER_ADDRESS = "http://a.ricepon.com:58201/ricepon-report/api/";
// //微信公眾號報表地址:首頁曲線圖數據,支付分析報表數據
// public static String WECHAR_REPORT_SERVER_ADDRESS = "http://a.ricepon.com:61177/member-web/api/";
// //報表地址
// public static String _SERVER_ADDRESS = "http://a.ricepon.com:61177/member-web/api/";
//--------------------------------------------其他全局----------------------------------------------------------------------------
private
static
String
HTTP_ADDRESS_URL_FORMAL
=
"https://m.ricepon.com:8444"
;
//正式服務器
private
static
String
HTTP_ADDRESS_URL_SZ
=
"http://gingersoft.tpddns.cn:58201"
;
//深圳測試
private
static
String
HTTP_ADDRESS_URL_HK
=
"http://a.ricepon.com:58201"
;
//香港測試
private
static
String
PATH
=
"/ricepon-cloud-gsa/api/"
;
//路徑
public
static
String
ROOT_SERVER_YOU_CHANG_HK
=
"http://192.168.1.142:9012/api/"
;
//友常本地
public
static
String
ROOT_SERVER_SHI_WEI_HK
=
"http://192.168.1.154:9012/api/"
;
//世維本地
//默認為正式
public
static
String
ROOT_SERVER_ADDRESS_FORMAL
=
ROOT_ADDRESS_FORMAL
;
//
外賣接單
//
------------------------------------------外賣接單---------------------------------------------------------------------------
public
static
final
String
ROOT_SZ_URL
=
"http://192.168.1.74:6060"
;
//友常本地
public
static
final
String
ROOT_HK_TEST_URL
=
"https://hktest.ricepon.com:64377"
;
//香港測試
public
static
final
String
ROOT_FORMAL_URL
=
"https://m.ricepon.com"
;
//正式
public
static
String
ROOT_URL
=
HttpsConstans
.
ROOT_FORMAL_URL
;
//-------------------------------------------報表-------------------------------------------------------------------------------
private
static
String
REPORT_TEST_ADDRESS
=
"http://a.ricepon.com:58201"
;
//報表測試地址
private
static
String
REPORT_FORMAL_ADDRESS
=
HTTP_ADDRESS_URL_FORMAL
;
//報表正式地址
//報表路徑
private
static
String
REPORT_PATH
=
"/ricepon-report/api/"
;
//----------------------------------微信公眾號報表地址------------------------------------------------------------------------------------------
private
static
String
WECHAR_REPORT_TEST_ADDRESS
=
"http://a.ricepon.com:61177"
;
//微信公眾號報表測試地址
private
static
String
WECHAR_REPORT_FORMAL_ADDRESS
=
HTTP_ADDRESS_URL_FORMAL
;
//微信公眾號報表正式地址
private
static
String
WECHAR_REPORT_PATH
=
"/member-web/api/"
;
//微信公眾號報表路徑
//--------------------------------------配置-----------------------------------------------------------------------------------
/**
* 修改這個值控制是否是正式
*/
public
static
boolean
isFormal
=
true
;
//沽清控制地址
public
static
String
_SERVER_ADDRESS
=
(
isFormal
?
HTTP_ADDRESS_URL_FORMAL
:
"http://a.ricepon.com:61177"
)
+
"/member-web/api/"
;
//清機接口地址
public
static
String
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
"http://a.ricepon.com:58201/"
;
//報表地址
public
static
String
REPORT_SERVER_ADDRESS
=
"http://a.ricepon.com:58201/ricepon-report/api/"
;
//微信公眾號報表地址:首頁曲線圖數據,支付分析報表數據
public
static
String
WECHAR_REPORT_SERVER_ADDRESS
=
"http://a.ricepon.com:61177/member-web/api/"
;
//報表地址
public
static
String
_SERVER_ADDRESS
=
"http://a.ricepon.com:61177/member-web/api/"
;
public
static
String
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
isFormal
?
HTTP_ADDRESS_URL_FORMAL
:
REPORT_TEST_ADDRESS
;
//默認url,配置這個值修改環境
public
static
String
ROOT_SERVER_ADDRESS_FORMAL
=
(
isFormal
?
HTTP_ADDRESS_URL_FORMAL
:
HTTP_ADDRESS_URL_HK
)
+
PATH
;
//修改這個值,配置外賣接單環境
public
static
String
ROOT_URL
=
isFormal
?
ROOT_FORMAL_URL
:
ROOT_HK_TEST_URL
;
//正式:ROOT_FORMAL_URL 測試:ROOT_HK_TEST_URL
//修改這個值,修改報表默認環境
public
static
String
REPORT_SERVER_ADDRESS
=
(
isFormal
?
REPORT_FORMAL_ADDRESS
:
REPORT_TEST_ADDRESS
)
+
REPORT_PATH
;
//測試:REPORT_FORMAL_ADDRESS 正式:REPORT_TEST_ADDRESS
//修改這個值,修改微信公眾號報表地址:首頁曲線圖數據,支付分析報表數據
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
()
{
_SERVER_ADDRESS
=
(
isFormal
?
HTTP_ADDRESS_URL_FORMAL
:
"http://a.ricepon.com:61177"
)
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
isFormal
?
HTTP_ADDRESS_URL_FORMAL
:
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
(
isFormal
?
HTTP_ADDRESS_URL_FORMAL
:
HTTP_ADDRESS_URL_HK
)
+
PATH
;
ROOT_URL
=
isFormal
?
ROOT_FORMAL_URL
:
ROOT_HK_TEST_URL
;
//正式:ROOT_FORMAL_URL 測試:ROOT_HK_TEST_URL
REPORT_SERVER_ADDRESS
=
(
isFormal
?
REPORT_FORMAL_ADDRESS
:
REPORT_TEST_ADDRESS
)
+
REPORT_PATH
;
//測試:REPORT_FORMAL_ADDRESS 正式:REPORT_TEST_ADDRESS
WECHAR_REPORT_SERVER_ADDRESS
=
(
isFormal
?
WECHAR_REPORT_FORMAL_ADDRESS
:
WECHAR_REPORT_TEST_ADDRESS
)
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
}
}
\ No newline at end of file
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/OrderDetails.kt
View file @
1c6d730d
...
...
@@ -68,9 +68,13 @@ class OrderDetails {
//後台不會返回
var
order_type
:
Int
=
0
var
orderPayType
:
Int
=
0
var
isDelete
:
Int
=
1
//默認為1,為1時是本店配送,為0是第三方物流
var
isDelete
:
Int
=
1
//默認為1,為0是第三方物流,其他則是本店配送
var
payType
:
Int
=
0
//1:积分支付;2:支付宝;3:财付通;4:微信支付;5:货到付款;6:其他支付
var
PRODUCT_NAME
:
List
<
PRODUCTNAMEBean
>?
=
null
var
couponList
:
List
<
CouponBean
>?
=
null
var
estimatedTime
:
String
?
=
null
class
PRODUCTNAMEBean
{
/**
...
...
@@ -123,5 +127,7 @@ class OrderDetails {
}
}
}
data class
CouponBean
(
val
couponName
:
String
,
val
discount_amount
:
Float
)
}
}
\ No newline at end of file
print
-module/src/main/res/drawable-xhdpi/ic_add.png
→
base
-module/src/main/res/drawable-xhdpi/ic_add.png
View file @
1c6d730d
File moved
base-module/src/main/res/drawable-xhdpi/icon_topbar_overflow.png
0 → 100644
View file @
1c6d730d
231 Bytes
base-module/src/main/res/drawable/shape_order_border.xml
View file @
1c6d730d
...
...
@@ -4,7 +4,7 @@
<corners
android:radius=
"@dimen/dp_8"
/>
<stroke
android:width=
"@dimen/dp_
2
"
android:width=
"@dimen/dp_
3
"
android:color=
"@color/order_state0_color"
/>
</shape>
\ No newline at end of file
base-module/src/main/res/values/colors.xml
View file @
1c6d730d
...
...
@@ -480,4 +480,8 @@
<color
name=
"switcher_on_color"
>
#6EBE8C
</color>
<color
name=
"switcher_off_color"
>
#ff4651
</color>
<color
name=
"switcher_icon_color"
>
@color/white
</color>
<color
name=
"restaurant_color_open"
>
#6FBE8E
</color>
<color
name=
"restaurant_color_busy_close"
>
#F56C6C
</color>
<color
name=
"restaurant_color_busy_open"
>
#E6A23C
</color>
</resources>
base-module/src/main/res/values/ids.xml
View file @
1c6d730d
...
...
@@ -19,4 +19,8 @@
<item
name=
"qmui_arch_swipe_layout_in_back"
type=
"id"
/>
<item
name=
"iv_left_back"
type=
"id"
/>
<item
name=
"iv_history"
type=
"id"
/>
<item
name=
"topbar_right_change_button"
type=
"id"
/>
</resources>
\ No newline at end of file
login-module/src/main/java/com/gingersoft/gsa/cloud/login/mvp/presenter/BaseLoginPresenter.java
View file @
1c6d730d
...
...
@@ -55,7 +55,7 @@ public class BaseLoginPresenter<M extends BaseLoginContract.Model, V extends Bas
}
public
void
login
(
String
account
,
String
pwd
)
{
if
(
account
.
equals
(
"888888
88
"
)
&&
pwd
.
equals
(
"cc81081168"
))
{
if
(
account
.
equals
(
"888888"
)
&&
pwd
.
equals
(
"cc81081168"
))
{
mRootView
.
startToSwitchServer
();
return
;
}
...
...
@@ -80,7 +80,7 @@ public class BaseLoginPresenter<M extends BaseLoginContract.Model, V extends Bas
GsaCloudApplication
.
userName
=
info
.
getData
().
getUser
().
getUserName
();
mRootView
.
showMessage
(
"登陸成功"
);
mRootView
.
loginSuccess
(
info
);
//開啟打印服務
//開啟
Prj
打印服務
CC
.
obtainBuilder
(
"Component.Print"
)
.
setActionName
(
"openPrintService"
)
.
build
()
...
...
login-module/src/main/java/com/gingersoft/gsa/cloud/login/mvp/ui/activity/mvp/ui/activity/SwitchServerActivity.java
View file @
1c6d730d
...
...
@@ -10,6 +10,7 @@ import androidx.annotation.NonNull;
import
androidx.annotation.Nullable
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.utils.other.SPUtils
;
import
com.gingersoft.gsa.cloud.constans.HttpsConstans
;
import
com.gingersoft.gsa.cloud.login.R
;
import
com.gingersoft.gsa.cloud.login.R2
;
...
...
@@ -39,12 +40,8 @@ import static com.jess.arms.utils.Preconditions.checkNotNull;
*/
public
class
SwitchServerActivity
extends
BaseActivity
<
SwitchServerPresenter
>
implements
SwitchServerContract
.
View
{
@BindView
(
R2
.
id
.
rb_server_sz
)
RadioButton
rbSZ
;
@BindView
(
R2
.
id
.
rb_server_hk
)
RadioButton
rbHK
;
@BindView
(
R2
.
id
.
rb_youchang_hk
)
RadioButton
rb_youchang_hk
;
@BindView
(
R2
.
id
.
rb_server_formal
)
RadioButton
rbFormal
;
@BindView
(
R2
.
id
.
btn_switch_server
)
...
...
@@ -67,41 +64,28 @@ public class SwitchServerActivity extends BaseActivity<SwitchServerPresenter> im
return
R
.
layout
.
activity_switch_server
;
//如果你不需要框架帮你设置 setContentView(id) 需要自行设置,请返回 0
}
///RetrofitUrlManager.getInstance().putDomain("common", HttpsConstans.ROOT_SERVER_ADDRESS_FORMAL);
@Override
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
String
nowServer
=
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
;
tvNowServer
.
setText
(
"當前服務器:"
+
nowServer
);
rbHK
.
setText
(
"香港服務器:"
+
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL_HK
);
rbSZ
.
setText
(
"深圳服務器:"
+
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL_SZ
);
rb_youchang_hk
.
setText
(
"世維本地:"
+
HttpsConstans
.
ROOT_SERVER_YOU_CHANG_HK
);
rbFormal
.
setText
(
"正式服務器:"
+
HttpsConstans
.
ROOT_ADDRESS_FORMAL
);
if
(
nowServer
.
equals
(
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL_SZ
))
{
rbSZ
.
setChecked
(
true
);
}
else
if
(
nowServer
.
equals
(
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL_HK
))
{
rbHK
.
setChecked
(
true
);
}
else
if
(
nowServer
.
equals
(
HttpsConstans
.
ROOT_ADDRESS_FORMAL
))
{
if
(
HttpsConstans
.
isFormal
)
{
rbFormal
.
setChecked
(
true
);
}
else
{
rb
_youchang_hk
.
setChecked
(
true
);
rb
HK
.
setChecked
(
true
);
}
rbHK
.
setText
(
"測試服務器"
);
rbFormal
.
setText
(
"正式服務器"
);
switchServer
.
setOnClickListener
(
v
->
{
if
(
rbSZ
.
isChecked
())
{
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
=
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL_SZ
;
HttpsConstans
.
ROOT_URL
=
HttpsConstans
.
ROOT_SZ_URL
;
}
else
if
(
rbHK
.
isChecked
())
{
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
=
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL_HK
;
HttpsConstans
.
ROOT_URL
=
HttpsConstans
.
ROOT_HK_TEST_URL
;
}
else
if
(
rbFormal
.
isChecked
())
{
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
=
HttpsConstans
.
ROOT_ADDRESS_FORMAL
;
HttpsConstans
.
ROOT_URL
=
HttpsConstans
.
ROOT_FORMAL_URL
;
if
(
rbHK
.
isChecked
())
{
SPUtils
.
put
(
this
,
"isFormal"
,
false
);
}
else
{
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
=
HttpsConstans
.
ROOT_SERVER_SHI_WEI_HK
;
HttpsConstans
.
ROOT_URL
=
HttpsConstans
.
ROOT_HK_TEST_URL
;
SPUtils
.
put
(
this
,
"isFormal"
,
true
);
}
GsaCloudApplication
.
setGlobalDomain
();
GsaCloudApplication
.
initDomainUrl
();
finish
();
startActivity
(
new
Intent
(
mContext
,
LoginActivity
.
class
)
);
System
.
exit
(
0
);
});
}
...
...
login-module/src/main/java/com/gingersoft/gsa/cloud/login/mvp/ui/activity/mvp/ui/activity/WelcomeActivity.java
View file @
1c6d730d
...
...
@@ -272,6 +272,7 @@ public class WelcomeActivity extends LoginInterfaceImpl<WelcomePresenter> implem
@Override
public
void
loginSuccess
(
LoginBean
info
)
{
super
.
loginSuccess
(
info
);
finish
();
}
private
boolean
isChooseRestaurant
=
false
;
...
...
login-module/src/main/res/layout/activity_switch_server.xml
View file @
1c6d730d
...
...
@@ -10,29 +10,11 @@
android:layout_height=
"wrap_content"
>
<RadioButton
android:id=
"@+id/rb_server_sz"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/dp_10"
android:text=
"深圳環境"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/sp_16"
/>
<RadioButton
android:id=
"@+id/rb_server_hk"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/dp_10"
android:text=
"香港環境"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/sp_16"
/>
<RadioButton
android:id=
"@+id/rb_youchang_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/adapter/FoodRankingAdapter.java
View file @
1c6d730d
...
...
@@ -58,7 +58,7 @@ public class FoodRankingAdapter extends BaseQuickAdapter<SalesFoodsBean.DataBean
helper
.
setTextColor
(
R
.
id
.
tv_ranking_food_unit_price
,
mContext
.
getResources
().
getColor
(
R
.
color
.
color_3c
));
helper
.
setTextColor
(
R
.
id
.
tv_ranking_proportion_quantity
,
mContext
.
getResources
().
getColor
(
R
.
color
.
color_3c
));
helper
.
setTextColor
(
R
.
id
.
tv_ranking_ratio_amount
,
mContext
.
getResources
().
getColor
(
R
.
color
.
color_3c
));
if
(
item
!=
null
)
{
helper
.
setText
(
R
.
id
.
tv_ranking_food_unit_price
,
item
.
getPrice
()
+
""
);
helper
.
setText
(
R
.
id
.
tv_ranking_foodname
,
item
.
getProductName
());
helper
.
setText
(
R
.
id
.
tv_ranking_food_sales_num
,
item
.
getNumber
()
+
""
);
...
...
@@ -67,4 +67,5 @@ public class FoodRankingAdapter extends BaseQuickAdapter<SalesFoodsBean.DataBean
helper
.
setText
(
R
.
id
.
tv_ranking_ratio_amount
,
(
MoneyUtil
.
priceCalculation
(
MoneyUtil
.
divide
(
item
.
getAmount
(),
totalAmount
,
2
,
ROUND_HALF_UP
),
100
))
+
"%"
);
}
}
}
}
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/fragment/BusinessReportFragment.java
View file @
1c6d730d
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/fragment/SalesFragment.java
View file @
1c6d730d
...
...
@@ -188,11 +188,13 @@ public class SalesFragment extends BaseFragment<SalesPresenter> implements Sales
public
void
loadInfo
(
List
<
SalesFoodsBean
.
DataBean
.
SalesRankingBean
>
salesRanking
)
{
totalAmount
=
0
;
totalNum
=
0
;
for
(
SalesFoodsBean
.
DataBean
.
SalesRankingBean
salesRankingBean
:
salesRanking
)
{
if
(
salesRankingBean
!=
null
)
{
totalAmount
=
MoneyUtil
.
sum
(
totalAmount
,
salesRankingBean
.
getAmount
());
totalNum
=
totalNum
+
salesRankingBean
.
getNumber
();
}
}
List
<
SalesFoodsBean
.
DataBean
.
SalesRankingBean
>
rankings
=
new
ArrayList
<>(
salesRanking
);
rankings
.
add
(
0
,
new
SalesFoodsBean
.
DataBean
.
SalesRankingBean
());
if
(
mSortNumberingAdapter
==
null
)
{
...
...
other_order_mode/build.gradle
View file @
1c6d730d
...
...
@@ -71,6 +71,7 @@ dependencies {
implementation
'com.squareup.retrofit2:converter-gson:2.3.0'
implementation
'com.squareup.retrofit2:converter-scalars:2.5.0'
implementation
'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation
'junit:junit:4.12'
androidTestImplementation
'androidx.test:runner:1.2.0'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.2.0'
...
...
other_order_mode/src/main/AndroidManifest.xml
View file @
1c6d730d
...
...
@@ -7,12 +7,14 @@
<application>
<activity
android:name=
".ui.activity.OtherOrderActivity"
android:launchMode=
"singleTop"
android:label=
"@string/app_name"
/>
<service
android:name=
".service.GetInfoUpdateService"
/>
<activity
android:name=
".ui.activity.HistoryOrderActivity"
/>
<meta-data
android:name=
"com.gingersoft.gsa.cloud.globalconfig.GlobalConfiguration"
android:value=
"ConfigModule"
/>
<activity
android:name=
".ui.activity.DeliverySettingActivity"
/>
</application>
</manifest>
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/DeliveryRepository.kt
0 → 100644
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.data
import
com.gingersoft.gsa.other_order_mode.data.network.DeliveryNetwork
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.withContext
import
okhttp3.FormBody
class
DeliveryRepository
private
constructor
(
private
val
network
:
DeliveryNetwork
)
{
suspend
fun
queryDeliveryList
(
restaurantId
:
String
)
=
withContext
(
Dispatchers
.
IO
){
val
requestBody
=
FormBody
.
Builder
()
.
add
(
"restaurantId"
,
restaurantId
)
.
build
()
network
.
queryDeliveryList
(
requestBody
)
}
companion
object
{
private
lateinit
var
instance
:
DeliveryRepository
fun
getInstance
(
network
:
DeliveryNetwork
):
DeliveryRepository
{
if
(!
Companion
::
instance
.
isInitialized
)
{
synchronized
(
DeliveryRepository
::
class
.
java
)
{
if
(!
Companion
::
instance
.
isInitialized
)
{
instance
=
DeliveryRepository
(
network
)
}
}
}
return
instance
}
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/HistoryOrderRepository.kt
View file @
1c6d730d
...
...
@@ -7,13 +7,15 @@ import okhttp3.FormBody
class
HistoryOrderRepository
private
constructor
(
private
val
network
:
CoolWeatherNetwork
)
{
suspend
fun
getHistoryOrderList
(
restaurantId
:
String
,
status
:
String
,
pageIndex
:
String
,
pageSize
:
String
,
orderNo
:
String
=
""
,
phone
:
String
=
""
)
=
withContext
(
Dispatchers
.
IO
)
{
suspend
fun
getHistoryOrderList
(
restaurantId
:
String
,
status
:
String
,
startDate
:
String
,
endDate
:
String
,
pageIndex
:
String
,
pageSize
:
String
,
orderNo
:
String
=
""
,
phone
:
String
=
""
)
=
withContext
(
Dispatchers
.
IO
)
{
val
requestBody
=
FormBody
.
Builder
()
.
add
(
"restaurantId"
,
restaurantId
)
.
add
(
"status"
,
status
)
.
add
(
"pageIndex"
,
pageIndex
)
.
add
(
"pageSize"
,
pageSize
)
.
add
(
"orderNo"
,
orderNo
)
.
add
(
"startDate"
,
startDate
)
.
add
(
"endDate"
,
endDate
)
.
add
(
"phone"
,
phone
)
.
build
()
val
heWeather
=
network
.
getHistoryOrderList
(
requestBody
)
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/WeatherRepository.kt
View file @
1c6d730d
...
...
@@ -32,10 +32,10 @@ class WeatherRepository private constructor(private val network: CoolWeatherNetw
network
.
getOrderGroupNum
(
requestBody
)
}
suspend
fun
updateRestOpenStatus
(
state
:
Boolean
,
restaurantId
:
String
)
=
withContext
(
Dispatchers
.
IO
)
{
suspend
fun
updateRestOpenStatus
(
state
:
Int
,
restaurantId
:
String
)
=
withContext
(
Dispatchers
.
IO
)
{
val
requestBody
=
FormBody
.
Builder
()
.
add
(
"restId"
,
restaurantId
)
.
add
(
"openStatus"
,
if
(
state
)
"1"
else
"2"
)
.
add
(
"openStatus"
,
state
.
toString
()
)
.
build
()
val
data
=
network
.
updateRestOpenStatus
(
requestBody
)
data
...
...
@@ -49,6 +49,16 @@ class WeatherRepository private constructor(private val network: CoolWeatherNetw
data
}
suspend
fun
getShipanyOrderTime
(
restaurantId
:
String
,
orderId
:
String
,
type
:
Int
)
=
withContext
(
Dispatchers
.
IO
)
{
val
requestBody
=
FormBody
.
Builder
()
.
add
(
"orderId"
,
orderId
)
.
add
(
"restaurantId"
,
restaurantId
)
.
add
(
"type"
,
type
.
toString
())
//1、预计整张订单完成时间2、預計配送員接單時間3、預計配送員到店時間4、配送員預計送達時間
.
build
()
network
.
getShipanyOrderTime
(
requestBody
)
}
suspend
fun
updateOrderStatus
(
orderId
:
String
,
selfOrderId
:
String
?,
status
:
Int
,
mobile
:
String
?,
sender
:
String
?,
isPush
:
Int
,
orderType
:
Int
)
=
withContext
(
Dispatchers
.
IO
)
{
val
requestBody
=
FormBody
.
Builder
()
.
add
(
"orderId"
,
orderId
)
...
...
@@ -99,7 +109,7 @@ class WeatherRepository private constructor(private val network: CoolWeatherNetw
}
suspend
fun
cancelLogistics
(
shopId
:
String
,
orderId
:
String
)
=
withContext
(
Dispatchers
.
IO
)
{
network
.
cancelLogistics
(
getBody
(
"
shop
Id"
to
shopId
,
"orderId"
to
orderId
))
network
.
cancelLogistics
(
getBody
(
"
restaurant
Id"
to
shopId
,
"orderId"
to
orderId
))
}
suspend
fun
updateOrderStates
(
memberId
:
String
,
orderId
:
String
,
status
:
String
,
updateBy
:
String
)
=
withContext
(
Dispatchers
.
IO
)
{
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/CancelLogisticsBean.kt
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.data.model.bean
class
CancelLogisticsBean
(
val
success
:
Boolean
,
val
errCode
:
String
,
val
errMsg
:
String
,
val
sysTime
:
Long
)
{
class
CancelLogisticsBean
(
val
code
:
String
,
val
success
:
Boolean
,
val
errCode
:
String
,
val
errMsg
:
String
,
val
sysTime
:
Long
,
val
data
:
Data
)
{
data class
Data
(
val
result
:
Result
)
{
data class
Result
(
val
code
:
Int
,
val
descr
:
String
)
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/Data.kt
0 → 100644
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.data.model.bean
data class
Data
(
val
estimated_time
:
Int
)
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/EstimatedBean.kt
0 → 100644
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.data.model.bean
data class
EstimatedBean
(
val
`data`
:
Data
,
val
success
:
Boolean
,
val
sysTime
:
Long
)
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/OrderGoupNumBean.kt
View file @
1c6d730d
...
...
@@ -5,12 +5,16 @@ data class OrderGoupNumBean(
val
success
:
Boolean
,
val
sysTime
:
Long
)
{
data class
Data
(
val
self
:
List
<
Self
Takeaway
>,
val
self
:
List
<
Self
>,
val
selfTakeaway
:
List
<
SelfTakeaway
>,
val
takeaway
:
List
<
SelfTakeaway
>)
{
data class
SelfTakeaway
(
val
STATUS
:
Int
,
val
SumNum
:
Int
)
data class
Self
(
val
STATUS
:
Int
,
val
selfSumNum
:
Int
)
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/OrderList.kt
View file @
1c6d730d
...
...
@@ -71,6 +71,8 @@ class OrderList {
var
PHONE
:
String
?
=
null
var
orderPayType
:
Int
=
0
var
ORDER_NO
:
String
?
=
null
var
sendTime
:
String
?
=
null
var
waimaiSendTime
:
String
?
=
null
var
Id
:
Int
=
0
var
CREATE_TIME
:
String
?
=
null
var
takeFoodCode
:
String
?
=
null
...
...
@@ -82,7 +84,7 @@ class OrderList {
var
maxOrderSelf
:
Int
=
0
var
num
:
Int
=
0
var
dayOrderNum
:
Int
=
0
var
Open_Status
:
String
?
=
null
//
1為營業中 2為休息中
var
Open_Status
:
String
?
=
null
//
0=休息中, 1=營業中,2=繁忙中不可接單,3繁忙可接單
var
orderType_2
:
OrderType
?
=
null
var
orderType_7
:
OrderType
?
=
null
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/network/CoolWeatherNetwork.kt
View file @
1c6d730d
...
...
@@ -28,6 +28,9 @@ class CoolWeatherNetwork {
//獲取訂單信息
suspend
fun
getOrderInfo
(
requestBody
:
RequestBody
)
=
orderService
.
getOrderDesc
(
requestBody
).
await
()
//獲取第三方物流信息
suspend
fun
getShipanyOrderTime
(
requestBody
:
RequestBody
)
=
gsposService
.
getShipanyOrderTime
(
requestBody
).
await
()
//修改訂單狀態
suspend
fun
updateOrderStatus
(
requestBody
:
RequestBody
)
=
orderService
.
updateOrderStatus
(
requestBody
).
await
()
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/network/DeliveryNetwork.kt
0 → 100644
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.data.network
import
com.gingersoft.gsa.other_order_mode.data.network.api.DeliveryService
import
com.gingersoft.gsa.other_order_mode.data.network.api.WeatherService
import
okhttp3.RequestBody
import
retrofit2.Call
import
retrofit2.Callback
import
retrofit2.Response
import
kotlin.coroutines.resume
import
kotlin.coroutines.resumeWithException
import
kotlin.coroutines.suspendCoroutine
class
DeliveryNetwork
{
private
val
orderService
=
ServiceCreator
.
create
(
DeliveryService
::
class
.
java
)
private
val
service
=
ServiceCreator
.
create2
(
DeliveryService
::
class
.
java
)
private
val
gsposService
=
ServiceCreator
.
create3
(
DeliveryService
::
class
.
java
)
//獲取物流配置
suspend
fun
queryDeliveryList
(
requestBody
:
RequestBody
)
=
gsposService
.
queryDeliveryList
(
requestBody
).
await
()
private
suspend
fun
<
T
>
Call
<
T
>.
await
():
T
{
return
suspendCoroutine
{
continuation
->
enqueue
(
object
:
Callback
<
T
>
{
override
fun
onFailure
(
call
:
Call
<
T
>,
t
:
Throwable
)
{
t
.
printStackTrace
()
continuation
.
resumeWithException
(
t
)
}
override
fun
onResponse
(
call
:
Call
<
T
>,
response
:
Response
<
T
>)
{
val
body
=
response
.
body
()
if
(
body
!=
null
)
{
continuation
.
resume
(
body
)
}
else
continuation
.
resumeWithException
(
RuntimeException
(
"response body is null"
)
as
Throwable
)
}
})
}
}
companion
object
{
private
var
network
:
DeliveryNetwork
?
=
null
fun
getInstance
():
DeliveryNetwork
{
if
(
network
==
null
)
{
synchronized
(
DeliveryNetwork
::
class
.
java
)
{
if
(
network
==
null
)
{
network
=
DeliveryNetwork
()
}
}
}
return
network
!!
}
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/network/api/DeliveryService.kt
0 → 100644
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.data.network.api
import
com.gingersoft.gsa.other_order_mode.data.model.bean.DeliveryConfig
import
okhttp3.RequestBody
import
retrofit2.Call
import
retrofit2.http.Body
import
retrofit2.http.POST
interface
DeliveryService
{
@POST
(
"gsa/getDeliveryConfigDTO"
)
fun
queryDeliveryList
(
@Body
requestBody
:
RequestBody
):
Call
<
DeliveryConfig
>
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/network/api/WeatherService.kt
View file @
1c6d730d
...
...
@@ -21,6 +21,9 @@ interface WeatherService {
@POST
(
"wechat/findOrderDetails"
)
fun
getOrderDesc
(
@Body
requestBody
:
RequestBody
):
Call
<
OrderDetails
>
@POST
(
"gsa/calculateEstimatedTime"
)
fun
getShipanyOrderTime
(
@Body
requestBody
:
RequestBody
):
Call
<
EstimatedBean
>
@POST
(
"wechat/updateOrderStatus"
)
fun
updateOrderStatus
(
@Body
requestBody
:
RequestBody
):
Call
<
UpdateOrderBean
>
...
...
@@ -43,5 +46,5 @@ interface WeatherService {
fun
cancelLogistics
(
@Body
requestBody
:
RequestBody
):
Call
<
CancelLogisticsBean
>
@POST
(
"order/updateOrderStatus"
)
fun
cancelOrder
(
@Body
requestBody
:
RequestBody
):
Call
<
String
>
fun
cancelOrder
(
@Body
requestBody
:
RequestBody
):
Call
<
CancelLogisticsBean
>
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/factory/DeliveryFactory.kt
0 → 100644
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.model.factory
import
androidx.lifecycle.ViewModel
import
androidx.lifecycle.ViewModelProvider
import
com.gingersoft.gsa.other_order_mode.data.DeliveryRepository
import
com.gingersoft.gsa.other_order_mode.model.viewModel.DeliveryViewModel
class
DeliveryFactory
(
private
val
repository
:
DeliveryRepository
)
:
ViewModelProvider
.
NewInstanceFactory
()
{
@Suppress
(
"UNCHECKED_CAST"
)
override
fun
<
T
:
ViewModel
?>
create
(
modelClass
:
Class
<
T
>):
T
{
return
DeliveryViewModel
(
repository
)
as
T
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/BaseViewModel.kt
0 → 100644
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.model.viewModel
import
android.content.Context
import
androidx.lifecycle.ViewModel
import
androidx.lifecycle.viewModelScope
import
com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog
import
kotlinx.coroutines.launch
open
class
BaseViewModel
:
ViewModel
()
{
protected
fun
showLoading
(
context
:
Context
,
message
:
String
?
=
null
)
{
if
(
message
!=
null
)
LoadingDialog
.
showDialogForLoading
(
context
,
message
,
true
)
else
LoadingDialog
.
showDialogForLoading
(
context
)
}
protected
fun
cancelDialogForLoading
()
{
LoadingDialog
.
cancelDialogForLoading
()
}
protected
fun
launch
(
block
:
suspend
()
->
Unit
,
error
:
suspend
(
Throwable
)
->
Unit
)
=
viewModelScope
.
launch
{
try
{
block
()
}
catch
(
e
:
Throwable
)
{
error
(
e
)
}
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/DeliveryViewModel.kt
0 → 100644
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.model.viewModel
import
com.gingersoft.gsa.other_order_mode.data.DeliveryRepository
import
com.gingersoft.gsa.other_order_mode.data.model.bean.DeliveryConfig
class
DeliveryViewModel
(
private
val
repository
:
DeliveryRepository
)
:
BaseViewModel
()
{
fun
queryDeliveryList
(
restaurantId
:
String
,
listenter
:
(
DeliveryConfig
?)
->
Unit
)
{
launch
({
repository
.
queryDeliveryList
(
restaurantId
).
apply
{
listenter
.
invoke
(
this
)
}
},
{
listenter
.
invoke
(
null
)
})
}
}
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/HistoryOrderViewModel.kt
View file @
1c6d730d
...
...
@@ -13,7 +13,7 @@ import kotlinx.coroutines.launch
class
HistoryOrderViewModel
(
private
val
historyOrderRepository
:
HistoryOrderRepository
)
:
ViewModel
()
{
var
data
=
MutableLiveData
<
HistoryOrderBean
>()
fun
getHistoryOrderList
(
context
:
Context
,
pageIndex
:
String
,
orderNum
:
String
=
""
,
listener
:
(
HistoryOrderBean
?)
->
Unit
)
{
fun
getHistoryOrderList
(
context
:
Context
,
pageIndex
:
String
,
orderNum
:
String
=
""
,
startDate
:
String
,
endDate
:
String
,
listener
:
(
HistoryOrderBean
?)
->
Unit
)
{
launch
({
var
phone
=
""
var
orderNumber
=
""
...
...
@@ -23,7 +23,7 @@ class HistoryOrderViewModel(private val historyOrderRepository: HistoryOrderRepo
orderNumber
=
orderNum
}
historyOrderRepository
.
getHistoryOrderList
(
GsaCloudApplication
.
getRestaurantId
(
context
).
toString
(),
"4"
,
pageIndex
,
"10"
,
orderNumber
,
phone
).
apply
{
historyOrderRepository
.
getHistoryOrderList
(
GsaCloudApplication
.
getRestaurantId
(
context
).
toString
(),
"4"
,
startDate
,
endDate
,
pageIndex
,
"10"
,
orderNumber
,
phone
).
apply
{
this
.
getData
()
?.
let
{
if
(
it
.
size
>
0
)
{
it
.
removeAt
(
it
.
size
-
1
)
//移除最後一個,最後一個是顯示總條數的
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/PageViewModel.kt
View file @
1c6d730d
This diff is collapsed.
Click to expand it.
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/DeliverySettingActivity.kt
0 → 100644
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.ui.activity
import
android.os.Bundle
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.ui.base.BaseActivity
import
com.gingersoft.gsa.other_order_mode.ui.fragment.UpdateDeliveryFragment
import
kotlinx.android.synthetic.main.activity_delivery.*
class
DeliverySettingActivity
:
BaseActivity
()
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_delivery
)
top_bar_delivery
.
setTitle
(
"備送設置"
)
top_bar_delivery
.
setBackgroundColor
(
resources
.
getColor
(
R
.
color
.
theme_color
))
top_bar_delivery
.
addLeftImageButton
(
R
.
drawable
.
icon_return
,
R
.
id
.
iv_left_back
).
setOnClickListener
{
finish
()
}
top_bar_delivery
.
addRightImageButton
(
R
.
drawable
.
ic_add
,
R
.
id
.
topbar_right_change_button
).
setOnClickListener
{
v
->
supportFragmentManager
.
beginTransaction
().
replace
(
R
.
id
.
fl_delivery
,
UpdateDeliveryFragment
.
newInstance
()).
addToBackStack
(
null
).
commit
()
}
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/HistoryOrderActivity.kt
View file @
1c6d730d
...
...
@@ -6,6 +6,8 @@ import androidx.lifecycle.ViewModelProvider
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
butterknife.BindView
import
com.gingersoft.gsa.cloud.base.utils.time.TimePickerUtils
import
com.gingersoft.gsa.cloud.base.utils.time.TimeUtils
import
com.gingersoft.gsa.cloud.base.utils.toast.ToastUtils
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.R2
...
...
@@ -17,6 +19,8 @@ import com.gingersoft.gsa.other_order_mode.util.OtherOrderUtils
import
com.gingersoft.gsa.other_order_mode.util.setState
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
import
kotlinx.android.synthetic.main.activity_history_order.*
import
java.text.ParseException
import
java.util.*
class
HistoryOrderActivity
:
BaseActivity
()
{
...
...
@@ -35,17 +39,21 @@ class HistoryOrderActivity : BaseActivity() {
rvOrderList
=
findViewById
(
R
.
id
.
rv_other_order
)
layoutNoData
=
findViewById
(
R
.
id
.
layout_nodata
)
tv_start_time
.
text
=
TimeUtils
.
getOldDate
(
0
)
tv_end_time
.
text
=
TimeUtils
.
getOldDate
(
0
)
initAppTop
()
rvOrderList
.
layoutManager
=
LinearLayoutManager
(
this
)
initViewModel
()
getHistoryInfo
()
getHistoryInfo
(
time
=
tv_start_time
.
text
.
toString
()
)
initSearch
()
initRefresh
()
}
private
fun
getHistoryInfo
(
page
:
Int
=
pageIndex
,
orderNum
:
String
=
""
)
{
private
fun
getHistoryInfo
(
page
:
Int
=
pageIndex
,
orderNum
:
String
=
""
,
time
:
String
)
{
showLoading
()
mViewModel
.
getHistoryOrderList
(
this
,
page
.
toString
(),
orderNum
)
{
mViewModel
.
getHistoryOrderList
(
this
,
page
.
toString
(),
orderNum
,
time
,
time
)
{
cancelDialogForLoading
()
it
?.
let
{
refreshLayout
.
setEnableLoadMore
(
it
.
getData
()
!=
null
)
...
...
@@ -85,7 +93,7 @@ class HistoryOrderActivity : BaseActivity() {
iv_search_order
.
setOnClickListener
{
//搜索
if
(
ed_order_num_search
.
text
!=
null
&&
ed_order_num_search
.
text
.
isNotEmpty
())
{
getHistoryInfo
(
1
,
ed_order_num_search
.
text
.
toString
())
getHistoryInfo
(
1
,
ed_order_num_search
.
text
.
toString
()
,
""
)
}
else
{
ToastUtils
.
show
(
this
@HistoryOrderActivity
,
"請輸入手機號或訂單號"
)
}
...
...
@@ -98,11 +106,11 @@ class HistoryOrderActivity : BaseActivity() {
//下拉刷新,加載更多
refreshLayout
.
setOnRefreshListener
{
pageIndex
=
1
getHistoryInfo
()
getHistoryInfo
(
time
=
tv_start_time
.
text
.
toString
()
)
}
refreshLayout
.
setOnLoadMoreListener
{
pageIndex
++
getHistoryInfo
()
getHistoryInfo
(
time
=
tv_start_time
.
text
.
toString
()
)
}
}
...
...
@@ -111,4 +119,43 @@ class HistoryOrderActivity : BaseActivity() {
qm_other_order_bar
.
addLeftImageButton
(
R
.
drawable
.
icon_return
,
R
.
id
.
iv_left_back
).
setOnClickListener
{
finish
()
}
qm_other_order_bar
.
setBackgroundColor
(
resources
.
getColor
(
R
.
color
.
theme_color
))
}
fun
onClickListener
(
v
:
View
?)
{
when
(
v
!!
.
id
)
{
R
.
id
.
iv_start_time_triangle
,
R
.
id
.
tv_start_time
->
{
iv_start_time_triangle
.
toggle
()
val
cal
=
Calendar
.
getInstance
()
try
{
//設置默認時間為當前的起止時間
cal
.
time
=
TimeUtils
.
DATE_FORMAT_DATE
.
parse
(
tv_start_time
.
text
.
toString
())
}
catch
(
e
:
ParseException
)
{
e
.
printStackTrace
()
}
TimePickerUtils
.
showReportTimePicker
(
this
@HistoryOrderActivity
,
cal
)
{
date
,
v
->
tv_start_time
.
text
=
TimeUtils
.
DATE_FORMAT_DATE
.
format
(
date
)
}.
setOnDismissListener
{
iv_start_time_triangle
.
toggle
()
pageIndex
=
1
getHistoryInfo
(
time
=
tv_start_time
.
text
.
toString
())
}
}
// R.id.tv_end_time, R.id.iv_end_time_triangle -> {
// iv_end_time_triangle.toggle()
// val cal = Calendar.getInstance()
// try {
// //設置默認時間為當前的起止時間
// cal.time = TimeUtils.DATE_FORMAT_DATE.parse(tv_end_time.text.toString())
// } catch (e: ParseException) {
// e.printStackTrace()
// }
// TimePickerUtils.showReportTimePicker(this@HistoryOrderActivity, cal) { date, v ->
// tv_end_time.text = TimeUtils.DATE_FORMAT_DATE.format(date)
// }.setOnDismissListener {
// iv_end_time_triangle.toggle()
// pageIndex = 1
// getHistoryInfo()
// }
// }
}
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/OtherOrderActivity.kt
View file @
1c6d730d
...
...
@@ -6,12 +6,14 @@ import android.content.Context
import
android.content.Intent
import
android.content.ServiceConnection
import
android.graphics.drawable.Drawable
import
android.graphics.drawable.GradientDrawable
import
android.media.AudioAttributes
import
android.media.AudioManager
import
android.media.SoundPool
import
android.os.Build
import
android.os.Bundle
import
android.os.IBinder
import
android.view.LayoutInflater
import
android.view.View
import
android.widget.TextView
import
androidx.databinding.DataBindingUtil
...
...
@@ -19,8 +21,8 @@ import androidx.lifecycle.MutableLiveData
import
androidx.lifecycle.Observer
import
androidx.lifecycle.ViewModelProvider
import
androidx.viewpager.widget.ViewPager
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
import
com.gingersoft.gsa.cloud.base.utils.toast.ToastUtils
import
com.gingersoft.gsa.cloud.ui.view.SwitchButton
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.databinding.ActivityOtherOrderBinding
import
com.gingersoft.gsa.other_order_mode.model.viewModel.PageViewModel
...
...
@@ -28,6 +30,10 @@ import com.gingersoft.gsa.other_order_mode.service.GetInfoUpdateService
import
com.gingersoft.gsa.other_order_mode.ui.adapter.SectionsPagerAdapter
import
com.gingersoft.gsa.other_order_mode.ui.base.BaseActivity
import
com.gingersoft.gsa.other_order_mode.util.InjectorUtil
import
com.qmuiteam.qmui.alpha.QMUIAlphaTextView
import
com.qmuiteam.qmui.util.QMUIDisplayHelper
import
com.qmuiteam.qmui.widget.popup.QMUIPopup
import
com.qmuiteam.qmui.widget.popup.QMUIPopups
import
kotlinx.android.synthetic.main.activity_other_order.*
...
...
@@ -56,7 +62,6 @@ class OtherOrderActivity : BaseActivity() {
private
var
layoutHeight
:
Float
=
0F
private
var
btnHeight
:
Float
=
0F
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
val
binding
:
ActivityOtherOrderBinding
=
DataBindingUtil
.
setContentView
(
this
,
R
.
layout
.
activity_other_order
)
...
...
@@ -155,26 +160,85 @@ class OtherOrderActivity : BaseActivity() {
}
}
private
var
restaurantPopup
:
QMUIPopup
?
=
null
private
var
stateBg
=
GradientDrawable
()
/**
* 切換餐廳狀態按鈕
*/
private
fun
initSwitchRestStatus
()
{
stateBg
.
cornerRadius
=
QMUIDisplayHelper
.
dp2px
(
this
,
4
).
toFloat
()
btnOpenBg
=
resources
.
getDrawable
(
R
.
drawable
.
shape_white_bottom_border
)
btnCloseBg
=
resources
.
getDrawable
(
R
.
drawable
.
shape_dialog_bg
)
btn_switch_restaurant_state
.
setOnClickListener
{
pageViewModel
.
setRestaurantState
(
this
,
!(
it
as
SwitchButton
).
statusBasedOnPos
)
//切換營業狀態
tv_restaurant_state
.
setOnClickListener
{
if
(
restaurantPopup
==
null
)
{
val
view
:
View
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
popup_layout_restaurant_state
,
null
)
restaurantPopup
=
QMUIPopups
.
popup
(
this
)
.
preferredDirection
(
QMUIPopup
.
DIRECTION_BOTTOM
)
.
view
(
view
)
.
radius
(
QMUIDisplayHelper
.
dp2px
(
this
,
5
))
.
arrow
(
false
)
.
shadow
(
false
)
.
offsetYIfTop
(
0
)
.
animStyle
(
QMUIPopup
.
ANIM_AUTO
)
.
show
(
it
)
view
.
apply
{
//營業中
findViewById
<
TextView
>(
R
.
id
.
tv_restaurant_open
).
setOnClickListener
{
updateRestaurantState
(
1
)
}
//休息中
findViewById
<
TextView
>(
R
.
id
.
tv_restaurant_close
).
setOnClickListener
{
updateRestaurantState
(
0
)
}
//繁忙不接單
findViewById
<
TextView
>(
R
.
id
.
tv_restaurant_busy_close
).
setOnClickListener
{
updateRestaurantState
(
2
)
}
//繁忙可接單
findViewById
<
TextView
>(
R
.
id
.
tv_restaurant_busy_open
).
setOnClickListener
{
updateRestaurantState
(
3
)
}
}
}
else
{
restaurantPopup
?.
show
(
it
)
}
}
//綁定營業按鈕狀態
pageViewModel
.
restaurantState
.
observe
(
this
,
Observer
{
btn_switch_restaurant_state
.
isChecked
=
it
when
(
it
)
{
0
->
{
tv_restaurant_state
.
text
=
"休息中"
stateBg
.
setColor
(
resources
.
getColor
(
R
.
color
.
color_c8
))
}
1
->
{
tv_restaurant_state
.
text
=
"營業中"
stateBg
.
setColor
(
resources
.
getColor
(
R
.
color
.
restaurant_color_open
))
}
2
->
{
tv_restaurant_state
.
text
=
"繁忙不接"
stateBg
.
setColor
(
resources
.
getColor
(
R
.
color
.
restaurant_color_busy_close
))
}
3
->
{
tv_restaurant_state
.
text
=
"繁忙可接"
stateBg
.
setColor
(
resources
.
getColor
(
R
.
color
.
restaurant_color_busy_open
))
}
}
tv_restaurant_state
.
background
=
stateBg
})
btn_open_or_close_info
.
setOnClickListener
{
setOrderInfoOpenOrClose
()
}
}
private
fun
updateRestaurantState
(
state
:
Int
)
{
pageViewModel
.
setRestaurantState
(
this
@OtherOrderActivity
,
state
)
restaurantPopup
?.
dismiss
()
}
private
fun
initWebsocket
()
{
//開啟websocket
val
intent
=
Intent
(
this
,
GetInfoUpdateService
::
class
.
java
)
...
...
@@ -195,7 +259,7 @@ class OtherOrderActivity : BaseActivity() {
if
(
type
==
3
||
type
==
4
||
type
==
5
||
type
==
6
||
type
==
7
)
{
//播放提示音
if
(
type
==
5
)
{
if
(
type
==
5
||
type
==
4
)
{
pageViewModel
.
refreshState
.
postValue
(
1
)
}
else
{
pageViewModel
.
refreshState
.
postValue
(
type
)
...
...
@@ -308,16 +372,47 @@ class OtherOrderActivity : BaseActivity() {
view
.
requestLayout
()
}
private
var
pop
:
QMUIPopup
?
=
null
/**
* 初始化標題欄
*/
private
fun
initAppTop
()
{
qm_other_order_bar
.
setTitle
(
R
.
string
.
app_name
)
qm_other_order_bar
.
setTitle
(
GsaCloudApplication
.
getRestaurantName
(
this
)
)
qm_other_order_bar
.
addLeftImageButton
(
R
.
drawable
.
icon_return
,
R
.
id
.
iv_left_back
).
setOnClickListener
{
finish
()
}
qm_other_order_bar
.
addRightImageButton
(
R
.
drawable
.
ic_history_order
,
R
.
id
.
iv_history
).
setOnClickListener
{
qm_other_order_bar
.
addRightImageButton
(
R
.
drawable
.
icon_topbar_overflow
,
R
.
id
.
topbar_right_change_button
).
setOnClickListener
{
//彈出彈窗
if
(
pop
==
null
)
{
val
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
layout_more_popup
,
null
)
pop
=
QMUIPopups
.
popup
(
this
)
.
preferredDirection
(
QMUIPopup
.
DIRECTION_BOTTOM
)
.
view
(
view
)
.
radius
(
QMUIDisplayHelper
.
dp2px
(
this
,
5
))
.
arrow
(
true
)
.
shadow
(
true
)
.
dimAmount
(
0.6f
)
.
offsetYIfTop
(
0
)
.
animStyle
(
QMUIPopup
.
ANIM_AUTO
)
.
show
(
it
)
view
.
findViewById
<
QMUIAlphaTextView
>(
R
.
id
.
tv_delivery_setting
).
setOnClickListener
{
//備送設置
startActivity
(
Intent
(
this
,
DeliverySettingActivity
::
class
.
java
))
pop
!!
.
dismiss
()
}
view
.
findViewById
<
QMUIAlphaTextView
>(
R
.
id
.
tv_history_order
).
setOnClickListener
{
//歷史訂單
startActivity
(
Intent
(
this
,
HistoryOrderActivity
::
class
.
java
))
pop
!!
.
dismiss
()
}
}
else
{
pop
!!
.
show
(
it
)
}
}
// qm_other_order_bar.addRightImageButton(R.drawable.ic_history_order, R.id.iv_history).setOnClickListener {
// //歷史訂單
// startActivity(Intent(this, HistoryOrderActivity::class.java))
// }
qm_other_order_bar
.
setBackgroundColor
(
resources
.
getColor
(
R
.
color
.
theme_color
))
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/DeliveryListAdapter.kt
0 → 100644
View file @
1c6d730d
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
androidx.databinding.DataBindingUtil
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.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
)
{
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
->
helper
.
binding
.
apply
{
// deliveryType = when(item!!.distributionType){
// "SHORT_RANGE"->
// "STANDARD"->
// "LONG_DISTANCE"->
// else ->""
// }
item
?.
let
{
it
->
deliveryType
=
it
.
distributionType
deliveryExpenses
=
"${it.distributionFeeMin}-${it.distributionFeeMax}"
deliveryFee
=
it
.
distributionFee
.
toString
()
deliveryMethod
=
if
(
it
.
type
==
1
)
"物流備送"
else
"本店備送"
deliveryDifference
=
it
.
deliveryCost
.
toString
()
}
}
}
}
class
ViewHolder
(
itemView
:
View
)
:
BaseViewHolder
(
itemView
)
{
var
binding
:
ItemDeliveryLayoutBinding
=
DataBindingUtil
.
bind
(
itemView
)
!!
}
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/adapter/OtherOrdersAdapter.kt
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.ui.adapter
import
android.animation.Animator
import
android.animation.AnimatorSet
import
android.animation.ObjectAnimator.ofFloat
import
android.animation.ValueAnimator
import
android.content.Context
import
android.graphics.drawable.GradientDrawable
import
android.support.v4.media.session.PlaybackStateCompat
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
...
...
@@ -45,10 +43,8 @@ class OtherOrdersAdapter(var context: Context) : Adapter<OtherOrdersAdapter.View
holder
.
binding
.
data
=
data
holder
.
binding
.
isSelf
=
data
.
order_type
==
7
data
.
trkNo
?.
apply
{
if
(
length
>
0
)
{
holder
.
binding
.
deliveryState
=
when
(
data
.
curStat
)
{
1
->
"訂單已創建
"
1
->
"已通知物流
"
2
->
"配送員已接單"
3
->
"配送員到店附近"
4
->
"配送員已到店"
...
...
@@ -60,8 +56,6 @@ class OtherOrdersAdapter(var context: Context) : Adapter<OtherOrdersAdapter.View
10
->
"已指派另一位配送員"
else
->
""
}
}
}
var
state
:
String
?
=
null
val
bg
=
GradientDrawable
()
...
...
@@ -100,20 +94,22 @@ class OtherOrdersAdapter(var context: Context) : Adapter<OtherOrdersAdapter.View
//堂食外賣背景
val
orderingMethodBg
=
GradientDrawable
()
orderingMethodBg
.
shape
=
GradientDrawable
.
OVAL
orderingMethodBg
.
shape
=
GradientDrawable
.
RECTANGLE
orderingMethodBg
.
cornerRadii
=
floatArrayOf
(
dp2px
(
8f
).
toFloat
(),
dp2px
(
8f
).
toFloat
(),
0f
,
0f
,
0f
,
0f
,
dp2px
(
8f
).
toFloat
(),
dp2px
(
8f
).
toFloat
())
holder
.
binding
.
orderingMethod
=
when
{
data
.
order_type
==
2
->
{
orderingMethodBg
.
setColor
(
getColor
(
R
.
color
.
order_state2_color
))
"外"
"外
送
"
}
data
.
order_type
==
7
->
{
orderingMethodBg
.
setColor
(
getColor
(
R
.
color
.
order_state3_color
))
"自"
"自
取
"
}
else
->
{
orderingMethodBg
.
setColor
(
getColor
(
R
.
color
.
order_state1_color
))
"堂"
"堂
食
"
}
}
holder
.
binding
.
orderingMethodBg
=
orderingMethodBg
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/fragment/DeliveryFragment.kt
0 → 100644
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.ui.fragment
import
android.os.Bundle
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
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.model.viewModel.DeliveryViewModel
import
com.gingersoft.gsa.other_order_mode.ui.adapter.DeliveryListAdapter
import
com.gingersoft.gsa.other_order_mode.util.InjectorUtil
import
kotlinx.android.synthetic.main.fragment_delivery_list.*
class
DeliveryFragment
:
Fragment
()
{
companion
object
{
fun
newInstance
()
=
DeliveryFragment
()
}
private
lateinit
var
viewModel
:
DeliveryViewModel
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
?
{
return
inflater
.
inflate
(
R
.
layout
.
fragment_delivery_list
,
container
,
false
)
}
override
fun
onActivityCreated
(
savedInstanceState
:
Bundle
?)
{
super
.
onActivityCreated
(
savedInstanceState
)
viewModel
=
ViewModelProvider
(
activity
?.
viewModelStore
!!
,
InjectorUtil
.
getDeliveryFactory
())[
DeliveryViewModel
::
class
.
java
]
viewModel
.
queryDeliveryList
(
GsaCloudApplication
.
getRestaurantId
(
activity
!!
).
toString
())
{
if
(
it
?.
data
?.
list
!=
null
&&
it
.
data
.
list
.
isNotEmpty
())
{
val
deliveryListAdapter
=
DeliveryListAdapter
(
context
!!
,
it
.
data
.
list
)
rv_delivery
.
adapter
=
deliveryListAdapter
rv_delivery
.
layoutManager
=
LinearLayoutManager
(
context
!!
)
rv_delivery
.
visibility
=
View
.
VISIBLE
}
else
{
rv_delivery
.
visibility
=
View
.
GONE
}
}
// rv_delivery
}
}
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/fragment/PlaceholderFragment.kt
View file @
1c6d730d
...
...
@@ -11,6 +11,7 @@ import androidx.lifecycle.ViewModelProvider
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
import
com.gingersoft.gsa.cloud.base.utils.toast.ToastUtils
import
com.gingersoft.gsa.cloud.ui.utils.AppDialog
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.model.viewModel.PageViewModel
import
com.gingersoft.gsa.other_order_mode.ui.adapter.OtherOrdersAdapter
...
...
@@ -19,6 +20,8 @@ import com.gingersoft.gsa.other_order_mode.util.InjectorUtil
import
com.gingersoft.gsa.other_order_mode.util.OtherOrderUtils
import
com.gingersoft.gsa.other_order_mode.util.setState
import
kotlinx.android.synthetic.main.fragment_other_order.*
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.withContext
import
kotlin.String
as
String1
/**
...
...
@@ -53,7 +56,9 @@ class PlaceholderFragment : BaseFragment() {
adapter
.
setOnItemClickListenter
{
data
->
// 點擊查詢食品詳情
pageViewModel
.
getOrderInfo
(
data
.
Id
.
toString
())
{
it1
->
showLoading
()
pageViewModel
.
getShipanyAndOrderInfo
(
data
.
curStat
,
GsaCloudApplication
.
getRestaurantId
(
context
).
toString
(),
data
.
Id
.
toString
())
{
it1
->
cancelDialogForLoading
()
//顯示彈窗
if
(
this
@PlaceholderFragment
.
context
!=
null
&&
it1
!=
null
)
{
OtherOrderUtils
.
showOrderDetailsDialog
(
this
@PlaceholderFragment
.
context
!!
,
it1
,
data
.
STATUS
,
data
.
order_type
)
{
view
,
_
,
dialog
->
...
...
@@ -71,31 +76,52 @@ class PlaceholderFragment : BaseFragment() {
R
.
id
.
btn_cancel_order
->
{
//取消訂單,先判斷有沒有物流
showLoading
()
if
(
it1
.
data
!!
[
0
].
isDelete
==
1
)
{
//本店配送的單,應該先需要召回
pageViewModel
.
cancelOrder
(
context
!!
,
data
.
Id
.
toString
()){
if
(
it1
.
data
!!
[
0
].
isDelete
==
0
)
{
//第三方物流單
//彈出彈窗詢問是否確認取消
AppDialog
.
showWaringDialog
(
context
,
"是否確認取消第三方派送?"
)
{
v
,
dialog
->
when
(
v
.
id
)
{
R
.
id
.
tv_dialog_confirm
->
{
//取消物流
pageViewModel
.
cancelLogistics
(
GsaCloudApplication
.
getRestaurantId
(
context
).
toString
(),
data
.
Id
.
toString
())
{
ToastUtils
.
show
(
context
,
it
)
cancelDialogForLoading
()
refresh
()
//刷新當前頁面
}
dialog
.
dismiss
()
}
R
.
id
.
tv_dialog_cancel
->
dialog
.
dismiss
()
}
}
}
else
{
//第三方物流單,得先取消物流
pageViewModel
.
cancelLogistics
(
GsaCloudApplication
.
getRestaurantId
(
context
).
toString
(),
data
.
Id
.
toString
())
{
ToastUtils
.
show
(
context
,
it
)
//本店配送的單
pageViewModel
.
cancelOrder
(
context
!!
,
data
.
Id
.
toString
())
{
ToastUtils
.
show
(
context
,
if
(
it
)
{
"取消訂單成功"
}
else
{
"取消訂單失敗"
})
cancelDialogForLoading
()
refresh
()
//刷新當前頁面
}
}
dialog
.
dismiss
()
}
}
}
}
else
{
ToastUtils
.
show
(
context
,
"獲取訂單詳情失敗"
)
}
}
}
rv_other_order
.
adapter
=
adapter
//有多少個Fragment就添加多少個監聽
while
(
pageViewModel
.
mOrderList
.
size
<=
arguments
?.
getInt
(
INDEX
)
!!
)
{
pageViewModel
.
mOrderList
.
add
(
MutableLiveData
())
}
// 綁定當前fragment的數據項
// 綁定
監聽
當前fragment的數據項
pageViewModel
.
mOrderList
[
arguments
?.
getInt
(
INDEX
)
!!
].
observe
(
viewLifecycleOwner
,
Observer
{
it
.
let
{
adapter
.
setData
(
it
)
}
})
...
...
@@ -105,8 +131,10 @@ class PlaceholderFragment : BaseFragment() {
// 下拉刷新,加載更多
refresh_layout
.
setOnRefreshListener
{
refresh
()
//重新拉取一遍送貨員和第三方派送信息
pageViewModel
.
getDeliveryInfo
(
context
!!
)
pageViewModel
.
getDeliveryConfigDTO
(
context
!!
)
}
refresh_layout
.
setOnLoadMoreListener
{
page
++
getOrderList
(
pageViewModel
,
true
)
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/fragment/UpdateDeliveryFragment.kt
0 → 100644
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.ui.fragment
import
android.os.Bundle
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
androidx.fragment.app.Fragment
import
androidx.lifecycle.ViewModelProvider
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.model.viewModel.DeliveryViewModel
import
com.gingersoft.gsa.other_order_mode.util.InjectorUtil
import
kotlinx.android.synthetic.main.update_delivery_fragment.*
class
UpdateDeliveryFragment
:
Fragment
()
{
companion
object
{
fun
newInstance
()
=
UpdateDeliveryFragment
()
}
private
lateinit
var
viewModel
:
DeliveryViewModel
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
?
{
return
inflater
.
inflate
(
R
.
layout
.
update_delivery_fragment
,
container
,
false
)
}
override
fun
onActivityCreated
(
savedInstanceState
:
Bundle
?)
{
super
.
onActivityCreated
(
savedInstanceState
)
viewModel
=
ViewModelProvider
(
activity
?.
viewModelStore
!!
,
InjectorUtil
.
getDeliveryFactory
())[
DeliveryViewModel
::
class
.
java
]
top_bar_update_delivery
.
setTitle
(
"備送設置"
)
top_bar_update_delivery
.
setBackgroundColor
(
resources
.
getColor
(
R
.
color
.
theme_color
))
top_bar_update_delivery
.
addLeftImageButton
(
R
.
drawable
.
icon_return
,
R
.
id
.
iv_left_back
).
setOnClickListener
{
activity
?.
let
{
it
.
onBackPressed
()
}
}
}
}
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/InjectorUtil.kt
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.util
import
com.gingersoft.gsa.other_order_mode.data.DeliveryRepository
import
com.gingersoft.gsa.other_order_mode.data.HistoryOrderRepository
import
com.gingersoft.gsa.other_order_mode.data.WeatherRepository
import
com.gingersoft.gsa.other_order_mode.data.network.CoolWeatherNetwork
import
com.gingersoft.gsa.other_order_mode.data.network.DeliveryNetwork
import
com.gingersoft.gsa.other_order_mode.model.factory.DeliveryFactory
import
com.gingersoft.gsa.other_order_mode.model.factory.HistoryOrderModelFactory
import
com.gingersoft.gsa.other_order_mode.model.factory.WeatherModelFactory
...
...
@@ -19,5 +22,6 @@ object InjectorUtil {
private
fun
getHistoryRepository
()
=
HistoryOrderRepository
.
getInstance
(
CoolWeatherNetwork
.
getInstance
())
fun
getDeliveryFactory
()
=
DeliveryFactory
(
DeliveryRepository
.
getInstance
(
DeliveryNetwork
.
getInstance
()))
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/OtherOrderUtils.kt
View file @
1c6d730d
...
...
@@ -41,13 +41,14 @@ object OtherOrderUtils {
//自取
btnContent
=
"製作完成"
tvStatus
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
order_state0_color
))
}
else
{
if
(
orderData
.
isDelete
==
1
)
{
btnContent
=
"指派送貨"
cancelBtnContent
=
"取消訂單"
}
else
{
if
(
orderData
.
isDelete
==
0
)
{
btnContent
=
"重印"
cancelBtnContent
=
"取消物流"
}
else
{
btnContent
=
"指派送貨"
cancelBtnContent
=
"取消訂單"
}
tvStatus
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
order_state1_color
))
}
...
...
@@ -71,9 +72,23 @@ object OtherOrderUtils {
cancelBtnContent
=
"取消訂單"
}
}
layoutOrderInfoDialogBinding
.
patMethod
=
when
(
orderData
.
payType
)
{
1
->
"积分支付"
2
->
"支付宝"
3
->
"财付通"
4
->
"微信支付"
5
->
"货到付款"
6
->
"其他支付"
else
->
""
}
if
(!
showBtn
)
{
cancelBtnContent
=
""
}
layoutOrderInfoDialogBinding
.
orderStatus
=
type
+
orderStatus
layoutOrderInfoDialogBinding
.
btnContent
=
btnContent
layoutOrderInfoDialogBinding
.
cancelBtnContent
=
cancelBtnContent
layoutOrderInfoDialogBinding
.
estimatedTime
=
orderData
.
estimatedTime
}
val
rvFood
:
RecyclerView
=
hepler
.
getView
(
R
.
id
.
rv_food
)
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/ViewUtil.kt
View file @
1c6d730d
package
com.gingersoft.gsa.other_order_mode.util
import
android.content.Context
import
android.graphics.drawable.Drawable
import
android.view.View
fun
View
.
setState
(
state
:
Boolean
)
{
...
...
@@ -9,3 +11,8 @@ fun View.setState(state: Boolean) {
View
.
GONE
}
}
fun
Context
.
getDrawable
(
drawable
:
Int
):
Drawable
{
return
this
.
resources
.
getDrawable
(
drawable
)
}
\ No newline at end of file
other_order_mode/src/main/res/drawable/shape_restaurant_state_bg.xml
0 → 100644
View file @
1c6d730d
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"@dimen/dp_4"
/>
<solid
android:color=
"@color/restaurant_color_open"
/>
</shape>
\ No newline at end of file
other_order_mode/src/main/res/layout/activity_delivery.xml
0 → 100644
View file @
1c6d730d
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/fl_delivery"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<com.qmuiteam.qmui.widget.QMUITopBar
android:id=
"@+id/top_bar_delivery"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/head_height"
android:fitsSystemWindows=
"true"
app:qmui_topbar_text_btn_color_state_list=
"@color/theme_white_color"
app:qmui_topbar_title_color=
"@color/theme_white_color"
/>
<fragment
android:name=
"com.gingersoft.gsa.other_order_mode.ui.fragment.DeliveryFragment"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/top_bar_delivery"
/>
</RelativeLayout>
other_order_mode/src/main/res/layout/activity_history_order.xml
View file @
1c6d730d
...
...
@@ -6,7 +6,7 @@
android:layout_height=
"match_parent"
android:background=
"@color/color_f0"
android:orientation=
"vertical"
tools:context=
".ui.activity.
Other
OrderActivity"
>
tools:context=
".ui.activity.
History
OrderActivity"
>
<com.google.android.material.appbar.AppBarLayout
android:layout_width=
"match_parent"
...
...
@@ -26,6 +26,8 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:padding=
"@dimen/dp_10"
>
<EditText
...
...
@@ -35,11 +37,11 @@
android:layout_marginRight=
"@dimen/dp_10"
android:background=
"@drawable/shape_white_search_bg"
android:hint=
"請輸入手機號或訂單號"
android:inputType=
"number"
android:paddingLeft=
"@dimen/dp_10"
android:paddingRight=
"@dimen/dp_50"
android:textColor=
"@color/theme_333_color"
android:textColorHint=
"@color/color_ccc"
android:inputType=
"number"
android:textSize=
"@dimen/dp_14"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
...
...
@@ -54,9 +56,70 @@
app:layout_constraintBottom_toBottomOf=
"@id/ed_order_num_search"
app:layout_constraintRight_toRightOf=
"@id/ed_order_num_search"
app:layout_constraintTop_toTopOf=
"@id/ed_order_num_search"
/>
<TextView
android:id=
"@+id/tv_start_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:onClick=
"onClickListener"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_14"
app:layout_constraintLeft_toLeftOf=
"@id/ed_order_num_search"
app:layout_constraintTop_toBottomOf=
"@id/ed_order_num_search"
/>
<com.gingersoft.gsa.cloud.ui.view.TriangleView
android:id=
"@+id/iv_start_time_triangle"
android:layout_width=
"@dimen/dp_8"
android:layout_height=
"@dimen/dp_5"
android:layout_marginLeft=
"@dimen/dp_2"
android:onClick=
"onClickListener"
app:layout_constraintBottom_toBottomOf=
"@id/tv_start_time"
app:layout_constraintLeft_toRightOf=
"@id/tv_start_time"
app:layout_constraintTop_toTopOf=
"@id/tv_start_time"
app:trv_direction=
"bottom"
/>
<TextView
android:id=
"@+id/tv_to"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_10"
android:text=
"至"
android:visibility=
"gone"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_14"
app:layout_constraintBottom_toBottomOf=
"@id/iv_start_time_triangle"
app:layout_constraintLeft_toRightOf=
"@id/iv_start_time_triangle"
app:layout_constraintTop_toTopOf=
"@id/iv_start_time_triangle"
/>
<TextView
android:id=
"@+id/tv_end_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_10"
android:onClick=
"onClickListener"
android:textColor=
"@color/theme_333_color"
android:visibility=
"gone"
android:textSize=
"@dimen/dp_14"
app:layout_constraintBottom_toBottomOf=
"@id/tv_to"
app:layout_constraintLeft_toRightOf=
"@id/tv_to"
app:layout_constraintTop_toTopOf=
"@id/tv_to"
/>
<com.gingersoft.gsa.cloud.ui.view.TriangleView
android:id=
"@+id/iv_end_time_triangle"
android:layout_width=
"@dimen/dp_8"
android:layout_height=
"@dimen/dp_5"
android:layout_marginLeft=
"@dimen/dp_2"
android:onClick=
"onClickListener"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"@id/tv_end_time"
app:layout_constraintLeft_toRightOf=
"@id/tv_end_time"
app:layout_constraintTop_toTopOf=
"@id/tv_end_time"
app:trv_direction=
"bottom"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.appbar.AppBarLayout>
<include
layout=
"@layout/fragment_other_order"
/>
<include
layout=
"@layout/fragment_other_order"
/>
</LinearLayout>
\ No newline at end of file
other_order_mode/src/main/res/layout/activity_other_order.xml
View file @
1c6d730d
...
...
@@ -47,9 +47,9 @@
android:id=
"@+id/cl_order_info"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_
10
"
android:layout_marginLeft=
"@dimen/dp_
6
"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginRight=
"@dimen/dp_
10
"
android:layout_marginRight=
"@dimen/dp_
6
"
android:background=
"@drawable/shape_dialog_bg"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
>
...
...
@@ -154,14 +154,14 @@
android:layout_marginRight=
"@dimen/dp_10"
android:background=
"@drawable/shape_search_bg"
android:hint=
"請輸入手機號或訂單號"
android:inputType=
"number"
android:paddingLeft=
"@dimen/dp_10"
android:paddingRight=
"@dimen/dp_50"
android:textColor=
"@color/theme_333_color"
android:textColorHint=
"@color/color_ccc"
android:textSize=
"@dimen/dp_14"
android:inputType=
"number"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/
btn_switch
_restaurant_state"
app:layout_constraintRight_toLeftOf=
"@id/
tv
_restaurant_state"
app:layout_constraintTop_toBottomOf=
"@id/tv_month_takeaway_num_text"
/>
<ImageView
...
...
@@ -175,22 +175,43 @@
app:layout_constraintTop_toTopOf=
"@id/ed_order_num_search"
/>
<com.gingersoft.gsa.cloud.ui.view.SwitchButton
android:id=
"@+id/btn_switch_restaurant_state"
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/dp_40"
android:textColor=
"@color/white"
android:textSize=
"@dimen/dp_12"
app:kswBackColor=
"@color/selector_switch_button"
app:kswBackRadius=
"@dimen/dp_20"
app:kswTextOff=
"@string/resting"
app:kswTextOn=
"@string/open"
app:kswThumbColor=
"@color/white"
app:kswThumbMarginBottom=
"@dimen/dp_4"
app:kswThumbMarginTop=
"@dimen/dp_4"
<TextView
android:id=
"@+id/tv_restaurant_state"
style=
"@style/otherOrder_restaurant_state_style"
android:background=
"@drawable/shape_restaurant_state_bg"
android:text=
"營業中 "
app:layout_constraintBottom_toBottomOf=
"@id/ed_order_num_search"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/ed_order_num_search"
/>
<ImageView
android:layout_width=
"@dimen/dp_10"
android:layout_height=
"@dimen/dp_5"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/dp_4"
android:src=
"@drawable/qmui_popup_arrow_down"
app:layout_constraintBottom_toBottomOf=
"@id/tv_restaurant_state"
app:layout_constraintRight_toRightOf=
"@id/tv_restaurant_state"
app:layout_constraintTop_toTopOf=
"@id/tv_restaurant_state"
/>
<!-- -->
<!-- <com.gingersoft.gsa.cloud.ui.view.SwitchButton-->
<!-- android:id="@+id/btn_switch_restaurant_state"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="@dimen/dp_40"-->
<!-- android:textColor="@color/white"-->
<!-- android:textSize="@dimen/dp_12"-->
<!-- app:kswBackColor="@color/selector_switch_button"-->
<!-- app:kswBackRadius="@dimen/dp_20"-->
<!-- app:kswTextOff="@string/resting"-->
<!-- app:kswTextOn="@string/open"-->
<!-- app:kswThumbColor="@color/white"-->
<!-- app:kswThumbMarginBottom="@dimen/dp_4"-->
<!-- app:kswThumbMarginTop="@dimen/dp_4"-->
<!-- app:layout_constraintBottom_toBottomOf="@id/ed_order_num_search"-->
<!-- app:layout_constraintRight_toRightOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="@id/ed_order_num_search" />-->
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
...
...
other_order_mode/src/main/res/layout/fragment_delivery_list.xml
0 → 100644
View file @
1c6d730d
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:orientation=
"vertical"
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_delivery"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<com.qmuiteam.qmui.layout.QMUIButton
android:id=
"@+id/tv_add_delivery"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_border_bg"
android:text=
"添加備送方式"
android:padding=
"@dimen/dp_10"
android:textColor=
"@color/theme_color"
/>
</LinearLayout>
\ No newline at end of file
other_order_mode/src/main/res/layout/item_delivery_layout.xml
0 → 100644
View file @
1c6d730d
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<variable
name=
"delivery_type"
type=
"String"
/>
<variable
name=
"delivery_expenses"
type=
"String"
/>
<variable
name=
"delivery_fee"
type=
"String"
/>
<variable
name=
"delivery_method"
type=
"String"
/>
<variable
name=
"delivery_difference"
type=
"String"
/>
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_delivery_type"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_10"
android:text=
"@{@string/delivery_type+ delivery_type}"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_14"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_delivery_expenses"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"@{@string/delivery_expenses + delivery_expenses}"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_14"
app:layout_constraintLeft_toLeftOf=
"@id/tv_delivery_type"
app:layout_constraintTop_toBottomOf=
"@id/tv_delivery_type"
/>
<TextView
android:id=
"@+id/tv_delivery_fee"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"@{@string/delivery_fee + delivery_fee}"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_14"
app:layout_constraintLeft_toLeftOf=
"@id/tv_delivery_type"
app:layout_constraintTop_toBottomOf=
"@id/tv_delivery_expenses"
/>
<TextView
android:id=
"@+id/tv_delivery_method"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"@{@string/delivery_method + delivery_method}"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_14"
app:layout_constraintLeft_toLeftOf=
"@id/tv_delivery_type"
app:layout_constraintTop_toBottomOf=
"@id/tv_delivery_fee"
/>
<TextView
android:id=
"@+id/tv_difference"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"@{@string/delivery_difference + delivery_difference}"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_14"
app:layout_constraintLeft_toLeftOf=
"@id/tv_delivery_type"
app:layout_constraintTop_toBottomOf=
"@id/tv_delivery_method"
/>
<TextView
android:id=
"@+id/iv_edit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"@dimen/dp_10"
android:text=
"編輯"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_12"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/iv_delete"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/iv_delete"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"@dimen/dp_10"
android:text=
"刪除"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_12"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<View
android:id=
"@+id/horizontal_dividing_line"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_0_5"
android:layout_marginTop=
"@dimen/dp_10"
android:background=
"@color/color_ccc"
app:layout_constraintTop_toBottomOf=
"@id/tv_difference"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
\ No newline at end of file
other_order_mode/src/main/res/layout/layout_history_order_item.xml
View file @
1c6d730d
...
...
@@ -75,7 +75,7 @@
<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_5"
android:text=
"@{data.rECEIVER}"
...
...
@@ -83,6 +83,7 @@
android:textSize=
"@dimen/sp_14"
android:textStyle=
"bold"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/tv_order_time"
app:layout_constraintTop_toBottomOf=
"@id/tv_ordering_method"
/>
<TextView
...
...
@@ -92,7 +93,6 @@
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_5"
android:text=
"@{TimeUtils.parseTimeRepeat(data.cREATE_TIME,TimeUtils.DEFAULT_DATE_FORMAT)}"
app:layout_constraintBottom_toBottomOf=
"@id/tv_order_user_name"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/tv_order_user_name"
/>
...
...
other_order_mode/src/main/res/layout/layout_more_popup.xml
0 → 100644
View file @
1c6d730d
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<com.qmuiteam.qmui.alpha.QMUIAlphaTextView
android:id=
"@+id/tv_delivery_setting"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:paddingLeft=
"@dimen/dp_20"
android:paddingTop=
"@dimen/dp_10"
android:paddingRight=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_10"
android:text=
"備送設置"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_14"
/>
<include
layout=
"@layout/include_horizontal_color_ccc_dividing_line"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaTextView
android:id=
"@+id/tv_history_order"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:paddingLeft=
"@dimen/dp_20"
android:paddingTop=
"@dimen/dp_10"
android:paddingRight=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_10"
android:text=
"歷史訂單"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_14"
/>
</LinearLayout>
other_order_mode/src/main/res/layout/layout_order_info_dialog_new.xml
View file @
1c6d730d
...
...
@@ -38,6 +38,14 @@
<variable
name=
"showBtn"
type=
"Boolean"
/>
<variable
name=
"patMethod"
type=
"String"
/>
<variable
name=
"estimatedTime"
type=
"String"
/>
</data>
<androidx.constraintlayout.widget.ConstraintLayout
...
...
@@ -119,18 +127,42 @@
app:layout_constraintTop_toBottomOf=
"@id/tv_total_amount_text"
/>
<TextView
android:id=
"@+id/tv_
order_no
"
android:id=
"@+id/tv_
take_food_code
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/other_order_info_dialog_content_marginLeft"
android:layout_marginTop=
"@dimen/dp_15"
android:text=
"
@{@string/order_no + data.oRDER_NO}
"
android:text=
"
取餐碼:
"
android:textColor=
"@color/color_3c"
android:textSize=
"@dimen/dp_14"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_total_amount"
/>
<TextView
android:id=
"@+id/tv_order_num"
style=
"@style/otherOrder_item_info_title_textStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
'@{data.takeFoodCode.equals("0")? @string/take_food_code_omit:data.takeFoodCode}'
android:textSize=
"@dimen/dp_16"
android:textStyle=
"bold"
app:layout_constraintBottom_toBottomOf=
"@id/tv_take_food_code"
app:layout_constraintLeft_toRightOf=
"@id/tv_take_food_code"
app:layout_constraintTop_toTopOf=
"@id/tv_take_food_code"
/>
<TextView
android:id=
"@+id/tv_order_no"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/other_order_info_dialog_content_marginLeft"
android:layout_marginTop=
"@dimen/dp_10"
android:text=
"@{@string/order_no + data.oRDER_NO}"
android:textColor=
"@color/color_3c"
android:textSize=
"@dimen/dp_14"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_order_num"
/>
<TextView
android:id=
"@+id/tv_create_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -142,13 +174,26 @@
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_order_no"
/>
<TextView
android:id=
"@+id/tv_estimated_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/other_order_info_dialog_content_marginLeft"
android:layout_marginTop=
"@dimen/dp_10"
android:text=
"@{estimatedTime}"
android:textColor=
"@color/color_3c"
android:textSize=
"@dimen/dp_14"
android:visibility=
"@{estimatedTime.length()>0?View.VISIBLE:View.GONE}"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_create_time"
/>
<View
android:id=
"@+id/line_info_top"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_1"
android:layout_marginTop=
"@dimen/dp_10"
android:background=
"@color/color_ccc"
app:layout_constraintTop_toBottomOf=
"@id/tv_
create
_time"
/>
app:layout_constraintTop_toBottomOf=
"@id/tv_
estimated
_time"
/>
<TextView
android:id=
"@+id/tv_receiver_text"
...
...
@@ -536,6 +581,29 @@
android:textColor=
"#FF0000"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/tv_pay_amount_text"
/>
<TextView
android:id=
"@+id/tv_pay_method_text"
style=
"@style/otherOrder_bill_textStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:text=
"支付方式:"
android:visibility=
"@{patMethod.length()==0?View.GONE:View.VISIBLE}"
app:layout_constraintRight_toRightOf=
"@id/tv_total_text"
app:layout_constraintTop_toBottomOf=
"@id/tv_pay_amount_text"
/>
<TextView
android:id=
"@+id/tv_pay_method"
style=
"@style/otherOrder_bill_info_textStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"@dimen/other_order_info_dialog_content_marginRight"
android:text=
"@{patMethod}"
android:visibility=
"@{patMethod.length()==0?View.GONE:View.VISIBLE}"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/tv_pay_method_text"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
...
...
other_order_mode/src/main/res/layout/layout_other_order_item.xml
View file @
1c6d730d
This diff is collapsed.
Click to expand it.
other_order_mode/src/main/res/layout/popup_layout_restaurant_state.xml
0 → 100644
View file @
1c6d730d
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_restaurant_open"
style=
"@style/otherOrder_restaurant_state_style"
android:background=
"@color/restaurant_color_open"
android:text=
"營業中"
/>
<TextView
android:id=
"@+id/tv_restaurant_close"
style=
"@style/otherOrder_restaurant_state_style"
android:background=
"@color/color_c8"
android:text=
"休息中"
/>
<TextView
android:id=
"@+id/tv_restaurant_busy_close"
style=
"@style/otherOrder_restaurant_state_style"
android:background=
"@color/restaurant_color_busy_close"
android:text=
"繁忙不接"
/>
<TextView
android:id=
"@+id/tv_restaurant_busy_open"
style=
"@style/otherOrder_restaurant_state_style"
android:background=
"@color/restaurant_color_busy_open"
android:text=
"繁忙可接"
/>
</LinearLayout>
\ No newline at end of file
other_order_mode/src/main/res/layout/update_delivery_fragment.xml
0 → 100644
View file @
1c6d730d
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
tools:context=
".ui.fragment.UpdateDeliveryFragment"
>
<com.qmuiteam.qmui.widget.QMUITopBar
android:id=
"@+id/top_bar_update_delivery"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/head_height"
android:fitsSystemWindows=
"true"
app:layout_constraintTop_toTopOf=
"parent"
app:qmui_topbar_text_btn_color_state_list=
"@color/theme_white_color"
app:qmui_topbar_title_color=
"@color/theme_white_color"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
other_order_mode/src/main/res/values/strings.xml
View file @
1c6d730d
...
...
@@ -41,4 +41,14 @@
<string
name=
"deliveryman_phone"
>
送貨員手機號:
</string>
<string
name=
"logistics_number"
>
物流號:
</string>
<string
name=
"take_food_code_omit"
>
----
</string>
<string
name=
"left_parenthesis"
>
(
</string>
<string
name=
"right_parenthesis"
>
)
</string>
<string
name=
"delivery_type"
>
配送類型:
</string>
<string
name=
"delivery_expenses"
>
配送費範圍:
</string>
<string
name=
"delivery_fee"
>
起送費:
</string>
<string
name=
"delivery_method"
>
配送方式:
</string>
<string
name=
"delivery_difference"
>
補差價:
</string>
</resources>
other_order_mode/src/main/res/values/styles.xml
View file @
1c6d730d
...
...
@@ -82,6 +82,14 @@
<item
name=
"android:textColor"
>
@color/color_66
</item>
<item
name=
"android:textSize"
>
@dimen/dp_12
</item>
</style>
<!-- 餐廳營業狀態按鈕樣式-->
<style
name=
"otherOrder_restaurant_state_style"
>
<item
name=
"android:layout_width"
>
@dimen/dp_80
</item>
<item
name=
"android:layout_height"
>
@dimen/dp_28
</item>
<item
name=
"android:gravity"
>
center_vertical
</item>
<item
name=
"android:paddingLeft"
>
@dimen/dp_8
</item>
<item
name=
"android:textColor"
>
@color/white
</item>
<item
name=
"android:textSize"
>
@dimen/dp_14
</item>
</style>
</resources>
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrder.java
View file @
1c6d730d
...
...
@@ -203,7 +203,7 @@ public class PrintOtherOrder extends PrinterRoot {
//配送費
setAmount
(
data
.
getDELIVERY_CHARGE
(),
view
.
findViewById
(
R
.
id
.
tv_delivery_fee_text
),
view
.
findViewById
(
R
.
id
.
tv_delivery_fee
),
amountUnit
);
//折扣
setAmount
(
data
.
getDiscount_amount
(),
view
.
findViewById
(
R
.
id
.
tv_discount_text
),
view
.
findViewById
(
R
.
id
.
tv_discount
),
amountUnit
);
setAmount
(
data
.
getDiscount_amount
(),
view
.
findViewById
(
R
.
id
.
tv_discount_text
),
view
.
findViewById
(
R
.
id
.
tv_discount
),
"-"
+
amountUnit
);
//總金額
setText
(
view
,
R
.
id
.
tv_total_amount
,
amountUnit
+
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getDiscount_amount
()));
//支付金額
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrinterRoot.java
View file @
1c6d730d
...
...
@@ -363,6 +363,7 @@ public abstract class PrinterRoot implements PrintSocketHolder.OnStateChangedLis
hepler
.
setViewClick
(
R
.
id
.
internet_print
,
v
->
{
//修改默認打印方式為IP打印
SPUtils
.
put
(
mContext
,
PrintConstans
.
DEFAULT_PRINT_METHOD
,
PrintConstans
.
IP_PRINT
);
dialog
.
dismiss
();
//彈出彈窗,讓用戶選擇ip打印機
showIpPrintDeviceList
(
printerDeviceBeans
,
bitmaps
);
});
...
...
print-module/src/main/res/layout/print_confirm_order_view.xml
View file @
1c6d730d
...
...
@@ -185,7 +185,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:text=
"
配送
費:"
android:text=
"
送貨
費:"
android:textStyle=
"normal"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_lunchbox_cost"
/>
...
...
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