修复了部分问题
This commit is contained in:
@@ -309,7 +309,7 @@ fun AdjustedView(viewModel: ReceiptViewModel) {
|
||||
) {
|
||||
itemsIndexed(
|
||||
items = purchaseAdjustList,
|
||||
key = { index, it -> it.goodId!! + index }) { index, it ->
|
||||
key = { index, it -> it.id ?: index }) { index, it ->
|
||||
|
||||
AdjustedViewItem(it, viewModel)
|
||||
}
|
||||
@@ -358,7 +358,7 @@ private fun AdjustedViewItem(purchaseOrder: GoodsInfo, viewModel: ReceiptViewMod
|
||||
.padding(horizontal = 30.dp)
|
||||
) {
|
||||
AdjustedRowInputLayout(
|
||||
label = "单价", value = purchaseOrder.recUnitPriceTaxInStr,
|
||||
label = "单价", value = purchaseOrder.newRecUnitPriceTaxInListStr,
|
||||
onValueChange = {
|
||||
viewModel.updatePurchaseItem(
|
||||
purchaseOrder = purchaseOrder.copy(
|
||||
@@ -593,7 +593,7 @@ private fun ReceiptProductEditView(
|
||||
|
||||
RowInputLayout(
|
||||
label = "收货单价",
|
||||
value = selectedItem!!.recUnitPriceTaxInTemp,
|
||||
value = selectedItem!!.newRecUnitPriceTaxInTemp,
|
||||
trailingLabel = "元",
|
||||
isInitUpdate = true,
|
||||
onValueChange = { value ->
|
||||
@@ -604,8 +604,8 @@ private fun ReceiptProductEditView(
|
||||
selectedItem!!.copy(
|
||||
recPriceExItemTemp = "",
|
||||
recPriceExItem = 0f,
|
||||
recUnitPriceTaxInTemp = value,
|
||||
recUnitPriceTaxIn = value.toSafeFloat()
|
||||
newRecUnitPriceTaxInTemp = value,
|
||||
newRecUnitPriceTaxIn = value.toSafeFloat()
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -682,7 +682,7 @@ private fun ReceiptProductEditView(
|
||||
return@clickable
|
||||
}
|
||||
val expectAmount =
|
||||
selectedItem!!.receivedNum!!.times(selectedItem!!.recUnitPriceTaxIn!!)
|
||||
selectedItem!!.receivedNum!!.times(selectedItem!!.newRecUnitPriceTaxIn!!)
|
||||
.toSafeFloat()
|
||||
Timber.d("金额判断:期望金额 = $expectAmount, 实际金额 = ${selectedItem!!.recPriceExItem}")
|
||||
// if (expectAmount != selectedItem!!.recPriceExItem) {
|
||||
|
||||
@@ -72,7 +72,7 @@ fun ReceiptUnadjustedListView(
|
||||
)
|
||||
Spacer(modifier = Modifier.width(20.dp))
|
||||
CustomSingleRightText(
|
||||
modifier = Modifier.width(140.dp),
|
||||
modifier = Modifier.width(200.dp),
|
||||
text = "数量",
|
||||
style = AppTypography.gray96a0aaTextStyle.bold()
|
||||
)
|
||||
@@ -93,7 +93,7 @@ fun ReceiptUnadjustedListView(
|
||||
LazyColumn() {
|
||||
itemsIndexed(
|
||||
items = productList,
|
||||
key = { index, it -> it.goodId!! + index }) { index, it ->
|
||||
key = { index, it -> it.id ?: index }) { index, it ->
|
||||
|
||||
val checkedBg =
|
||||
if (selectIndex == index) Gray_DCDCF0 else Color.Transparent
|
||||
@@ -120,8 +120,8 @@ fun ReceiptUnadjustedListView(
|
||||
)
|
||||
Spacer(modifier = Modifier.width(20.dp))
|
||||
CustomSingleRightText(
|
||||
modifier = Modifier.width(140.dp),
|
||||
text = "${it.receiveCountListStr}${it.unitNameStr}",
|
||||
modifier = Modifier.width(200.dp),
|
||||
text = "${it.dualCountStr}${it.unitNameStr}",
|
||||
style = AppTypography.blackTextStyle
|
||||
)
|
||||
Spacer(modifier = Modifier.width(20.dp))
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.sw.inbound.R
|
||||
import com.sw.inbound.ext.bold
|
||||
import com.sw.inbound.model.request.PurchaseWarehouseParam
|
||||
import com.sw.inbound.ui.theme.AppTypography
|
||||
import com.sw.inbound.ui.theme.Gray_DCDCF0
|
||||
|
||||
/**
|
||||
* 自采购 左侧列表
|
||||
@@ -89,11 +88,9 @@ fun SelfProcurementListItem(
|
||||
//// key = { it.goodsId }
|
||||
// )
|
||||
{ index, it ->
|
||||
val checkedBg =
|
||||
if (it.goodsId == checkedItem?.goodsId) Gray_DCDCF0 else Color.Transparent
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.background(color = checkedBg)
|
||||
.background(color = Color.Transparent)
|
||||
.padding(30.dp)
|
||||
.clickable {
|
||||
onItemCheckedClick(it)
|
||||
|
||||
@@ -144,7 +144,7 @@ fun ReceiptTipDialog(
|
||||
Spacer(modifier = Modifier.width(10.dp))
|
||||
CustomSingleRightText(
|
||||
modifier = Modifier.weight(1f),
|
||||
text = "${goods.receivedNumListStr}${goods.unitNameStr}",
|
||||
text = "${goods.receiveCountListStr}${goods.unitNameStr}",
|
||||
style = AppTypography.blackMediumTextStyle.withColor(
|
||||
color = Color(0xFF0032C8)
|
||||
),
|
||||
@@ -153,7 +153,7 @@ fun ReceiptTipDialog(
|
||||
Spacer(modifier = Modifier.width(10.dp))
|
||||
CustomSingleRightText(
|
||||
modifier = Modifier.weight(1f),
|
||||
text = "${goods.receiveCountListStr}${goods.unitNameStr}",
|
||||
text = "${goods.receivedNumListStr}${goods.unitNameStr}",
|
||||
style = AppTypography.blackMediumTextStyle.withColor(
|
||||
Color.Red
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user