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
4cd86929
Commit
4cd86929
authored
Jun 04, 2020
by
Wyh
Committed by
宁斌
Jun 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
6.04 物流單不顯示結賬按鈕,打印格式修改
parent
4155fd28
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
78 additions
and
37 deletions
+78
-37
main-module/src/main/res/layout/activity_new_main.xml
+1
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/OtherOrderUtils.kt
+4
-0
other_order_mode/src/main/res/layout/activity_other_order.xml
+2
-2
other_order_mode/src/main/res/layout/layout_other_order_item.xml
+1
-0
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrder.java
+38
-12
print-module/src/main/res/layout/print_confirm_order_view.xml
+0
-0
print-module/src/main/res/layout/print_item_bill.xml
+3
-3
print-module/src/main/res/layout/print_other_order_food.xml
+24
-14
print-module/src/main/res/layout/print_other_order_food_item.xml
+3
-3
print-module/src/main/res/values/styles.xml
+2
-2
No files found.
main-module/src/main/res/layout/activity_new_main.xml
View file @
4cd86929
...
...
@@ -23,7 +23,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_15"
android:text=
"
个
人中心"
android:text=
"
個
人中心"
android:textColor=
"@color/white"
android:textSize=
"@dimen/dp_17"
/>
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/OtherOrderUtils.kt
View file @
4cd86929
...
...
@@ -61,6 +61,10 @@ object OtherOrderUtils {
orderStatus
=
"待取餐"
tvStatus
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
order_state3_color
))
}
else
{
if
(
orderData
.
isDelete
==
0
){
//如果是第三方物流,不顯示結賬按鈕
btnContent
=
""
}
orderStatus
=
"派送中"
tvStatus
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
order_state2_color
))
}
...
...
other_order_mode/src/main/res/layout/activity_other_order.xml
View file @
4cd86929
...
...
@@ -272,7 +272,7 @@
style=
"@style/otherOrderInfoDialogTextStyle_font_style_twelve"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"外
賣
"
android:text=
"外
送
"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/line_today_order_info"
app:layout_constraintTop_toTopOf=
"@id/line_today_order_info"
/>
...
...
@@ -361,7 +361,7 @@
style=
"@style/otherOrderInfoDialogTextStyle_font_style_twelve"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"外
賣
"
android:text=
"外
送
"
app:layout_constraintHorizontal_chainStyle=
"packed"
app:layout_constraintLeft_toRightOf=
"@id/line_today_info"
app:layout_constraintRight_toLeftOf=
"@id/line_today_amount_info"
...
...
other_order_mode/src/main/res/layout/layout_other_order_item.xml
View file @
4cd86929
...
...
@@ -236,6 +236,7 @@
android:text=
"@{@string/amount_unit + data.pAY_AMOUNT}"
android:textColor=
"@color/red_600"
android:textSize=
"@dimen/sp_16"
app:layout_constraintTop_toBottomOf=
"@id/tv_delivery_state"
app:layout_constraintRight_toRightOf=
"@id/tv_order_time"
app:layout_constraintTop_toTopOf=
"@id/tv_address_text"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrder.java
View file @
4cd86929
...
...
@@ -153,7 +153,7 @@ public class PrintOtherOrder extends PrinterRoot {
RecyclerView
rvFood
=
view
.
findViewById
(
R
.
id
.
rv_order_food
);
TextView
tvTakeCode
=
view
.
findViewById
(
R
.
id
.
tv_order_take_code
);
if
(
dataBean
.
getOrder_type
()
==
2
)
{
tvOrderType
.
setText
(
"外
賣
"
);
tvOrderType
.
setText
(
"外
送
"
);
}
else
{
tvOrderType
.
setText
(
"自取"
);
}
...
...
@@ -173,22 +173,24 @@ public class PrintOtherOrder extends PrinterRoot {
//創建時間
tvCreateTime
.
setText
(
TimeUtils
.
parseTimeRepeat
(
dataBean
.
getCREATE_TIME
(),
TimeUtils
.
DEFAULT_DATE_FORMAT
));
//訂單號
tvOrderNum
.
setText
(
"
訂
單號:"
+
dataBean
.
getORDER_NO
());
tvOrderNum
.
setText
(
"單號:"
+
dataBean
.
getORDER_NO
());
rvFood
.
setLayoutManager
(
new
LinearLayoutManager
(
context
));
rvFood
.
setAdapter
(
new
OtherOrderAdapter
(
context
,
orderDetail
,
false
));
return
viewToBitmap
(
context
,
view
);
}
private
Bitmap
initPrintView
(
Context
context
,
OrderDetails
.
DataBean
data
)
{
View
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
print_confirm_order_view
,
null
,
false
);
//品牌名
setText
(
view
,
R
.
id
.
tv_brand_name
,
GsaCloudApplication
.
getBrandName
(
context
));
//餐廳名
setText
(
view
,
R
.
id
.
tv_restaurant_name
,
GsaCloudApplication
.
getRestaurantName
(
context
));
// 訂單類型
setText
(
view
,
R
.
id
.
tv_order_type
,
data
.
getOrder_type
()
==
2
?
"外送"
:
"自取"
);
// 訂單號
setText
(
view
,
R
.
id
.
tv_order_number
,
"
訂
單號:"
+
data
.
getORDER_NO
());
setText
(
view
,
R
.
id
.
tv_order_number
,
"單號:"
+
data
.
getORDER_NO
());
if
(
data
.
getTakeFoodCode
()
!=
null
&&
!
data
.
getTakeFoodCode
().
equals
(
"0"
))
{
setText
(
view
,
R
.
id
.
tv_order_take_food_code
,
"#"
+
data
.
getTakeFoodCode
());
}
else
{
...
...
@@ -200,7 +202,7 @@ public class PrintOtherOrder extends PrinterRoot {
RecyclerView
rvBill
=
view
.
findViewById
(
R
.
id
.
rv_bill
);
List
<
PrintBillBean
>
billData
=
new
ArrayList
<>();
billData
.
add
(
getBillBean
(
"合計:"
,
amountUnit
+
MoneyUtil
.
sub
(
MoneyUtil
.
sub
(
Double
.
parseDouble
(
Objects
.
requireNonNull
(
data
.
getTOTAL_AMOUNT
())),
data
.
getLunchbox
()),
data
.
getDELIVERY_CHARGE
())));
//
billData.add(getBillBean("合計:", amountUnit + MoneyUtil.sub(MoneyUtil.sub(Double.parseDouble(Objects.requireNonNull(data.getTOTAL_AMOUNT())), data.getLunchbox()), data.getDELIVERY_CHARGE())));
if
(
data
.
getLunchbox
()
!=
0
)
{
billData
.
add
(
getBillBean
(
"餐盒費:"
,
amountUnit
+
data
.
getLunchbox
()));
}
...
...
@@ -216,14 +218,14 @@ public class PrintOtherOrder extends PrinterRoot {
}
}
billData
.
add
(
getBillBean
(
"總金額:"
,
amountUnit
+
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getDiscount_amount
())));
billData
.
add
(
getBillBean
(
"支付金額:"
,
amountUnit
+
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getDiscount_amount
())));
//
billData.add(getBillBean("支付金額:", amountUnit + MoneyUtil.sub(Double.parseDouble(data.getTOTAL_AMOUNT()), data.getDiscount_amount())));
BillItemAdapter
adapter
=
new
BillItemAdapter
(
billData
,
context
);
rvBill
.
setLayoutManager
(
new
LinearLayoutManager
(
context
));
rvBill
.
setAdapter
(
adapter
);
//
總金額
//
setText(view, R.id.tv_total, amountUnit + MoneyUtil.sub(MoneyUtil.sub(Double.parseDouble(Objects.requireNonNull(data.getTOTAL_AMOUNT())), data.getLunchbox()), data.getDELIVERY_CHARGE()));
//
合計
setText
(
view
,
R
.
id
.
tv_total
,
amountUnit
+
MoneyUtil
.
sub
(
MoneyUtil
.
sub
(
Double
.
parseDouble
(
Objects
.
requireNonNull
(
data
.
getTOTAL_AMOUNT
())),
data
.
getLunchbox
()),
data
.
getDELIVERY_CHARGE
()));
//餐盒費
// setAmount(data.getLunchbox(), view.findViewById(R.id.tv_lunchbox_cost_text), view.findViewById(R.id.tv_lunchbox_cost), amountUnit);
//配送費
...
...
@@ -233,11 +235,30 @@ public class PrintOtherOrder extends PrinterRoot {
//總金額
// setText(view, R.id.tv_total_amount, amountUnit + MoneyUtil.sub(Double.parseDouble(data.getTOTAL_AMOUNT()), data.getDiscount_amount()));
//支付金額
// setText(view, R.id.tv_pay_amount,
amountUnit + MoneyUtil.sub(Double.parseDouble(data.getTOTAL_AMOUNT()), data.getDiscount_amount()));
setText
(
view
,
R
.
id
.
tv_pay_amount_text
,
"支付金額:"
+
amountUnit
+
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getDiscount_amount
()));
//支付類型:貨到付款,在線支付
setText
(
view
,
R
.
id
.
tv_pay_type
,
data
.
getOrderPayType
()
==
1
?
"貨到付款"
:
"在線支付"
);
String
payType
=
""
;
if
(
data
.
getPayType
()
==
1
)
{
payType
=
":积分支付"
;
}
else
if
(
data
.
getPayType
()
==
2
)
{
payType
=
":支付宝"
;
}
else
if
(
data
.
getPayType
()
==
3
)
{
payType
=
":财付通"
;
}
else
if
(
data
.
getPayType
()
==
4
)
{
payType
=
":微信支付"
;
}
else
if
(
data
.
getPayType
()
==
5
)
{
payType
=
":货到付款"
;
}
else
if
(
data
.
getPayType
()
==
6
)
{
payType
=
":其他支付"
;
}
if
(
data
.
getOrderPayType
()
==
1
)
{
//貨到付款
setText
(
view
,
R
.
id
.
tv_pay_type
,
"貨到付款"
);
}
else
{
setText
(
view
,
R
.
id
.
tv_pay_type
,
"在線支付"
+
payType
);
}
//收貨時間
setText
(
view
,
R
.
id
.
tv_delivery_time
,
data
.
getOrder_type
()
==
2
?
data
.
get
TakeTime
()
:
data
.
getSEND_TIME
());
setText
(
view
,
R
.
id
.
tv_delivery_time
,
data
.
getOrder_type
()
==
2
?
data
.
get
SEND_TIME
()
:
data
.
getTakeTime
());
//收貨地址
setText
(
view
,
R
.
id
.
tv_address
,
context
.
getString
(
R
.
string
.
address
)
+
data
.
getAddressDetail
());
//收貨人
...
...
@@ -245,7 +266,12 @@ public class PrintOtherOrder extends PrinterRoot {
//手機號
setText
(
view
,
R
.
id
.
tv_phone
,
"手機號:"
+
data
.
getPHONE
());
//備註
if
(
data
.
getRemark
()
!=
null
&&
!
data
.
getRemark
().
isEmpty
())
{
setText
(
view
,
R
.
id
.
tv_remark
,
"備註:"
+
data
.
getRemark
());
view
.
findViewById
(
R
.
id
.
tv_remark
).
setVisibility
(
View
.
VISIBLE
);
}
else
{
view
.
findViewById
(
R
.
id
.
tv_remark
).
setVisibility
(
View
.
GONE
);
}
if
(
data
.
getPRODUCT_NAME
()
!=
null
)
{
RecyclerView
rvFoodList
=
view
.
findViewById
(
R
.
id
.
rv_order_print_food
);
...
...
print-module/src/main/res/layout/print_confirm_order_view.xml
View file @
4cd86929
This diff is collapsed.
Click to expand it.
print-module/src/main/res/layout/print_item_bill.xml
View file @
4cd86929
...
...
@@ -6,14 +6,14 @@
<TextView
android:id=
"@+id/print_bill_name"
style=
"@style/print
OtherOrderInfoPrintBoldTextS
tyle"
style=
"@style/print
_other_order_twenty_two_s
tyle"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
/>
android:layout_weight=
"1"
/>
<TextView
android:id=
"@+id/print_bill_value"
style=
"@style/print
OtherOrderInfoPrintBoldTextS
tyle"
style=
"@style/print
_other_order_twenty_two_s
tyle"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_5"
...
...
print-module/src/main/res/layout/print_other_order_food.xml
View file @
4cd86929
...
...
@@ -5,45 +5,64 @@
android:orientation=
"vertical"
>
<!-- 接單的廚房單-->
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
>
<TextView
android:id=
"@+id/tv_order_type"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"外賣"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_26"
/>
<TextView
android:id=
"@+id/tv_order_number"
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_15"
android:text=
"單號:"
android:textColor=
"@color/theme_333_color"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_order_create_time"
style=
"@style/print_other_order_
eighteen
_style"
style=
"@style/print_other_order_
twenty_two
_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"廚房時間:"
/>
<TextView
android:id=
"@+id/tv_order_take_code"
style=
"@style/print_other_order_
eighteen
_style"
style=
"@style/print_other_order_
twenty_two
_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"取餐碼:"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_operator_name"
style=
"@style/print_other_order_
eighteen
_style"
style=
"@style/print_other_order_
twenty_two
_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"操作"
/>
<TextView
android:id=
"@+id/tv_order_send_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"送貨時間:"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_22"
/>
<TextView
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
...
...
@@ -55,18 +74,10 @@
android:layout_height=
"wrap_content"
/>
<TextView
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
/>
<TextView
android:id=
"@+id/tv_order_number"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"訂單號:"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_18"
/>
</LinearLayout>
\ No newline at end of file
print-module/src/main/res/layout/print_other_order_food_item.xml
View file @
4cd86929
...
...
@@ -11,7 +11,7 @@
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
app:layout_constraintHorizontal_weight=
"0.
7
"
app:layout_constraintHorizontal_weight=
"0.
6
"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/tv_food_number"
app:layout_constraintTop_toTopOf=
"parent"
>
...
...
@@ -31,7 +31,7 @@
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_2
0
"
android:textSize=
"@dimen/dp_2
2
"
app:layout_constraintLeft_toRightOf=
"@id/iv_food_item_next"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
@@ -43,7 +43,7 @@
android:layout_height=
"wrap_content"
android:gravity=
"right"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_2
0
"
android:textSize=
"@dimen/dp_2
2
"
app:layout_constraintHorizontal_weight=
"0.2"
app:layout_constraintLeft_toRightOf=
"@id/layout_food_name"
app:layout_constraintRight_toLeftOf=
"@id/tv_food_price"
...
...
print-module/src/main/res/values/styles.xml
View file @
4cd86929
...
...
@@ -23,9 +23,9 @@
<item
name=
"android:textColor"
>
@color/theme_333_color
</item>
<item
name=
"android:textSize"
>
@dimen/dp_18
</item>
</style>
<style
name=
"printOtherOrderTextStyle_font_style_twenty"
parent=
"font_style_twenty"
>
<style
name=
"print_other_order_twenty_two_style"
>
<item
name=
"android:textColor"
>
@color/theme_333_color
</item>
<item
name=
"android:textSize"
>
@dimen/dp_22
</item>
</style>
<style
name=
"printOtherOrderInfoPrintBoldTextStyle"
>
...
...
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