Compare commits
64 Commits
d26f164736
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c4e97945b | |||
| a663609eeb | |||
| 74e9f5a827 | |||
| d6f72186a3 | |||
| b2ea79512c | |||
| 8b666364ae | |||
| aac2c860c6 | |||
| c2b5e74156 | |||
| 093314d601 | |||
| 9b089d51b1 | |||
| 8ced5be7a9 | |||
| da50aa9794 | |||
| 47cef6ee59 | |||
| baaa9c5615 | |||
| edb1f576b7 | |||
| 8b0043d2f5 | |||
| 5ccb971c61 | |||
| 6278d9738d | |||
| 0b25e9c68c | |||
| a4095d6e72 | |||
| d31e78ff49 | |||
| 43b1b6f44f | |||
| f4d5904003 | |||
| 4b3c31252b | |||
| f61302a1f6 | |||
| a64b963d03 | |||
| 634dd96ac6 | |||
| 93939ed411 | |||
| 06d0244e24 | |||
| f04cf81ff2 | |||
| d31a408ddc | |||
| ce080f04a7 | |||
| 5a9dd6f97a | |||
| 8c774ef3a3 | |||
| af49cf4fb6 | |||
| 76f55597db | |||
| fada4b3231 | |||
| 15e13e8e12 | |||
| 03a6e75d68 | |||
| 2729e18043 | |||
| abac0d28fa | |||
| 06713190e0 | |||
| ff8185644b | |||
| 330b5bc28a | |||
| 1476f1368a | |||
| b994f43bc7 | |||
| be3d633301 | |||
| ad6b7d17a5 | |||
| 7413a8d159 | |||
| a1c53dd9fe | |||
| a60d59de83 | |||
| d0c7207b5a | |||
| 9406047a57 | |||
| b81d887b0b | |||
| 97ef9b4679 | |||
| 2efe322fcf | |||
| 41fc2f4558 | |||
| f628ae64a9 | |||
| b2cc0059b3 | |||
| 3f56614df8 | |||
| e12e0db7be | |||
| 0a9230860b | |||
| e50ce25eb3 | |||
| c0025c949f |
14
.claude/commands/run.md
Normal file
14
.claude/commands/run.md
Normal file
@@ -0,0 +1,14 @@
|
||||
清理构建缓存,重新打包 Debug 版本,安装到 Android 设备并启动应用
|
||||
|
||||
先检查是否有已连接的设备,然后执行清理、构建、安装并启动应用。
|
||||
|
||||
```bash
|
||||
# 检查设备连接
|
||||
adb devices -l
|
||||
|
||||
# 清理 + 安装
|
||||
./gradlew clean installDebug
|
||||
|
||||
# 启动应用(通过 Launcher Intent)
|
||||
adb shell monkey -p com.lukouguoji.aerologic -c android.intent.category.LAUNCHER 1
|
||||
```
|
||||
15
.claude/mcp.json
Normal file
15
.claude/mcp.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"空港集团 - API 文档": {
|
||||
"command": "/Users/kid/.version-fox/sdks/nodejs/bin/npx",
|
||||
"args": [
|
||||
"-y",
|
||||
"apifox-mcp-server@latest",
|
||||
"--project-id=7382863"
|
||||
],
|
||||
"env": {
|
||||
"APIFOX_ACCESS_TOKEN": "APS-S2aVVwqasbdByzPLgSqryRC8BB0ZFqhQ"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,9 +55,58 @@
|
||||
"Bash(xargs:*)",
|
||||
"Bash(unzip:*)",
|
||||
"WebFetch(domain:gainscha.github.io)",
|
||||
"WebFetch(domain:m.gainscha.com)"
|
||||
"WebFetch(domain:m.gainscha.com)",
|
||||
"Bash(git add:*)",
|
||||
"Bash(git commit:*)",
|
||||
"WebFetch(domain:support.claude.com)",
|
||||
"WebFetch(domain:api.apifox.com)",
|
||||
"Bash(curl:*)",
|
||||
"Bash(git:*)",
|
||||
"WebFetch(domain:app.apifox.com)",
|
||||
"WebFetch(domain:apifox.com)",
|
||||
"Bash(npx:*)",
|
||||
"Bash(claude mcp:*)",
|
||||
"Bash(python3:*)",
|
||||
"mcp__apifox__read_project_oas_ukz3j4",
|
||||
"mcp__apifox__read_project_oas_ref_resources_ukz3j4",
|
||||
"mcp__apifox__refresh_project_oas_ukz3j4",
|
||||
"mcp__playwright__browser_click",
|
||||
"mcp__playwright__browser_take_screenshot",
|
||||
"mcp__playwright__browser_snapshot",
|
||||
"Bash(/tmp/communicate_type_findings.md:*)",
|
||||
"Read(//tmp/**)",
|
||||
"mcp__apifox__read_project_oas_3gn3lx",
|
||||
"mcp__apifox__read_project_oas_ref_resources_3gn3lx",
|
||||
"mcp__apifox__refresh_project_oas_3gn3lx",
|
||||
"Bash(cp \"/var/folders/qz/qk20ny650h1fhmxrx46gdfhr0000gn/T/images/Warp 2026-03-13 09.54.13.tiff\" /tmp/screenshot.png)",
|
||||
"Read(//private/var/folders/qz/qk20ny650h1fhmxrx46gdfhr0000gn/T/images/**)",
|
||||
"mcp__apifox__read_project_oas_2s2uhx",
|
||||
"mcp__apifox__read_project_oas_ref_resources_2s2uhx",
|
||||
"mcp__apifox__refresh_project_oas_2s2uhx",
|
||||
"Bash(find /Users/kid/Development/Fusion/Projects/aerologic-app -path \"*/build\" -prune -o -type f \\\\\\( -name \"*manifest*\" -o -name \"*bean*\" \\\\\\) | grep -i \"gjj\\\\|tally\" | grep -E \"\\\\.\\(kt\\)$\" | sort)",
|
||||
"mcp__apifox__read_project_oas_9otrai",
|
||||
"mcp__apifox__read_project_oas_ref_resources_9otrai",
|
||||
"Bash(cd:*)",
|
||||
"mcp__apifox__read_project_oas_tua249",
|
||||
"mcp__apifox__read_project_oas_ref_resources_tua249",
|
||||
"mcp__apifox__read_project_oas_heib77",
|
||||
"mcp__apifox__read_project_oas_ref_resources_heib77",
|
||||
"Bash(export JAVA_HOME=\"/Applications/Android Studio.app/Contents/jbr/Contents/Home\")",
|
||||
"Bash(export PATH=\"$JAVA_HOME/bin:$PATH\")",
|
||||
"Read(//Library/Java/JavaVirtualMachines/**)",
|
||||
"Read(//usr/local/**)",
|
||||
"Read(//opt/homebrew/opt/**)",
|
||||
"Bash(/Users/kid/.vfox/sdks/java/bin/java -version 2>&1)",
|
||||
"Bash(export JAVA_HOME=/Users/kid/.vfox/sdks/java)",
|
||||
"mcp__apifox__read_project_oas_kcl8s7",
|
||||
"mcp__apifox__refresh_project_oas_kcl8s7",
|
||||
"mcp__apifox__read_project_oas_ref_resources_kcl8s7"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
}
|
||||
},
|
||||
"enabledMcpjsonServers": [
|
||||
"空港集团 - API 文档",
|
||||
"apifox"
|
||||
]
|
||||
}
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -203,3 +203,4 @@ fabric.properties
|
||||
.worktrees/
|
||||
.security-key
|
||||
logs/security/
|
||||
.playwright-mcp/
|
||||
|
||||
15
.mcp.json
Normal file
15
.mcp.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"apifox": {
|
||||
"command": "npx",
|
||||
"args": [
|
||||
"-y",
|
||||
"apifox-mcp-server@latest",
|
||||
"--project-id=7382863"
|
||||
],
|
||||
"env": {
|
||||
"APIFOX_ACCESS_TOKEN": "APS-S2aVVwqasbdByzPLgSqryRC8BB0ZFqhQ"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
[tools]
|
||||
java = "17.0.17+10-amzn"
|
||||
java = "17+35-amzn"
|
||||
|
||||
@@ -1 +1 @@
|
||||
/Users/kid/.version-fox/cache/java/v-17.0.17+10-amzn/java-17.0.17+10-amzn
|
||||
/Users/kid/.vfox/cache/java/v-17+35-amzn/java-17+35-amzn
|
||||
@@ -286,6 +286,14 @@
|
||||
android:name=".page.car.list.CarListActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".page.uld.list.UldListActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".page.uld.edit.UldEditActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".page.car.add.CarDetailsActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
@@ -298,10 +306,22 @@
|
||||
android:name=".page.log.list.LogListActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".page.log.list.LogQueryActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".page.log.detail.LogDetailActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".page.transportLog.list.TransportLogActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".page.coldStorage.list.ColdStorageActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".page.gnj.manifest.list.GnjManifestListActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
@@ -405,6 +425,20 @@
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-进港舱单分单编辑 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpManifestSubEditActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-进港舱单详情 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpManifestDetailsActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-装机单(分拣理货) -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpLoadingListActivity"
|
||||
@@ -412,6 +446,13 @@
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-装机单编辑 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpLoadingListEditActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-理货报告 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpTallyActivity"
|
||||
@@ -419,6 +460,81 @@
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpTallyDetailsActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-仓库 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpStorageUseActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-提取记录 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpPickUpRecordActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-提取详情 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpPickUpRecordDetailsActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-费用修改 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpPickUpChargeEditActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-提取出库 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpPickUpDLVActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-进港查询 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpQueryActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-查询详情 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpQueryDetailsActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-运单修改 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpQueryEditActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-事故签证 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpAccidentVisaActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpAccidentVisaEditActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<service android:name="com.huitao.printer.service.PrinterService" />
|
||||
<service android:name="com.lukouguoji.gnc.bluetooth.service.AncillaryService" />
|
||||
<service android:name="com.lukouguoji.gnc.bluetooth.service.MyService" />
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.lukouguoji.aerologic.page.coldStorage.list
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.aerologic.databinding.ActivityColdStorageBinding
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.impl.observe
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 冷库登记页面
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_COLD_STORAGE)
|
||||
class ColdStorageActivity :
|
||||
BaseBindingActivity<ActivityColdStorageBinding, ColdStorageViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_cold_storage
|
||||
override fun viewModelClass() = ColdStorageViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("冷库登记")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 观察全选状态,更新图标透明度
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 绑定分页
|
||||
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
// 初始加载数据
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == Constant.RequestCode.WAYBILL && resultCode == Activity.RESULT_OK) {
|
||||
viewModel.wbNo.value = data?.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||
viewModel.searchClick()
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
context.startActivity(Intent(context, ColdStorageActivity::class.java))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.lukouguoji.aerologic.page.coldStorage.list
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.aerologic.databinding.ItemColdStorageBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.ColdStorageBean
|
||||
|
||||
/**
|
||||
* 冷库登记 列表项ViewHolder
|
||||
*/
|
||||
class ColdStorageViewHolder(view: View) :
|
||||
BaseViewHolder<ColdStorageBean, ItemColdStorageBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item) ?: return
|
||||
binding.bean = bean
|
||||
binding.position = position
|
||||
binding.executePendingBindings()
|
||||
|
||||
// 添加图标点击事件 - 切换选择状态
|
||||
binding.ivIcon.setOnClickListener {
|
||||
bean.checked.set(!bean.checked.get())
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
package com.lukouguoji.aerologic.page.coldStorage.list
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.bean.ColdStorageBean
|
||||
import dev.utils.app.info.KeyValue
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
/**
|
||||
* 冷库登记 ViewModel
|
||||
*/
|
||||
class ColdStorageViewModel : BasePageViewModel() {
|
||||
|
||||
// ========== 搜索条件 ==========
|
||||
val ieFlag = MutableLiveData("") // 进出港标识
|
||||
val wbNo = MutableLiveData("") // 运单号
|
||||
val status = MutableLiveData("") // 货物状态
|
||||
val outUserName = MutableLiveData("") // 出库人
|
||||
val inUserName = MutableLiveData("") // 入库人
|
||||
|
||||
// ========== 下拉列表数据源 ==========
|
||||
val ieFlagList = MutableLiveData<List<KeyValue>>(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("进港", "I"),
|
||||
KeyValue("出港", "E")
|
||||
)
|
||||
)
|
||||
val statusList = MutableLiveData<List<KeyValue>>(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("已入库", "已入库"),
|
||||
KeyValue("已出库", "已出库")
|
||||
)
|
||||
)
|
||||
|
||||
// ========== 统计信息 ==========
|
||||
val totalCount = MutableLiveData("0") // 合计票数
|
||||
val totalPc = MutableLiveData("0") // 总件数
|
||||
val totalWeight = MutableLiveData("0") // 总重量
|
||||
|
||||
// ========== 全选状态 ==========
|
||||
val isAllChecked = MutableLiveData(false)
|
||||
|
||||
init {
|
||||
isAllChecked.observeForever { checked ->
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<ColdStorageBean>
|
||||
?: return@observeForever
|
||||
list.forEach { it.checked.set(checked) }
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
// ========== 适配器配置 ==========
|
||||
val itemViewHolder = ColdStorageViewHolder::class.java
|
||||
val itemLayoutId = R.layout.item_cold_storage
|
||||
|
||||
/**
|
||||
* 扫码运单号
|
||||
*/
|
||||
fun scanWbNo() {
|
||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索按钮点击
|
||||
*/
|
||||
fun searchClick() {
|
||||
refresh()
|
||||
}
|
||||
|
||||
/**
|
||||
* 全选按钮点击
|
||||
*/
|
||||
fun checkAllClick() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<ColdStorageBean> ?: return
|
||||
val shouldCheckAll = !isAllChecked.value!!
|
||||
list.forEach { it.checked.set(shouldCheckAll) }
|
||||
isAllChecked.value = shouldCheckAll
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成入库
|
||||
*/
|
||||
fun completeIn() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<ColdStorageBean> ?: return
|
||||
val selectedItems = list.filter { it.isSelected }
|
||||
|
||||
if (selectedItems.isEmpty()) {
|
||||
showToast("请选择要入库的数据")
|
||||
return
|
||||
}
|
||||
|
||||
launchLoadingCollect({ NetApply.api.coldStorageCompleteIn(selectedItems.toRequestBody()) }) {
|
||||
onSuccess = {
|
||||
showToast("入库完成")
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
}
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成出库
|
||||
*/
|
||||
fun completeOut() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<ColdStorageBean> ?: return
|
||||
val selectedItems = list.filter { it.isSelected }
|
||||
|
||||
if (selectedItems.isEmpty()) {
|
||||
showToast("请选择要出库的数据")
|
||||
return
|
||||
}
|
||||
|
||||
launchLoadingCollect({ NetApply.api.coldStorageCompleteOut(selectedItems.toRequestBody()) }) {
|
||||
onSuccess = {
|
||||
showToast("出库完成")
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
}
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
override fun getData() {
|
||||
val filterParams = mapOf(
|
||||
"ieFlag" to ieFlag.value?.ifEmpty { null },
|
||||
"wbNo" to wbNo.value?.ifEmpty { null },
|
||||
"status" to status.value?.ifEmpty { null },
|
||||
"outUserName" to outUserName.value?.ifEmpty { null },
|
||||
"inUserName" to inUserName.value?.ifEmpty { null }
|
||||
)
|
||||
|
||||
val listParams = (filterParams + mapOf(
|
||||
"pageNum" to pageModel.page,
|
||||
"pageSize" to pageModel.limit
|
||||
)).toRequestBody()
|
||||
|
||||
val totalParams = filterParams.toRequestBody()
|
||||
|
||||
// 获取列表
|
||||
launchLoadingCollect({ NetApply.api.getColdStorageList(listParams) }) {
|
||||
onSuccess = { pageModel.handleListBean(it?.toBaseListBean()) }
|
||||
}
|
||||
|
||||
// 获取统计信息
|
||||
launchCollect({ NetApply.api.getColdStorageTotal(totalParams) }) {
|
||||
onSuccess = { result ->
|
||||
val data = result.data
|
||||
totalCount.value = (data?.wbNumber ?: 0).toString()
|
||||
totalPc.value = (data?.totalPc ?: 0).toString()
|
||||
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,15 @@ package com.lukouguoji.aerologic.page.flight.query.details
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.aerologic.databinding.ActivityFlightQueryDetailsBinding
|
||||
import com.lukouguoji.aerologic.databinding.ActivityGnjStashDetailsBinding
|
||||
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_FLIGHT_QUERY_DETAILS)
|
||||
class FlightQueryDetailsActivity :
|
||||
BaseBindingActivity<ActivityFlightQueryDetailsBinding, FlightQueryDetailsViewModel>() {
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
|
||||
@Deprecated("使用 module_hangban 中的 HbQueryListActivity 替代")
|
||||
class FlightQueryListActivity :
|
||||
BaseBindingActivity<ActivityFlightQueryListBinding, FlightQueryListViewModel>() {
|
||||
override fun layoutId() = R.layout.activity_flight_query_list
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
package com.lukouguoji.aerologic.page.log.detail
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.util.TypedValue
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.google.gson.Gson
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.aerologic.databinding.ActivityLogDetailBinding
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.LogBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_LOG_DETAIL)
|
||||
class LogDetailActivity : BaseBindingActivity<ActivityLogDetailBinding, LogDetailViewModel>() {
|
||||
|
||||
private val timelineAdapter = LogDetailTimelineAdapter()
|
||||
|
||||
override fun layoutId(): Int {
|
||||
return R.layout.activity_log_detail
|
||||
}
|
||||
|
||||
override fun viewModelClass(): Class<LogDetailViewModel> {
|
||||
return LogDetailViewModel::class.java
|
||||
}
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("操作日志详情")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 配置操作详情 RecyclerView(垂直时间线)
|
||||
binding.rvTimeline.adapter = timelineAdapter
|
||||
|
||||
// 观察流转状态变化,程序化构建步骤进度条
|
||||
viewModel.currentStepIndex.observe(this) { index ->
|
||||
buildStepProgressBar(viewModel.allSteps, index)
|
||||
}
|
||||
|
||||
viewModel.statusLogList.observe(this) { list ->
|
||||
timelineAdapter.setData(list)
|
||||
}
|
||||
|
||||
viewModel.initOnCreated(intent)
|
||||
}
|
||||
|
||||
private fun buildStepProgressBar(steps: List<String>, currentIndex: Int) {
|
||||
val container = binding.llSteps
|
||||
container.removeAllViews()
|
||||
|
||||
val colorBlue = 0xFF1C8CF5.toInt()
|
||||
val colorGray = 0xFFCCCCCC.toInt()
|
||||
val colorGreen = 0xFF4CAF50.toInt()
|
||||
val dotSize = dp(10)
|
||||
val lineHeight = dp(2)
|
||||
|
||||
for (i in steps.indices) {
|
||||
val isCompleted = i <= currentIndex
|
||||
val isCurrent = i == currentIndex
|
||||
val isFirst = i == 0
|
||||
val isLast = i == steps.size - 1
|
||||
|
||||
// 每个步骤的根容器(等宽)
|
||||
val stepLayout = LinearLayout(this).apply {
|
||||
orientation = LinearLayout.VERTICAL
|
||||
gravity = Gravity.CENTER_HORIZONTAL
|
||||
layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f)
|
||||
}
|
||||
|
||||
// 步骤名称(所有步骤统一 padding 确保高度一致)
|
||||
val tvName = TextView(this).apply {
|
||||
text = steps[i]
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_SP, 13f)
|
||||
gravity = Gravity.CENTER
|
||||
setPadding(dp(6), dp(2), dp(6), dp(2))
|
||||
if (isCurrent) {
|
||||
setBackgroundResource(R.drawable.bg_step_current_badge)
|
||||
setTextColor(0xFFFFFFFF.toInt())
|
||||
} else {
|
||||
setTextColor(if (isCompleted) 0xFF333333.toInt() else 0xFF999999.toInt())
|
||||
}
|
||||
layoutParams = LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT
|
||||
)
|
||||
}
|
||||
stepLayout.addView(tvName)
|
||||
|
||||
// 圆点和连线区域(FrameLayout 叠加)
|
||||
val dotLineContainer = FrameLayout(this).apply {
|
||||
layoutParams = LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT, dp(20)
|
||||
).apply { topMargin = dp(8) }
|
||||
}
|
||||
|
||||
// 左半连线(从左边缘到中心,略超过中心以避免断层)
|
||||
if (!isFirst) {
|
||||
val lineLeft = View(this).apply {
|
||||
setBackgroundColor(if (isCompleted) colorBlue else colorGray)
|
||||
layoutParams = FrameLayout.LayoutParams(0, lineHeight).apply {
|
||||
gravity = Gravity.CENTER_VERTICAL or Gravity.START
|
||||
}
|
||||
}
|
||||
dotLineContainer.addView(lineLeft)
|
||||
dotLineContainer.post {
|
||||
lineLeft.layoutParams = FrameLayout.LayoutParams(
|
||||
dotLineContainer.width / 2 + dotSize / 2, lineHeight
|
||||
).apply { gravity = Gravity.CENTER_VERTICAL or Gravity.START }
|
||||
}
|
||||
}
|
||||
|
||||
// 右半连线(从中心到右边缘,略超过中心以避免断层)
|
||||
if (!isLast) {
|
||||
val rightLineColor = if (isCompleted && !isCurrent) colorBlue else colorGray
|
||||
val lineRight = View(this).apply {
|
||||
setBackgroundColor(rightLineColor)
|
||||
layoutParams = FrameLayout.LayoutParams(0, lineHeight).apply {
|
||||
gravity = Gravity.CENTER_VERTICAL or Gravity.END
|
||||
}
|
||||
}
|
||||
dotLineContainer.addView(lineRight)
|
||||
dotLineContainer.post {
|
||||
lineRight.layoutParams = FrameLayout.LayoutParams(
|
||||
dotLineContainer.width / 2 + dotSize / 2, lineHeight
|
||||
).apply { gravity = Gravity.CENTER_VERTICAL or Gravity.END }
|
||||
}
|
||||
}
|
||||
|
||||
// 圆点(叠加在连线之上)
|
||||
val dot = View(this).apply {
|
||||
setBackgroundResource(
|
||||
when {
|
||||
isCurrent -> R.drawable.bg_step_dot_green
|
||||
isCompleted -> R.drawable.bg_step_dot_blue
|
||||
else -> R.drawable.bg_step_dot_gray
|
||||
}
|
||||
)
|
||||
layoutParams = FrameLayout.LayoutParams(dotSize, dotSize).apply {
|
||||
gravity = Gravity.CENTER
|
||||
}
|
||||
}
|
||||
dotLineContainer.addView(dot)
|
||||
|
||||
stepLayout.addView(dotLineContainer)
|
||||
container.addView(stepLayout)
|
||||
}
|
||||
}
|
||||
|
||||
private fun dp(value: Int): Int {
|
||||
return TypedValue.applyDimension(
|
||||
TypedValue.COMPLEX_UNIT_DIP, value.toFloat(), resources?.displayMetrics
|
||||
).toInt()
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, bean: LogBean) {
|
||||
val starter = Intent(context, LogDetailActivity::class.java)
|
||||
starter.putExtra(Constant.Key.DATA, Gson().toJson(bean))
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.lukouguoji.aerologic.page.log.detail
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.lukouguoji.aerologic.R
|
||||
|
||||
class LogDetailStepAdapter : RecyclerView.Adapter<LogDetailStepAdapter.StepViewHolder>() {
|
||||
|
||||
private var steps: List<String> = emptyList()
|
||||
private var currentIndex: Int = -1
|
||||
|
||||
fun setData(steps: List<String>, currentIndex: Int) {
|
||||
this.steps = steps
|
||||
this.currentIndex = currentIndex
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): StepViewHolder {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_log_step, parent, false)
|
||||
return StepViewHolder(view)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: StepViewHolder, position: Int) {
|
||||
val step = steps[position]
|
||||
val isCompleted = position <= currentIndex
|
||||
val isCurrent = position == currentIndex
|
||||
val isFirst = position == 0
|
||||
val isLast = position == steps.size - 1
|
||||
|
||||
// 步骤名称
|
||||
if (isCurrent) {
|
||||
holder.tvStepName.setBackgroundResource(R.drawable.bg_step_current_badge)
|
||||
holder.tvStepName.setTextColor(0xFFFFFFFF.toInt())
|
||||
} else {
|
||||
holder.tvStepName.setBackgroundResource(0)
|
||||
holder.tvStepName.setTextColor(
|
||||
if (isCompleted) 0xFF333333.toInt() else 0xFF999999.toInt()
|
||||
)
|
||||
}
|
||||
holder.tvStepName.text = step
|
||||
|
||||
// 圆点
|
||||
holder.dotView.setBackgroundResource(
|
||||
when {
|
||||
isCurrent -> R.drawable.bg_step_dot_green
|
||||
isCompleted -> R.drawable.bg_step_dot_blue
|
||||
else -> R.drawable.bg_step_dot_gray
|
||||
}
|
||||
)
|
||||
|
||||
// 左侧连线
|
||||
holder.lineLeft.visibility = if (isFirst) View.INVISIBLE else View.VISIBLE
|
||||
holder.lineLeft.setBackgroundColor(
|
||||
if (isCompleted) 0xFF1C8CF5.toInt() else 0xFFCCCCCC.toInt()
|
||||
)
|
||||
|
||||
// 右侧连线
|
||||
holder.lineRight.visibility = if (isLast) View.INVISIBLE else View.VISIBLE
|
||||
holder.lineRight.setBackgroundColor(
|
||||
if (isCompleted && position < currentIndex) 0xFF1C8CF5.toInt() else 0xFFCCCCCC.toInt()
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = steps.size
|
||||
|
||||
class StepViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val tvStepName: TextView = view.findViewById(R.id.tv_step_name)
|
||||
val dotView: View = view.findViewById(R.id.view_dot)
|
||||
val lineLeft: View = view.findViewById(R.id.view_line_left)
|
||||
val lineRight: View = view.findViewById(R.id.view_line_right)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.lukouguoji.aerologic.page.log.detail
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.module_base.bean.StatusLogBean
|
||||
|
||||
class LogDetailTimelineAdapter : RecyclerView.Adapter<LogDetailTimelineAdapter.TimelineViewHolder>() {
|
||||
|
||||
private var items: List<StatusLogBean> = emptyList()
|
||||
|
||||
fun setData(list: List<StatusLogBean>) {
|
||||
items = list
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TimelineViewHolder {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_log_timeline, parent, false)
|
||||
return TimelineViewHolder(view)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: TimelineViewHolder, position: Int) {
|
||||
val item = items[position]
|
||||
val isFirst = position == 0
|
||||
val isLast = position == items.size - 1
|
||||
|
||||
holder.tvContent.text = item.content
|
||||
holder.tvTime.text = item.opDate
|
||||
|
||||
// 最后一项(当前步骤)用绿色圆点
|
||||
holder.dotView.setBackgroundResource(
|
||||
if (isLast) R.drawable.bg_timeline_dot_green
|
||||
else R.drawable.bg_timeline_dot_gray
|
||||
)
|
||||
|
||||
// 第一项不显示顶部连线
|
||||
holder.lineTop.visibility = if (isFirst) View.INVISIBLE else View.VISIBLE
|
||||
|
||||
// 最后一项不显示底部连线
|
||||
holder.lineBottom.visibility = if (isLast) View.INVISIBLE else View.VISIBLE
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = items.size
|
||||
|
||||
class TimelineViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val dotView: View = view.findViewById(R.id.view_dot)
|
||||
val lineTop: View = view.findViewById(R.id.view_line_top)
|
||||
val lineBottom: View = view.findViewById(R.id.view_line_bottom)
|
||||
val tvContent: TextView = view.findViewById(R.id.tv_content)
|
||||
val tvTime: TextView = view.findViewById(R.id.tv_time)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.lukouguoji.aerologic.page.log.detail
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.google.gson.Gson
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
import com.lukouguoji.module_base.bean.LogBean
|
||||
import com.lukouguoji.module_base.bean.StatusLogBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
|
||||
class LogDetailViewModel : BaseViewModel() {
|
||||
|
||||
val waybillNo = MutableLiveData("")
|
||||
val waybillType = MutableLiveData("")
|
||||
|
||||
val statusLogList = MutableLiveData<List<StatusLogBean>>(emptyList())
|
||||
|
||||
// 流转状态步骤定义
|
||||
val allSteps = listOf(
|
||||
"预录入", "完成收运", "运抵申报", "海关放行",
|
||||
"完成组装", "完成复磅", "装载申报", "航班关闭", "理货申报"
|
||||
)
|
||||
|
||||
// 当前完成到哪一步(索引)
|
||||
val currentStepIndex = MutableLiveData(-1)
|
||||
|
||||
fun initOnCreated(intent: Intent) {
|
||||
val json = intent.getStringExtra(Constant.Key.DATA) ?: ""
|
||||
if (json.isNotEmpty()) {
|
||||
val bean = Gson().fromJson(json, LogBean::class.java)
|
||||
waybillNo.value = bean.key
|
||||
waybillType.value = getAwbTypeName(bean.logType)
|
||||
loadStatusList(bean.key, bean.logType)
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadStatusList(key: String, logType: String) {
|
||||
if (key.isEmpty()) {
|
||||
loadMockData()
|
||||
return
|
||||
}
|
||||
launchCollect({
|
||||
NetApply.api.getLogStatusList(
|
||||
mapOf(
|
||||
"key" to key,
|
||||
"awbType" to logType
|
||||
).toRequestBody()
|
||||
)
|
||||
}) {
|
||||
onSuccess = {
|
||||
val list = it.data ?: emptyList()
|
||||
if (list.isNotEmpty()) {
|
||||
statusLogList.value = list
|
||||
val lastStatus = list.last().content
|
||||
val index = allSteps.indexOfFirst { step ->
|
||||
lastStatus.contains(step)
|
||||
}
|
||||
currentStepIndex.value = if (index >= 0) index else list.size - 1
|
||||
} else {
|
||||
loadMockData()
|
||||
}
|
||||
}
|
||||
onFailed = { _, _ ->
|
||||
loadMockData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadMockData() {
|
||||
// Mock 数据:模拟到"装载申报"步骤
|
||||
currentStepIndex.value = 6 // "装载申报" 在 allSteps 中的索引
|
||||
|
||||
statusLogList.value = listOf(
|
||||
StatusLogBean(content = "托书录入", opDate = "2017-04-01 12:00:00"),
|
||||
StatusLogBean(content = "完成收运", opDate = "2017-04-01 12:00:00"),
|
||||
StatusLogBean(content = "完成组装", opDate = "2017-04-01 12:00:00"),
|
||||
StatusLogBean(content = "已复磅", opDate = "2017-04-01 12:00:00"),
|
||||
StatusLogBean(content = "海关已放行", opDate = "2017-04-01 12:00:00"),
|
||||
StatusLogBean(content = "装载申报", opDate = "2017-04-01 12:00:00")
|
||||
)
|
||||
}
|
||||
|
||||
private fun getAwbTypeName(logType: String): String {
|
||||
return when (logType) {
|
||||
"CI" -> "国内进港"
|
||||
"CO" -> "国内出港"
|
||||
"II" -> "国际进港"
|
||||
"IO" -> "国际出港"
|
||||
else -> logType
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.lukouguoji.aerologic.page.log.list
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.aerologic.databinding.ActivityLogQueryBinding
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_LOG_QUERY)
|
||||
class LogQueryActivity : BaseBindingActivity<ActivityLogQueryBinding, LogQueryViewModel>() {
|
||||
|
||||
override fun layoutId(): Int {
|
||||
return R.layout.activity_log_query
|
||||
}
|
||||
|
||||
override fun viewModelClass(): Class<LogQueryViewModel> {
|
||||
return LogQueryViewModel::class.java
|
||||
}
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("日志查询")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.pageModel.bindSmartRefreshLayout(
|
||||
binding.srl,
|
||||
binding.rv,
|
||||
viewModel,
|
||||
getLifecycleOwner()
|
||||
)
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val starter = Intent(context, LogQueryActivity::class.java)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.lukouguoji.aerologic.page.log.list
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.aerologic.databinding.ItemLogQueryBinding
|
||||
import com.lukouguoji.aerologic.page.log.detail.LogDetailActivity
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.LogBean
|
||||
|
||||
class LogQueryViewHolder(view: View) : BaseViewHolder<LogBean, ItemLogQueryBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item)
|
||||
binding.bean = bean
|
||||
itemView.setOnClickListener {
|
||||
bean?.let { LogDetailActivity.start(itemView.context, it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.lukouguoji.aerologic.page.log.list
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.bean.LogBean
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.formatDate
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import dev.utils.common.DateUtils
|
||||
|
||||
class LogQueryViewModel : BasePageViewModel() {
|
||||
|
||||
val startDate = MutableLiveData(DateUtils.getCurrentTime().formatDate())
|
||||
val endDate = MutableLiveData("")
|
||||
|
||||
val keyWord = MutableLiveData("")
|
||||
val operatorId = MutableLiveData("")
|
||||
|
||||
val count = MutableLiveData(0)
|
||||
|
||||
val itemLayoutId = R.layout.item_log_query
|
||||
val itemViewHolder = LogQueryViewHolder::class.java
|
||||
|
||||
fun searchClick() {
|
||||
refresh()
|
||||
}
|
||||
|
||||
override fun getData() {
|
||||
launchLoadingCollect({
|
||||
NetApply.api.getLogList(
|
||||
mapOf(
|
||||
"pageNum" to pageModel.page,
|
||||
"pageSize" to pageModel.limit,
|
||||
"startTime" to startDate.value,
|
||||
"endTime" to endDate.value,
|
||||
"key" to keyWord.value,
|
||||
"opId" to operatorId.value,
|
||||
).toRequestBody()
|
||||
)
|
||||
}) {
|
||||
onSuccess = {
|
||||
pageModel.handleListBean(it)
|
||||
count.value = it.total
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.lukouguoji.aerologic.page.uld.edit
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.aerologic.databinding.ActivityUldEditBinding
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
|
||||
class UldEditActivity : BaseBindingActivity<ActivityUldEditBinding, UldEditViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_uld_edit
|
||||
|
||||
override fun viewModelClass() = UldEditViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
viewModel.initOnCreate(intent)
|
||||
setBackArrow("ULD${viewModel.pageType.value!!.title}")
|
||||
binding.viewModel = viewModel
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, id: String = "", modify: Boolean = id.isEmpty()) {
|
||||
val starter = Intent(context, UldEditActivity::class.java)
|
||||
.putExtra(Constant.Key.ID, id)
|
||||
.putExtra(Constant.Key.DATA, modify)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.lukouguoji.aerologic.page.uld.edit
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
import com.lukouguoji.module_base.bean.ULDBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.DetailsPageType
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.noNull
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import dev.DevUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
|
||||
class UldEditViewModel : BaseViewModel() {
|
||||
|
||||
var id = ""
|
||||
|
||||
val pageType = MutableLiveData(DetailsPageType.Add)
|
||||
|
||||
val uldBean = MutableLiveData(ULDBean())
|
||||
|
||||
val statusList = MutableLiveData<List<KeyValue>>(
|
||||
listOf(
|
||||
KeyValue("正常", "0"),
|
||||
KeyValue("故障", "1"),
|
||||
)
|
||||
)
|
||||
|
||||
// 所属航司下拉列表(mock,后续替换为接口)
|
||||
val carrierList = MutableLiveData<List<KeyValue>>(
|
||||
listOf(
|
||||
KeyValue("MU - 东方航空", "MU"),
|
||||
KeyValue("CA - 国航", "CA"),
|
||||
KeyValue("CZ - 南方航空", "CZ"),
|
||||
KeyValue("HO - 吉祥航空", "HO"),
|
||||
KeyValue("FM - 上海航空", "FM"),
|
||||
)
|
||||
)
|
||||
|
||||
fun initOnCreate(intent: Intent) {
|
||||
id = intent.getStringExtra(Constant.Key.ID) ?: ""
|
||||
val modify = intent.getBooleanExtra(Constant.Key.DATA, false)
|
||||
pageType.value = if (id.isEmpty()) DetailsPageType.Add
|
||||
else if (modify) DetailsPageType.Modify else DetailsPageType.Details
|
||||
|
||||
getData()
|
||||
}
|
||||
|
||||
private fun getData() {
|
||||
if (id.isEmpty()) return
|
||||
launchLoadingCollect({
|
||||
NetApply.api.queryUldByCode(id)
|
||||
}) {
|
||||
onSuccess = {
|
||||
uldBean.value = it.data ?: ULDBean()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun onSaveClick() {
|
||||
val bean = uldBean.value ?: return
|
||||
if (bean.uld.isBlank()) {
|
||||
showToast("ULD编号不能为空")
|
||||
return
|
||||
}
|
||||
val isAdd = pageType.value == DetailsPageType.Add
|
||||
launchLoadingCollect({
|
||||
if (isAdd) NetApply.api.saveUld(bean.toRequestBody())
|
||||
else NetApply.api.updateUld(bean.toRequestBody())
|
||||
}) {
|
||||
onSuccess = {
|
||||
showToast(it.msg.noNull(if (isAdd) "新增成功" else "修改成功"))
|
||||
if (isAdd) uldBean.value = ULDBean() else getData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun onCancelClick() {
|
||||
DevUtils.getTopActivity().finish()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.lukouguoji.aerologic.page.uld.list
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.aerologic.databinding.ActivityUldListBinding
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
|
||||
class UldListActivity : BaseBindingActivity<ActivityUldListBinding, UldListViewModel>() {
|
||||
|
||||
override fun layoutId(): Int {
|
||||
return R.layout.activity_uld_list
|
||||
}
|
||||
|
||||
override fun viewModelClass(): Class<UldListViewModel> {
|
||||
return UldListViewModel::class.java
|
||||
}
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("ULD管理")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.pageModel.bindSmartRefreshLayout(
|
||||
binding.srl,
|
||||
binding.rv,
|
||||
viewModel,
|
||||
getLifecycleOwner()
|
||||
)
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
context.startActivity(Intent(context, UldListActivity::class.java))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.lukouguoji.aerologic.page.uld.list
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.aerologic.databinding.ItemUldListBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.ULDBean
|
||||
|
||||
class UldListViewHolder(view: View) : BaseViewHolder<ULDBean, ItemUldListBinding>(view) {
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val itemBean = getItemBean(item)!!
|
||||
binding.bean = itemBean
|
||||
notifyItemClick(position, binding.llContent)
|
||||
notifyItemClick(position, binding.tvModify)
|
||||
notifyItemClick(position, binding.tvDelete)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.lukouguoji.aerologic.page.uld.list
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.aerologic.page.uld.edit.UldEditActivity
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.bean.ULDBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.noNull
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.model.ConfirmDialogModel
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
import dev.DevUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
|
||||
class UldListViewModel : BasePageViewModel() {
|
||||
|
||||
// 搜索条件
|
||||
val status = MutableLiveData("")
|
||||
val uldSuffix = MutableLiveData("")
|
||||
val uldNo = MutableLiveData("")
|
||||
|
||||
// 状态下拉列表
|
||||
val statusList = MutableLiveData<List<KeyValue>>(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("正常", "0"),
|
||||
KeyValue("故障", "1"),
|
||||
)
|
||||
)
|
||||
|
||||
// 所属航司下拉列表(mock,后续替换为接口)
|
||||
val carrierList = MutableLiveData<List<KeyValue>>(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("MU - 东方航空", "MU"),
|
||||
KeyValue("CA - 国航", "CA"),
|
||||
KeyValue("CZ - 南方航空", "CZ"),
|
||||
KeyValue("HO - 吉祥航空", "HO"),
|
||||
KeyValue("FM - 上海航空", "FM"),
|
||||
)
|
||||
)
|
||||
|
||||
// 合计数量
|
||||
val count = MutableLiveData(0L)
|
||||
|
||||
val itemLayoutId = R.layout.item_uld_list
|
||||
val itemViewHolder = UldListViewHolder::class.java
|
||||
|
||||
override fun getData() {
|
||||
launchLoadingCollect({
|
||||
NetApply.api.getUldList(
|
||||
mapOf(
|
||||
"pageNum" to pageModel.page,
|
||||
"pageSize" to pageModel.limit,
|
||||
"status" to status.value?.ifEmpty { null },
|
||||
"uldSuffix" to uldSuffix.value?.ifEmpty { null },
|
||||
"uld" to uldNo.value?.ifEmpty { null },
|
||||
).toRequestBody()
|
||||
)
|
||||
}) {
|
||||
onSuccess = {
|
||||
pageModel.handleListBean(it.toBaseListBean())
|
||||
count.value = it.total
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun onUldScanClick() {
|
||||
ScanModel.startScan(DevUtils.getTopActivity(), Constant.RequestCode.ULD)
|
||||
}
|
||||
|
||||
fun onAddClick() {
|
||||
UldEditActivity.start(DevUtils.getTopActivity())
|
||||
}
|
||||
|
||||
override fun onItemClick(position: Int, type: Int) {
|
||||
val bean = pageModel.rv?.commonAdapter()?.getItem(position) as? ULDBean ?: return
|
||||
when (type) {
|
||||
R.id.ll_content -> UldEditActivity.start(DevUtils.getTopActivity(), bean.uld)
|
||||
R.id.tv_modify -> UldEditActivity.start(DevUtils.getTopActivity(), bean.uld, true)
|
||||
R.id.tv_delete -> deleteUld(bean.uld)
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
private fun deleteUld(uld: String) {
|
||||
ConfirmDialogModel("是否确定删除该ULD记录?") {
|
||||
launchLoadingCollect({
|
||||
NetApply.api.deleteUld(uld)
|
||||
}) {
|
||||
onSuccess = {
|
||||
showToast("删除成功")
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
}.show()
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
if (resultCode == Activity.RESULT_OK && data != null) {
|
||||
when (requestCode) {
|
||||
Constant.RequestCode.ULD -> {
|
||||
uldNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT).noNull()
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,11 +25,14 @@ import com.lukouguoji.aerologic.page.gnj.query.list.GnjQueryListActivity
|
||||
import com.lukouguoji.aerologic.page.gnj.stash.list.GnjStashListActivity
|
||||
import com.lukouguoji.aerologic.page.gnj.unload.list.GnjUnloadListActivity
|
||||
import com.lukouguoji.aerologic.page.log.list.LogListActivity
|
||||
import com.lukouguoji.aerologic.page.log.list.LogQueryActivity
|
||||
import com.lukouguoji.aerologic.page.message.list.MessageListActivity
|
||||
import com.lukouguoji.aerologic.page.telegram.list.TelegramListActivity
|
||||
import com.lukouguoji.aerologic.page.test.PrintActivity
|
||||
import com.lukouguoji.aerologic.page.transport.GoodsTransportActivity
|
||||
import com.lukouguoji.aerologic.page.transportLog.list.TransportLogActivity
|
||||
import com.lukouguoji.aerologic.page.coldStorage.list.ColdStorageActivity
|
||||
import com.lukouguoji.aerologic.page.uld.list.UldListActivity
|
||||
import com.lukouguoji.gnc.page.deposit.list.GncDepositListActivity
|
||||
import com.lukouguoji.gnc.page.distribution.home.GncDistributionHomeActivity
|
||||
import com.lukouguoji.gnc.page.fubang.list.GncFuBangListActivity
|
||||
@@ -50,7 +53,8 @@ class HomeFragment : Fragment() {
|
||||
* TODO: 正式发布前务必设置为 false
|
||||
*/
|
||||
companion object {
|
||||
private const val DEV_AUTO_SELECT_INT_EXP = true // 自动选择国际出港开关
|
||||
private const val DEV_AUTO_SELECT_MENU = true // 开发调试:自动选择菜单开关,正式发布前设为 false
|
||||
private const val DEV_AUTO_SELECT_MENU_ID = Constant.AuthName.IntImp // 自动选择的目标菜单
|
||||
}
|
||||
|
||||
private var rvLeft: RecyclerView by Delegates.notNull()
|
||||
@@ -73,9 +77,8 @@ class HomeFragment : Fragment() {
|
||||
rvLeft.adapter = HomeLeftAdapt(leftMenuList)
|
||||
rvRight.adapter = HomeRightAdapt(getRightMenu4Id(leftMenuList.first().id))
|
||||
|
||||
// ========== 开发调试:自动选择"国际出港"菜单 ==========
|
||||
// TODO: 正式发布前删除此行
|
||||
autoSelectIntExpForDev()
|
||||
// ========== 开发调试:自动选择指定菜单 ==========
|
||||
autoSelectMenuForDev()
|
||||
}
|
||||
|
||||
/////////// 左边的list循环
|
||||
@@ -104,7 +107,9 @@ class HomeFragment : Fragment() {
|
||||
if (Constant.AuthName.Flight == leftMenuTemp.id) {
|
||||
// ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_HANG_BAN_QUERY)
|
||||
// .navigation(activity, Constant.RequestCode.home_left_hang_ban_query)
|
||||
FlightQueryListActivity.start(requireContext())
|
||||
// FlightQueryListActivity.start(requireContext()) // 已废弃
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_HB_QUERY_LIST)
|
||||
.navigation()
|
||||
mPosition = oldPosition
|
||||
}
|
||||
//货物查询
|
||||
@@ -451,6 +456,37 @@ class HomeFragment : Fragment() {
|
||||
.navigation()
|
||||
}
|
||||
|
||||
// 进港仓库
|
||||
Constant.AuthName.GjjWareHouseActivity -> {
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GJJ_WARE_HOUSE)
|
||||
.navigation()
|
||||
}
|
||||
|
||||
// 提取记录
|
||||
Constant.AuthName.IntImpPickUpRecord -> {
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_INT_IMP_PICK_UP_RECORD)
|
||||
.navigation()
|
||||
}
|
||||
|
||||
// 提取出库
|
||||
Constant.AuthName.IntImpPickUpDLV -> {
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_INT_IMP_PICK_UP_DLV)
|
||||
.navigation()
|
||||
}
|
||||
|
||||
// 进港查询
|
||||
Constant.AuthName.GjjQueryListActivity -> {
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GJJ_QUERY_LIST)
|
||||
.navigation()
|
||||
}
|
||||
|
||||
// 事故签证
|
||||
Constant.AuthName.IntImpAccidentVisa -> {
|
||||
ARouter.getInstance()
|
||||
.build(ARouterConstants.ACTIVITY_URL_INT_IMP_ACCIDENT_VISA)
|
||||
.navigation()
|
||||
}
|
||||
|
||||
/**
|
||||
* 航班查询
|
||||
*/
|
||||
@@ -515,7 +551,15 @@ class HomeFragment : Fragment() {
|
||||
}
|
||||
// 日志查询
|
||||
Constant.AuthName.ComprehensiveLog -> {
|
||||
LogListActivity.start(requireContext())
|
||||
LogQueryActivity.start(requireContext())
|
||||
}
|
||||
// ULD管理
|
||||
Constant.AuthName.ComprehensiveUld -> {
|
||||
UldListActivity.start(requireContext())
|
||||
}
|
||||
// 冷库登记
|
||||
Constant.AuthName.ComprehensiveColdStorage -> {
|
||||
ColdStorageActivity.start(requireContext())
|
||||
}
|
||||
|
||||
else -> {
|
||||
@@ -800,6 +844,41 @@ class HomeFragment : Fragment() {
|
||||
"理货报告"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
RightMenu(
|
||||
Constant.AuthName.GjjWareHouseActivity,
|
||||
R.mipmap.gnj_cang_ku_icon,
|
||||
"进港仓库"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
RightMenu(
|
||||
Constant.AuthName.IntImpPickUpRecord,
|
||||
R.mipmap.gnj_cang_ku_icon,
|
||||
"提取记录"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
RightMenu(
|
||||
Constant.AuthName.IntImpPickUpDLV,
|
||||
R.mipmap.gnj_cang_ku_icon,
|
||||
"提取出库"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
RightMenu(
|
||||
Constant.AuthName.GjjQueryListActivity,
|
||||
R.mipmap.img_bwjx,
|
||||
"进港查询"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
RightMenu(
|
||||
Constant.AuthName.IntImpAccidentVisa,
|
||||
R.mipmap.img_bwjx,
|
||||
"事故签证"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
Constant.AuthName.Flight -> {
|
||||
@@ -884,6 +963,20 @@ class HomeFragment : Fragment() {
|
||||
"转运记录"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
RightMenu(
|
||||
Constant.AuthName.ComprehensiveUld,
|
||||
R.mipmap.cargo,
|
||||
"ULD管理"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
RightMenu(
|
||||
Constant.AuthName.ComprehensiveColdStorage,
|
||||
com.lukouguoji.module_base.R.mipmap.gnc_cangku,
|
||||
"冷库登记"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
else -> {
|
||||
@@ -907,24 +1000,20 @@ class HomeFragment : Fragment() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 开发调试:自动选择"国际出港"菜单
|
||||
* TODO: 正式发布前删除此方法或将 DEV_AUTO_SELECT_INT_EXP 设置为 false
|
||||
* 开发调试:自动选择指定菜单
|
||||
* 正式发布前将 DEV_AUTO_SELECT_MENU 设置为 false 即可关闭
|
||||
*/
|
||||
private fun autoSelectIntExpForDev() {
|
||||
if (!DEV_AUTO_SELECT_INT_EXP) return
|
||||
private fun autoSelectMenuForDev() {
|
||||
if (!DEV_AUTO_SELECT_MENU) return
|
||||
|
||||
// 延迟执行,确保适配器已初始化
|
||||
rvLeft.postDelayed({
|
||||
val leftAdapter = rvLeft.adapter as? HomeLeftAdapt ?: return@postDelayed
|
||||
|
||||
// 查找"国际出港"在左侧菜单的位置
|
||||
val leftMenuList = initLeftMenuData()
|
||||
val intExpIndex = leftMenuList.indexOfFirst { it.id == Constant.AuthName.IntExp }
|
||||
val targetIndex = leftMenuList.indexOfFirst { it.id == DEV_AUTO_SELECT_MENU_ID }
|
||||
|
||||
if (intExpIndex >= 0) {
|
||||
// 模拟点击左侧"国际出港"菜单项
|
||||
leftAdapter.simulateClick(intExpIndex)
|
||||
if (targetIndex >= 0) {
|
||||
leftAdapter.simulateClick(targetIndex)
|
||||
}
|
||||
}, 300) // 延迟300ms确保适配器已绑定数据
|
||||
}, 300)
|
||||
}
|
||||
}
|
||||
6
app/src/main/res/drawable/bg_step_current_badge.xml
Normal file
6
app/src/main/res/drawable/bg_step_current_badge.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#4CAF50" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/bg_step_dot_blue.xml
Normal file
5
app/src/main/res/drawable/bg_step_dot_blue.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#FF1C8CF5" />
|
||||
</shape>
|
||||
8
app/src/main/res/drawable/bg_step_dot_gray.xml
Normal file
8
app/src/main/res/drawable/bg_step_dot_gray.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<stroke
|
||||
android:width="1.5dp"
|
||||
android:color="#CCCCCC" />
|
||||
<solid android:color="#FFFFFF" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/bg_step_dot_green.xml
Normal file
5
app/src/main/res/drawable/bg_step_dot_green.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#4CAF50" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/bg_timeline_dot_gray.xml
Normal file
5
app/src/main/res/drawable/bg_timeline_dot_gray.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#CCCCCC" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/bg_timeline_dot_green.xml
Normal file
5
app/src/main/res/drawable/bg_timeline_dot_green.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#4CAF50" />
|
||||
</shape>
|
||||
208
app/src/main/res/layout/activity_cold_storage.xml
Normal file
208
app/src/main/res/layout/activity_cold_storage.xml
Normal file
@@ -0,0 +1,208 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.aerologic.page.coldStorage.list.ColdStorageViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!-- 搜索区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 选择进港或出港 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"选择进港或出港"}'
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
list="@{viewModel.ieFlagList}"
|
||||
value="@={viewModel.ieFlag}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入运单号"}'
|
||||
icon="@{@drawable/img_scan}"
|
||||
setOnIconClickListener="@{(v)-> viewModel.scanWbNo()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.wbNo}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- 货物状态 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请选择货物状态"}'
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
list="@{viewModel.statusList}"
|
||||
value="@={viewModel.status}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- 出库人 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入出库人"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.outUserName}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- 入库人 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入入库人"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.inUserName}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical|start"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:padding="2dp"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 列表 -->
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||
viewHolder="@{viewModel.itemViewHolder}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/item_cold_storage" />
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<!-- 底部统计和操作按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@android:color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<!-- 全选按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:onClick="@{()-> viewModel.checkAllClick()}"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@drawable/img_check_all" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="全选"
|
||||
android:textColor="@color/color_66"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 统计信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{"合计:"+viewModel.totalCount+"票"}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{"总件数:"+viewModel.totalPc}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{"总重量:"+viewModel.totalWeight}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 完成出库按钮 -->
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()-> viewModel.completeOut()}"
|
||||
android:text="完成出库" />
|
||||
|
||||
<!-- 完成入库按钮 -->
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()-> viewModel.completeIn()}"
|
||||
android:text="完成入库" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
@@ -13,265 +13,268 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/backgroud_gray"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="0dp">
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
android:padding="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"航班日期:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.fdate}'
|
||||
android:layout_width="0dp"
|
||||
<!-- 第1行:航班日期、航班号、航程 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"航班号:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.fno}'
|
||||
android:layout_width="0dp"
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"航班日期"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.fdate}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"航班号"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.fno}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"航程"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.range}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第2行:地区类型、服务类型、经停站 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"航程:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.range}'
|
||||
android:layout_width="0dp"
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"地区类型"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.countryType}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"服务类型"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.serviceType}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"经停站"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.jtz}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第3行:计划起飞、预计起飞、实际起飞 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
</LinearLayout>
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"计划起飞"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.scheduledTackOff}' />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"预计起飞"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.estimatedTakeOff}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"地区类型:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@{viewModel.dataBean.countryType}'
|
||||
android:layout_width="0dp"
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"实际起飞"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.actualTakeOff}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第4行:计划降落、预计降落、实际降落 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"服务类型:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@{viewModel.dataBean.serviceType}'
|
||||
android:layout_width="0dp"
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"计划降落"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.scheduledArrival}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"预计降落"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.estimatedArrival}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"实际降落"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.actualArrival}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第5行:飞行状态、航班状态、延误原因 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"经停站:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.jtz}'
|
||||
android:layout_width="0dp"
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"飞行状态"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.portCode}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"航班状态"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.flightStatus}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"延误原因"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.delayFreeText}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第6行:机号、机型、机位 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
</LinearLayout>
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"机号"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.registration}' />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"机型"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.aircraftCode}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"计划起飞:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.scheduledTackOff}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"机位"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.standId}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"预计起飞:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.estimatedTakeOff}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"实际起飞:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.actualTakeOff}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"计划降落:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.scheduledArrival}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"预计降落:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.estimatedArrival}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"实际降落:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.actualArrival}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"飞行状态:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@{viewModel.dataBean.portCode}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"航班状态:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@{viewModel.dataBean.flightStatus}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"延误原因:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.delayFreeText}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"机号:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.registration}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"机型:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.aircraftCode}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"机位:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.standId}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#5c6890"
|
||||
android:gravity="center_vertical|end"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
</layout>
|
||||
|
||||
159
app/src/main/res/layout/activity_log_detail.xml
Normal file
159
app/src/main/res/layout/activity_log_detail.xml
Normal file
@@ -0,0 +1,159 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.aerologic.page.log.detail.LogDetailViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<!-- 运单信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单信息"
|
||||
android:textColor="#333333"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单号: "
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.waybillNo}"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单类型: "
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.waybillType}"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 流转状态 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="流转状态"
|
||||
android:textColor="#333333"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_steps"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 操作详情 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="操作详情"
|
||||
android:textColor="#333333"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_timeline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
119
app/src/main/res/layout/activity_log_query.xml
Normal file
119
app/src/main/res/layout/activity_log_query.xml
Normal file
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.aerologic.page.log.list.LogQueryViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请选择航班日期起"}'
|
||||
icon="@{@drawable/img_date}"
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
value="@={viewModel.startDate}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请选择航班日期止"}'
|
||||
icon="@{@drawable/img_date}"
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
value="@={viewModel.endDate}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入关键字"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.keyWord}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入操作员ID"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.operatorId}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|start"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="24dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:padding="2dp"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||
viewHolder="@{viewModel.itemViewHolder}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_log_query" />
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{"合计:" + viewModel.count + "条"}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="合计:1条" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
167
app/src/main/res/layout/activity_uld_edit.xml
Normal file
167
app/src/main/res/layout/activity_uld_edit.xml
Normal file
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
||||
<import type="com.lukouguoji.module_base.common.DetailsPageType" />
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.aerologic.page.uld.edit.UldEditViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<!-- Row 1: ULD编号 / 状态 / 自重 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{viewModel.pageType == DetailsPageType.Add}"
|
||||
hint='@{"请输入ULD编号"}'
|
||||
title='@{"ULD编号"}'
|
||||
titleLength="@{7}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.uldBean.uld}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||
hint='@{"请选择状态"}'
|
||||
list="@{viewModel.statusList}"
|
||||
title='@{"状态"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.uldBean.status}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||
hint='@{"请输入自重"}'
|
||||
title='@{"自重"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.uldBean.uldWeight}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 2: 最大装载容积 / 最大载重 / 所属航司 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||
hint='@{"请输入最大装载容积"}'
|
||||
title='@{"最大装载容积"}'
|
||||
titleLength="@{7}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.uldBean.maxVolume}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||
hint='@{"请输入最大载重"}'
|
||||
title='@{"最大载重"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.uldBean.maxWeight}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||
hint='@{"请选择所属航司"}'
|
||||
list="@{viewModel.carrierList}"
|
||||
title='@{"所属航司"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.uldBean.carrier}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 备注(全行,多行输入) -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||
hint='@{"请输入备注"}'
|
||||
inputHeight="@{80}"
|
||||
title='@{"备注"}'
|
||||
titleLength="@{3}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.uldBean.remark}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:gravity="center"
|
||||
visible="@{viewModel.pageType != DetailsPageType.Details}">
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:layout_width="120dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:onClick="@{()-> viewModel.onCancelClick()}"
|
||||
android:text="取消" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:layout_width="120dp"
|
||||
android:onClick="@{()-> viewModel.onSaveClick()}"
|
||||
android:text="保存" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
118
app/src/main/res/layout/activity_uld_list.xml
Normal file
118
app/src/main/res/layout/activity_uld_list.xml
Normal file
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.aerologic.page.uld.list.UldListViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"选择状态"}'
|
||||
list="@{viewModel.statusList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.status}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.33" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"选择所属航司"}'
|
||||
list="@{viewModel.carrierList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.uldSuffix}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.33" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入ULD编号"}'
|
||||
icon="@{@drawable/img_scan}"
|
||||
setOnIconClickListener="@{()-> viewModel.onUldScanClick()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.uldNo}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.33" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|start"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="24dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:onClick="@{()-> viewModel.refresh()}"
|
||||
android:padding="2dp"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:onClick="@{()-> viewModel.onAddClick()}"
|
||||
android:src="@drawable/img_add" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||
viewHolder="@{viewModel.itemViewHolder}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_uld_list" />
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text='@{"合计:" + viewModel.count + "条"}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
283
app/src/main/res/layout/item_cold_storage.xml
Normal file
283
app/src/main/res/layout/item_cold_storage.xml
Normal file
@@ -0,0 +1,283 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.ColdStorageBean" />
|
||||
|
||||
<variable
|
||||
name="position"
|
||||
type="Integer" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="15dp">
|
||||
|
||||
<!-- 选中图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||
android:src="@drawable/img_plane" />
|
||||
|
||||
<!-- 信息区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 第一行:运单号 | 件数 | 入库人 | 入库时间 | 在库状态 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 运单号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="运单号:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.wbNo}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.7"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="件数:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.pc)}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 入库人 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="入库人:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.inUserName}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 入库时间 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="入库时间:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.inDate}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 在库状态 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="在库状态:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.status}"
|
||||
android:textColor='@{bean.status.equals("已出库") ? @color/text_red : bean.status.equals("已入库") ? @color/text_green : @color/text_normal}'
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第二行:在库时长 | 重量 | 出库人 | 出库时间 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 在库时长 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="在库时长:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.storageDuration}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 重量 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.7"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="重量:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf((int)bean.wt)}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 出库人 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="出库人:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.outUserName}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 出库时间 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="出库时间:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.outDate}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 占位,与第一行在库状态对齐 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
123
app/src/main/res/layout/item_log_query.xml
Normal file
123
app/src/main/res/layout/item_log_query.xml
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.LogBean" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<!-- 第一行:关键字 | 日志类型 | 操作员 | 操作时间 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="关键字 " />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.key}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="日志类型 " />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.logType}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="操作员 " />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.opId}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.3"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="操作时间 " />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.opTime}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第二行:操作内容 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="操作内容 " />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.content}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
52
app/src/main/res/layout/item_log_step.xml
Normal file
52
app/src/main/res/layout/item_log_step.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="4dp">
|
||||
|
||||
<!-- 步骤名称 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_step_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<!-- 圆点和连线区域 -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="6dp">
|
||||
|
||||
<!-- 左侧连线 -->
|
||||
<View
|
||||
android:id="@+id/view_line_left"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toLeftOf="@+id/view_dot"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:background="#FF1C8CF5" />
|
||||
|
||||
<!-- 圆点 -->
|
||||
<View
|
||||
android:id="@+id/view_dot"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/bg_step_dot_blue" />
|
||||
|
||||
<!-- 右侧连线 -->
|
||||
<View
|
||||
android:id="@+id/view_line_right"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@+id/view_dot"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="#FF1C8CF5" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
68
app/src/main/res/layout/item_log_timeline.xml
Normal file
68
app/src/main/res/layout/item_log_timeline.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<!-- 左侧:圆点 + 连线 -->
|
||||
<RelativeLayout
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="12dp">
|
||||
|
||||
<!-- 顶部连线 -->
|
||||
<View
|
||||
android:id="@+id/view_line_top"
|
||||
android:layout_width="1.5dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="#E0E0E0" />
|
||||
|
||||
<!-- 圆点 -->
|
||||
<View
|
||||
android:id="@+id/view_dot"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_below="@+id/view_line_top"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/bg_timeline_dot_gray" />
|
||||
|
||||
<!-- 底部连线 -->
|
||||
<View
|
||||
android:id="@+id/view_line_bottom"
|
||||
android:layout_width="1.5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/view_dot"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="#E0E0E0" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- 右侧:内容 + 时间 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="#999999"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
240
app/src/main/res/layout/item_uld_list.xml
Normal file
240
app/src/main/res/layout/item_uld_list.xml
Normal file
@@ -0,0 +1,240 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.ULDBean" />
|
||||
</data>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/img_plane"
|
||||
tools:src="@drawable/img_plane" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 第一行 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- ULD编号 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ULD编号:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.uld}"
|
||||
android:textColor="@color/colorPrimary" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 状态 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{3}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="状态:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.statusName()}"
|
||||
android:textColor='@{bean.status.equals("0") ? @color/text_normal : @color/red}' />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 自重 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{3}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="自重:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.uldWeight}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 所属航司 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="所属航司:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.carrier}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 最大装载容积 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{7}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="最大装载容积:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.maxVolume}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 第二行 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<!-- 最大载重 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="最大载重:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.maxWeight}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 备注 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3.6"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{3}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="备注:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.remark}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@drawable/img_pda_right" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_modify"
|
||||
style="@style/tv_item_action"
|
||||
android:background="#8313ef"
|
||||
android:text="修改" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_delete"
|
||||
style="@style/tv_item_action"
|
||||
android:background="@color/red"
|
||||
android:text="删除" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</layout>
|
||||
@@ -6,7 +6,17 @@
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 \
|
||||
--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
|
||||
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
|
||||
--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
|
||||
--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
|
||||
--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
|
||||
--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
|
||||
--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
|
||||
--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
|
||||
--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
|
||||
--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
|
||||
kapt.use.worker.api=false
|
||||
kapt.include.compile.classpath=false
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
|
||||
@@ -41,7 +41,7 @@ import me.jessyan.autosize.internal.CustomAdapt
|
||||
* ========== 开发调试开关 ==========
|
||||
* TODO: 正式发布前务必设置为 false
|
||||
*/
|
||||
private const val DEV_AUTO_LOGIN = false // 自动登录开关
|
||||
private const val DEV_AUTO_LOGIN = true // 自动登录开关
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_LOGIN)
|
||||
class LoginActivity : BaseActivity(),
|
||||
|
||||
@@ -49,6 +49,26 @@ fun bindAdapter(
|
||||
if (hint.isNullOrEmpty()) {
|
||||
val adapter = ArrayAdapter(spinner.context, layoutId, list)
|
||||
spinner.adapter = adapter
|
||||
} else if (list.isEmpty()) {
|
||||
// 列表为空时:控件上显示 hint 占位文字(灰色),下拉列表隐藏
|
||||
// 不能用 SpinnerHintAdapter,其 getCount()=0 会导致 Spinner 不渲染
|
||||
val adapter = object : ArrayAdapter<String>(spinner.context, layoutId, listOf(hint)) {
|
||||
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
val view = super.getView(position, convertView, parent)
|
||||
(view as TextView).setTextColor(context.resources.getColor(R.color.text_gray_l))
|
||||
return view
|
||||
}
|
||||
|
||||
override fun getDropDownView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
// 下拉列表中隐藏 hint 项
|
||||
val view = super.getDropDownView(position, convertView, parent)
|
||||
view.visibility = View.GONE
|
||||
view.layoutParams = ViewGroup.LayoutParams(0, 0)
|
||||
return view
|
||||
}
|
||||
}
|
||||
spinner.adapter = adapter
|
||||
spinner.setSelection(0)
|
||||
} else {
|
||||
val containHintList = list + hint
|
||||
val adapter = SpinnerHintAdapter(spinner.context, layoutId, containHintList)
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
import androidx.databinding.ObservableBoolean
|
||||
|
||||
/**
|
||||
* 冷库登记 Bean
|
||||
*/
|
||||
class ColdStorageBean {
|
||||
var id: Long = 0
|
||||
var wbNo: String = "" // 运单号
|
||||
var pc: Int = 0 // 件数
|
||||
var wt: Double = 0.0 // 重量
|
||||
var inUserName: String = "" // 入库人
|
||||
var inDate: String = "" // 入库时间
|
||||
var outUserName: String = "" // 出库人
|
||||
var outDate: String = "" // 出库时间
|
||||
var storageDuration: String = "" // 在库时长
|
||||
var status: String = "" // 在库状态
|
||||
var ieFlag: String = "" // 进出港标识
|
||||
|
||||
// 多选状态
|
||||
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||
var isSelected: Boolean
|
||||
get() = checked.get()
|
||||
set(value) = checked.set(value)
|
||||
}
|
||||
@@ -151,6 +151,46 @@ class FlightBean : ICheck {
|
||||
).noNull(scheduledTackOff)
|
||||
}
|
||||
|
||||
// 预计起飞时间-时分
|
||||
val estimatedTakeOffHM: String
|
||||
get() {
|
||||
return DateUtils.parseString(
|
||||
estimatedTakeOff,
|
||||
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||
"HH:mm"
|
||||
).noNull(estimatedTakeOff)
|
||||
}
|
||||
|
||||
// 计划降落时间-时分
|
||||
val scheduledArrivalHM: String
|
||||
get() {
|
||||
return DateUtils.parseString(
|
||||
scheduledArrival,
|
||||
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||
"HH:mm"
|
||||
).noNull(scheduledArrival)
|
||||
}
|
||||
|
||||
// 预计降落时间-时分
|
||||
val estimatedArrivalHM: String
|
||||
get() {
|
||||
return DateUtils.parseString(
|
||||
estimatedArrival,
|
||||
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||
"HH:mm"
|
||||
).noNull(estimatedArrival)
|
||||
}
|
||||
|
||||
// 实际降落时间-时分
|
||||
val actualArrivalHM: String
|
||||
get() {
|
||||
return DateUtils.parseString(
|
||||
actualArrival,
|
||||
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||
"HH:mm"
|
||||
).noNull(actualArrival)
|
||||
}
|
||||
|
||||
// 航班服务种类(0:客机;1:货机;2:卡车)
|
||||
var serviceType: String = ""
|
||||
|
||||
@@ -219,6 +259,50 @@ class FlightBean : ICheck {
|
||||
return calendar.get(Calendar.DAY_OF_YEAR) > current.get(Calendar.DAY_OF_YEAR)
|
||||
}
|
||||
|
||||
// 预计起飞 vs 计划起飞 是否跨日
|
||||
fun isEstimatedTakeOffNextDay(): Boolean {
|
||||
if (scheduledTackOff.isEmpty() || estimatedTakeOff.isEmpty()) return false
|
||||
return try {
|
||||
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledTackOff))
|
||||
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(estimatedTakeOff))
|
||||
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
|
||||
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
// 实际起飞 vs 计划起飞 是否跨日
|
||||
fun isActualTakeOffNextDay(): Boolean {
|
||||
if (scheduledTackOff.isEmpty() || actualTakeOff.isEmpty()) return false
|
||||
return try {
|
||||
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledTackOff))
|
||||
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(actualTakeOff))
|
||||
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
|
||||
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
// 预计降落 vs 计划降落 是否跨日
|
||||
fun isEstimatedArrivalNextDay(): Boolean {
|
||||
if (scheduledArrival.isEmpty() || estimatedArrival.isEmpty()) return false
|
||||
return try {
|
||||
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledArrival))
|
||||
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(estimatedArrival))
|
||||
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
|
||||
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
// 实际降落 vs 计划降落 是否跨日
|
||||
fun isActualArrivalNextDay(): Boolean {
|
||||
if (scheduledArrival.isEmpty() || actualArrival.isEmpty()) return false
|
||||
return try {
|
||||
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledArrival))
|
||||
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(actualArrival))
|
||||
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
|
||||
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
fun getCargoTypeName(): String {
|
||||
return when (cargoType) {
|
||||
"0" -> "国际货"
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
class GjAccidentVisaEditBean {
|
||||
var id: Long = 0
|
||||
var fdate: String = "" // 航班日期
|
||||
var fno: String = "" // 航班号
|
||||
var dep: String = "" // 始发站
|
||||
var dest: String = "" // 目的站
|
||||
var wbNo: String = "" // 运单号
|
||||
var dpc: String = "" // 不正常件数
|
||||
var pc: String = "" // 运单总件数
|
||||
var weight: String = "" // 运单总重量
|
||||
var reweight: String = "" // 复称重量
|
||||
var goods: String = "" // 品名
|
||||
var opacking: String = "" // 外包装
|
||||
var damage: String = "" // 包装破损情况
|
||||
var condition: String = "" // 内容物情况
|
||||
var problem: String = "" // 不正常类型
|
||||
var seachDate: String = "" // 发现时间
|
||||
var photo: String = "" // 图片是否留底
|
||||
var remarks: String = "" // 备注
|
||||
var pic: String = "" // 缩略图
|
||||
var originalPic: String = "" // 原图
|
||||
var picNumber: String = "" // 图片数量
|
||||
var idFlag: String = "1" // 国际标志(固定为1=国际)
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import androidx.databinding.ObservableBoolean
|
||||
*/
|
||||
data class GjjAirManifest(
|
||||
// 主单原始舱单
|
||||
var maWbList: GjjImportManifest? = null,
|
||||
var maWb: GjjImportManifest? = null,
|
||||
// 分单原始舱单列表
|
||||
var haWbList: List<GjjImportManifest>? = null
|
||||
) {
|
||||
@@ -15,6 +15,10 @@ data class GjjAirManifest(
|
||||
// 选中状态(用于列表多选)
|
||||
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||
|
||||
// 展开/收起状态(用于子列表显示控制)
|
||||
@Transient
|
||||
val showMore: ObservableBoolean = ObservableBoolean(false)
|
||||
|
||||
// 兼容现有API的isSelected属性
|
||||
var isSelected: Boolean
|
||||
get() = checked.get()
|
||||
@@ -24,6 +28,6 @@ data class GjjAirManifest(
|
||||
* 获取主单用于显示
|
||||
*/
|
||||
fun getMainManifest(): GjjImportManifest {
|
||||
return maWbList ?: GjjImportManifest()
|
||||
return maWb ?: GjjImportManifest()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,11 @@ class GjjWarehouse(
|
||||
var volume: String? = "",
|
||||
var wbNo: String? = "",
|
||||
var weight: String? = "",
|
||||
var whid: String? = ""
|
||||
var whid: String? = "",
|
||||
var splitFlag: String? = "",
|
||||
var inDate: String? = "",
|
||||
var clearNormal: String? = "",
|
||||
var range: String? = ""
|
||||
) {
|
||||
|
||||
fun getWaybillCode() = "${prefix}${no}"
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
import androidx.databinding.ObservableBoolean
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* 国际进港舱单-分单Bean
|
||||
*/
|
||||
data class GjjHaWb(
|
||||
var hawbId: Long = 0,
|
||||
var hno: String = "",
|
||||
var no: String = "",
|
||||
var prefix: String = "",
|
||||
var pc: Long = 0,
|
||||
var weight: Double = 0.0,
|
||||
var volume: Double = 0.0,
|
||||
var cashWeight: Double = 0.0,
|
||||
var goods: String = "",
|
||||
var goodsCn: String = "",
|
||||
var spCode: String = "",
|
||||
var mftStatus: String = "",
|
||||
var lastMftStatus: String = "",
|
||||
var mftMsgId: String = "",
|
||||
var lastMftMsgId: String = "",
|
||||
var declareCount: Int = 0,
|
||||
var checkInType: String = "",
|
||||
var activeId: Long = 0,
|
||||
var opId: String = "",
|
||||
var opDate: String = "",
|
||||
var billsNo: String = "",
|
||||
var remark: String = "",
|
||||
var response: String = ""
|
||||
) : Serializable {
|
||||
@Transient
|
||||
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||
|
||||
var isSelected: Boolean
|
||||
get() = checked.get()
|
||||
set(value) = checked.set(value)
|
||||
}
|
||||
@@ -47,10 +47,14 @@ data class GjjImportManifest(
|
||||
var dgrContactMame: String = "",
|
||||
// 危险品收货人通讯方式
|
||||
var dgrContactNumber: String = "",
|
||||
// 航班日期
|
||||
var fdate: String = "",
|
||||
// 航班起始站
|
||||
var fdep: String = "",
|
||||
// 航班目的站
|
||||
var fdest: String = "",
|
||||
// 航班号
|
||||
var fno: String = "",
|
||||
// 航班id
|
||||
var fid: Long = 0,
|
||||
// 运费支付方式
|
||||
@@ -114,6 +118,15 @@ data class GjjImportManifest(
|
||||
// 重量
|
||||
var weight: Double = 0.0
|
||||
) : Serializable {
|
||||
// 获取航班信息(日期去横杠/航班号)
|
||||
fun getFlightSplit(): String {
|
||||
if (fdate != "" && fno != "") {
|
||||
val (year, mon, day) = fdate.split("-")
|
||||
return "${year}${mon}${day}/${fno}"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// ========== UI扩展字段 ==========
|
||||
// 选中状态
|
||||
@Transient
|
||||
|
||||
@@ -74,7 +74,27 @@ data class GjjImportTally(
|
||||
// 体积(m³)
|
||||
var volume: Double = 0.0,
|
||||
// 重量(kg)
|
||||
var weight: Double = 0.0
|
||||
var weight: Double = 0.0,
|
||||
// 品名(中文)
|
||||
var goodsCn: String = "",
|
||||
// 品名(英文)
|
||||
var goodsEn: String = "",
|
||||
// 放行模式(代码)
|
||||
var relMode: String = "",
|
||||
// 放行模式(名称)
|
||||
var releaseMode: String = "",
|
||||
// 放行时间(perDate)
|
||||
var perDate: String = "",
|
||||
// 放行时间
|
||||
var releaseTime: String = "",
|
||||
// 指令类型(comType)
|
||||
var comType: String = "",
|
||||
// 指令类型
|
||||
var instructionType: String = "",
|
||||
// 放行备注
|
||||
var relRemark: String = "",
|
||||
// 备注
|
||||
var remark: String = ""
|
||||
) : Serializable {
|
||||
// 选中状态(用于多选功能)- 不参与序列化
|
||||
@Transient
|
||||
@@ -85,7 +105,24 @@ data class GjjImportTally(
|
||||
get() = checked.get()
|
||||
set(value) = checked.set(value)
|
||||
|
||||
// 展开/折叠状态 - 不参与序列化
|
||||
@Transient
|
||||
val showMore: ObservableBoolean = ObservableBoolean(false)
|
||||
|
||||
// 已加载的分单数据 - 不参与序列化
|
||||
@Transient
|
||||
var haWbList: MutableList<GjjImportTally>? = null
|
||||
|
||||
// 获取完整运单号
|
||||
fun getWaybillNo() = "$prefix$no"
|
||||
|
||||
// 获取航班信息(日期去横杠/航班号)
|
||||
fun getFlightSplit(): String {
|
||||
if (fdate != "" && fno != "") {
|
||||
val (year, mon, day) = fdate.split("-")
|
||||
return "${year}${mon}${day}/${fno}"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,13 @@ data class GjjManifest(
|
||||
var unNumber: String = "", // 危险品编号
|
||||
var activeId: Long = 0 // 活动ID
|
||||
) : Serializable {
|
||||
// 分单列表
|
||||
var haWbList: List<GjjHaWb>? = null
|
||||
|
||||
// 展开/收起状态
|
||||
@Transient
|
||||
val showMore: ObservableBoolean = ObservableBoolean(false)
|
||||
|
||||
// 选中状态(用于多选功能)- 不参与序列化
|
||||
@Transient
|
||||
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* 国际进港-库位使用记录Bean
|
||||
* 对应接口: /IntImpSearch/detail 返回的 storageUseList 项
|
||||
*/
|
||||
data class GjjStorageUse(
|
||||
var id: Long? = null, // 主键
|
||||
var maWbId: Long? = null, // 运单id
|
||||
var prefix: String? = null, // 运单前缀
|
||||
var no: String? = null, // 运单号
|
||||
var location: String? = null, // 库位号
|
||||
var locationId: Long? = null, // 库位id
|
||||
var inDate: String? = null, // 入库时间
|
||||
var inOpId: String? = null, // 入库人ID
|
||||
var inOpName: String? = null, // 入库人姓名
|
||||
var outDate: String? = null, // 出库时间
|
||||
var outOpId: String? = null, // 出库人ID
|
||||
var outOpName: String? = null, // 出库人姓名
|
||||
var cargoStatus: String? = null // 货物状态
|
||||
) : Serializable
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
import androidx.databinding.ObservableBoolean
|
||||
|
||||
class IntImpAccidentVisaBean {
|
||||
var id: Long = 0
|
||||
var fdate: String = "" // 航班日期
|
||||
var fno: String = "" // 航班号
|
||||
var fdep: String = "" // 始发站
|
||||
var fdest: String = "" // 目的站
|
||||
var wbNo: String = "" // 运单号
|
||||
var totalPc: Int = 0 // 运单总件数
|
||||
var totalWeight: Double = 0.0 // 运单总重量
|
||||
var abnPc: Int = 0 // 不正常件数
|
||||
var opName: String = "" // 经办人
|
||||
var opDate: String = "" // 经办时间
|
||||
|
||||
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||
|
||||
var isSelected: Boolean
|
||||
get() = checked.get()
|
||||
set(value) = checked.set(value)
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
import androidx.databinding.ObservableBoolean
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* 国际进港提取出库-列表数据Bean
|
||||
* 对应API: IntImpPickUpDlv/pageQuery
|
||||
*/
|
||||
class IntImpPickUpDLVBean : Serializable {
|
||||
var id: Long = 0 // 主键ID
|
||||
var wbNo: String = "" // 运单号
|
||||
var no: String = "" // 主单号
|
||||
var prefix: String = "" // 主单前缀
|
||||
var hno: String = "" // 分单号
|
||||
var agentCode: String = "" // 代理人代码
|
||||
var agentName: String = "" // 代理人名称
|
||||
var flight: String = "" // 航班信息
|
||||
var fno: String = "" // 航班号
|
||||
var fdate: String = "" // 航班日期
|
||||
var pc: Long = 0 // 件数
|
||||
var weight: Double = 0.0 // 重量
|
||||
var cashWeight: Double = 0.0 // 计费重量
|
||||
var pkId: String = "" // 提货编号(提货单号)
|
||||
var location: String = "" // 库位
|
||||
var chargeTime: String = "" // 缴费时间(提取时间)
|
||||
var dlvTime: String = "" // 出库时间
|
||||
var goods: String = "" // 品名
|
||||
var spCode: String = "" // 特码
|
||||
var pickFlag: String = "" // 提取出库标识
|
||||
var chargeFlag: String = "" // 提取标识
|
||||
var serialNo: Long = 0 // 收费记录项目序号
|
||||
var amount: Double = 0.0 // 总金额
|
||||
var optCharge: Double = 0.0 // 服务费
|
||||
var whsCharge: Double = 0.0 // 仓储费
|
||||
var tranCharge: Double = 0.0 // 信息费
|
||||
var drawBillCharge: Double = 0.0 // 抽单费
|
||||
var efrCharge: Double = 0.0 // 冷藏费
|
||||
var svlCharge: Double = 0.0 // 铲车费
|
||||
var tallyCharge: Double = 0.0 // 理货费
|
||||
var pipFee: Double = 0.0 // 精密仪器处理费
|
||||
var lapFee: Double = 0.0 // 活体动物处理费
|
||||
var chargeId: String = "" // 收费员
|
||||
var chargeName: String = "" // 收费员名称
|
||||
var dlvId: String = ""
|
||||
var dlvIdType: String = ""
|
||||
var dlvName: String = ""
|
||||
var dlvPhone: String = ""
|
||||
var locFlag: String = ""
|
||||
var origin: String = ""
|
||||
var refId: String = ""
|
||||
var receiptNo: String = ""
|
||||
var chgMode: String = ""
|
||||
var billReviewStatus: String = ""
|
||||
var billAgentRemark: String = ""
|
||||
var awbPc: Long = 0
|
||||
|
||||
// ========== UI扩展字段 ==========
|
||||
/**
|
||||
* 航班信息展示:优先使用 flight 字段,否则用 fdate(去杠)/fno 拼接
|
||||
* 格式示例:20240204/MU2023
|
||||
*/
|
||||
val flightInfo: String
|
||||
get() {
|
||||
if (!flight.isNullOrEmpty()) return flight
|
||||
val dateStr = fdate?.replace("-", "")?.take(8) ?: ""
|
||||
val noStr = fno ?: ""
|
||||
return if (dateStr.isNotEmpty() || noStr.isNotEmpty()) "$dateStr/$noStr" else ""
|
||||
}
|
||||
|
||||
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||
|
||||
var isSelected: Boolean
|
||||
get() = checked.get()
|
||||
set(value) = checked.set(value)
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
import androidx.databinding.ObservableBoolean
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* 国际进港提取记录-列表数据Bean
|
||||
* 对应API: IntImpPickup/pageQuery
|
||||
*/
|
||||
class IntImpPickUpRecordBean : Serializable {
|
||||
var id: Long = 0 // 主键ID
|
||||
var wbNo: String = "" // 运单号
|
||||
var no: String = "" // 主单号
|
||||
var prefix: String = "" // 前缀
|
||||
var hno: String = "" // 分单号
|
||||
var serialNo: String = "" // 序号
|
||||
var pc: Int = 0 // 件数
|
||||
var weight: Double = 0.0 // 重量
|
||||
var cashWeight: Double = 0.0 // 计费重量
|
||||
var agentCode: String = "" // 代理人
|
||||
var spCode: String = "" // 特码
|
||||
var optCharge: Double = 0.0 // 服务费
|
||||
var whsCharge: Double = 0.0 // 仓储费
|
||||
var amount: Double = 0.0 // 总金额
|
||||
var chargeTime: String = "" // 缴费时间/提取时间
|
||||
var pkId: String = "" // 提货编号
|
||||
var tranCharge: Double = 0.0 // 信息费
|
||||
var drawBillCharge: Double = 0.0 // 抽单费
|
||||
var efrCharge: Double = 0.0 // 冷藏费
|
||||
var svlCharge: Double = 0.0 // 铲车费
|
||||
var tallyCharge: Double = 0.0 // 理货费
|
||||
var pipFee: Double = 0.0 // 精密仪器处理费
|
||||
var lapFee: Double = 0.0 // 活体动物处理费
|
||||
var chargeName: String = "" // 办理人名称
|
||||
var chargeId: String = "" // 收费员ID
|
||||
var dlvTime: String = "" // 出库时间
|
||||
|
||||
// ========== UI扩展字段 ==========
|
||||
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||
|
||||
var isSelected: Boolean
|
||||
get() = checked.get()
|
||||
set(value) = checked.set(value)
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* 国际进港查询-主运单数据模型
|
||||
* 对应接口:/IntImpSearch/pageQuery 返回的列表项 (GjjSearchMaWb)
|
||||
*/
|
||||
data class IntImpQueryBean(
|
||||
var maWbId: Long? = null, // 主单主键ID
|
||||
var wbNo: String? = null, // 运单号
|
||||
var prefix: String? = null, // 运单号前缀
|
||||
var no: String? = null, // 运单号主体
|
||||
|
||||
// ==================== 货物信息 ====================
|
||||
var awbPc: Long? = null, // 运单件数
|
||||
var awbWeight: Double? = null, // 运单重量
|
||||
var inPc: Long? = null, // 入库件数
|
||||
var inWeight: Double? = null, // 入库重量
|
||||
var cashWeight: Double? = null, // 计费重量
|
||||
var goods: String? = null, // 品名(英)
|
||||
var goodsCn: String? = null, // 品名(中)
|
||||
var packageType: String? = null, // 包装类型
|
||||
var unNumber: String? = null, // UN编号
|
||||
|
||||
// ==================== 航班信息 ====================
|
||||
var flight: String? = null, // 航班: 日期/航班号
|
||||
var fno: String? = null, // 航班号
|
||||
var fdate: String? = null, // 航班日期
|
||||
var range: String? = null, // 航程 (如 LAX-HFE)
|
||||
var dest: String? = null, // 目的地
|
||||
var origin: String? = null, // 货源地
|
||||
var by1: String? = null, // 承运人
|
||||
|
||||
// ==================== 代理与运单类型 ====================
|
||||
var agentCode: String? = null, // 代理人code
|
||||
var agentName: String? = null, // 代理人名称
|
||||
var awbType: String? = null, // 运单类型code
|
||||
var awbName: String? = null, // 运单类型名称
|
||||
var businessType: String? = null, // 业务类型code
|
||||
var businessName: String? = null, // 业务类型名称
|
||||
|
||||
// ==================== 特码 ====================
|
||||
var spCode: String? = null, // 特码
|
||||
|
||||
// ==================== 时间信息 ====================
|
||||
var inDate: String? = null, // 入库时间
|
||||
var dlvTime: String? = null, // 出库时间
|
||||
|
||||
// ==================== 状态信息 ====================
|
||||
var mftStatus: String? = null, // 原始舱单状态
|
||||
var tallyStatus: String? = null, // 理货申报状态
|
||||
var lockState: Int? = null, // 锁定状态(0:未锁, 1:锁定)
|
||||
var command: String? = null, // 海关放行
|
||||
|
||||
// ==================== 其他 ====================
|
||||
var remark: String? = null, // 备注
|
||||
var activeId: Long? = null // 有效值
|
||||
)
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* 国际进港运单修改-数据模型
|
||||
* 对应接口:/IntImpSearch/modifyMaWb 的请求体 (GjjMaWb)
|
||||
* 详情数据来源:/IntImpSearch/detail 返回的 maWb + maWbM + warehouseList
|
||||
*/
|
||||
data class IntImpQueryEditBean(
|
||||
// ==================== 主键 ====================
|
||||
var maWbId: Long? = null, // 主单主键ID
|
||||
var activeId: Long? = null, // 有效值
|
||||
|
||||
// ==================== 运单号(禁用) ====================
|
||||
var wbNo: String? = null, // 运单号(组合: prefix + no)
|
||||
var prefix: String? = null, // 运单号前缀
|
||||
var no: String? = null, // 运单号主体
|
||||
|
||||
// ==================== 可编辑字段 ====================
|
||||
var agentCode: String? = null, // 代理人code(提交用)
|
||||
var agentName: String? = null, // 代理人名称(显示用)
|
||||
var spCode: String? = null, // 特码
|
||||
var packageType: String? = null, // 包装类型
|
||||
var awbType: String? = null, // 运单类型code
|
||||
var lockState: String? = null, // 锁定状态("0":未锁, "1":锁定)
|
||||
var remark: String? = null, // 备注
|
||||
|
||||
// ==================== 禁用字段(仅显示) ====================
|
||||
var awbPc: Long? = null, // 运单件数(对应API: pc)
|
||||
var awbWeight: Double? = null, // 运单重量(对应API: weight)
|
||||
var businessType: String? = null, // 业务类型code
|
||||
var businessName: String? = null, // 业务类型名称
|
||||
var inPc: Long? = null, // 入库件数
|
||||
var inWeight: Double? = null, // 入库重量
|
||||
var cashWeight: Double? = null, // 计费重量
|
||||
var by1: String? = null, // 承运人
|
||||
var range: String? = null, // 航程
|
||||
var goodsCn: String? = null, // 品名(中)
|
||||
var goods: String? = null, // 品名(英)
|
||||
var unNumber: String? = null, // UN编号
|
||||
|
||||
// ==================== 提交时需要的额外字段 ====================
|
||||
var fno: String? = null, // 航班号
|
||||
var fdate: String? = null, // 航班日期
|
||||
var flight: String? = null, // 航班
|
||||
var pc: Long? = null, // 件数(API用)
|
||||
var weight: Double? = null, // 重量(API用)
|
||||
var volume: Double? = null, // 体积
|
||||
var origin: String? = null, // 货源地
|
||||
var dest: String? = null, // 目的地
|
||||
var cargoType: String? = null, // 货物类型
|
||||
var subCode: String? = null, // 子码
|
||||
var carId: String? = null // 车牌号
|
||||
)
|
||||
@@ -23,7 +23,8 @@ class MsgReceivePool(
|
||||
var interfaceType: String = "" // 接口类型
|
||||
) : BaseObservable(), ICheck {
|
||||
|
||||
// 选中状态
|
||||
// 选中状态(UI状态,不参与序列化)
|
||||
@Transient
|
||||
val checked = ObservableBoolean(false)
|
||||
|
||||
override fun getCheckObservable() = checked
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
data class StatusLogBean(
|
||||
var id: Long = 0,
|
||||
var key: String = "", // 关键字(运单号)
|
||||
var awbType: String = "", // 运单类型(CI:国内进港,CO:国内出港,II:国际进港,IO:国际出港)
|
||||
var content: String = "", // 操作内容
|
||||
var opDate: String = "", // 操作时间
|
||||
var opId: String = "", // 操作人
|
||||
var status: String = "" // 操作环节(运单状态)
|
||||
)
|
||||
@@ -15,6 +15,16 @@ data class ULDBean(
|
||||
var uld: String = "",
|
||||
var uldFlag: String = "",
|
||||
var uldType: String = "",
|
||||
// 状态 0:正常 1:故障
|
||||
var status: String = "",
|
||||
// 备注
|
||||
var remark: String = "",
|
||||
){
|
||||
val checked = ObservableBoolean(false)
|
||||
|
||||
fun statusName(): String = when (status) {
|
||||
"0" -> "正常"
|
||||
"1" -> "故障"
|
||||
else -> status
|
||||
}
|
||||
}
|
||||
@@ -270,6 +270,9 @@ interface Constant {
|
||||
const val IntArrAirManifest = "AppIntArrAirManifest" //原始舱单
|
||||
const val IntImpManifest = "AppIntImpManifest" //进港舱单
|
||||
const val IntImpTally = "AppIntImpTally" //理货报告
|
||||
const val IntImpPickUpRecord = "AppIntImpPickUpRecord" //提取记录
|
||||
const val IntImpPickUpDLV = "AppIntImpPickUpDLV" //提取出库
|
||||
const val IntImpAccidentVisa = "AppIntImpAccidentVisa" //事故签证
|
||||
const val GjjManifestListActivity = "AppIntExpManifest" //舱单
|
||||
const val GjjTallyListActivity = "AppIntExpTally" //理货
|
||||
const val GjjGoodsListActivity = "AppIntExpGjjGoods" //货物交接
|
||||
@@ -325,6 +328,12 @@ interface Constant {
|
||||
|
||||
// 日志查询
|
||||
const val ComprehensiveLog = "AppComprehensiveLog"
|
||||
|
||||
// ULD管理
|
||||
const val ComprehensiveUld = "AppComprehensiveUld"
|
||||
|
||||
// 冷库登记
|
||||
const val ComprehensiveColdStorage = "AppComprehensiveColdStorage"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.lukouguoji.module_base.bean.BaseResultBean
|
||||
import com.lukouguoji.module_base.bean.BoxDetailsForCarIdBean
|
||||
import com.lukouguoji.module_base.bean.CarBarBean
|
||||
import com.lukouguoji.module_base.bean.CarOrUldBean
|
||||
import com.lukouguoji.module_base.bean.ColdStorageBean
|
||||
import com.lukouguoji.module_base.bean.DiBangChannelBean
|
||||
import com.lukouguoji.module_base.bean.DictBean
|
||||
import com.lukouguoji.module_base.bean.DictIdValueBean
|
||||
@@ -44,11 +45,17 @@ import com.lukouguoji.module_base.bean.GjcWeighingBean
|
||||
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
|
||||
import com.lukouguoji.module_base.bean.GjcWeighingStatisticsBean
|
||||
import com.lukouguoji.module_base.bean.GjjAirManifest
|
||||
import com.lukouguoji.module_base.bean.GjjHaWb
|
||||
import com.lukouguoji.module_base.bean.GjjGoodsBean
|
||||
import com.lukouguoji.module_base.bean.GjjGoodsDetailsBean
|
||||
import com.lukouguoji.module_base.bean.GjjGoodsTypeBean
|
||||
import com.lukouguoji.module_base.bean.GjjHandoverRecordBean
|
||||
import com.lukouguoji.module_base.bean.GjjImportTally
|
||||
import com.lukouguoji.module_base.bean.GjAccidentVisaEditBean
|
||||
import com.lukouguoji.module_base.bean.IntImpAccidentVisaBean
|
||||
import com.lukouguoji.module_base.bean.IntImpPickUpDLVBean
|
||||
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
|
||||
import com.lukouguoji.module_base.bean.IntImpQueryBean
|
||||
import com.lukouguoji.module_base.bean.GjjManifest
|
||||
import com.lukouguoji.module_base.bean.GjjManifestBean
|
||||
import com.lukouguoji.module_base.bean.GjjPackTypeBean
|
||||
@@ -74,6 +81,7 @@ import com.lukouguoji.module_base.bean.GnjYiKuBean
|
||||
import com.lukouguoji.module_base.bean.GoodsTransportBean
|
||||
import com.lukouguoji.module_base.bean.JianDataBean
|
||||
import com.lukouguoji.module_base.bean.LogBean
|
||||
import com.lukouguoji.module_base.bean.StatusLogBean
|
||||
import com.lukouguoji.module_base.bean.ManifestTotalDto
|
||||
import com.lukouguoji.module_base.bean.MessageBean
|
||||
import com.lukouguoji.module_base.bean.MoveStashBean
|
||||
@@ -227,6 +235,12 @@ interface Api {
|
||||
@POST("typeCode/intExp/agentCode")
|
||||
suspend fun getIntExpAgentList(): DictListBean
|
||||
|
||||
/**
|
||||
* 获取代理人-国际进港-下拉框
|
||||
*/
|
||||
@POST("typeCode/intImp/agentCode")
|
||||
suspend fun getIntImpAgentList(): DictListBean
|
||||
|
||||
/**
|
||||
* 获取业务类型---CI:国内进港,CO:国内出港,II:国际进港,IO:国际出港 下拉框
|
||||
*/
|
||||
@@ -288,6 +302,18 @@ interface Api {
|
||||
@POST("typeCode/countryType")
|
||||
suspend fun getAreaTypeList(): DictListBean
|
||||
|
||||
/**
|
||||
* 获取国家代码
|
||||
*/
|
||||
@POST("typeCode/countryCode")
|
||||
suspend fun getCountryCodeList(): DictListBean
|
||||
|
||||
/**
|
||||
* 获取通讯方式类型
|
||||
*/
|
||||
@POST("typeCode/communicateType")
|
||||
suspend fun getCommunicateTypeList(): DictListBean
|
||||
|
||||
/**
|
||||
* 查询平板车信息
|
||||
*/
|
||||
@@ -891,6 +917,125 @@ interface Api {
|
||||
@GET("typeCode/locationByFlag")
|
||||
suspend fun getLocationList(@Query("flag") flag: Int): BaseResultBean<List<DictLocationBean>>
|
||||
|
||||
/**
|
||||
* 国际进港仓库-分页查询
|
||||
* 接口路径: /IntImpStorage/pageQuery
|
||||
*/
|
||||
@POST("IntImpStorage/pageQuery")
|
||||
suspend fun getIntImpStorageUseList(@Body data: RequestBody): PageInfo<GjcMaWb>
|
||||
|
||||
/**
|
||||
* 国际进港仓库-分页合计
|
||||
* 接口路径: /IntImpStorage/pageQueryTotal
|
||||
*/
|
||||
@POST("IntImpStorage/pageQueryTotal")
|
||||
suspend fun getIntImpStorageUseTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||
|
||||
/**
|
||||
* 国际进港库位操作-清仓
|
||||
* 接口路径: /IntImpStorage/updateClear
|
||||
*/
|
||||
@POST("IntImpStorage/updateClear")
|
||||
suspend fun clearIntImpStorage(@Query("clearNormal") clearNormal: String, @Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际进港库位操作-修改库位
|
||||
* 接口路径: /IntImpStorage/modifyStorage
|
||||
*/
|
||||
@POST("IntImpStorage/modifyStorage")
|
||||
suspend fun modifyIntImpStorage(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际进港库位操作-出库
|
||||
* 接口路径: /IntImpStorage/outStorage
|
||||
*/
|
||||
@POST("IntImpStorage/outStorage")
|
||||
suspend fun outIntImpStorage(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际进港库位操作-入库
|
||||
* 接口路径: /IntImpStorage/inStorage
|
||||
*/
|
||||
@POST("IntImpStorage/inStorage")
|
||||
suspend fun inIntImpStorage(@Query("location") location: String, @Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际进港提取记录-分页查询
|
||||
* 接口路径: /IntImpPickup/pageQuery
|
||||
*/
|
||||
@POST("IntImpPickup/pageQuery")
|
||||
suspend fun getIntImpPickUpRecordList(@Body data: RequestBody): PageInfo<IntImpPickUpRecordBean>
|
||||
|
||||
/**
|
||||
* 国际进港提取记录-分页合计
|
||||
* 接口路径: /IntImpPickup/pageQueryTotal
|
||||
*/
|
||||
@POST("IntImpPickup/pageQueryTotal")
|
||||
suspend fun getIntImpPickUpRecordTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||
|
||||
/**
|
||||
* 国际进港提取记录-清除提货
|
||||
* 接口路径: /IntImpPickup/clearPickup
|
||||
*/
|
||||
@POST("IntImpPickup/clearPickup")
|
||||
suspend fun clearIntImpPickUp(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际进港提取记录-修改费用
|
||||
* 接口路径: /IntImpPickup/modifyCharge
|
||||
*/
|
||||
@POST("IntImpPickup/modifyCharge")
|
||||
suspend fun modifyIntImpPickUpCharge(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际进港提取出库-分页查询
|
||||
* 接口路径: /IntImpPickUpDlv/pageQuery
|
||||
*/
|
||||
@POST("IntImpPickUpDlv/pageQuery")
|
||||
suspend fun getIntImpPickUpDLVList(@Body data: RequestBody): PageInfo<IntImpPickUpDLVBean>
|
||||
|
||||
/**
|
||||
* 国际进港提取出库-分页合计
|
||||
* 接口路径: /IntImpPickUpDlv/pageQueryTotal
|
||||
*/
|
||||
@POST("IntImpPickUpDlv/pageQueryTotal")
|
||||
suspend fun getIntImpPickUpDLVTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||
|
||||
/**
|
||||
* 国际进港提取出库-确认出库
|
||||
* 接口路径: /IntImpPickUpDlv/pickUpOut
|
||||
*/
|
||||
@POST("IntImpPickUpDlv/pickUpOut")
|
||||
suspend fun confirmIntImpPickUpDLV(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际进港查询-分页
|
||||
* 接口路径: /IntImpSearch/pageQuery
|
||||
*/
|
||||
@POST("IntImpSearch/pageQuery")
|
||||
suspend fun getIntImpQueryList(@Body data: RequestBody): PageInfo<IntImpQueryBean>
|
||||
|
||||
/**
|
||||
* 国际进港查询-分页合计
|
||||
* 接口路径: /IntImpSearch/pageQueryTotal
|
||||
*/
|
||||
@POST("IntImpSearch/pageQueryTotal")
|
||||
suspend fun getIntImpQueryTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||
|
||||
/**
|
||||
* 国际进港查询-详情
|
||||
* 接口路径: /IntImpSearch/detail
|
||||
*/
|
||||
@POST("IntImpSearch/detail")
|
||||
suspend fun getIntImpQueryDetails(@Body data: RequestBody): BaseResultBean<Map<String, Any>>
|
||||
|
||||
/**
|
||||
* 国际进港查询-修改运单
|
||||
* 接口路径: /IntImpSearch/modifyMaWb
|
||||
*/
|
||||
@POST("IntImpSearch/modifyMaWb")
|
||||
suspend fun modifyIntImpMaWb(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际出港待计重-分页搜索
|
||||
* 接口路径: /IntExpCheckIn/pageQuery
|
||||
@@ -1130,21 +1275,21 @@ interface Api {
|
||||
suspend fun getGjjManifestDetail(@Query("id") id: String): BaseResultBean<GjjManifestBean>
|
||||
|
||||
/**
|
||||
* 删除-国际进-舱单-列表
|
||||
* 批量删除-国际进港舱单(请求体为 mfId 数组,如 [1,2,3])
|
||||
*/
|
||||
@POST("IntImpManiFest/deleteFestList")
|
||||
suspend fun gjjManifestDelete(@Body data: RequestBody): BaseResultBean<Any>
|
||||
suspend fun gjjManifestDeleteBatch(@Body data: RequestBody): BaseResultBean<Any>
|
||||
|
||||
/**
|
||||
* 新增-国际进-舱单
|
||||
* 新增-国际进港舱单
|
||||
*/
|
||||
@POST("IntImpManiFest/saveFest")
|
||||
@POST("IntImpManifest/addManifest")
|
||||
suspend fun gjjManifestInsert(@Body data: RequestBody): BaseResultBean<Any>
|
||||
|
||||
/**
|
||||
* 更新-国际进-舱单
|
||||
* 修改-国际进港舱单
|
||||
*/
|
||||
@POST("IntImpManiFest/updateFest")
|
||||
@POST("IntImpManifest/modifyManifest")
|
||||
suspend fun gjjManifestUpdate(@Body data: RequestBody): BaseResultBean<Any>
|
||||
|
||||
/**
|
||||
@@ -1349,6 +1494,12 @@ interface Api {
|
||||
@POST("log/pageQuery")
|
||||
suspend fun getLogList(@Body data: RequestBody): BaseListBean<LogBean>
|
||||
|
||||
/**
|
||||
* 获取-运单状态列表(关键词-运单号、运单类型必填)
|
||||
*/
|
||||
@POST("log/listStatus")
|
||||
suspend fun getLogStatusList(@Body data: RequestBody): BaseResultBean<List<StatusLogBean>>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 国内进港-舱单
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -1634,13 +1785,13 @@ interface Api {
|
||||
* 分页查询国际进港电报
|
||||
*/
|
||||
@POST("IntImpMsg/pageQuery")
|
||||
suspend fun getIntImpMsgList(@Body data: RequestBody): BaseResultBean<PageInfo<MsgReceivePool>>
|
||||
suspend fun getIntImpMsgList(@Body data: RequestBody): PageInfo<MsgReceivePool>
|
||||
|
||||
/**
|
||||
* 批量生成电报
|
||||
* 解析电报(电报生成)
|
||||
*/
|
||||
@POST("IntImpMsg/batchGenerate")
|
||||
suspend fun batchGenerateMsg(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
|
||||
@POST("IntImpMsg/analyseMsg")
|
||||
suspend fun analyseMsg(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 国际进港-原始舱单
|
||||
@@ -1650,7 +1801,7 @@ interface Api {
|
||||
* 国际进港原始舱单-分页查询
|
||||
*/
|
||||
@POST("IntImpAirManifest/pageQuery")
|
||||
suspend fun getIntArrAirManifestList(@Body data: RequestBody): BaseResultBean<PageInfo<GjjAirManifest>>
|
||||
suspend fun getIntArrAirManifestList(@Body data: RequestBody): PageInfo<GjjAirManifest>
|
||||
|
||||
/**
|
||||
* 国际进港原始舱单-分页合计
|
||||
@@ -1676,6 +1827,12 @@ interface Api {
|
||||
@POST("IntImpAirManifest/deleteDeclare")
|
||||
suspend fun deleteIntArrManifestDeclare(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际进港原始舱单-补充收发货人信息
|
||||
*/
|
||||
@POST("IntImpAirManifest/complete")
|
||||
suspend fun completeIntArrManifest(@Body data: RequestBody): BaseResultBean<Any>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 国际进港-进港舱单
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -1684,7 +1841,7 @@ interface Api {
|
||||
* 国际进港舱单-分页查询
|
||||
*/
|
||||
@POST("IntImpManifest/pageQuery")
|
||||
suspend fun getIntImpManifestList(@Body data: RequestBody): BaseResultBean<PageInfo<GjjManifest>>
|
||||
suspend fun getIntImpManifestList(@Body data: RequestBody): PageInfo<GjjManifest>
|
||||
|
||||
/**
|
||||
* 国际进港舱单-分页合计
|
||||
@@ -1692,11 +1849,35 @@ interface Api {
|
||||
@POST("IntImpManifest/pageQueryTotal")
|
||||
suspend fun getIntImpManifestTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||
|
||||
/**
|
||||
* 国际进港舱单-获取主单下分单
|
||||
*/
|
||||
@POST("IntImpManifest/listHaWbByManifest")
|
||||
suspend fun getIntImpManifestHaWbList(@Body data: RequestBody): BaseResultBean<List<GjjHaWb>>
|
||||
|
||||
/**
|
||||
* 国际进港舱单-新增分单
|
||||
*/
|
||||
@POST("IntImpManifest/addHaWb")
|
||||
suspend fun intImpManifestAddHaWb(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际进港舱单-修改分单
|
||||
*/
|
||||
@POST("IntImpManifest/modifyHaWb")
|
||||
suspend fun intImpManifestModifyHaWb(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际进港舱单-获取主单减去分单的件数重量
|
||||
*/
|
||||
@POST("IntImpManifest/getMaWbMinusHaWb")
|
||||
suspend fun getMaWbMinusHaWb(@Body data: RequestBody): BaseResultBean<GjjHaWb>
|
||||
|
||||
/**
|
||||
* 国际进港舱单-分拣理货(装机单)-分页查询
|
||||
*/
|
||||
@POST("IntImpManifest/pageQueryAir")
|
||||
suspend fun getIntImpLoadingList(@Body data: RequestBody): BaseResultBean<PageInfo<GjjManifest>>
|
||||
suspend fun getIntImpLoadingList(@Body data: RequestBody): PageInfo<GjjManifest>
|
||||
|
||||
/**
|
||||
* 国际进港舱单-分拣理货(装机单)-分页合计
|
||||
@@ -1704,6 +1885,26 @@ interface Api {
|
||||
@POST("IntImpManifest/pageQueryAirTotal")
|
||||
suspend fun getIntImpLoadingTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||
|
||||
/**
|
||||
* 国际进港舱单-分拣理货(装机单)-修改装机单
|
||||
*/
|
||||
@POST("IntImpManifest/modifyManifestAir")
|
||||
suspend fun modifyIntImpLoadingList(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际进港舱单-分拣理货(装机单)-修改库位
|
||||
* 接口路径: /IntImpManifest/modifyStorage
|
||||
*/
|
||||
@POST("IntImpManifest/modifyStorage")
|
||||
suspend fun modifyIntImpLoadingStorage(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际进港舱单-分拣理货(装机单)-入库
|
||||
* 接口路径: /IntImpManifest/inStorage
|
||||
*/
|
||||
@POST("IntImpManifest/inStorage")
|
||||
suspend fun inIntImpLoadingStorage(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际进港理货报告-分页查询
|
||||
*/
|
||||
@@ -1715,4 +1916,148 @@ interface Api {
|
||||
*/
|
||||
@POST("IntImpTally/pageQueryTotal")
|
||||
suspend fun getIntImpTallyTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||
|
||||
/**
|
||||
* 国际进港理货报告-查询分单列表
|
||||
*/
|
||||
@POST("IntImpTally/listHaWb")
|
||||
suspend fun getIntImpTallySubList(@Body data: RequestBody): BaseResultBean<List<GjjImportTally>>
|
||||
|
||||
/**
|
||||
* 国际进港理货-人工放行
|
||||
*/
|
||||
@POST("IntImpTally/customCommand")
|
||||
suspend fun intImpTallyCustomCommand(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际进港理货-状态重置
|
||||
*/
|
||||
@POST("IntImpTally/resetDeclare")
|
||||
suspend fun intImpTallyResetDeclare(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际进港理货-删除申报
|
||||
*/
|
||||
@POST("IntImpTally/deleteDeclare")
|
||||
suspend fun intImpTallyDeleteDeclare(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际进港理货-理货申报
|
||||
*/
|
||||
@POST("IntImpTally/declare")
|
||||
suspend fun intImpTallyDeclare(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际进港舱单-货物发放
|
||||
*/
|
||||
@POST("IntImpManifest/putUpCargo")
|
||||
suspend fun intImpManifestPutUpCargo(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 国际进港-事故签证
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* 国际事故签证-分页搜索
|
||||
*/
|
||||
@POST("GjAccidentVisa/search")
|
||||
suspend fun getIntImpAccidentVisaList(@Body data: RequestBody): PageInfo<IntImpAccidentVisaBean>
|
||||
|
||||
/**
|
||||
* 国际事故签证-删除(传选中的 Bean 列表)
|
||||
*/
|
||||
@POST("GjAccidentVisa/delete")
|
||||
suspend fun deleteIntImpAccidentVisa(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际事故签证-新增
|
||||
*/
|
||||
@POST("GjAccidentVisa/saveVisa")
|
||||
suspend fun saveGjAccidentVisa(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际事故签证-修改
|
||||
*/
|
||||
@POST("GjAccidentVisa/modifyVisa")
|
||||
suspend fun modifyGjAccidentVisa(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际事故签证-详情
|
||||
*/
|
||||
@POST("GjAccidentVisa/detail")
|
||||
suspend fun getGjAccidentVisaDetail(@Query("id") id: Long): BaseResultBean<GjAccidentVisaEditBean>
|
||||
|
||||
/**
|
||||
* 字典-破损情况
|
||||
*/
|
||||
@POST("typeCode/damageType")
|
||||
suspend fun getDamageTypeList(): DictListBean
|
||||
|
||||
/**
|
||||
* 字典-内容物情况
|
||||
*/
|
||||
@POST("typeCode/contentType")
|
||||
suspend fun getContentTypeList(): DictListBean
|
||||
|
||||
/**
|
||||
* 字典-不正常类型
|
||||
*/
|
||||
@POST("typeCode/unusualType")
|
||||
suspend fun getUnusualTypeList(): DictListBean
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ULD管理
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* 获取-ULD-列表(分页)
|
||||
*/
|
||||
@POST("eqm/uld/pageQuery")
|
||||
suspend fun getUldList(@Body data: RequestBody): PageInfo<ULDBean>
|
||||
|
||||
/**
|
||||
* 新增-ULD-信息
|
||||
*/
|
||||
@POST("eqm/uld/saveUld")
|
||||
suspend fun saveUld(@Body data: RequestBody): BaseResultBean<Any>
|
||||
|
||||
/**
|
||||
* 更新-ULD-信息
|
||||
*/
|
||||
@POST("eqm/uld/updateUld")
|
||||
suspend fun updateUld(@Body data: RequestBody): BaseResultBean<Any>
|
||||
|
||||
/**
|
||||
* 删除-ULD-信息
|
||||
*/
|
||||
@POST("eqm/uld/deleteUld")
|
||||
suspend fun deleteUld(@Query("uld") uld: String): BaseResultBean<Any>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 冷库登记
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* 冷库登记-分页查询
|
||||
*/
|
||||
@POST("ColdStorage/pageQuery")
|
||||
suspend fun getColdStorageList(@Body data: RequestBody): PageInfo<ColdStorageBean>
|
||||
|
||||
/**
|
||||
* 冷库登记-分页合计
|
||||
*/
|
||||
@POST("ColdStorage/pageQueryTotal")
|
||||
suspend fun getColdStorageTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||
|
||||
/**
|
||||
* 冷库登记-完成入库
|
||||
*/
|
||||
@POST("ColdStorage/completeIn")
|
||||
suspend fun coldStorageCompleteIn(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 冷库登记-完成出库
|
||||
*/
|
||||
@POST("ColdStorage/completeOut")
|
||||
suspend fun coldStorageCompleteOut(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
}
|
||||
@@ -160,6 +160,7 @@ object ARouterConstants {
|
||||
const val ACTIVITY_URL_GJJ_WARE_HOUSE_INFO = "/gjj/GjjWareHouseInfoActivity" //国际进港模块 仓库详情
|
||||
|
||||
const val ACTIVITY_URL_GJJ_CHU_KU_LIST = "/gjj/GjjChuKuListActivity" //国际进港 出库
|
||||
const val ACTIVITY_URL_INT_IMP_PICK_UP_RECORD = "/gjj/IntImpPickUpRecordActivity" //国际进港 提取记录
|
||||
|
||||
const val ACTIVITY_URL_GJJ_QUERY_LIST = "/gjj/GjjQueryListActivity" //国际进港 查询 列表
|
||||
const val ACTIVITY_URL_GJJ_QUERY_INFO = "/gjj/GnjQueryInfoActivity" //国际进港 查询 详情
|
||||
@@ -174,15 +175,20 @@ object ARouterConstants {
|
||||
const val ACTIVITY_URL_INT_ARR_AIR_MANIFEST_DETAILS = "/gjj/IntArrAirManifestDetailsActivity" //国际进港 原始舱单详情
|
||||
const val ACTIVITY_URL_INT_ARR_SUPPLEMENT_INFO = "/gjj/IntArrSupplementInfoActivity" //国际进港 补充信息
|
||||
const val ACTIVITY_URL_INT_IMP_MANIFEST = "/gjj/IntImpManifestActivity" //国际进港 进港舱单
|
||||
const val ACTIVITY_URL_INT_IMP_MANIFEST_DETAILS = "/gjj/IntImpManifestDetailsActivity" //国际进港 进港舱单详情
|
||||
const val ACTIVITY_URL_INT_IMP_LOADING_LIST = "/gjj/IntImpLoadingListActivity" //国际进港 装机单(分拣理货)
|
||||
const val ACTIVITY_URL_INT_IMP_TALLY = "/gjj/IntImpTallyActivity" //国际进港 理货报告
|
||||
const val ACTIVITY_URL_INT_IMP_PICK_UP_DLV = "/gjj/IntImpPickUpDLVActivity" //国际进港 提取出库
|
||||
const val ACTIVITY_URL_INT_IMP_ACCIDENT_VISA = "/gjj/IntImpAccidentVisaActivity" //国际进港 事故签证
|
||||
|
||||
///////////////// 航班查询模块
|
||||
/**
|
||||
* 航班查询模块
|
||||
*/
|
||||
const val ACTIVITY_URL_HANG_BAN_QUERY = "/hb/HangBanQueryActivity" //航班查询模块
|
||||
const val ACTIVITY_URL_HANG_BAN_QUERY_INFO = "/hb/HangBanQueryInfoActivity" //航班查询模块
|
||||
const val ACTIVITY_URL_HANG_BAN_QUERY = "/hb/HangBanQueryActivity" //航班查询模块(旧版)
|
||||
const val ACTIVITY_URL_HANG_BAN_QUERY_INFO = "/hb/HangBanQueryInfoActivity" //航班查询模块(旧版)
|
||||
const val ACTIVITY_URL_HB_QUERY_LIST = "/hb/HbQueryListActivity" //航班管理 列表(新版)
|
||||
const val ACTIVITY_URL_FLIGHT_QUERY_DETAILS = "/app/FlightQueryDetailsActivity" //航班详情
|
||||
|
||||
///////////////// 货物追踪模块
|
||||
/**
|
||||
@@ -210,4 +216,9 @@ object ARouterConstants {
|
||||
|
||||
const val ACTIVITY_URL_PDA_ENTER = "/pda/PDAEnterActivity" //PDA入口
|
||||
|
||||
///////////////// 综合管理
|
||||
const val ACTIVITY_URL_COLD_STORAGE = "/app/ColdStorageActivity" //冷库登记
|
||||
const val ACTIVITY_URL_LOG_QUERY = "/app/LogQueryActivity" //日志查询
|
||||
const val ACTIVITY_URL_LOG_DETAIL = "/app/LogDetailActivity" //操作日志详情
|
||||
|
||||
}
|
||||
@@ -36,7 +36,11 @@ data class AutoQueryConfig(
|
||||
var title: String = "请选择",
|
||||
|
||||
/** 防抖延迟(毫秒,默认 300ms) */
|
||||
var debounceMillis: Long = 300L
|
||||
var debounceMillis: Long = 300L,
|
||||
|
||||
/** 额外参数提供者(查询时动态获取额外参数,如航班日期、航班号等) */
|
||||
@Transient
|
||||
var extraParamsProvider: (() -> Map<String, String?>)? = null
|
||||
) {
|
||||
/**
|
||||
* 验证配置是否有效
|
||||
|
||||
@@ -113,8 +113,12 @@ class AutoQueryManager(
|
||||
}
|
||||
lastQueriedValue = value
|
||||
|
||||
// 构建查询参数
|
||||
val params = mapOf(config.paramKey to value).toRequestBody()
|
||||
// 构建查询参数(合并额外参数)
|
||||
val baseParams = mutableMapOf<String, Any?>(config.paramKey to value)
|
||||
config.extraParamsProvider?.invoke()?.forEach { (key, v) ->
|
||||
if (!v.isNullOrEmpty()) baseParams[key] = v
|
||||
}
|
||||
val params = baseParams.toRequestBody()
|
||||
|
||||
// 发起网络请求
|
||||
scope?.launchCollect({ NetApply.api.getWbNoList(config.url, params) }) {
|
||||
|
||||
@@ -96,6 +96,7 @@ class PadDataLayoutNew : FrameLayout {
|
||||
field = value
|
||||
|
||||
et.hint = value
|
||||
tv.hint = value
|
||||
bindAdapter(spinner, list, hint)
|
||||
}
|
||||
|
||||
|
||||
@@ -119,8 +119,12 @@ class SearchAutoQueryManager(
|
||||
}
|
||||
lastQueriedValue = value
|
||||
|
||||
// 构建查询参数
|
||||
val params = mapOf(config.paramKey to value).toRequestBody()
|
||||
// 构建查询参数(合并额外参数)
|
||||
val baseParams = mutableMapOf<String, Any?>(config.paramKey to value)
|
||||
config.extraParamsProvider?.invoke()?.forEach { (key, v) ->
|
||||
if (!v.isNullOrEmpty()) baseParams[key] = v
|
||||
}
|
||||
val params = baseParams.toRequestBody()
|
||||
|
||||
// 发起网络请求
|
||||
scope?.launchCollect({ NetApply.api.getWbNoList(config.url, params) }) {
|
||||
|
||||
@@ -102,6 +102,24 @@ object DictUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取国际进港代理列表
|
||||
*/
|
||||
fun getIntImpAgentList(
|
||||
addAll: Boolean = true,
|
||||
checkedValue: String? = null,
|
||||
callBack: (List<KeyValue>) -> Unit
|
||||
) {
|
||||
launchCollect({
|
||||
NetApply.api
|
||||
.getIntImpAgentList()
|
||||
}) {
|
||||
onSuccess = {
|
||||
handleCallBack(it, checkedValue, addAll, callBack)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取仓管列表
|
||||
*/
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 775 B |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:width="200dp"
|
||||
android:height="200dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
android:background="@null"
|
||||
android:paddingStart="10dp"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textColorHint="@color/text_gray"
|
||||
android:textColorHint="@color/text_gray_l"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Spinner
|
||||
|
||||
@@ -119,8 +119,8 @@ class GjcQueryViewModel : BasePageViewModel() {
|
||||
|
||||
// 构建查询参数(统计接口 - 使用相同的搜索条件)
|
||||
val totalParams = mapOf(
|
||||
"fdateStart" to flightDateStart.value!!.ifEmpty { null },
|
||||
"fdateEnd" to flightDateEnd.value!!.ifEmpty { null },
|
||||
"beginDate" to flightDateStart.value!!.ifEmpty { null },
|
||||
"endDate" to flightDateEnd.value!!.ifEmpty { null },
|
||||
"agentCode" to agentId.value!!.ifEmpty { null },
|
||||
"outState" to outStatus.value!!.ifEmpty { null },
|
||||
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
||||
|
||||
@@ -100,11 +100,10 @@
|
||||
|
||||
<!-- 添加按钮 -->
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:onClick="@{()-> viewModel.addClick()}"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/img_add" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -104,11 +104,10 @@
|
||||
|
||||
<!-- 添加按钮 -->
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:onClick="@{()-> viewModel.addClick()}"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/img_add" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -97,11 +97,10 @@
|
||||
|
||||
<!-- 新<><E696B0><EFBFBD>按钮 -->
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:onClick="@{()-> viewModel.onAddClick()}"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/img_add" />
|
||||
|
||||
<!-- 删除按钮 -->
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.inDate != null ? String.valueOf(bean.inDate).substring(0, 16) : `--`}"
|
||||
android:text="@{bean.inDate != null && String.valueOf(bean.inDate).length() >= 16 ? String.valueOf(bean.inDate).substring(0, 16) : (bean.inDate != null && String.valueOf(bean.inDate).length() > 0 ? String.valueOf(bean.inDate) : `--`)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.outDate != null ? String.valueOf(bean.outDate).substring(0, 16) : `--`}"
|
||||
android:text="@{bean.outDate != null && String.valueOf(bean.outDate).length() >= 16 ? String.valueOf(bean.outDate).substring(0, 16) : (bean.outDate != null && String.valueOf(bean.outDate).length() > 0 ? String.valueOf(bean.outDate) : `--`)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.DetailsPageType
|
||||
import com.lukouguoji.module_base.ktx.noNull
|
||||
import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter
|
||||
|
||||
class GjjManifestAddActivity :
|
||||
BaseBindingActivity<ActivityGjjManifestAddBinding, GjjManifestAddViewModel>() {
|
||||
@@ -20,15 +21,16 @@ class GjjManifestAddActivity :
|
||||
override fun viewModelClass() = GjjManifestAddViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
// 动态设置标题
|
||||
val title = when {
|
||||
viewModel.pageType.value == DetailsPageType.Modify -> "国际进港舱单编辑"
|
||||
binding.viewModel = viewModel
|
||||
binding.flightNoInput.et.setUpperCaseAlphanumericFilter()
|
||||
viewModel.initOnCreated(intent)
|
||||
|
||||
// 动态设置标题(必须在 initOnCreated 之后,pageType 已从 Intent 解析)
|
||||
val title = when (viewModel.pageType.value) {
|
||||
DetailsPageType.Modify -> "国际进港舱单编辑"
|
||||
else -> "国际进港舱单新增"
|
||||
}
|
||||
setBackArrow(title)
|
||||
|
||||
binding.viewModel = viewModel
|
||||
viewModel.initOnCreated(intent)
|
||||
}
|
||||
|
||||
companion object {
|
||||
@@ -49,7 +51,25 @@ class GjjManifestAddActivity :
|
||||
* 编辑舱单(通过Bean对象)
|
||||
*/
|
||||
@JvmStatic
|
||||
fun startForEdit(context: Context, bean: com.lukouguoji.module_base.bean.GjjManifest) {
|
||||
fun startForEdit(
|
||||
context: Context,
|
||||
bean: com.lukouguoji.module_base.bean.GjjManifest,
|
||||
flightDate: String = "",
|
||||
flightNo: String = ""
|
||||
) {
|
||||
val starter = Intent(context, GjjManifestAddActivity::class.java)
|
||||
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
|
||||
.putExtra(Constant.Key.BEAN, bean)
|
||||
.putExtra("flightDate", flightDate)
|
||||
.putExtra("flightNo", flightNo)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑舱单(通过GjjImportManifest对象)
|
||||
*/
|
||||
@JvmStatic
|
||||
fun startForEdit(context: Context, bean: com.lukouguoji.module_base.bean.GjjImportManifest) {
|
||||
val starter = Intent(context, GjjManifestAddActivity::class.java)
|
||||
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
|
||||
.putExtra(Constant.Key.BEAN, bean)
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.lukouguoji.module_base.BaseActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_INFO)
|
||||
// @Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_INFO) // 已替换为 IntImpQueryDetailsActivity
|
||||
class GjjQueryInfoActivity : BaseActivity(), View.OnClickListener {
|
||||
|
||||
private lateinit var viewModel: GjjQueryInfoViewModel
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.scwang.smart.refresh.layout.api.RefreshLayout
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_LIST)
|
||||
//@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_LIST)
|
||||
class GjjQueryListActivity : BaseActivity(), View.OnClickListener {
|
||||
private val currentTitleName = "国际进港查询"
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.scwang.smart.refresh.layout.api.RefreshLayout
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_WARE_HOUSE)
|
||||
//@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_WARE_HOUSE)
|
||||
class GjjWareHouseActivity : BaseActivity(), View.OnClickListener {
|
||||
private lateinit var viewModel: GjjWareHouseListViewModel
|
||||
private val currentTitleName = "国际进港仓库管理"
|
||||
|
||||
@@ -45,8 +45,13 @@ class IntArrAirManifestActivity :
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
// 初始加载数据
|
||||
viewModel.refresh()
|
||||
// 设置运单号自动查询的额外参数(航班日期、航班号)
|
||||
binding.pslWaybillNo.autoQueryConfig.extraParamsProvider = {
|
||||
mapOf(
|
||||
"fdate" to viewModel.flightDate.value,
|
||||
"fno" to viewModel.flightNo.value
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
|
||||
@@ -32,9 +32,9 @@ class IntArrSupplementInfoActivity :
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, manifest: GjjImportManifest) {
|
||||
fun start(context: Context, manifestList: ArrayList<GjjImportManifest>) {
|
||||
val starter = Intent(context, IntArrSupplementInfoActivity::class.java)
|
||||
.putExtra(Constant.Key.DATA, manifest)
|
||||
.putExtra(Constant.Key.DATA, manifestList)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,12 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.google.gson.Gson
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntArrTelegramDetailsBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntArrTelegramDetailsViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.MsgReceivePool
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@@ -23,8 +25,6 @@ class IntArrTelegramDetailsActivity : BaseBindingActivity<ActivityIntArrTelegram
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际进港电报详情")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 初始化数据
|
||||
viewModel.initOnCreated(intent)
|
||||
}
|
||||
|
||||
@@ -32,14 +32,14 @@ class IntArrTelegramDetailsActivity : BaseBindingActivity<ActivityIntArrTelegram
|
||||
/**
|
||||
* 启动电报详情页面
|
||||
* @param context 上下文
|
||||
* @param id 电报ID
|
||||
* @param flow 流向(接收0、发送1)
|
||||
* @param bean 电报Bean
|
||||
* @param fid 航班ID
|
||||
*/
|
||||
@JvmStatic
|
||||
fun start(context: Context, id: String, flow: String) {
|
||||
fun start(context: Context, bean: MsgReceivePool, fid: String) {
|
||||
val starter = Intent(context, IntArrTelegramDetailsActivity::class.java)
|
||||
.putExtra(Constant.Key.ID, id)
|
||||
.putExtra(Constant.Key.FLOW, flow)
|
||||
.putExtra(Constant.Key.DATA, Gson().toJson(bean))
|
||||
.putExtra("fid", fid)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.lukouguoji.gjj.activity
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.IntImpAccidentVisaBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.impl.observe
|
||||
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际进港-事故签证
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_INT_IMP_ACCIDENT_VISA)
|
||||
class IntImpAccidentVisaActivity :
|
||||
BaseBindingActivity<ActivityIntImpAccidentVisaBinding, IntImpAccidentVisaViewModel>(),
|
||||
IOnItemClickListener {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_accident_visa
|
||||
override fun viewModelClass() = IntImpAccidentVisaViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际事故签证")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||
|
||||
binding.rv.addOnItemClickListener(this)
|
||||
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == Constant.RequestCode.WAYBILL && resultCode == Activity.RESULT_OK) {
|
||||
viewModel.wbNo.value = data?.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||
viewModel.searchClick()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onItemClick(position: Int, type: Int) {
|
||||
when (type) {
|
||||
2000 -> {
|
||||
// 侧滑菜单 - 修改
|
||||
val bean = binding.rv.commonAdapter()?.getItem(position) as? IntImpAccidentVisaBean
|
||||
?: return
|
||||
IntImpAccidentVisaEditActivity.start(this, bean.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.lukouguoji.gjj.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaEditBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaEditViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.DetailsPageType
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
|
||||
/**
|
||||
* 国际进港-事故签证新增/编辑
|
||||
*/
|
||||
class IntImpAccidentVisaEditActivity :
|
||||
BaseBindingActivity<ActivityIntImpAccidentVisaEditBinding, IntImpAccidentVisaEditViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_accident_visa_edit
|
||||
override fun viewModelClass() = IntImpAccidentVisaEditViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
binding.viewModel = viewModel
|
||||
|
||||
viewModel.rv = binding.rv
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
viewModel.initOnCreate(intent)
|
||||
|
||||
viewModel.pageType.observe(this) {
|
||||
val title = if (it == DetailsPageType.Add) "国际事故签证新增" else "国际事故签证修改"
|
||||
setBackArrow(title)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, id: Long = 0) {
|
||||
context.startActivity(
|
||||
Intent(context, IntImpAccidentVisaEditActivity::class.java)
|
||||
.putExtra(Constant.Key.ID, id)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,13 +6,18 @@ import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpLoadingListBinding
|
||||
import com.lukouguoji.gjj.dialog.IntImpInStorageDialogModel
|
||||
import com.lukouguoji.gjj.dialog.IntImpModifyStorageDialogModel
|
||||
import com.lukouguoji.gjj.viewModel.IntImpLoadingListViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.GjjManifest
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.impl.observe
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
@@ -28,6 +33,7 @@ class IntImpLoadingListActivity :
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际进港装机单")
|
||||
binding.viewModel = viewModel
|
||||
binding.activity = this
|
||||
|
||||
// 观察全选状态,更新图标透明度
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
@@ -45,10 +51,70 @@ class IntImpLoadingListActivity :
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
// 设置运单号自动查询的额外参数(FID、FDGP)
|
||||
binding.pslWaybillNo.autoQueryConfig.extraParamsProvider = {
|
||||
mapOf(
|
||||
"fid" to viewModel.fid,
|
||||
"fdep" to viewModel.fdep
|
||||
)
|
||||
}
|
||||
|
||||
// 接收从进港舱单传递的参数(FID和FDGP用于查询,fdate/fno/fdest用于界面显示)
|
||||
intent.getStringExtra("fid")?.let { if (it.isNotEmpty()) viewModel.fid = it }
|
||||
intent.getStringExtra("fdep")?.let { if (it.isNotEmpty()) viewModel.fdep = it }
|
||||
intent.getStringExtra("fdate")?.let { if (it.isNotEmpty()) viewModel.flightDate.value = it }
|
||||
intent.getStringExtra("fno")?.let { if (it.isNotEmpty()) viewModel.flightNo.value = it }
|
||||
intent.getStringExtra("fdest")?.let { if (it.isNotEmpty()) viewModel.fdest.value = it }
|
||||
|
||||
// 如果收到了航班号和日期参数,触发航班查询来构建始发站下拉列表
|
||||
val fdate = intent.getStringExtra("fdate")
|
||||
val fno = intent.getStringExtra("fno")
|
||||
if (!fdate.isNullOrEmpty() && !fno.isNullOrEmpty()) {
|
||||
viewModel.onFlightNoInputComplete()
|
||||
}
|
||||
|
||||
// 初始加载数据
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示入库操作对话框
|
||||
*/
|
||||
fun showInStorageDialog() {
|
||||
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
|
||||
val selectedItems = list.filterIsInstance<GjjManifest>().filter { it.isSelected }
|
||||
|
||||
if (selectedItems.isEmpty()) {
|
||||
showToast("请选择要入库的记录")
|
||||
return
|
||||
}
|
||||
|
||||
IntImpInStorageDialogModel { dialog ->
|
||||
val locationName = dialog.locationName
|
||||
val locationId = dialog.locationId
|
||||
viewModel.performInStorage(locationName, locationId, selectedItems)
|
||||
}.show(this)
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示修改库位对话框
|
||||
*/
|
||||
fun showModifyStorageDialog() {
|
||||
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
|
||||
val selectedItems = list.filterIsInstance<GjjManifest>().filter { it.isSelected }
|
||||
|
||||
if (selectedItems.isEmpty()) {
|
||||
showToast("请选择要修改库位的记录")
|
||||
return
|
||||
}
|
||||
|
||||
IntImpModifyStorageDialogModel { dialog ->
|
||||
val locationName = dialog.locationName
|
||||
val locationId = dialog.locationId
|
||||
viewModel.performModifyStorage(locationName, locationId, selectedItems)
|
||||
}.show(this)
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == Constant.RequestCode.WAYBILL && resultCode == Activity.RESULT_OK) {
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.lukouguoji.gjj.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.google.gson.Gson
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpLoadingListEditBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpLoadingListEditViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.GjjManifest
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
|
||||
/**
|
||||
* 国际进港-装机单编辑页面
|
||||
*/
|
||||
class IntImpLoadingListEditActivity :
|
||||
BaseBindingActivity<ActivityIntImpLoadingListEditBinding, IntImpLoadingListEditViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_loading_list_edit
|
||||
override fun viewModelClass() = IntImpLoadingListEditViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("装机单编辑")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.initOnCreated(intent)
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, bean: GjjManifest) {
|
||||
val starter = Intent(context, IntImpLoadingListEditActivity::class.java)
|
||||
.putExtra(Constant.Key.DATA, Gson().toJson(bean))
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,8 +45,13 @@ class IntImpManifestActivity :
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
// 初始加载数据
|
||||
viewModel.refresh()
|
||||
// 设置运单号自动查询的额外参数(FID、FDGP)
|
||||
binding.pslWaybillNo.autoQueryConfig.extraParamsProvider = {
|
||||
mapOf(
|
||||
"fid" to viewModel.fid,
|
||||
"fdep" to viewModel.fdep
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.lukouguoji.gjj.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpManifestDetailsBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpManifestDetailsViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.GjjManifest
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际进港舱单详情
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_INT_IMP_MANIFEST_DETAILS)
|
||||
class IntImpManifestDetailsActivity :
|
||||
BaseBindingActivity<ActivityIntImpManifestDetailsBinding, IntImpManifestDetailsViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_manifest_details
|
||||
override fun viewModelClass() = IntImpManifestDetailsViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("进港舱单详情")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.initOnCreated(intent)
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, manifest: GjjManifest) {
|
||||
val starter = Intent(context, IntImpManifestDetailsActivity::class.java)
|
||||
.putExtra(Constant.Key.DATA, manifest)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.lukouguoji.gjj.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpManifestSubEditBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpManifestSubEditViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.GjjHaWb
|
||||
import com.lukouguoji.module_base.bean.GjjManifest
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.DetailsPageType
|
||||
|
||||
class IntImpManifestSubEditActivity :
|
||||
BaseBindingActivity<ActivityIntImpManifestSubEditBinding, IntImpManifestSubEditViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_manifest_sub_edit
|
||||
|
||||
override fun viewModelClass() = IntImpManifestSubEditViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
binding.viewModel = viewModel
|
||||
viewModel.initOnCreated(intent)
|
||||
|
||||
val title = when (viewModel.pageType.value) {
|
||||
DetailsPageType.Modify -> "分单编辑"
|
||||
else -> "分单新增"
|
||||
}
|
||||
setBackArrow(title)
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* 新增分单
|
||||
*/
|
||||
@JvmStatic
|
||||
fun startForAdd(context: Context, manifest: GjjManifest) {
|
||||
context.startActivity(
|
||||
Intent(context, IntImpManifestSubEditActivity::class.java)
|
||||
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name)
|
||||
.putExtra(Constant.Key.BEAN, manifest)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改分单
|
||||
*/
|
||||
@JvmStatic
|
||||
fun startForModify(context: Context, manifest: GjjManifest, haWb: GjjHaWb) {
|
||||
context.startActivity(
|
||||
Intent(context, IntImpManifestSubEditActivity::class.java)
|
||||
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
|
||||
.putExtra(Constant.Key.BEAN, manifest)
|
||||
.putExtra("haWb", haWb)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,9 +43,6 @@ class IntImpMsgParseActivity :
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
// 初始加载数据
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.lukouguoji.gjj.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.google.gson.Gson
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpPickUpChargeEditBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpPickUpChargeEditViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
|
||||
/**
|
||||
* 国际进港-费用修改
|
||||
*/
|
||||
class IntImpPickUpChargeEditActivity :
|
||||
BaseBindingActivity<ActivityIntImpPickUpChargeEditBinding, IntImpPickUpChargeEditViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_pick_up_charge_edit
|
||||
override fun viewModelClass() = IntImpPickUpChargeEditViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际进港费用修改")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.initOnCreated(intent)
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, bean: IntImpPickUpRecordBean) {
|
||||
val starter = Intent(context, IntImpPickUpChargeEditActivity::class.java)
|
||||
.putExtra(Constant.Key.DATA, Gson().toJson(bean))
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.lukouguoji.gjj.activity
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpPickUpDlvBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpPickUpDLVViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.impl.observe
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际进港-提取出库
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_INT_IMP_PICK_UP_DLV)
|
||||
class IntImpPickUpDLVActivity :
|
||||
BaseBindingActivity<ActivityIntImpPickUpDlvBinding, IntImpPickUpDLVViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_pick_up_dlv
|
||||
override fun viewModelClass() = IntImpPickUpDLVViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际进港出库")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 观察全选状态,更新图标透明度
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 绑定分页
|
||||
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
// 初始化代理人列表
|
||||
viewModel.initAgentList()
|
||||
|
||||
// 初始加载数据
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
viewModel.onActivityResult(requestCode, resultCode, data)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.lukouguoji.gjj.activity
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpPickUpRecordBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpPickUpRecordViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.impl.observe
|
||||
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.model.ConfirmDialogModel
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际进港-提取记录
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_INT_IMP_PICK_UP_RECORD)
|
||||
class IntImpPickUpRecordActivity :
|
||||
BaseBindingActivity<ActivityIntImpPickUpRecordBinding, IntImpPickUpRecordViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_pick_up_record
|
||||
override fun viewModelClass() = IntImpPickUpRecordViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际进港提取记录")
|
||||
binding.viewModel = viewModel
|
||||
binding.activity = this
|
||||
|
||||
// 观察全选状态,更新图标透明度
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 绑定分页
|
||||
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||
|
||||
// 设置列表项点击回调(侧滑修改按钮)
|
||||
binding.rv.addOnItemClickListener(object : IOnItemClickListener {
|
||||
override fun onItemClick(position: Int, type: Int) {
|
||||
when (type) {
|
||||
2000 -> {
|
||||
// 侧滑修改操作
|
||||
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
|
||||
val bean = list.getOrNull(position) as? IntImpPickUpRecordBean ?: return
|
||||
IntImpPickUpChargeEditActivity.start(this@IntImpPickUpRecordActivity, bean)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
// 运单号自动查询额外参数
|
||||
binding.pslWbNo.autoQueryConfig.extraParamsProvider = {
|
||||
mapOf(
|
||||
"beginDate" to viewModel.paymentDateStart.value,
|
||||
"endDate" to viewModel.paymentDateEnd.value,
|
||||
"agentCode" to viewModel.agentCode.value,
|
||||
"spCode" to viewModel.spCode.value
|
||||
)
|
||||
}
|
||||
|
||||
// 初始化下拉列表
|
||||
viewModel.initAgentList()
|
||||
viewModel.initSpecialCodeList()
|
||||
|
||||
// 初始加载数据
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除提货操作
|
||||
*/
|
||||
fun clearPickUp() {
|
||||
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
|
||||
val allItems = list.filterIsInstance<IntImpPickUpRecordBean>()
|
||||
|
||||
val selectedItems = allItems.filter { it.isSelected }
|
||||
|
||||
if (selectedItems.isEmpty()) {
|
||||
showToast("请选择要清除提货的记录")
|
||||
return
|
||||
}
|
||||
|
||||
ConfirmDialogModel(
|
||||
message = "确定要清除选中的 ${selectedItems.size} 条提货记录吗?",
|
||||
title = "清除提货确认"
|
||||
) {
|
||||
viewModel.clearPickUp(selectedItems)
|
||||
}.show(this)
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == Constant.RequestCode.WAYBILL && resultCode == Activity.RESULT_OK) {
|
||||
viewModel.wbNo.value = data?.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||
viewModel.searchClick()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.lukouguoji.gjj.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.google.gson.Gson
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpPickUpRecordDetailsBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpPickUpRecordDetailsViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
|
||||
/**
|
||||
* 国际进港-提取详情
|
||||
*/
|
||||
class IntImpPickUpRecordDetailsActivity :
|
||||
BaseBindingActivity<ActivityIntImpPickUpRecordDetailsBinding, IntImpPickUpRecordDetailsViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_pick_up_record_details
|
||||
override fun viewModelClass() = IntImpPickUpRecordDetailsViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际进港提取详情")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.initOnCreated(intent)
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, bean: IntImpPickUpRecordBean) {
|
||||
val starter = Intent(context, IntImpPickUpRecordDetailsActivity::class.java)
|
||||
.putExtra(Constant.Key.DATA, Gson().toJson(bean))
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user