Commit f42fba82 authored by 赵鹏翔's avatar 赵鹏翔

Merge branch 'dev_v2.1.6' into 'develop'

Dev v2.1.6

See merge request !9
parents d224c083 094baf4e
...@@ -174,9 +174,6 @@ class LoginActivity : AppCompatActivity() { ...@@ -174,9 +174,6 @@ class LoginActivity : AppCompatActivity() {
// } // }
} }
/**
* Extension function to simplify setting an afterTextChanged action to EditText components.
*/
private fun EditText.afterTextChanged(afterTextChanged: (String) -> Unit) { private fun EditText.afterTextChanged(afterTextChanged: (String) -> Unit) {
this.addTextChangedListener(object : TextWatcher { this.addTextChangedListener(object : TextWatcher {
......
...@@ -54,13 +54,15 @@ class SearchOrderActivity : BaseActivity() { ...@@ -54,13 +54,15 @@ class SearchOrderActivity : BaseActivity() {
binding.vpPage.adapter = object : FragmentStateAdapter(this) { binding.vpPage.adapter = object : FragmentStateAdapter(this) {
override fun getItemCount(): Int { override fun getItemCount(): Int {
return 2 return 3
} }
override fun createFragment(position: Int): Fragment { override fun createFragment(position: Int): Fragment {
return when (position) { return when (position) {
0 -> SearchOrderFragment(MiYaPayPlantformPayWayEnum.MiyaPayType.WEIXIN) 0 -> SearchOrderFragment(MiYaPayPlantformPayWayEnum.MiyaPayType.WEIXIN)
else -> SearchOrderFragment(MiYaPayPlantformPayWayEnum.MiyaPayType.ALIPAY) 1 -> SearchOrderFragment(MiYaPayPlantformPayWayEnum.MiyaPayType.ALIPAY)
else ->
SearchOrderFragment(MiYaPayPlantformPayWayEnum.MiyaPayType.TONGLIANZHIFU)
} }
} }
} }
...@@ -72,6 +74,7 @@ class SearchOrderActivity : BaseActivity() { ...@@ -72,6 +74,7 @@ class SearchOrderActivity : BaseActivity() {
when (position) { when (position) {
0 -> tab.text = "微信" 0 -> tab.text = "微信"
1 -> tab.text = "支付宝" 1 -> tab.text = "支付宝"
2 -> tab.text = "通联支付"
else -> tab.text = "" else -> tab.text = ""
} }
}.attach() }.attach()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container" android:id="@+id/cl_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".ui.LoginActivity"> tools:context=".ui.LoginActivity">
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
app:layout_constraintVertical_bias="0.2" /> app:layout_constraintVertical_bias="0.2" />
<ImageView <ImageView
android:id="@+id/ivLogo" android:id="@+id/iv_logo"
android:layout_width="120dp" android:layout_width="120dp"
android:layout_height="120dp" android:layout_height="120dp"
android:layout_marginStart="39dp" android:layout_marginStart="39dp"
...@@ -78,11 +78,11 @@ ...@@ -78,11 +78,11 @@
android:text="您好,欢迎登录!" android:text="您好,欢迎登录!"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="48sp" android:textSize="48sp"
app:layout_constraintStart_toEndOf="@+id/ivLogo" app:layout_constraintStart_toEndOf="@+id/iv_logo"
app:layout_constraintTop_toTopOf="@+id/ivLogo" /> app:layout_constraintTop_toTopOf="@+id/iv_logo" />
<TextView <TextView
android:id="@+id/tvSlog" android:id="@+id/tv_slog"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="23dp" android:layout_marginStart="23dp"
...@@ -90,8 +90,8 @@ ...@@ -90,8 +90,8 @@
android:text="欢迎使用匡威商米收银" android:text="欢迎使用匡威商米收银"
android:textColor="#666666" android:textColor="#666666"
android:textSize="28sp" android:textSize="28sp"
app:layout_constraintBottom_toBottomOf="@+id/ivLogo" app:layout_constraintBottom_toBottomOf="@+id/iv_logo"
app:layout_constraintStart_toEndOf="@+id/ivLogo" /> app:layout_constraintStart_toEndOf="@+id/iv_logo" />
<TextView <TextView
android:id="@+id/tv_error_info" android:id="@+id/tv_error_info"
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
android:textColor="#FF5A59" android:textColor="#FF5A59"
android:textSize="24sp" android:textSize="24sp"
android:visibility="gone" android:visibility="gone"
app:layout_constraintStart_toEndOf="@+id/ivLogo" app:layout_constraintStart_toEndOf="@+id/iv_logo"
app:layout_constraintStart_toStartOf="@+id/et_username" app:layout_constraintStart_toStartOf="@+id/et_username"
app:layout_constraintTop_toBottomOf="@+id/et_password" /> app:layout_constraintTop_toBottomOf="@+id/et_password" />
......
...@@ -8,15 +8,27 @@ ...@@ -8,15 +8,27 @@
android:id="@+id/title" android:id="@+id/title"
layout="@layout/title" /> layout="@layout/title" />
<View
android:id="@+id/v_block"
android:layout_width="match_parent"
android:layout_height="85dp"
android:background="@color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="87dp"
app:layout_constraintTop_toTopOf="parent"/>
<com.google.android.material.tabs.TabLayout <com.google.android.material.tabs.TabLayout
android:id="@+id/tlIndicator" android:id="@+id/tlIndicator"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="85dp" android:layout_height="85dp"
android:layout_marginTop="87dp" android:layout_marginEnd="30dp"
android:background="@color/white" app:layout_constraintTop_toTopOf="@id/v_block"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="@id/v_block"
app:layout_constraintBottom_toBottomOf="@id/v_block"
app:layout_constraintEnd_toEndOf="@id/v_block"
app:tabGravity="fill" app:tabGravity="fill"
app:tabIndicatorColor="#FF4B8A" app:tabIndicatorColor="@color/color_FF4B8A"
app:tabIndicatorFullWidth="false" app:tabIndicatorFullWidth="false"
app:tabIndicatorHeight="5dp" app:tabIndicatorHeight="5dp"
app:tabMode="fixed" app:tabMode="fixed"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<color name="color_141C30">#141C30</color> <color name="color_141C30">#141C30</color>
<color name="color_D1D1DC">#D1D1DC</color> <color name="color_D1D1DC">#D1D1DC</color>
<color name="color_323233">#323233</color> <color name="color_323233">#323233</color>
<color name="color_FF4B8A">#FF4B8A</color>
<color name="lfile_colorAccent">#FF8000</color> <color name="lfile_colorAccent">#FF8000</color>
<color name="lfile_colorPrimary">#FF8000</color> <color name="lfile_colorPrimary">#FF8000</color>
......
# 版本历史 # 版本历史
## tag
####v2.1.6 :
-通联支付方式对接,打印、查询订单功能新增通联相关业务
## tag ## tag
####优化版本 : ####优化版本 :
-基础业务组件抽取,libcommon库抽取 -基础业务组件抽取,libcommon库抽取
-混淆配置,灰度转正式 -混淆配置,灰度转正式
## tag ## tag
####v2.1.6 ####v2.1.5.1
-统计打印业务逻辑优化,时间选择控件优化 -统计打印业务逻辑优化,时间选择控件优化
## tag ## tag
......
...@@ -23,12 +23,13 @@ public class MiYaPayPlantformPayWayEnum { ...@@ -23,12 +23,13 @@ public class MiYaPayPlantformPayWayEnum {
GONGHANG("K", "工行"), GONGHANG("K", "工行"),
FEIFAN("L", "飞凡"), FEIFAN("L", "飞凡"),
HUARUIYINHANG("M", "华润银行"), HUARUIYINHANG("M", "华润银行"),
YINLIANQIANBAO("N", "银联钱包"),
JINGDONG2("P", "京东钱包2.0"), JINGDONG2("P", "京东钱包2.0"),
RUNQIANBAO("T", "润钱包"), RUNQIANBAO("T", "润钱包"),
YIDONG("U", "移动钱包"), YIDONG("U", "移动钱包"),
MINSHENG("S", "民生银行"), MINSHENG("S", "民生银行"),
YINLIANSHANGWU("Q", "银联商务"); YINLIANSHANGWU("Q", "银联商务"),
TONGLIANZHIFU("N", "通联支付");//N实际上是银联钱包,但是匡威平台银联支付走的是通联支付的渠道,app内默认处理成通联支付的形式
// YINLIANQIANBAO("N", "银联钱包");
/** /**
* 资源id * 资源id
...@@ -69,9 +70,4 @@ public class MiYaPayPlantformPayWayEnum { ...@@ -69,9 +70,4 @@ public class MiYaPayPlantformPayWayEnum {
} }
} }
} }
package com.fastcashier.lib_common.function.print package com.fastcashier.lib_common.function.print
import android.text.TextUtils import android.text.TextUtils
import com.fastcashier.lib_common.BuildConfig
import com.fastcashier.lib_common.function.account.AccountService import com.fastcashier.lib_common.function.account.AccountService
import com.fastcashier.lib_common.function.account.SelfCashierAccountInfo import com.fastcashier.lib_common.function.account.SelfCashierAccountInfo
import com.fastcashier.lib_common.function.pay.MiYaPayPlantformPayWayEnum import com.fastcashier.lib_common.function.pay.MiYaPayPlantformPayWayEnum
...@@ -60,25 +61,25 @@ object PrintService { ...@@ -60,25 +61,25 @@ object PrintService {
selfCashierAccountInfo: SelfCashierAccountInfo, selfCashierAccountInfo: SelfCashierAccountInfo,
serialNumber: String serialNumber: String
) { ) {
// if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
// printCashier(printer, payServiceResponse, selfCashierAccountInfo, serialNumber) printCashier(printer, payServiceResponse, selfCashierAccountInfo, serialNumber)
// } else { } else {
printCashier( printCashier(
printer,
payServiceResponse,
selfCashierAccountInfo,
serialNumber
)
Timer().schedule(4000) {
printCustomer(
printer, printer,
payServiceResponse, payServiceResponse,
selfCashierAccountInfo, selfCashierAccountInfo,
serialNumber serialNumber
) )
Timer().schedule(4000) {
printCustomer(
printer,
payServiceResponse,
selfCashierAccountInfo,
serialNumber
)
}
} }
// }
} }
/** /**
...@@ -125,7 +126,13 @@ object PrintService { ...@@ -125,7 +126,13 @@ object PrintService {
if (couponDetail.size >= 2 && !TextUtils.isEmpty(couponDetail[1]) && couponDetail[1] != "0" && couponDetail[1] != "0.00") { if (couponDetail.size >= 2 && !TextUtils.isEmpty(couponDetail[1]) && couponDetail[1] != "0" && couponDetail[1] != "0.00") {
val shopCoupon = couponDetail[1] val shopCoupon = couponDetail[1]
//打印商家优惠 //打印商家优惠
printer.printText("商家优惠:${StringPriceFormatUtils.transStringPriceToDecimalString(shopCoupon)}元") printer.printText(
"商家优惠:${
StringPriceFormatUtils.transStringPriceToDecimalString(
shopCoupon
)
}"
)
} }
if (couponDetail.size >= 3 && !TextUtils.isEmpty(couponDetail[2]) && couponDetail[2] != "0" && couponDetail[2] != "0.00") { if (couponDetail.size >= 3 && !TextUtils.isEmpty(couponDetail[2]) && couponDetail[2] != "0" && couponDetail[2] != "0.00") {
//平台优惠 //平台优惠
...@@ -142,7 +149,13 @@ object PrintService { ...@@ -142,7 +149,13 @@ object PrintService {
} }
if (couponDetail.isNotEmpty() && !TextUtils.isEmpty(couponDetail[0])) { if (couponDetail.isNotEmpty() && !TextUtils.isEmpty(couponDetail[0])) {
val payPrice = couponDetail[0] val payPrice = couponDetail[0]
printer.printText("客户支付:${StringPriceFormatUtils.transStringPriceToDecimalString(payPrice)}元") printer.printText(
"客户支付:${
StringPriceFormatUtils.transStringPriceToDecimalString(
payPrice
)
}"
)
} }
printer.printText("持卡人签名:") printer.printText("持卡人签名:")
...@@ -197,7 +210,13 @@ object PrintService { ...@@ -197,7 +210,13 @@ object PrintService {
if (couponDetail.size >= 2 && !TextUtils.isEmpty(couponDetail[1]) && couponDetail[1] != "0" && couponDetail[1] != "0.00") { if (couponDetail.size >= 2 && !TextUtils.isEmpty(couponDetail[1]) && couponDetail[1] != "0" && couponDetail[1] != "0.00") {
val shopCoupon = couponDetail[1] val shopCoupon = couponDetail[1]
//打印商家优惠 //打印商家优惠
printer.printText("商家优惠:${StringPriceFormatUtils.transStringPriceToDecimalString(shopCoupon)}元") printer.printText(
"商家优惠:${
StringPriceFormatUtils.transStringPriceToDecimalString(
shopCoupon
)
}"
)
} }
if (couponDetail.size >= 3 && !TextUtils.isEmpty(couponDetail[2]) && couponDetail[2] != "0" && couponDetail[2] != "0.00") { if (couponDetail.size >= 3 && !TextUtils.isEmpty(couponDetail[2]) && couponDetail[2] != "0" && couponDetail[2] != "0.00") {
//平台优惠 //平台优惠
...@@ -214,7 +233,13 @@ object PrintService { ...@@ -214,7 +233,13 @@ object PrintService {
} }
if (couponDetail.isNotEmpty() && !TextUtils.isEmpty(couponDetail[0])) { if (couponDetail.isNotEmpty() && !TextUtils.isEmpty(couponDetail[0])) {
val payPrice = couponDetail[0] val payPrice = couponDetail[0]
printer.printText("客户支付:${StringPriceFormatUtils.transStringPriceToDecimalString(payPrice)}元") printer.printText(
"客户支付:${
StringPriceFormatUtils.transStringPriceToDecimalString(
payPrice
)
}"
)
} }
printer.printText("\n\n") printer.printText("\n\n")
} }
...@@ -270,17 +295,25 @@ object PrintService { ...@@ -270,17 +295,25 @@ object PrintService {
payServiceResponse: PayServiceResponse, payServiceResponse: PayServiceResponse,
selfCashierAccountInfo: SelfCashierAccountInfo selfCashierAccountInfo: SelfCashierAccountInfo
) { ) {
refundPrintCashier( if (BuildConfig.DEBUG) {
printer, refundPrintCashier(
payServiceResponse,
selfCashierAccountInfo
)
Timer().schedule(4000) {
refundPrintCustomer(
printer, printer,
payServiceResponse, payServiceResponse,
selfCashierAccountInfo selfCashierAccountInfo
) )
} else {
refundPrintCashier(
printer,
payServiceResponse,
selfCashierAccountInfo
)
Timer().schedule(4000) {
refundPrintCustomer(
printer,
payServiceResponse,
selfCashierAccountInfo
)
}
} }
} }
...@@ -329,7 +362,13 @@ object PrintService { ...@@ -329,7 +362,13 @@ object PrintService {
if (couponDetail.size >= 2 && !TextUtils.isEmpty(couponDetail[1]) && couponDetail[1] != "0" && couponDetail[1] != "0.00") { if (couponDetail.size >= 2 && !TextUtils.isEmpty(couponDetail[1]) && couponDetail[1] != "0" && couponDetail[1] != "0.00") {
val shopCoupon = couponDetail[1] val shopCoupon = couponDetail[1]
//打印商家优惠 //打印商家优惠
printer.printText("商家优惠:${StringPriceFormatUtils.transStringPriceToDecimalString(shopCoupon)}元") printer.printText(
"商家优惠:${
StringPriceFormatUtils.transStringPriceToDecimalString(
shopCoupon
)
}"
)
} }
if (couponDetail.size >= 3 && !TextUtils.isEmpty(couponDetail[2]) && couponDetail[2] != "0" && couponDetail[2] != "0.00") { if (couponDetail.size >= 3 && !TextUtils.isEmpty(couponDetail[2]) && couponDetail[2] != "0" && couponDetail[2] != "0.00") {
//平台优惠 //平台优惠
...@@ -346,7 +385,13 @@ object PrintService { ...@@ -346,7 +385,13 @@ object PrintService {
} }
if (couponDetail.isNotEmpty() && !TextUtils.isEmpty(couponDetail[0])) { if (couponDetail.isNotEmpty() && !TextUtils.isEmpty(couponDetail[0])) {
val payPrice = couponDetail[0] val payPrice = couponDetail[0]
printer.printText("客户支付:${StringPriceFormatUtils.transStringPriceToDecimalString(payPrice)}元") printer.printText(
"客户支付:${
StringPriceFormatUtils.transStringPriceToDecimalString(
payPrice
)
}"
)
} }
printer.printText("持卡人签名:") printer.printText("持卡人签名:")
...@@ -402,7 +447,13 @@ object PrintService { ...@@ -402,7 +447,13 @@ object PrintService {
if (couponDetail.size >= 2 && !TextUtils.isEmpty(couponDetail[1]) && couponDetail[1] != "0" && couponDetail[1] != "0.00") { if (couponDetail.size >= 2 && !TextUtils.isEmpty(couponDetail[1]) && couponDetail[1] != "0" && couponDetail[1] != "0.00") {
val shopCoupon = couponDetail[1] val shopCoupon = couponDetail[1]
//打印商家优惠 //打印商家优惠
printer.printText("商家优惠:${StringPriceFormatUtils.transStringPriceToDecimalString(shopCoupon)}元") printer.printText(
"商家优惠:${
StringPriceFormatUtils.transStringPriceToDecimalString(
shopCoupon
)
}"
)
} }
if (couponDetail.size >= 3 && !TextUtils.isEmpty(couponDetail[2]) && couponDetail[2] != "0" && couponDetail[2] != "0.00") { if (couponDetail.size >= 3 && !TextUtils.isEmpty(couponDetail[2]) && couponDetail[2] != "0" && couponDetail[2] != "0.00") {
//平台优惠 //平台优惠
...@@ -419,7 +470,13 @@ object PrintService { ...@@ -419,7 +470,13 @@ object PrintService {
} }
if (couponDetail.isNotEmpty() && !TextUtils.isEmpty(couponDetail[0])) { if (couponDetail.isNotEmpty() && !TextUtils.isEmpty(couponDetail[0])) {
val payPrice = couponDetail[0] val payPrice = couponDetail[0]
printer.printText("客户支付:${StringPriceFormatUtils.transStringPriceToDecimalString(payPrice)}元") printer.printText(
"客户支付:${
StringPriceFormatUtils.transStringPriceToDecimalString(
payPrice
)
}"
)
} }
printer.printText("\n\n") printer.printText("\n\n")
} }
...@@ -536,7 +593,9 @@ object PrintService { ...@@ -536,7 +593,9 @@ object PrintService {
printer.printText( printer.printText(
Page58MmPrintUtils.printTwoData( Page58MmPrintUtils.printTwoData(
"退款金额", "退款金额",
"" + StringPriceFormatUtils.transStringPriceToDecimalString(statisticBean.refundTotalAmount.toString()) "" + StringPriceFormatUtils.transStringPriceToDecimalString(
statisticBean.refundTotalAmount.toString()
)
) )
) )
} }
......
ext { ext {
VERSION_CODE = 26 VERSION_CODE = 27
VERSION_NAME = '2.1.5' VERSION_NAME = '2.1.6'
} }
\ No newline at end of file
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