返回按钮图标替换、仓库弹窗显示
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}")
|
||||||
|
|||||||
@@ -19,9 +19,9 @@
|
|||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
android:fullBackupContent="@xml/backup_rules"
|
android:fullBackupContent="@xml/backup_rules"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher512"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher512"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.Inbound"
|
android:theme="@style/Theme.Inbound"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
|
|||||||
@@ -346,7 +346,8 @@ fun AdjustedView(viewModel: ReceiptViewModel) {
|
|||||||
) {
|
) {
|
||||||
itemsIndexed(
|
itemsIndexed(
|
||||||
items = purchaseAdjustList,
|
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)
|
AdjustedViewItem(it, viewModel)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.fillMaxSize
|
|||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
@@ -24,6 +25,9 @@ import androidx.compose.runtime.DisposableEffect
|
|||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.collectAsState
|
import androidx.compose.runtime.collectAsState
|
||||||
import androidx.compose.runtime.getValue
|
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.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
@@ -257,7 +261,6 @@ fun ProductIdentification(viewModel: SelfProcurementViewModel) {
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.width(457.dp)
|
.width(457.dp)
|
||||||
.fillMaxHeight()
|
.fillMaxHeight()
|
||||||
.padding(30.dp)
|
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@@ -784,6 +787,8 @@ private fun SelfProductEditView(
|
|||||||
var unitTypeList = emptyList<DictType>() // 界面中会重新获取
|
var unitTypeList = emptyList<DictType>() // 界面中会重新获取
|
||||||
val lifecycleOwner = LocalLifecycleOwner.current
|
val lifecycleOwner = LocalLifecycleOwner.current
|
||||||
|
|
||||||
|
// var storeSetState by remember { mutableStateOf(true) }
|
||||||
|
|
||||||
LaunchedEffect(selectedItem) {
|
LaunchedEffect(selectedItem) {
|
||||||
Timber.d("selectedItem变化 selectedItem is ${selectedItem == null}")
|
Timber.d("selectedItem变化 selectedItem is ${selectedItem == null}")
|
||||||
if (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 {
|
selectedItem?.let {
|
||||||
unitTypeList = selectedItem!!.unitDictTypeList
|
unitTypeList = selectedItem!!.unitDictTypeList
|
||||||
Column(
|
Column(
|
||||||
@@ -823,9 +840,10 @@ private fun SelfProductEditView(
|
|||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(10.dp))
|
Spacer(modifier = Modifier.height(10.dp))
|
||||||
|
|
||||||
|
// TODO: 处理筛选后右侧仓库数据的显示,只有第一次选择同步到右侧
|
||||||
RowInputLayout(
|
RowInputLayout(
|
||||||
label = "仓库",
|
label = "仓库",
|
||||||
value = selectedItem!!.warehouseNameStr,
|
value = selectedItem!!.warehouseNameStr,
|
||||||
dropdownItems = storeList,
|
dropdownItems = storeList,
|
||||||
onValueChange = { value ->
|
onValueChange = { value ->
|
||||||
selectedItem.let {
|
selectedItem.let {
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ fun BottomActionBar(
|
|||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(R.mipmap.ic_home2),
|
painter = painterResource(R.mipmap.ic_back_white),
|
||||||
contentDescription = "返回",
|
contentDescription = "返回",
|
||||||
modifier = Modifier.size(40.dp)
|
modifier = Modifier.size(40.dp)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ fun CustomSpinner(
|
|||||||
onItemSelected: (DictType) -> Unit,
|
onItemSelected: (DictType) -> Unit,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
var expanded by remember { mutableStateOf(false) }
|
// var expanded by remember { mutableStateOf(false) }
|
||||||
|
var expanded by remember { mutableStateOf(true) }
|
||||||
|
|
||||||
ExposedDropdownMenuBox(
|
ExposedDropdownMenuBox(
|
||||||
expanded = expanded,
|
expanded = expanded,
|
||||||
|
|||||||
@@ -93,7 +93,8 @@ fun ReceiptUnadjustedListView(
|
|||||||
LazyColumn() {
|
LazyColumn() {
|
||||||
itemsIndexed(
|
itemsIndexed(
|
||||||
items = productList,
|
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 =
|
val checkedBg =
|
||||||
if (/*selectIndex == index ||*/ checkedItem?.id == it.id) Gray_DCDCF0 else Color.Transparent
|
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 _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 |
Reference in New Issue
Block a user