修改输入框数据类型
This commit is contained in:
@@ -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}")
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user