diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 883e82e..5368233 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/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 495834c..750c680 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -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" 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 bb918ee..17ed7f3 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 @@ -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) } 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 e6bde72..67c99f4 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 @@ -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() // 界面中会重新获取 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 { diff --git a/app/src/main/java/com/sw/inbound/ui/weight/BottomActionBar.kt b/app/src/main/java/com/sw/inbound/ui/weight/BottomActionBar.kt index 77b092a..efe868c 100644 --- a/app/src/main/java/com/sw/inbound/ui/weight/BottomActionBar.kt +++ b/app/src/main/java/com/sw/inbound/ui/weight/BottomActionBar.kt @@ -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) ) diff --git a/app/src/main/java/com/sw/inbound/ui/weight/CustomSpinner.kt b/app/src/main/java/com/sw/inbound/ui/weight/CustomSpinner.kt index fb96f05..c8822e2 100644 --- a/app/src/main/java/com/sw/inbound/ui/weight/CustomSpinner.kt +++ b/app/src/main/java/com/sw/inbound/ui/weight/CustomSpinner.kt @@ -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, diff --git a/app/src/main/java/com/sw/inbound/ui/weight/ReceiptUnadjustedListView.kt b/app/src/main/java/com/sw/inbound/ui/weight/ReceiptUnadjustedListView.kt index 2e95add..cde1550 100644 --- a/app/src/main/java/com/sw/inbound/ui/weight/ReceiptUnadjustedListView.kt +++ b/app/src/main/java/com/sw/inbound/ui/weight/ReceiptUnadjustedListView.kt @@ -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 diff --git a/app/src/main/java/com/sw/inbound/viewmodel/SelfProcurementViewModel.kt b/app/src/main/java/com/sw/inbound/viewmodel/SelfProcurementViewModel.kt index 67ba6a1..25324b2 100644 --- a/app/src/main/java/com/sw/inbound/viewmodel/SelfProcurementViewModel.kt +++ b/app/src/main/java/com/sw/inbound/viewmodel/SelfProcurementViewModel.kt @@ -91,6 +91,11 @@ class SelfProcurementViewModel @Inject constructor( */ private val _amountUserInput = MutableStateFlow(false) +// private val _storeSelectState = MutableStateFlow("") +// val storeSelectState = _storeSelectState +// fun updateStoreState(store:String) { +// _storeSelectState.value = store +// } /** * 更新全局仓库 */ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_back_white.png b/app/src/main/res/mipmap-xxhdpi/ic_back_white.png new file mode 100644 index 0000000..1a54f5d Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_back_white.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher512.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher512.png new file mode 100644 index 0000000..464d261 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher512.png differ