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.LinkedWorkOrder
|
||||
import com.example.ops_android.data.repository.WarehouseRepository
|
||||
import com.example.ops_android.printer.PrintHelper
|
||||
import com.example.ops_android.ui.LocalAppContainer
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
@@ -123,6 +124,19 @@ fun ItemDetailScreen(id: Int, onBack: () -> Unit, onCreateWorkOrder: (Int) -> Un
|
||||
title = { Text("物品详情") },
|
||||
navigationIcon = { IconButton(onClick = onBack) { Icon(Icons.AutoMirrored.Filled.ArrowBack, null, tint = Color.White) } },
|
||||
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) }
|
||||
if (resp?.canModifyItem == true) {
|
||||
IconButton(onClick = { showMoveDialog = true }) { Icon(Icons.Default.OpenWith, "移动", tint = Color.White) }
|
||||
|
||||
Reference in New Issue
Block a user