修改输入框数据类型
This commit is contained in:
@@ -28,9 +28,9 @@ android {
|
|||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
// ndk {
|
ndk {
|
||||||
// abiFilters.addAll(listOf("armeabi-v7a"/*, "arm64-v8a"*/))
|
abiFilters.addAll(listOf("armeabi-v7a"/*, "arm64-v8a"*/))
|
||||||
// }
|
}
|
||||||
|
|
||||||
// 设置输出APK文件名格式
|
// 设置输出APK文件名格式
|
||||||
setProperty("archivesBaseName", "入库客户端_${versionName}")
|
setProperty("archivesBaseName", "入库客户端_${versionName}")
|
||||||
|
|||||||
@@ -34,9 +34,9 @@ object SensorScaleUtils {
|
|||||||
}
|
}
|
||||||
// Timber.d("readWeight state = ${stateStr}, weight = $value")
|
// Timber.d("readWeight state = ${stateStr}, weight = $value")
|
||||||
// 只使用稳定值
|
// 只使用稳定值
|
||||||
if (state == SensorScale.STATE_STABLE) {
|
// if (state == SensorScale.STATE_STABLE) {
|
||||||
callback?.invoke(value)
|
callback?.invoke(value)
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -75,6 +75,8 @@ import com.sw.inbound.utils.InteractionUtils
|
|||||||
import com.sw.inbound.utils.ToastUtils
|
import com.sw.inbound.utils.ToastUtils
|
||||||
import com.sw.inbound.viewmodel.ReceiptViewModel
|
import com.sw.inbound.viewmodel.ReceiptViewModel
|
||||||
import timber.log.Timber
|
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,
|
trailingLabel = selectedItem?.unitName,
|
||||||
inputType = InputType.Decimal,
|
inputType = InputType.Decimal,
|
||||||
isInitUpdate = true
|
isInitUpdate = true,
|
||||||
|
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number)
|
||||||
)
|
)
|
||||||
|
|
||||||
RowInputLayout(
|
RowInputLayout(
|
||||||
@@ -650,7 +653,8 @@ private fun ReceiptProductEditView(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}, inputType = InputType.Decimal
|
}, inputType = InputType.Decimal,
|
||||||
|
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number)
|
||||||
)
|
)
|
||||||
RowInputLayout(
|
RowInputLayout(
|
||||||
label = "收货金额",
|
label = "收货金额",
|
||||||
@@ -671,7 +675,8 @@ private fun ReceiptProductEditView(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}, inputType = InputType.Decimal
|
}, inputType = InputType.Decimal,
|
||||||
|
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number)
|
||||||
)
|
)
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ import com.sw.inbound.utils.InteractionUtils
|
|||||||
import com.sw.inbound.utils.ToastUtils
|
import com.sw.inbound.utils.ToastUtils
|
||||||
import com.sw.inbound.viewmodel.SelfProcurementViewModel
|
import com.sw.inbound.viewmodel.SelfProcurementViewModel
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
import androidx.compose.foundation.text.KeyboardOptions
|
||||||
|
import androidx.compose.ui.text.input.KeyboardType
|
||||||
|
|
||||||
@Preview(
|
@Preview(
|
||||||
widthDp = 1920,
|
widthDp = 1920,
|
||||||
@@ -908,6 +910,7 @@ private fun SelfProductEditView(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
trailingLabel = selectedItem!!.unitName ?: "-",
|
trailingLabel = selectedItem!!.unitName ?: "-",
|
||||||
|
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number),
|
||||||
)
|
)
|
||||||
|
|
||||||
RowInputLayout(
|
RowInputLayout(
|
||||||
@@ -916,6 +919,7 @@ private fun SelfProductEditView(
|
|||||||
inputType = InputType.Decimal,
|
inputType = InputType.Decimal,
|
||||||
trailingLabel = "元",
|
trailingLabel = "元",
|
||||||
isInitUpdate = true,
|
isInitUpdate = true,
|
||||||
|
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number),
|
||||||
onValueChange = { value ->
|
onValueChange = { value ->
|
||||||
viewModel.updatePriceInputState(true)
|
viewModel.updatePriceInputState(true)
|
||||||
viewModel.updateAmountInputState(false)
|
viewModel.updateAmountInputState(false)
|
||||||
@@ -937,6 +941,7 @@ private fun SelfProductEditView(
|
|||||||
inputType = InputType.Decimal,
|
inputType = InputType.Decimal,
|
||||||
trailingLabel = "元",
|
trailingLabel = "元",
|
||||||
isInitUpdate = true,
|
isInitUpdate = true,
|
||||||
|
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number),
|
||||||
onValueChange = { value ->
|
onValueChange = { value ->
|
||||||
viewModel.updateAmountInputState(true)
|
viewModel.updateAmountInputState(true)
|
||||||
viewModel.updatePriceInputState(false)
|
viewModel.updatePriceInputState(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user