返回按钮图标替换、仓库弹窗显示

This commit is contained in:
2025-09-12 13:35:10 +08:00
parent 88e6a38cd6
commit 63f8668b77
10 changed files with 37 additions and 11 deletions
+3 -3
View File
@@ -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}")
+2 -2
View File
@@ -19,9 +19,9 @@
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/ic_launcher512"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@mipmap/ic_launcher512"
android:supportsRtl="true"
android:theme="@style/Theme.Inbound"
android:usesCleartextTraffic="true"
@@ -346,7 +346,8 @@ fun AdjustedView(viewModel: ReceiptViewModel) {
) {
itemsIndexed(
items = purchaseAdjustList,
key = { index, it -> it.id ?: index }) { index, it ->
// key = { index, it -> it.id ?: index }) { index, it ->
key = { index, it -> index }) { index, it ->
AdjustedViewItem(it, viewModel)
}
@@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
@@ -24,6 +25,9 @@ import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
@@ -257,7 +261,6 @@ fun ProductIdentification(viewModel: SelfProcurementViewModel) {
modifier = Modifier
.width(457.dp)
.fillMaxHeight()
.padding(30.dp)
) {
Box(
modifier = Modifier
@@ -784,6 +787,8 @@ private fun SelfProductEditView(
var unitTypeList = emptyList<DictType>() // 界面中会重新获取
val lifecycleOwner = LocalLifecycleOwner.current
// var storeSetState by remember { mutableStateOf(true) }
LaunchedEffect(selectedItem) {
Timber.d("selectedItem变化 selectedItem is ${selectedItem == null}")
if (selectedItem == null) {
@@ -801,6 +806,18 @@ private fun SelfProductEditView(
}
}
// TODO: ------------------------------------------------------------------------------------------
//初始同步选择的仓库
// if (selectedItem == null) {
// val dictType = storeList.firstOrNull { it.value == viewModel.globalWarehouse.value.value }
// dictType?.let { dt ->
// viewModel.updateSelectedItem(purchaseOrder = PurchaseWarehouseParam().also {
// it.warehouseId = dt.id
// })
// }
// }
// TODO: ------------------------------------------------------------------------------------------
selectedItem?.let {
unitTypeList = selectedItem!!.unitDictTypeList
Column(
@@ -823,9 +840,10 @@ private fun SelfProductEditView(
)
Spacer(modifier = Modifier.height(10.dp))
// TODO: 处理筛选后右侧仓库数据的显示,只有第一次选择同步到右侧
RowInputLayout(
label = "仓库",
value = selectedItem!!.warehouseNameStr,
value = selectedItem!!.warehouseNameStr,
dropdownItems = storeList,
onValueChange = { value ->
selectedItem.let {
@@ -62,7 +62,7 @@ fun BottomActionBar(
}
) {
Image(
painter = painterResource(R.mipmap.ic_home2),
painter = painterResource(R.mipmap.ic_back_white),
contentDescription = "返回",
modifier = Modifier.size(40.dp)
)
@@ -35,7 +35,8 @@ fun CustomSpinner(
onItemSelected: (DictType) -> Unit,
modifier: Modifier = Modifier,
) {
var expanded by remember { mutableStateOf(false) }
// var expanded by remember { mutableStateOf(false) }
var expanded by remember { mutableStateOf(true) }
ExposedDropdownMenuBox(
expanded = expanded,
@@ -93,7 +93,8 @@ fun ReceiptUnadjustedListView(
LazyColumn() {
itemsIndexed(
items = productList,
key = { index, it -> it.id ?: index }) { index, it ->
// key = { index, it -> it.id ?: index }) { index, it ->
key = { index, it -> index }) { index, it ->
val checkedBg =
if (/*selectIndex == index ||*/ checkedItem?.id == it.id) Gray_DCDCF0 else Color.Transparent
@@ -91,6 +91,11 @@ class SelfProcurementViewModel @Inject constructor(
*/
private val _amountUserInput = MutableStateFlow<Boolean>(false)
// private val _storeSelectState = MutableStateFlow<String>("")
// val storeSelectState = _storeSelectState
// fun updateStoreState(store:String) {
// _storeSelectState.value = store
// }
/**
* 更新全局仓库
*/
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB