up
This commit is contained in:
@@ -28,6 +28,7 @@ import com.example.ops_android.data.remote.api.ItemResponse
|
|||||||
import com.example.ops_android.data.remote.api.LinkedCustomerInfo
|
import com.example.ops_android.data.remote.api.LinkedCustomerInfo
|
||||||
import com.example.ops_android.data.remote.api.LinkedWorkOrder
|
import com.example.ops_android.data.remote.api.LinkedWorkOrder
|
||||||
import com.example.ops_android.data.repository.WarehouseRepository
|
import com.example.ops_android.data.repository.WarehouseRepository
|
||||||
|
import com.example.ops_android.printer.PrintHelper
|
||||||
import com.example.ops_android.ui.LocalAppContainer
|
import com.example.ops_android.ui.LocalAppContainer
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
@@ -123,6 +124,19 @@ fun ItemDetailScreen(id: Int, onBack: () -> Unit, onCreateWorkOrder: (Int) -> Un
|
|||||||
title = { Text("物品详情") },
|
title = { Text("物品详情") },
|
||||||
navigationIcon = { IconButton(onClick = onBack) { Icon(Icons.AutoMirrored.Filled.ArrowBack, null, tint = Color.White) } },
|
navigationIcon = { IconButton(onClick = onBack) { Icon(Icons.AutoMirrored.Filled.ArrowBack, null, tint = Color.White) } },
|
||||||
actions = {
|
actions = {
|
||||||
|
val scope = rememberCoroutineScope()
|
||||||
|
item?.let { itm ->
|
||||||
|
val printerManager = app.printerManager
|
||||||
|
if (printerManager != null) {
|
||||||
|
IconButton(onClick = {
|
||||||
|
scope.launch {
|
||||||
|
PrintHelper.printItemLabel(printerManager, itm, app.sessionManager.cachedBlackMarkEnabled, app.sessionManager.cachedUnwindMm)
|
||||||
|
}
|
||||||
|
}) {
|
||||||
|
Icon(Icons.Default.Print, "打印", tint = Color.White)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
IconButton(onClick = { onCreateWorkOrder(id) }) { Icon(Icons.Default.AddTask, "新建工单", tint = Color.White) }
|
IconButton(onClick = { onCreateWorkOrder(id) }) { Icon(Icons.Default.AddTask, "新建工单", tint = Color.White) }
|
||||||
if (resp?.canModifyItem == true) {
|
if (resp?.canModifyItem == true) {
|
||||||
IconButton(onClick = { showMoveDialog = true }) { Icon(Icons.Default.OpenWith, "移动", tint = Color.White) }
|
IconButton(onClick = { showMoveDialog = true }) { Icon(Icons.Default.OpenWith, "移动", tint = Color.White) }
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#Thu Jun 25 17:53:49 CST 2026
|
#Fri Jun 26 17:02:46 CST 2026
|
||||||
VERSION_CODE=90
|
VERSION_CODE=93
|
||||||
VERSION_NAME=1.2
|
VERSION_NAME=1.2
|
||||||
|
|||||||
Reference in New Issue
Block a user