Commit 61371513 by Wyh Committed by 宁斌

6.04 打印字體大小調整

parent 63feb95e
...@@ -471,6 +471,7 @@ ...@@ -471,6 +471,7 @@
<dimen name="sp_23">23sp</dimen> <dimen name="sp_23">23sp</dimen>
<dimen name="sp_24">24sp</dimen> <dimen name="sp_24">24sp</dimen>
<dimen name="sp_25">25sp</dimen> <dimen name="sp_25">25sp</dimen>
<dimen name="sp_26">26sp</dimen>
<dimen name="sp_28">28sp</dimen> <dimen name="sp_28">28sp</dimen>
<dimen name="sp_30">30sp</dimen> <dimen name="sp_30">30sp</dimen>
<dimen name="sp_32">32sp</dimen> <dimen name="sp_32">32sp</dimen>
......
...@@ -144,5 +144,5 @@ ...@@ -144,5 +144,5 @@
<string name="wai"></string> <string name="wai"></string>
<string name="amount_unit">$</string> <string name="amount_unit">$</string>
<string name="print_split_line">------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</string> <string name="print_split_line">- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </string>
</resources> </resources>
...@@ -4,7 +4,7 @@ import java.util.List; ...@@ -4,7 +4,7 @@ import java.util.List;
/** /**
* Created by Wyh on 2020/2/26. * Created by Wyh on 2020/2/26.
* 售分析——食品top10 * 售分析——食品top10
*/ */
public class SalesFoodsBean { public class SalesFoodsBean {
......
...@@ -334,6 +334,10 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() { ...@@ -334,6 +334,10 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
} }
} else if (status == 4) { } else if (status == 4) {
//結賬,彈窗確認是否結賬 //結賬,彈窗確認是否結賬
if (orderDetails.data!![0].isDelete == 0) {
//第三方物流單,沒有結賬,重印
printOrder(orderDetails, data, context, listener)
} else {
object : DialogUtils(context, R.layout.other_order_pause_orders) { object : DialogUtils(context, R.layout.other_order_pause_orders) {
override fun initLayout(hepler: ViewHepler, dialog: Dialog) { override fun initLayout(hepler: ViewHepler, dialog: Dialog) {
hepler.setText(R.id.tv_warning_title, "是否確認結賬?") hepler.setText(R.id.tv_warning_title, "是否確認結賬?")
...@@ -356,6 +360,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() { ...@@ -356,6 +360,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
} }
} }
}.createDialogView().show() }.createDialogView().show()
}
} else { } else {
showLoading(context) showLoading(context)
// 確認訂單 // 確認訂單
......
...@@ -63,7 +63,7 @@ object OtherOrderUtils { ...@@ -63,7 +63,7 @@ object OtherOrderUtils {
} else { } else {
if(orderData.isDelete == 0){ if(orderData.isDelete == 0){
//如果是第三方物流,不顯示結賬按鈕 //如果是第三方物流,不顯示結賬按鈕
btnContent = "" btnContent = "重印"
} }
orderStatus = "派送中" orderStatus = "派送中"
tvStatus.setTextColor(context.resources.getColor(R.color.order_state2_color)) tvStatus.setTextColor(context.resources.getColor(R.color.order_state2_color))
......
...@@ -192,7 +192,7 @@ public class PrintOtherOrder extends PrinterRoot { ...@@ -192,7 +192,7 @@ public class PrintOtherOrder extends PrinterRoot {
// 訂單號 // 訂單號
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")) { if (data.getTakeFoodCode() != null && !data.getTakeFoodCode().equals("0")) {
setText(view, R.id.tv_order_take_food_code, "#" + data.getTakeFoodCode()); setText(view, R.id.tv_order_take_food_code, "取餐碼:#" + data.getTakeFoodCode());
} else { } else {
view.findViewById(R.id.tv_order_take_food_code).setVisibility(View.GONE); view.findViewById(R.id.tv_order_take_food_code).setVisibility(View.GONE);
} }
...@@ -218,7 +218,6 @@ public class PrintOtherOrder extends PrinterRoot { ...@@ -218,7 +218,6 @@ public class PrintOtherOrder extends PrinterRoot {
BillItemAdapter adapter = new BillItemAdapter(billData, context); BillItemAdapter adapter = new BillItemAdapter(billData, context);
rvBill.setLayoutManager(new LinearLayoutManager(context)); rvBill.setLayoutManager(new LinearLayoutManager(context));
rvBill.setAdapter(adapter); 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()));
//支付金額 //支付金額
...@@ -252,6 +251,9 @@ public class PrintOtherOrder extends PrinterRoot { ...@@ -252,6 +251,9 @@ public class PrintOtherOrder extends PrinterRoot {
setText(view, R.id.tv_receiver, "收貨人:" + data.getRECEIVER()); setText(view, R.id.tv_receiver, "收貨人:" + data.getRECEIVER());
//手機號 //手機號
setText(view, R.id.tv_phone, "手機號:" + data.getPHONE()); setText(view, R.id.tv_phone, "手機號:" + data.getPHONE());
//底部時間
// setText(view, R.id.tv_bottom_time, "手機號:" + data.getPHONE());
//備註 //備註
if (data.getRemark() != null && !data.getRemark().isEmpty()) { if (data.getRemark() != null && !data.getRemark().isEmpty()) {
setText(view, R.id.tv_remark, "備註:" + data.getRemark()); setText(view, R.id.tv_remark, "備註:" + data.getRemark());
......
...@@ -6,14 +6,14 @@ ...@@ -6,14 +6,14 @@
<TextView <TextView
android:id="@+id/print_bill_name" android:id="@+id/print_bill_name"
style="@style/print_other_order_twenty_two_style" style="@style/print_other_order_twenty_six_style"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"/> android:layout_weight="1"/>
<TextView <TextView
android:id="@+id/print_bill_value" android:id="@+id/print_bill_value"
style="@style/print_other_order_twenty_two_style" style="@style/print_other_order_twenty_six_style"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5" android:layout_marginLeft="@dimen/dp_5"
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<TextView <TextView
android:id="@+id/tv_order_number" android:id="@+id/tv_order_number"
style="@style/print_other_order_twenty_two_style" style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_15" android:layout_marginLeft="@dimen/dp_15"
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<TextView <TextView
android:id="@+id/tv_order_create_time" android:id="@+id/tv_order_create_time"
style="@style/print_other_order_twenty_two_style" style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5" android:layout_marginTop="@dimen/dp_5"
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<TextView <TextView
android:id="@+id/tv_order_take_code" android:id="@+id/tv_order_take_code"
style="@style/print_other_order_twenty_two_style" style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5" android:layout_marginTop="@dimen/dp_5"
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<TextView <TextView
android:id="@+id/tv_operator_name" android:id="@+id/tv_operator_name"
style="@style/print_other_order_twenty_two_style" style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5" android:layout_marginTop="@dimen/dp_5"
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
android:textSize="@dimen/dp_22" /> android:textSize="@dimen/dp_22" />
<TextView <TextView
style="@style/print_other_order_twenty_two_style" style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="1" android:maxLines="1"
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<TextView <TextView
style="@style/print_other_order_twenty_two_style" style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="1" android:maxLines="1"
......
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
android:id="@+id/tv_food_name" android:id="@+id/tv_food_name"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/theme_333_color" style="@style/print_other_order_twenty_six_style"
android:textSize="@dimen/dp_22"
app:layout_constraintLeft_toRightOf="@id/iv_food_item_next" app:layout_constraintLeft_toRightOf="@id/iv_food_item_next"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -42,8 +41,7 @@ ...@@ -42,8 +41,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:textColor="@color/theme_333_color" style="@style/print_other_order_twenty_six_style"
android:textSize="@dimen/dp_22"
app:layout_constraintHorizontal_weight="0.2" app:layout_constraintHorizontal_weight="0.2"
app:layout_constraintLeft_toRightOf="@id/layout_food_name" app:layout_constraintLeft_toRightOf="@id/layout_food_name"
app:layout_constraintRight_toLeftOf="@id/tv_food_price" app:layout_constraintRight_toLeftOf="@id/tv_food_price"
...@@ -54,9 +52,8 @@ ...@@ -54,9 +52,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:textColor="@color/theme_333_color" style="@style/print_other_order_twenty_six_style"
android:visibility="invisible" android:visibility="invisible"
android:textSize="@dimen/dp_20"
app:layout_constraintHorizontal_weight="0.2" app:layout_constraintHorizontal_weight="0.2"
app:layout_constraintLeft_toRightOf="@id/tv_food_number" app:layout_constraintLeft_toRightOf="@id/tv_food_number"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
......
...@@ -23,13 +23,22 @@ ...@@ -23,13 +23,22 @@
<item name="android:textColor">@color/theme_333_color</item> <item name="android:textColor">@color/theme_333_color</item>
<item name="android:textSize">@dimen/dp_18</item> <item name="android:textSize">@dimen/dp_18</item>
</style> </style>
<style name="print_other_order_twenty_two_style"> <style name="print_other_order_twenty_six_style">
<item name="android:textColor">@color/theme_333_color</item> <item name="android:textColor">@color/theme_333_color</item>
<item name="android:textSize">@dimen/dp_22</item> <item name="android:textSize">@dimen/dp_26</item>
</style>
<style name="print_other_order_thirty_style">
<item name="android:textColor">@color/theme_333_color</item>
<item name="android:textSize">@dimen/dp_30</item>
</style>
<style name="print_other_order_thirty_bold_style" parent="print_other_order_thirty_style">
<item name="android:textStyle">bold</item>
</style> </style>
<style name="printOtherOrderInfoPrintBoldTextStyle"> <style name="printOtherOrderInfoPrintBoldTextStyle">
<item name="android:textSize">@dimen/dp_18</item> <item name="android:textSize">@dimen/sp_18</item>
<item name="android:textColor">@color/theme_333_color</item> <item name="android:textColor">@color/theme_333_color</item>
<item name="android:textStyle">bold</item> <item name="android:textStyle">bold</item>
</style> </style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment