From 7498ad08da79b61ba087a8945f295ecf3adc07f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=A2=9E=E9=A3=9E?= <331023091@qq.com> Date: Wed, 17 Sep 2025 19:22:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 6 +++--- .../main/java/com/sw/inbound/sdk/SensorScaleUtils.kt | 4 ++-- .../com/sw/inbound/ui/page/ReceiptProductScreen.kt | 11 ++++++++--- .../com/sw/inbound/ui/page/SelfProcurementScreen.kt | 5 +++++ 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5368233..883e82e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -28,9 +28,9 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" -// ndk { -// abiFilters.addAll(listOf("armeabi-v7a"/*, "arm64-v8a"*/)) -// } + ndk { + abiFilters.addAll(listOf("armeabi-v7a"/*, "arm64-v8a"*/)) + } // 设置输出APK文件名格式 setProperty("archivesBaseName", "入库客户端_${versionName}") diff --git a/app/src/main/java/com/sw/inbound/sdk/SensorScaleUtils.kt b/app/src/main/java/com/sw/inbound/sdk/SensorScaleUtils.kt index 8ddd194..c565980 100644 --- a/app/src/main/java/com/sw/inbound/sdk/SensorScaleUtils.kt +++ b/app/src/main/java/com/sw/inbound/sdk/SensorScaleUtils.kt @@ -34,9 +34,9 @@ object SensorScaleUtils { } // Timber.d("readWeight state = ${stateStr}, weight = $value") // 只使用稳定值 - if (state == SensorScale.STATE_STABLE) { +// if (state == SensorScale.STATE_STABLE) { callback?.invoke(value) - } +// } } /** diff --git a/app/src/main/java/com/sw/inbound/ui/page/ReceiptProductScreen.kt b/app/src/main/java/com/sw/inbound/ui/page/ReceiptProductScreen.kt index 17ed7f3..23b5d55 100644 --- a/app/src/main/java/com/sw/inbound/ui/page/ReceiptProductScreen.kt +++ b/app/src/main/java/com/sw/inbound/ui/page/ReceiptProductScreen.kt @@ -75,6 +75,8 @@ import com.sw.inbound.utils.InteractionUtils import com.sw.inbound.utils.ToastUtils import com.sw.inbound.viewmodel.ReceiptViewModel import timber.log.Timber +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.ui.text.input.KeyboardType /** * 收货界面 @@ -629,7 +631,8 @@ private fun ReceiptProductEditView( }, trailingLabel = selectedItem?.unitName, inputType = InputType.Decimal, - isInitUpdate = true + isInitUpdate = true, + keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number) ) RowInputLayout( @@ -650,7 +653,8 @@ private fun ReceiptProductEditView( ) ) } - }, inputType = InputType.Decimal + }, inputType = InputType.Decimal, + keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number) ) RowInputLayout( label = "收货金额", @@ -671,7 +675,8 @@ private fun ReceiptProductEditView( ) ) } - }, inputType = InputType.Decimal + }, inputType = InputType.Decimal, + keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number) ) Row( diff --git a/app/src/main/java/com/sw/inbound/ui/page/SelfProcurementScreen.kt b/app/src/main/java/com/sw/inbound/ui/page/SelfProcurementScreen.kt index 67c99f4..eed537d 100644 --- a/app/src/main/java/com/sw/inbound/ui/page/SelfProcurementScreen.kt +++ b/app/src/main/java/com/sw/inbound/ui/page/SelfProcurementScreen.kt @@ -79,6 +79,8 @@ import com.sw.inbound.utils.InteractionUtils import com.sw.inbound.utils.ToastUtils import com.sw.inbound.viewmodel.SelfProcurementViewModel import timber.log.Timber +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.ui.text.input.KeyboardType @Preview( widthDp = 1920, @@ -908,6 +910,7 @@ private fun SelfProductEditView( } }, trailingLabel = selectedItem!!.unitName ?: "-", + keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number), ) RowInputLayout( @@ -916,6 +919,7 @@ private fun SelfProductEditView( inputType = InputType.Decimal, trailingLabel = "元", isInitUpdate = true, + keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number), onValueChange = { value -> viewModel.updatePriceInputState(true) viewModel.updateAmountInputState(false) @@ -937,6 +941,7 @@ private fun SelfProductEditView( inputType = InputType.Decimal, trailingLabel = "元", isInitUpdate = true, + keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number), onValueChange = { value -> viewModel.updateAmountInputState(true) viewModel.updatePriceInputState(false)