Commit 61371513 by Wyh Committed by 宁斌

6.04 打印字體大小調整

parent 63feb95e
......@@ -471,6 +471,7 @@
<dimen name="sp_23">23sp</dimen>
<dimen name="sp_24">24sp</dimen>
<dimen name="sp_25">25sp</dimen>
<dimen name="sp_26">26sp</dimen>
<dimen name="sp_28">28sp</dimen>
<dimen name="sp_30">30sp</dimen>
<dimen name="sp_32">32sp</dimen>
......
......@@ -144,5 +144,5 @@
<string name="wai"></string>
<string name="amount_unit">$</string>
<string name="print_split_line">------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</string>
<string name="print_split_line">- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </string>
</resources>
......@@ -4,7 +4,7 @@ import java.util.List;
/**
* Created by Wyh on 2020/2/26.
* 售分析——食品top10
* 售分析——食品top10
*/
public class SalesFoodsBean {
......
......@@ -334,6 +334,10 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
}
} 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) {
override fun initLayout(hepler: ViewHepler, dialog: Dialog) {
hepler.setText(R.id.tv_warning_title, "是否確認結賬?")
......@@ -356,6 +360,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
}
}
}.createDialogView().show()
}
} else {
showLoading(context)
// 確認訂單
......
......@@ -63,7 +63,7 @@ object OtherOrderUtils {
} else {
if(orderData.isDelete == 0){
//如果是第三方物流,不顯示結賬按鈕
btnContent = ""
btnContent = "重印"
}
orderStatus = "派送中"
tvStatus.setTextColor(context.resources.getColor(R.color.order_state2_color))
......
......@@ -192,7 +192,7 @@ public class PrintOtherOrder extends PrinterRoot {
// 訂單號
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());
setText(view, R.id.tv_order_take_food_code, "取餐碼:#" + data.getTakeFoodCode());
} else {
view.findViewById(R.id.tv_order_take_food_code).setVisibility(View.GONE);
}
......@@ -218,7 +218,6 @@ public class PrintOtherOrder extends PrinterRoot {
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()));
//支付金額
......@@ -252,6 +251,9 @@ public class PrintOtherOrder extends PrinterRoot {
setText(view, R.id.tv_receiver, "收貨人:" + data.getRECEIVER());
//手機號
setText(view, R.id.tv_phone, "手機號:" + data.getPHONE());
//底部時間
// setText(view, R.id.tv_bottom_time, "手機號:" + data.getPHONE());
//備註
if (data.getRemark() != null && !data.getRemark().isEmpty()) {
setText(view, R.id.tv_remark, "備註:" + data.getRemark());
......
......@@ -3,11 +3,12 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical"
android:paddingBottom="@dimen/dp_20">
<TextView
android:id="@+id/tv_brand_name"
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
......@@ -16,7 +17,7 @@
<TextView
android:id="@+id/tv_restaurant_name"
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
......@@ -30,15 +31,14 @@
<TextView
android:id="@+id/tv_order_type"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text='外送'
android:textColor="@color/theme_333_color"
android:textSize="@dimen/dp_20" />
android:text='外送' />
<TextView
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/tv_order_type"
......@@ -47,7 +47,7 @@
<TextView
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/tv_order_type"
......@@ -57,68 +57,59 @@
<TextView
android:id="@+id/tv_pay_type"
style="@style/print_other_order_thirty_bold_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_5"
android:text="在線支付:"
android:textColor="@color/theme_333_color"
android:textSize="@dimen/dp_26"
android:textStyle="bold" />
android:text="在線支付:" />
<TextView
android:id="@+id/tv_delivery_time"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_5"
android:textColor="@color/theme_333_color"
android:textSize="@dimen/dp_18"
android:textStyle="bold" />
<TextView
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="@string/print_split_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
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_height="wrap_content"
android:text='單號:' />
<TextView
android:id="@+id/tv_order_take_food_code"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="@color/theme_333_color"
android:textSize="@dimen/dp_22"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tv_order_create"
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='開單時間' />
<TextView
android:id="@+id/tv_remark"
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_thirty_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
android:textSize="@dimen/dp_26"
android:textStyle="bold" />
<RelativeLayout
......@@ -128,14 +119,14 @@
<TextView
android:id="@+id/tv_application"
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="項目" />
<TextView
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/tv_application"
......@@ -143,7 +134,7 @@
android:text="@string/print_split_line" />
<TextView
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/tv_application"
......@@ -157,7 +148,7 @@
android:layout_height="wrap_content" />
<TextView
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
......@@ -169,24 +160,23 @@
<TextView
android:id="@+id/tv_total_text"
style="@style/printOtherOrderInfoPrintBoldTextStyle"
style="@style/print_other_order_thirty_bold_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:text="合計:"
android:textSize="@dimen/dp_26"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_total"
style="@style/printOtherOrderInfoPrintBoldTextStyle"
style="@style/print_other_order_thirty_bold_style"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:layout_weight="1"
android:gravity="right"
android:textSize="@dimen/dp_26"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout>
......@@ -199,23 +189,22 @@
app:layout_constraintTop_toBottomOf="@id/tv_total_text" />
<TextView
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="@string/print_split_line" />
<TextView
android:id="@+id/tv_pay_amount_text"
style="@style/printOtherOrderInfoPrintBoldTextStyle"
style="@style/print_other_order_thirty_bold_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="支付金額:"
android:textSize="@dimen/dp_26" />
<TextView
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
......@@ -223,7 +212,7 @@
<TextView
android:id="@+id/tv_address"
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="地址:"
......@@ -231,7 +220,7 @@
<TextView
android:id="@+id/tv_receiver"
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
......@@ -239,7 +228,7 @@
<TextView
android:id="@+id/tv_phone"
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
......@@ -253,7 +242,7 @@
android:textColor="@color/theme_333_color" />
<TextView
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="親愛的顧客,祝您用餐愉快,如您遇到任何問題請撥打8200 2022聯繫我們,期待您的下次光臨。"
......@@ -262,18 +251,20 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10">
android:layout_marginTop="@dimen/dp_10"
android:visibility="gone">
<TextView
android:id="@+id/tv_bottom_time"
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="2020-04-25 12:00:36 GS Support pos1" />
<TextView
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/tv_bottom_time"
......@@ -282,7 +273,7 @@
<TextView
android:id="@+id/tv_bottom_time_right_line"
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/tv_bottom_time"
......
......@@ -6,14 +6,14 @@
<TextView
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_height="wrap_content"
android:layout_weight="1"/>
<TextView
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_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
......
......@@ -19,7 +19,7 @@
<TextView
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_height="wrap_content"
android:layout_marginLeft="@dimen/dp_15"
......@@ -29,7 +29,7 @@
<TextView
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_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
......@@ -37,7 +37,7 @@
<TextView
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_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
......@@ -46,7 +46,7 @@
<TextView
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_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
......@@ -62,7 +62,7 @@
android:textSize="@dimen/dp_22" />
<TextView
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
......@@ -74,7 +74,7 @@
android:layout_height="wrap_content" />
<TextView
style="@style/print_other_order_twenty_two_style"
style="@style/print_other_order_twenty_six_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
......
......@@ -30,8 +30,7 @@
android:id="@+id/tv_food_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/theme_333_color"
android:textSize="@dimen/dp_22"
style="@style/print_other_order_twenty_six_style"
app:layout_constraintLeft_toRightOf="@id/iv_food_item_next"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -42,8 +41,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="right"
android:textColor="@color/theme_333_color"
android:textSize="@dimen/dp_22"
style="@style/print_other_order_twenty_six_style"
app:layout_constraintHorizontal_weight="0.2"
app:layout_constraintLeft_toRightOf="@id/layout_food_name"
app:layout_constraintRight_toLeftOf="@id/tv_food_price"
......@@ -54,9 +52,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="right"
android:textColor="@color/theme_333_color"
style="@style/print_other_order_twenty_six_style"
android:visibility="invisible"
android:textSize="@dimen/dp_20"
app:layout_constraintHorizontal_weight="0.2"
app:layout_constraintLeft_toRightOf="@id/tv_food_number"
app:layout_constraintRight_toRightOf="parent"
......
......@@ -23,13 +23,22 @@
<item name="android:textColor">@color/theme_333_color</item>
<item name="android:textSize">@dimen/dp_18</item>
</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: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 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:textStyle">bold</item>
</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