添加了图片拍照及识别逻辑

This commit is contained in:
zxj
2025-08-14 09:34:49 +08:00
parent 1ac73df8d9
commit 10d4a4a41d
16 changed files with 542 additions and 396 deletions
@@ -21,32 +21,18 @@ class PurchaseOrderViewModel @Inject constructor(
*/
private val _supplierList = MutableStateFlow<List<SupplierInfo?>>(emptyList())
val supplierList: StateFlow<List<SupplierInfo?>> = _supplierList
/**
* 是否可以加载更多
*/
private val _canLoadMore = MutableStateFlow(true)
val canLoadMore: StateFlow<Boolean> = _canLoadMore
/**
* 是否显示进度条
*/
private val _isMoreLoading = MutableStateFlow(false)
val isMoreLoading = _isMoreLoading
/**
* 获取采购订单-供应商列表
*/
fun getOrderList(pageNum: Int = 1, pageSize: Int = 5) {
if (pageNum != 1) {
launch {
_isMoreLoading.value = true
updateMoreLoading(true)
val response = repository.getReceiveList(pageNum, pageSize)
_isMoreLoading.value = false
updateMoreLoading(false)
if (parseResponse(response)) {
response.result?.records?.let {
_canLoadMore.value = it.size >= pageSize
updateCanLoadMore(it.size >= pageSize)
Timber.d("加载更多 canLoadMore =${it.size >= pageSize}")
_supplierList.value = _supplierList.value + it
}
@@ -63,5 +49,9 @@ class PurchaseOrderViewModel @Inject constructor(
}
}
}
override fun handleSensorScale(weight: Double) {
}
}