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,28 +334,33 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
}
} else if (status == 4) {
//結賬,彈窗確認是否結賬
object : DialogUtils(context, R.layout.other_order_pause_orders) {
override fun initLayout(hepler: ViewHepler, dialog: Dialog) {
hepler.setText(R.id.tv_warning_title, "是否確認結賬?")
hepler.getView<TextView>(R.id.tv_dialog_confirm).setOnClickListener {
dialog.dismiss()
launch({
// updateOrderStatus(data.Id.toString(), "", status, "", "", isPush, data.order_type).apply {
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, "是否確認結賬?")
hepler.getView<TextView>(R.id.tv_dialog_confirm).setOnClickListener {
dialog.dismiss()
launch({
// updateOrderStatus(data.Id.toString(), "", status, "", "", isPush, data.order_type).apply {
// listener.invoke(success)
// }
repository.gsUpdateOrderStatus(data.Id.toString(), status, data.order_type, 3, "", "", "", "0", "", 1, 0).apply {
listener.invoke(code == "1")
}
}, {
repository.gsUpdateOrderStatus(data.Id.toString(), status, data.order_type, 3, "", "", "", "0", "", 1, 0).apply {
listener.invoke(code == "1")
}
}, {
})
}
hepler.getView<TextView>(R.id.tv_dialog_cancel).setOnClickListener {
dialog.dismiss()
listener.invoke(false)
})
}
hepler.getView<TextView>(R.id.tv_dialog_cancel).setOnClickListener {
dialog.dismiss()
listener.invoke(false)
}
}
}
}.createDialogView().show()
}.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());
......
......@@ -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