添加注释
This commit is contained in:
@@ -2,6 +2,9 @@ package com.sw.inbound.model.request
|
||||
|
||||
import com.sw.inbound.GlobalData
|
||||
|
||||
/**
|
||||
* 物品采购单位入参
|
||||
*/
|
||||
data class GoodsPurchaseUnitParam(
|
||||
val goodsId: Int = 0,// 物品id integer ,
|
||||
val purchaseUnit: Int = 0, // 采购单位 integer ,
|
||||
|
||||
@@ -3,6 +3,9 @@ package com.sw.inbound.model.request
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* 登录入参
|
||||
*/
|
||||
@Parcelize
|
||||
data class LoginParam(
|
||||
val userName: String,
|
||||
|
||||
@@ -4,6 +4,9 @@ import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*/
|
||||
@Parcelize
|
||||
data class User(
|
||||
@SerializedName("eaCode")
|
||||
|
||||
@@ -5,6 +5,9 @@ import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
/**
|
||||
* 进度条状态
|
||||
*/
|
||||
object LoadingState {
|
||||
private var _isLoading by mutableStateOf(false)
|
||||
val isLoading: Boolean get() = _isLoading
|
||||
|
||||
@@ -22,6 +22,9 @@ import retrofit2.http.POST
|
||||
import retrofit2.http.Part
|
||||
import retrofit2.http.Query
|
||||
|
||||
/**
|
||||
* api接口
|
||||
*/
|
||||
interface ApiService {
|
||||
/**
|
||||
* 登录
|
||||
|
||||
@@ -6,6 +6,9 @@ import android.content.Intent
|
||||
import com.sw.inbound.MainActivity
|
||||
import timber.log.Timber
|
||||
|
||||
/**
|
||||
* 开机广播监听
|
||||
*/
|
||||
class BootReceiver : BroadcastReceiver() {
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
|
||||
@@ -242,6 +242,9 @@ fun ReceiptLeftView(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 已确认、未确认切换按钮
|
||||
*/
|
||||
@Composable
|
||||
fun TabScreen(viewModel: ReceiptViewModel) {
|
||||
var selectedTabIndex by remember { mutableIntStateOf(0) }
|
||||
@@ -316,6 +319,9 @@ fun TabScreen(viewModel: ReceiptViewModel) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 未确认界面
|
||||
*/
|
||||
@Composable
|
||||
fun UnadjustedView(purchaseOrderList: List<GoodsInfo>, viewModel: ReceiptViewModel) {
|
||||
val checkedItem by viewModel.selectedItem.collectAsState()
|
||||
@@ -347,6 +353,9 @@ fun AdjustedView(viewModel: ReceiptViewModel) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 已确认界面
|
||||
*/
|
||||
@Composable
|
||||
private fun AdjustedViewItem(purchaseOrder: GoodsInfo, viewModel: ReceiptViewModel) {
|
||||
val warehouseTypeList = GlobalData.warehouseTypeList
|
||||
@@ -457,6 +466,9 @@ private fun AdjustedViewItem(purchaseOrder: GoodsInfo, viewModel: ReceiptViewMod
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 已确认 横向输入组件 左标题+右输入框
|
||||
*/
|
||||
@Composable
|
||||
private fun AdjustedRowInputLayout(
|
||||
label: String,
|
||||
@@ -506,6 +518,9 @@ private fun AdjustedRowInputLayout(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 未调整,显示右侧界面
|
||||
*/
|
||||
@Composable
|
||||
fun ReceiptRightView(modifier: Modifier = Modifier, viewModel: ReceiptViewModel) {
|
||||
val selectedItem by viewModel.selectedItem.collectAsState()
|
||||
|
||||
@@ -292,6 +292,9 @@ fun ProductIdentification(viewModel: SelfProcurementViewModel) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加物品弹窗内容界面
|
||||
*/
|
||||
@Composable
|
||||
private fun AddProductDialogContentView(
|
||||
modifier: Modifier,
|
||||
@@ -323,6 +326,9 @@ private fun AddProductDialogContentView(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加物品弹窗 右侧编辑框
|
||||
*/
|
||||
@Composable
|
||||
private fun DialogRightEditView(viewModel: SelfProcurementViewModel) {
|
||||
val itemTypeList = GlobalData.goodsTypeList
|
||||
@@ -546,6 +552,9 @@ private fun DialogRightEditView(viewModel: SelfProcurementViewModel) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加采购单位弹窗内容
|
||||
*/
|
||||
@Composable
|
||||
private fun AddPurchaseUnitDialogContentView(
|
||||
modifier: Modifier,
|
||||
@@ -724,7 +733,9 @@ private fun DialogAddPurchaseUnitEditView(viewModel: SelfProcurementViewModel) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 文本输入框 上文字 下输入框
|
||||
*/
|
||||
@Composable
|
||||
fun ColumnInputText(
|
||||
modifier: Modifier = Modifier,
|
||||
|
||||
Reference in New Issue
Block a user