Compare commits
3 Commits
9402d895db
...
9e0a26f3bc
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e0a26f3bc | |||
| 3918ad64d6 | |||
| 88bbd73fa1 |
@@ -113,7 +113,9 @@
|
|||||||
"mcp__apifox__read_project_oas_6i29va",
|
"mcp__apifox__read_project_oas_6i29va",
|
||||||
"mcp__apifox__read_project_oas_ref_resources_6i29va",
|
"mcp__apifox__read_project_oas_ref_resources_6i29va",
|
||||||
"mcp__plugin_claude-mem_mcp-search__smart_search",
|
"mcp__plugin_claude-mem_mcp-search__smart_search",
|
||||||
"Bash(echo \"exit:$?\")"
|
"Bash(echo \"exit:$?\")",
|
||||||
|
"mcp__apifox__read_project_oas_j7j64k",
|
||||||
|
"mcp__apifox__read_project_oas_ref_resources_j7j64k"
|
||||||
],
|
],
|
||||||
"deny": [],
|
"deny": [],
|
||||||
"ask": []
|
"ask": []
|
||||||
|
|||||||
@@ -383,6 +383,27 @@
|
|||||||
android:configChanges="orientation|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden"
|
||||||
android:screenOrientation="userLandscape"/>
|
android:screenOrientation="userLandscape"/>
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="com.lukouguoji.gnj.page.yiku.list.GnjYiKuListActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
|
<activity
|
||||||
|
android:name="com.lukouguoji.gnj.page.yiku.edit.GnjYiKuEditActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
|
<activity
|
||||||
|
android:name="com.lukouguoji.gnj.page.yiku.details.GnjYiKuDetailsActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
|
<activity
|
||||||
|
android:name="com.lukouguoji.gnj.page.yiku.handover.GnjYiKuHandoverActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
|
|
||||||
<!-- 国际进港-电报解析 -->
|
<!-- 国际进港-电报解析 -->
|
||||||
<activity
|
<activity
|
||||||
android:name="com.lukouguoji.gjj.activity.IntImpMsgParseActivity"
|
android:name="com.lukouguoji.gjj.activity.IntImpMsgParseActivity"
|
||||||
|
|||||||
@@ -1,21 +1,31 @@
|
|||||||
package com.lukouguoji.aerologic.page.gnj.move.stash.list
|
package com.lukouguoji.aerologic.page.gnj.move.stash.list
|
||||||
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import com.lukouguoji.aerologic.databinding.ItemGnjMoveStashListBinding
|
import com.lukouguoji.aerologic.databinding.ItemGnjMoveStashListBinding
|
||||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
import com.lukouguoji.gnj.page.yiku.handover.GnjYiKuHandoverActivity
|
||||||
import com.lukouguoji.module_base.bean.MoveStashBean
|
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||||
import com.lukouguoji.module_base.bean.SimpleCheckBean
|
import com.lukouguoji.module_base.bean.MoveStashBean
|
||||||
|
|
||||||
class GnjMoveStashListViewHolder(view: View) :
|
class GnjMoveStashListViewHolder(view: View) :
|
||||||
BaseViewHolder<MoveStashBean, ItemGnjMoveStashListBinding>(view) {
|
BaseViewHolder<MoveStashBean, ItemGnjMoveStashListBinding>(view) {
|
||||||
|
|
||||||
override fun onBind(item: Any?, position: Int) {
|
override fun onBind(item: Any?, position: Int) {
|
||||||
val bean = getItemBean(item)!!
|
val bean = getItemBean(item)!!
|
||||||
binding.bean = bean
|
binding.bean = bean
|
||||||
|
|
||||||
binding.ivIcon.setOnClickListener {
|
binding.ivIcon.setOnClickListener {
|
||||||
bean.checked.set(!bean.checked.get())
|
bean.checked.set(!bean.checked.get())
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// 点击列表项进入移交详情
|
||||||
}
|
binding.ll.setOnClickListener {
|
||||||
|
GnjYiKuHandoverActivity.startForDetails(itemView.context, bean.mawbId)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 侧滑菜单 - 编辑按钮
|
||||||
|
binding.btnEdit.setOnClickListener {
|
||||||
|
binding.swipeMenu.quickClose()
|
||||||
|
GnjYiKuHandoverActivity.startForEdit(itemView.context, bean.mawbId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,245 +1,279 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="bean"
|
name="bean"
|
||||||
type="com.lukouguoji.module_base.bean.MoveStashBean" />
|
type="com.lukouguoji.module_base.bean.MoveStashBean" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<!-- 外层容器承载间距 -->
|
||||||
android:id="@+id/ll"
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="15dp"
|
android:layout_marginHorizontal="15dp"
|
||||||
android:layout_marginVertical="5dp"
|
android:layout_marginVertical="5dp"
|
||||||
android:background="@drawable/bg_item"
|
android:orientation="vertical">
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="10dp">
|
<!-- 侧滑布局 -->
|
||||||
|
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
|
||||||
<ImageView
|
android:id="@+id/swipe_menu"
|
||||||
android:id="@+id/iv_icon"
|
android:layout_width="match_parent"
|
||||||
loadImage="@{bean.checked ? @drawable/img_plane_s : @drawable/img_plane}"
|
android:layout_height="wrap_content">
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
<!-- 主列表项容器 -->
|
||||||
android:layout_gravity="center"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:src="@drawable/img_plane" />
|
android:id="@+id/ll"
|
||||||
|
android:layout_width="match_parent"
|
||||||
<LinearLayout
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:background="@drawable/bg_item"
|
||||||
android:layout_height="wrap_content"
|
android:orientation="horizontal"
|
||||||
android:layout_marginLeft="10dp"
|
android:padding="10dp">
|
||||||
android:orientation="vertical">
|
|
||||||
|
<ImageView
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
android:id="@+id/iv_icon"
|
||||||
android:layout_width="match_parent"
|
loadImage="@{bean.checked ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||||
android:layout_height="wrap_content">
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
android:layout_gravity="center"
|
||||||
android:layout_width="0dp"
|
android:src="@drawable/img_plane" />
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1.1"
|
<LinearLayout
|
||||||
android:gravity="center_vertical">
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
<TextView
|
android:layout_marginLeft="10dp"
|
||||||
completeSpace="@{4}"
|
android:layout_weight="1"
|
||||||
android:layout_width="wrap_content"
|
android:orientation="vertical">
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="运单号:" />
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
<TextView
|
android:layout_height="wrap_content">
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.wbNo}"
|
android:layout_width="0dp"
|
||||||
android:textColor="@color/colorPrimary"
|
android:layout_height="wrap_content"
|
||||||
tools:text="789165431" />
|
android:layout_weight="1.1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
<TextView
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
completeSpace="@{4}"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:text="运单号:" />
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
<TextView
|
||||||
<TextView
|
android:layout_width="wrap_content"
|
||||||
completeSpace="@{4}"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:text="@{bean.wbNo}"
|
||||||
android:layout_height="wrap_content"
|
android:textColor="@color/colorPrimary"
|
||||||
android:text="件数:" />
|
tools:text="789165431" />
|
||||||
|
|
||||||
<TextView
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text='@{bean.pc}' />
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1"
|
android:layout_width="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="件数:" />
|
||||||
<TextView
|
|
||||||
completeSpace="@{4}"
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="重量:" />
|
android:text='@{bean.pc}' />
|
||||||
|
|
||||||
<TextView
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.weight}" />
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1"
|
android:layout_width="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="重量:" />
|
||||||
<TextView
|
|
||||||
completeSpace="@{4}"
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="代理人:" />
|
android:text="@{bean.weight}" />
|
||||||
|
|
||||||
<TextView
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text='@{bean.agentCode}' />
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1.1"
|
android:layout_width="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="代理人:" />
|
||||||
<TextView
|
|
||||||
completeSpace="@{5}"
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="运单类型:" />
|
android:text='@{bean.agentCode}' />
|
||||||
|
|
||||||
<TextView
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text='@{bean.awbType}' />
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:layout_weight="1.1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
<TextView
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
completeSpace="@{5}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp">
|
android:text="运单类型:" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.1"
|
android:text='@{bean.awbType}' />
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
<TextView
|
|
||||||
completeSpace="@{4}"
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="航班:" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
<TextView
|
android:layout_marginTop="10dp">
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.flight}" />
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:layout_weight="1.1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1"
|
android:layout_width="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="航班:" />
|
||||||
<TextView
|
|
||||||
completeSpace="@{4}"
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="始发港:" />
|
android:text="@{bean.flight}" />
|
||||||
|
|
||||||
<TextView
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.origin}" />
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1"
|
android:layout_width="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="始发港:" />
|
||||||
<TextView
|
|
||||||
completeSpace="@{4}"
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="起始站:" />
|
android:text="@{bean.origin}" />
|
||||||
|
|
||||||
<TextView
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.dep}" />
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1"
|
android:layout_width="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="起始站:" />
|
||||||
<TextView
|
|
||||||
completeSpace="@{4}"
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="目的港:" />
|
android:text="@{bean.dep}" />
|
||||||
|
|
||||||
<TextView
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.dest}" />
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1.1"
|
android:layout_width="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="目的港:" />
|
||||||
<TextView
|
|
||||||
completeSpace="@{5}"
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="品名:" />
|
android:text="@{bean.dest}" />
|
||||||
|
|
||||||
<TextView
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.goods}" />
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:layout_weight="1.1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
<TextView
|
||||||
</LinearLayout>
|
completeSpace="@{5}"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:layout_height="wrap_content"
|
||||||
</layout>
|
android:text="品名:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.goods}" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<!-- 侧滑菜单区域 -->
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 编辑按钮 -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btn_edit"
|
||||||
|
style="@style/tv_item_action"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="编辑" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ class GjAccidentVisaEditBean {
|
|||||||
var dpc: String = "" // 不正常件数
|
var dpc: String = "" // 不正常件数
|
||||||
var pc: String = "" // 运单总件数
|
var pc: String = "" // 运单总件数
|
||||||
var weight: String = "" // 运单总重量
|
var weight: String = "" // 运单总重量
|
||||||
var reweight: String = "" // 复称重量
|
var reWeight: String = "" // 复称重量
|
||||||
var goods: String = "" // 品名
|
var goods: String = "" // 品名
|
||||||
var opacking: String = "" // 外包装
|
var opacking: String = "" // 外包装
|
||||||
var damage: String = "" // 包装破损情况
|
var damage: String = "" // 包装破损情况
|
||||||
var condition: String = "" // 内容物情况
|
var condition: String = "" // 内容物情况
|
||||||
var problem: String = "" // 不正常类型
|
var kdamage: String = "" // 不正常类型
|
||||||
var seachDate: String = "" // 发现时间
|
var seachDate: String = "" // 发现时间
|
||||||
var photo: String = "" // 图片是否留底
|
var photo: String = "" // 图片是否留底
|
||||||
var remarks: String = "" // 备注
|
var remarks: String = "" // 备注
|
||||||
|
|||||||
@@ -16,14 +16,19 @@ class GnjYiKuBean : ICheck {
|
|||||||
var agentCode: String = "" // 代理人
|
var agentCode: String = "" // 代理人
|
||||||
var goods: String = "" // 品名
|
var goods: String = "" // 品名
|
||||||
var flight: String = "" // 进港航班(格式: 20240712/MU2023)
|
var flight: String = "" // 进港航班(格式: 20240712/MU2023)
|
||||||
var route: String = "" // 航程(格式: LAX-PEK-HFE)
|
var route: String = "" // 航程(格式: LAX-PEK-HFE)(旧接口字段)
|
||||||
|
var range: String = "" // 航程(格式: LAX-PEK-HFE)(GnjMawb 接口字段)
|
||||||
var origin: String = "" // 始发港
|
var origin: String = "" // 始发港
|
||||||
var dest: String = "" // 目的港
|
var dest: String = "" // 目的港
|
||||||
var awbType: String = "" // 运单类型(转国际进港/转国内出港等)
|
var awbType: String = "" // 运单类型(转国际进港/转国内出港等)
|
||||||
var telegramNo: String = "" // 电报号
|
var telegramNo: String = "" // 电报号(旧接口字段)
|
||||||
|
var telegramId: String = "" // 电报号(GnjMawb 接口字段)
|
||||||
var remark: String = "" // 备注
|
var remark: String = "" // 备注
|
||||||
var handoverStatus: String = "" // 移交状态(未移交/已移交)
|
var handoverStatus: String = "" // 移交状态(未移交/已移交)
|
||||||
var images: String = "" // 交接图片(逗号分隔的URL列表)
|
var images: String = "" // 交接图片(逗号分隔的URL列表)
|
||||||
|
var originalPic: String = "" // 交接图片原图地址
|
||||||
|
var pic: String = "" // 交接图片缩略图
|
||||||
|
var picNumber: String = "" // 交接图片数量
|
||||||
var fdate: String = "" // 航班日期
|
var fdate: String = "" // 航班日期
|
||||||
var fno: String = "" // 航班号
|
var fno: String = "" // 航班号
|
||||||
var businessType: String = "" // 业务类型
|
var businessType: String = "" // 业务类型
|
||||||
@@ -41,10 +46,17 @@ class GnjYiKuBean : ICheck {
|
|||||||
* 获取图片列表
|
* 获取图片列表
|
||||||
*/
|
*/
|
||||||
fun getImageList(): List<String> {
|
fun getImageList(): List<String> {
|
||||||
return if (images.isNotEmpty()) {
|
val source = originalPic.ifEmpty { images }
|
||||||
images.split(",").filter { it.isNotEmpty() }
|
return if (source.isNotEmpty()) {
|
||||||
|
source.split(",").filter { it.isNotEmpty() }
|
||||||
} else {
|
} else {
|
||||||
emptyList()
|
emptyList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 获取航程(兼容新旧接口) */
|
||||||
|
fun getRouteDisplay(): String = range.ifEmpty { route }
|
||||||
|
|
||||||
|
/** 获取电报号(兼容新旧接口) */
|
||||||
|
fun getTelegramDisplay(): String = telegramId.ifEmpty { telegramNo }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ class IntImpAccidentVisaBean {
|
|||||||
var totalPc: Int = 0 // 运单总件数
|
var totalPc: Int = 0 // 运单总件数
|
||||||
var totalWeight: Double = 0.0 // 运单总重量
|
var totalWeight: Double = 0.0 // 运单总重量
|
||||||
var abnPc: Int = 0 // 不正常件数
|
var abnPc: Int = 0 // 不正常件数
|
||||||
var opName: String = "" // 经办人
|
var opId: String = "" // 经办人
|
||||||
var opDate: String = "" // 经办时间
|
var opdate: String = "" // 经办时间
|
||||||
|
|
||||||
val checked: ObservableBoolean = ObservableBoolean(false)
|
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||||
|
|
||||||
|
|||||||
@@ -1744,6 +1744,18 @@ interface Api {
|
|||||||
@POST("DomImpMove/save")
|
@POST("DomImpMove/save")
|
||||||
suspend fun saveGnjYiKu(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
|
suspend fun saveGnjYiKu(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取-国内进港移库-详情(新接口)
|
||||||
|
*/
|
||||||
|
@GET("DomImpMove/detail")
|
||||||
|
suspend fun getGnjMoveStashDetail(@Query("mawbId") mawbId: String): BaseResultBean<GnjYiKuBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑-国内进港移库(新接口)
|
||||||
|
*/
|
||||||
|
@POST("DomImpMove/modify")
|
||||||
|
suspend fun modifyGnjMoveStash(@Body data: RequestBody): BaseResultBean<String>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 执行-国内进港移库操作
|
* 执行-国内进港移库操作
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.lukouguoji.module_base.impl
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewTreeObserver
|
||||||
|
import com.lukouguoji.module_base.adapter.loadImage
|
||||||
|
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||||
|
import com.lukouguoji.module_base.bean.FileBean
|
||||||
|
import com.lukouguoji.module_base.databinding.ItemImageSelectNewBinding
|
||||||
|
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||||
|
import com.lukouguoji.module_base.ktx.logd
|
||||||
|
import com.lukouguoji.module_base.ktx.loge
|
||||||
|
import com.lukouguoji.module_base.ui.page.preview.PreviewActivity
|
||||||
|
import com.lukouguoji.module_base.util.MediaUtil
|
||||||
|
|
||||||
|
class ImageSelectNewViewHolder(view: View) : BaseViewHolder<FileBean, ItemImageSelectNewBinding>(view) {
|
||||||
|
|
||||||
|
override fun onBind(item: Any?, position: Int) {
|
||||||
|
val bean = getItemBean(item)!!
|
||||||
|
binding.bean = bean
|
||||||
|
|
||||||
|
// 让高度等于宽度,实现正方形
|
||||||
|
binding.rl.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||||
|
override fun onGlobalLayout() {
|
||||||
|
binding.rl.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||||
|
val width = binding.rl.width
|
||||||
|
if (width > 0 && binding.rl.height != width) {
|
||||||
|
val lp = binding.rl.layoutParams
|
||||||
|
lp.height = width
|
||||||
|
binding.rl.layoutParams = lp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
binding.rl.setOnClickListener {
|
||||||
|
if (bean.path.isEmpty()) {
|
||||||
|
MediaUtil.pickImage(itemView.context, maxNum = 10) { results ->
|
||||||
|
val adapter = getRecyclerView()?.commonAdapter() ?: return@pickImage
|
||||||
|
results.forEach { result ->
|
||||||
|
logd("添加了图片 : ${result.realPath}")
|
||||||
|
// 在加号按钮(最后一项)之前插入图片
|
||||||
|
val insertPos = adapter.items.size - 1
|
||||||
|
adapter.items.add(insertPos, FileBean(path = result.realPath))
|
||||||
|
adapter.notifyItemInserted(insertPos)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
PreviewActivity.start(itemView.context, listOf(bean))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 长按事件
|
||||||
|
binding.rl.setOnLongClickListener {
|
||||||
|
clickListener?.onItemClick(bindingAdapterPosition, binding.rl.id)
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
|
notifyItemClick(position, binding.ivDelete)
|
||||||
|
|
||||||
|
if (bean.isOnlineResource()) {
|
||||||
|
loge("开始下载 : ${bean.path}")
|
||||||
|
bean.download {
|
||||||
|
loadImage(binding.iv, it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -106,6 +106,7 @@ object ARouterConstants {
|
|||||||
const val ACTIVITY_URL_GNJ_YIKU_LIST = "/gnj/GnjYiKuListActivity" //国内进港 移库列表
|
const val ACTIVITY_URL_GNJ_YIKU_LIST = "/gnj/GnjYiKuListActivity" //国内进港 移库列表
|
||||||
const val ACTIVITY_URL_GNJ_YIKU_DETAILS = "/gnj/GnjYiKuDetailsActivity" //国内进港 移库详情
|
const val ACTIVITY_URL_GNJ_YIKU_DETAILS = "/gnj/GnjYiKuDetailsActivity" //国内进港 移库详情
|
||||||
const val ACTIVITY_URL_GNJ_YIKU_EDIT = "/gnj/GnjYiKuEditActivity" //国内进港 移库编辑
|
const val ACTIVITY_URL_GNJ_YIKU_EDIT = "/gnj/GnjYiKuEditActivity" //国内进港 移库编辑
|
||||||
|
const val ACTIVITY_URL_GNJ_YIKU_HANDOVER = "/gnj/GnjYiKuHandoverActivity" //国内进港 移交编辑/详情
|
||||||
|
|
||||||
///////////////// 国际出港模块
|
///////////////// 国际出港模块
|
||||||
/**
|
/**
|
||||||
|
|||||||
48
module_base/src/main/res/layout/item_image_select_new.xml
Normal file
48
module_base/src/main/res/layout/item_image_select_new.xml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<?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.FileBean" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:background="@color/white">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
visible="@{bean.path.length() == 0}"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@drawable/img_add" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv"
|
||||||
|
loadImage="@{bean.path}"
|
||||||
|
visible="@{bean.path}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:scaleType="centerCrop" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
visible="@{bean.canDelete}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/black_tran10" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_delete"
|
||||||
|
visible="@{bean.canDelete}"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@drawable/img_delete_red" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</layout>
|
||||||
@@ -14,7 +14,7 @@ import com.lukouguoji.module_base.common.ConstantEvent
|
|||||||
import com.lukouguoji.module_base.common.DetailsPageType
|
import com.lukouguoji.module_base.common.DetailsPageType
|
||||||
import com.lukouguoji.module_base.http.net.NetApply
|
import com.lukouguoji.module_base.http.net.NetApply
|
||||||
import com.lukouguoji.module_base.impl.FlowBus
|
import com.lukouguoji.module_base.impl.FlowBus
|
||||||
import com.lukouguoji.module_base.impl.ImageSelectViewHolder
|
import com.lukouguoji.module_base.impl.ImageSelectNewViewHolder
|
||||||
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
|
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
|
||||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||||
import com.lukouguoji.module_base.ktx.formatDate
|
import com.lukouguoji.module_base.ktx.formatDate
|
||||||
@@ -23,6 +23,8 @@ import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
|||||||
import com.lukouguoji.module_base.ktx.noNull
|
import com.lukouguoji.module_base.ktx.noNull
|
||||||
import com.lukouguoji.module_base.ktx.showToast
|
import com.lukouguoji.module_base.ktx.showToast
|
||||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||||
|
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||||
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
|
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
|
||||||
import com.lukouguoji.module_base.util.MediaUtil
|
import com.lukouguoji.module_base.util.MediaUtil
|
||||||
import com.lukouguoji.module_base.util.UploadUtil
|
import com.lukouguoji.module_base.util.UploadUtil
|
||||||
@@ -49,8 +51,8 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
|
|||||||
val dataBean = MutableLiveData(GjAccidentVisaEditBean())
|
val dataBean = MutableLiveData(GjAccidentVisaEditBean())
|
||||||
|
|
||||||
// 图片列表
|
// 图片列表
|
||||||
val itemLayoutId = R.layout.item_image_select
|
val itemLayoutId = R.layout.item_image_select_new
|
||||||
val itemViewHolder = ImageSelectViewHolder::class.java
|
val itemViewHolder = ImageSelectNewViewHolder::class.java
|
||||||
var rv: RecyclerView? = null
|
var rv: RecyclerView? = null
|
||||||
|
|
||||||
// 下拉列表
|
// 下拉列表
|
||||||
@@ -71,6 +73,8 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
|
|||||||
|
|
||||||
// 是否为详情模式(只读)
|
// 是否为详情模式(只读)
|
||||||
val isDetailMode = MutableLiveData(false)
|
val isDetailMode = MutableLiveData(false)
|
||||||
|
// 详情模式下无图片时显示占位提示
|
||||||
|
val showNoImage = MutableLiveData(false)
|
||||||
|
|
||||||
fun initOnCreate(intent: Intent) {
|
fun initOnCreate(intent: Intent) {
|
||||||
id = intent.getLongExtra(Constant.Key.ID, 0)
|
id = intent.getLongExtra(Constant.Key.ID, 0)
|
||||||
@@ -154,6 +158,11 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
rv?.commonAdapter()?.loadMore(picList)
|
rv?.commonAdapter()?.loadMore(picList)
|
||||||
|
|
||||||
|
// 详情模式下无图片时显示占位提示
|
||||||
|
if (isDetailMode.value == true && picList.isEmpty()) {
|
||||||
|
showNoImage.value = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -250,7 +259,10 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
|
|||||||
bean.idFlag = "1"
|
bean.idFlag = "1"
|
||||||
|
|
||||||
if (pageType.value == DetailsPageType.Add) {
|
if (pageType.value == DetailsPageType.Add) {
|
||||||
NetApply.api.saveGjAccidentVisa(bean.toRequestBody())
|
val jsonObj = org.json.JSONObject(NetApply.gson.toJson(bean))
|
||||||
|
jsonObj.remove("id")
|
||||||
|
val body = jsonObj.toString().toRequestBody("application/json; charset=utf-8".toMediaTypeOrNull())
|
||||||
|
NetApply.api.saveGjAccidentVisa(body)
|
||||||
} else {
|
} else {
|
||||||
NetApply.api.modifyGjAccidentVisa(bean.toRequestBody())
|
NetApply.api.modifyGjAccidentVisa(bean.toRequestBody())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,7 +185,7 @@
|
|||||||
title='@{"复称重量"}'
|
title='@{"复称重量"}'
|
||||||
titleLength="@{6}"
|
titleLength="@{6}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value='@={viewModel.dataBean.reweight}' />
|
value='@={viewModel.dataBean.reWeight}' />
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -262,7 +262,7 @@
|
|||||||
title='@{"不正常类型"}'
|
title='@{"不正常类型"}'
|
||||||
titleLength="@{6}"
|
titleLength="@{6}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
value='@={viewModel.dataBean.problem}' />
|
value='@={viewModel.dataBean.kdamage}' />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -339,8 +339,21 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
app:spanCount="4"
|
app:spanCount="6"
|
||||||
tools:listitem="@layout/item_image_select" />
|
tools:listitem="@layout/item_image_select_new" />
|
||||||
|
|
||||||
|
<!-- 详情模式下无图片时的占位提示 -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_no_image"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="暂无图片"
|
||||||
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:visibility="@{viewModel.showNoImage ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
<!-- 底部按钮(详情模式隐藏) -->
|
<!-- 底部按钮(详情模式隐藏) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|||||||
@@ -262,7 +262,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.opName}"
|
android:text="@{bean.opId}"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@@ -284,7 +284,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.opDate}"
|
android:text="@{bean.opdate}"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.lukouguoji.gnj.page.yiku.handover
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
|
import com.lukouguoji.gnj.R
|
||||||
|
import com.lukouguoji.gnj.databinding.ActivityGnjYikuHandoverBinding
|
||||||
|
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
|
||||||
|
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||||
|
import com.lukouguoji.module_base.router.ARouterConstants
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国内进港移交编辑/详情页
|
||||||
|
*/
|
||||||
|
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_YIKU_HANDOVER)
|
||||||
|
class GnjYiKuHandoverActivity :
|
||||||
|
BaseBindingActivity<ActivityGnjYikuHandoverBinding, GnjYiKuHandoverViewModel>() {
|
||||||
|
|
||||||
|
override fun layoutId() = R.layout.activity_gnj_yiku_handover
|
||||||
|
|
||||||
|
override fun viewModelClass() = GnjYiKuHandoverViewModel::class.java
|
||||||
|
|
||||||
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
|
viewModel.initOnCreated(intent)
|
||||||
|
|
||||||
|
when (viewModel.pageType.value) {
|
||||||
|
DetailsPageType.Modify -> setBackArrow("国内进港移交编辑")
|
||||||
|
DetailsPageType.Details -> setBackArrow("国内进港移交详情")
|
||||||
|
else -> setBackArrow("国内进港移交")
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
|
// 绑定图片列表点击事件(编辑模式下可删除图片)
|
||||||
|
binding.rvImages.addOnItemClickListener(viewModel)
|
||||||
|
|
||||||
|
// 监听图片列表变化并更新 adapter
|
||||||
|
viewModel.imageList.observe(this) { images ->
|
||||||
|
binding.rvImages.commonAdapter()?.refresh(images)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
fun startForEdit(context: Context, id: String) {
|
||||||
|
val starter = Intent(context, GnjYiKuHandoverActivity::class.java)
|
||||||
|
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
|
||||||
|
.putExtra(Constant.Key.ID, id)
|
||||||
|
context.startActivity(starter)
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun startForDetails(context: Context, id: String) {
|
||||||
|
val starter = Intent(context, GnjYiKuHandoverActivity::class.java)
|
||||||
|
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Details.name)
|
||||||
|
.putExtra(Constant.Key.ID, id)
|
||||||
|
context.startActivity(starter)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
package com.lukouguoji.gnj.page.yiku.handover
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import androidx.lifecycle.viewModelScope
|
||||||
|
import com.lukouguoji.gnj.R
|
||||||
|
import com.lukouguoji.module_base.base.BaseViewModel
|
||||||
|
import com.lukouguoji.module_base.bean.FileBean
|
||||||
|
import com.lukouguoji.module_base.bean.GnjYiKuBean
|
||||||
|
import com.lukouguoji.module_base.common.Constant
|
||||||
|
import com.lukouguoji.module_base.common.ConstantEvent
|
||||||
|
import com.lukouguoji.module_base.common.DetailsPageType
|
||||||
|
import com.lukouguoji.module_base.http.net.NetApply
|
||||||
|
import com.lukouguoji.module_base.impl.FlowBus
|
||||||
|
import com.lukouguoji.module_base.impl.ImageSelectNewViewHolder
|
||||||
|
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
|
||||||
|
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.util.UploadUtil
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国内进港移交编辑/详情 ViewModel
|
||||||
|
*/
|
||||||
|
class GnjYiKuHandoverViewModel : BaseViewModel(), IOnItemClickListener {
|
||||||
|
|
||||||
|
val pageType = MutableLiveData(DetailsPageType.Modify)
|
||||||
|
var mawbId = ""
|
||||||
|
|
||||||
|
val dataBean = MutableLiveData(GnjYiKuBean())
|
||||||
|
|
||||||
|
// 图片列表
|
||||||
|
val imageList = MutableLiveData<MutableList<FileBean>>(mutableListOf())
|
||||||
|
|
||||||
|
// 图片适配器配置
|
||||||
|
val imageItemLayoutId = R.layout.item_image_select_new
|
||||||
|
val imageItemViewHolder = ImageSelectNewViewHolder::class.java
|
||||||
|
|
||||||
|
// 详情模式下无图片时显示占位提示
|
||||||
|
val showNoImage = MutableLiveData(false)
|
||||||
|
|
||||||
|
fun initOnCreated(intent: Intent) {
|
||||||
|
pageType.value = DetailsPageType.valueOf(
|
||||||
|
intent.getStringExtra(Constant.Key.PAGE_TYPE) ?: DetailsPageType.Modify.name
|
||||||
|
)
|
||||||
|
mawbId = intent.getStringExtra(Constant.Key.ID) ?: ""
|
||||||
|
loadData()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun loadData() {
|
||||||
|
launchLoadingCollect({
|
||||||
|
NetApply.api.getGnjMoveStashDetail(mawbId)
|
||||||
|
}) {
|
||||||
|
onSuccess = {
|
||||||
|
val bean = it.data ?: GnjYiKuBean()
|
||||||
|
dataBean.value = bean
|
||||||
|
|
||||||
|
// 处理图片列表
|
||||||
|
val images = bean.getImageList().map { url ->
|
||||||
|
FileBean(path = url)
|
||||||
|
}.toMutableList()
|
||||||
|
|
||||||
|
// 编辑模式添加空 FileBean 用于显示"添加照片"按钮
|
||||||
|
if (pageType.value == DetailsPageType.Modify) {
|
||||||
|
images.add(FileBean())
|
||||||
|
}
|
||||||
|
|
||||||
|
imageList.value = images
|
||||||
|
|
||||||
|
// 详情模式下无图片时显示占位提示
|
||||||
|
if (pageType.value == DetailsPageType.Details && bean.getImageList().isEmpty()) {
|
||||||
|
showNoImage.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交保存(只保存备注和图片)
|
||||||
|
*/
|
||||||
|
fun submit() {
|
||||||
|
val bean = dataBean.value ?: return
|
||||||
|
|
||||||
|
// 获取所有非空图片
|
||||||
|
val images = imageList.value!!.filter { it.path.isNotEmpty() }
|
||||||
|
|
||||||
|
if (images.size > 7) {
|
||||||
|
showToast("最多上传7张图片")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
launchLoadingCollect({
|
||||||
|
// 上传图片
|
||||||
|
val uploadedUrls = mutableListOf<String>()
|
||||||
|
images.forEach { fileBean ->
|
||||||
|
if (fileBean.path.startsWith("http")) {
|
||||||
|
uploadedUrls.add(fileBean.path)
|
||||||
|
} else {
|
||||||
|
val result = UploadUtil.upload(fileBean.path)
|
||||||
|
if (result.verifySuccess()) {
|
||||||
|
uploadedUrls.add(result.data?.newName ?: "")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交(只更新备注和图片)
|
||||||
|
val params = mapOf(
|
||||||
|
"mawbId" to mawbId,
|
||||||
|
"remark" to bean.remark,
|
||||||
|
"originalPic" to uploadedUrls.joinToString(","),
|
||||||
|
).toRequestBody(removeEmptyOrNull = true)
|
||||||
|
|
||||||
|
NetApply.api.modifyGnjMoveStash(params)
|
||||||
|
}) {
|
||||||
|
onSuccess = {
|
||||||
|
showToast("保存成功")
|
||||||
|
viewModelScope.launch {
|
||||||
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH_GNJ_YIKU_LIST).emit("refresh")
|
||||||
|
}
|
||||||
|
getTopActivity().finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理图片删除点击事件
|
||||||
|
*/
|
||||||
|
override fun onItemClick(position: Int, type: Int) {
|
||||||
|
val list = imageList.value!!
|
||||||
|
if (type == R.id.iv_delete && position < list.size) {
|
||||||
|
list.removeAt(position)
|
||||||
|
imageList.value = list
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,23 +1,35 @@
|
|||||||
package com.lukouguoji.gnj.page.yiku.list
|
package com.lukouguoji.gnj.page.yiku.list
|
||||||
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import com.lukouguoji.gnj.databinding.ItemGnjYikuListBinding
|
import com.lukouguoji.gnj.databinding.ItemGnjYikuListBinding
|
||||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
import com.lukouguoji.gnj.page.yiku.handover.GnjYiKuHandoverActivity
|
||||||
import com.lukouguoji.module_base.bean.GnjYiKuBean
|
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||||
|
import com.lukouguoji.module_base.bean.GnjYiKuBean
|
||||||
/**
|
|
||||||
* 国内进港移库列表 ViewHolder
|
/**
|
||||||
*/
|
* 国内进港移库列表 ViewHolder
|
||||||
class GnjYiKuListViewHolder(view: View) :
|
*/
|
||||||
BaseViewHolder<GnjYiKuBean, ItemGnjYikuListBinding>(view) {
|
class GnjYiKuListViewHolder(view: View) :
|
||||||
|
BaseViewHolder<GnjYiKuBean, ItemGnjYikuListBinding>(view) {
|
||||||
override fun onBind(item: Any?, position: Int) {
|
|
||||||
val bean = getItemBean(item)!!
|
override fun onBind(item: Any?, position: Int) {
|
||||||
binding.bean = bean
|
val bean = getItemBean(item)!!
|
||||||
|
binding.bean = bean
|
||||||
// 点击checkbox切换选中状态
|
|
||||||
binding.ivIcon.setOnClickListener {
|
// 点击 checkbox 切换选中状态
|
||||||
bean.checked.set(!bean.checked.get())
|
binding.ivIcon.setOnClickListener {
|
||||||
}
|
bean.checked.set(!bean.checked.get())
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// 点击列表项进入移交详情
|
||||||
|
binding.ll.setOnClickListener {
|
||||||
|
GnjYiKuHandoverActivity.startForDetails(itemView.context, bean.id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 侧滑菜单 - 编辑按钮
|
||||||
|
binding.btnEdit.setOnClickListener {
|
||||||
|
binding.swipeMenu.quickClose()
|
||||||
|
GnjYiKuHandoverActivity.startForEdit(itemView.context, bean.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
268
module_gnj/src/main/res/layout/activity_gnj_yiku_handover.xml
Normal file
268
module_gnj/src/main/res/layout/activity_gnj_yiku_handover.xml
Normal file
@@ -0,0 +1,268 @@
|
|||||||
|
<?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.data.layout.DataLayoutType" />
|
||||||
|
|
||||||
|
<import type="com.lukouguoji.module_base.common.DetailsPageType" />
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewModel"
|
||||||
|
type="com.lukouguoji.gnj.page.yiku.handover.GnjYiKuHandoverViewModel" />
|
||||||
|
</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">
|
||||||
|
|
||||||
|
<!-- 第一行:运单号、件数、重量(均只读) -->
|
||||||
|
<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="@{false}"
|
||||||
|
title='@{"运单号"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@{viewModel.dataBean.wbNo}' />
|
||||||
|
|
||||||
|
<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="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@{viewModel.dataBean.pc}' />
|
||||||
|
|
||||||
|
<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="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@{viewModel.dataBean.weight}' />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 第二行:特码、代理、品名(均只读) -->
|
||||||
|
<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="@{false}"
|
||||||
|
title='@{"特码"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@{viewModel.dataBean.spCode}' />
|
||||||
|
|
||||||
|
<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="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@{viewModel.dataBean.agentCode}' />
|
||||||
|
|
||||||
|
<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="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@{viewModel.dataBean.goods}' />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 第三行:进港航班、航程、运单类型(均只读) -->
|
||||||
|
<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="@{false}"
|
||||||
|
title='@{"进港航班"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@{viewModel.dataBean.flight}' />
|
||||||
|
|
||||||
|
<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="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@{viewModel.dataBean.routeDisplay}' />
|
||||||
|
|
||||||
|
<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="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@{viewModel.dataBean.awbType}' />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 第四行:电报号(只读)、备注(编辑模式可编辑) -->
|
||||||
|
<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="@{false}"
|
||||||
|
title='@{"电报号"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@{viewModel.dataBean.telegramDisplay}' />
|
||||||
|
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
hint='@{"请输入备注"}'
|
||||||
|
title='@{"备注"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@={viewModel.dataBean.remark}' />
|
||||||
|
|
||||||
|
</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="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="交接图片"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_images"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
itemLayoutId="@{viewModel.imageItemLayoutId}"
|
||||||
|
viewHolder="@{viewModel.imageItemViewHolder}"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:spanCount="6" />
|
||||||
|
|
||||||
|
<!-- 详情模式下无图片时的占位提示 -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_no_image"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="暂无图片"
|
||||||
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:visibility="@{viewModel.showNoImage ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<!-- 底部按钮(详情模式不显示) -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="@{viewModel.pageType != DetailsPageType.Details ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="150dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:background="@drawable/bg_gray_radius_4"
|
||||||
|
android:gravity="center"
|
||||||
|
android:onClick="@{()-> viewModel.getTopActivity().finish()}"
|
||||||
|
android:text="取消"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_bottom_btn_lg"
|
||||||
|
android:onClick="@{()-> viewModel.submit()}"
|
||||||
|
android:text="保存" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
@@ -1,267 +1,301 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="bean"
|
name="bean"
|
||||||
type="com.lukouguoji.module_base.bean.GnjYiKuBean" />
|
type="com.lukouguoji.module_base.bean.GnjYiKuBean" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<!-- 外层容器承载间距 -->
|
||||||
android:id="@+id/ll"
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="15dp"
|
android:layout_marginHorizontal="15dp"
|
||||||
android:layout_marginVertical="5dp"
|
android:layout_marginVertical="5dp"
|
||||||
android:background="@drawable/bg_item"
|
android:orientation="vertical">
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="10dp">
|
<!-- 侧滑布局 -->
|
||||||
|
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
|
||||||
<!-- 选中图标 -->
|
android:id="@+id/swipe_menu"
|
||||||
<ImageView
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/iv_icon"
|
android:layout_height="wrap_content">
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
<!-- 主列表项容器 -->
|
||||||
android:layout_gravity="center"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
loadImage="@{bean.checked ? @drawable/img_plane_s : @drawable/img_plane}"
|
android:id="@+id/ll"
|
||||||
android:src="@drawable/img_plane" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
<LinearLayout
|
android:background="@drawable/bg_item"
|
||||||
android:layout_width="match_parent"
|
android:orientation="horizontal"
|
||||||
android:layout_height="wrap_content"
|
android:padding="10dp">
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:orientation="vertical">
|
<!-- 选中图标 -->
|
||||||
|
<ImageView
|
||||||
<!-- 第一行数据 -->
|
android:id="@+id/iv_icon"
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
android:layout_width="40dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="40dp"
|
||||||
android:layout_height="wrap_content">
|
android:layout_gravity="center"
|
||||||
|
loadImage="@{bean.checked ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||||
<!-- 运单号 -->
|
android:src="@drawable/img_plane" />
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
<LinearLayout
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1.1"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
<TextView
|
android:orientation="vertical">
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<!-- 第一行数据 -->
|
||||||
completeSpace="@{4}"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="运单号:" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<!-- 运单号 -->
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.wbNo}"
|
android:layout_width="0dp"
|
||||||
android:textColor="@color/colorPrimary"
|
android:layout_height="wrap_content"
|
||||||
tools:text="78109081212" />
|
android:layout_weight="1.1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
<TextView
|
||||||
<!-- 件数 -->
|
android:layout_width="wrap_content"
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="0dp"
|
completeSpace="@{4}"
|
||||||
android:layout_height="wrap_content"
|
android:text="运单号:" />
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical">
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
<TextView
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:text="@{bean.wbNo}"
|
||||||
android:layout_height="wrap_content"
|
android:textColor="@color/colorPrimary"
|
||||||
completeSpace="@{4}"
|
tools:text="78109081212" />
|
||||||
android:text="件数:" />
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<!-- 件数 -->
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text='@{bean.pc}'
|
android:layout_width="0dp"
|
||||||
tools:text="11" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<!-- 航班 -->
|
<TextView
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1.2"
|
android:text="件数:" />
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
<TextView
|
||||||
<TextView
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text='@{bean.pc}'
|
||||||
completeSpace="@{4}"
|
tools:text="11" />
|
||||||
android:text="航班:" />
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<!-- 航班 -->
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.flight}"
|
android:layout_width="0dp"
|
||||||
tools:text="20240712/MU2023" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.2"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<!-- 航程 -->
|
<TextView
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1.2"
|
android:text="航班:" />
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
<TextView
|
||||||
<TextView
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text="@{bean.flight}"
|
||||||
completeSpace="@{4}"
|
tools:text="20240712/MU2023" />
|
||||||
android:text="航程:" />
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<!-- 航程 -->
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.route}"
|
android:layout_width="0dp"
|
||||||
tools:text="LAX-PEK-HFE" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.2"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<!-- 移交状态 -->
|
<TextView
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1"
|
android:text="航程:" />
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
<TextView
|
||||||
<TextView
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text="@{bean.route}"
|
||||||
completeSpace="@{5}"
|
tools:text="LAX-PEK-HFE" />
|
||||||
android:text="移交状态:" />
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<!-- 移交状态 -->
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text='@{bean.handoverStatus}'
|
android:layout_width="0dp"
|
||||||
tools:text="未移交" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
<!-- 第二行数据 -->
|
android:layout_height="wrap_content"
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
completeSpace="@{5}"
|
||||||
android:layout_width="match_parent"
|
android:text="移交状态:" />
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp">
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
<!-- 运单类型 -->
|
android:layout_height="wrap_content"
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
android:text='@{bean.handoverStatus}'
|
||||||
android:layout_width="0dp"
|
tools:text="未移交" />
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1.1"
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<!-- 第二行数据 -->
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
completeSpace="@{5}"
|
android:layout_width="match_parent"
|
||||||
android:text="运单类型:" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp">
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<!-- 运单类型 -->
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.awbType}"
|
android:layout_width="0dp"
|
||||||
tools:text="转国际进港" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.1"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<!-- 品名 -->
|
<TextView
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{5}"
|
||||||
android:layout_weight="1"
|
android:text="运单类型:" />
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
<TextView
|
||||||
<TextView
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text="@{bean.awbType}"
|
||||||
completeSpace="@{4}"
|
tools:text="转国际进港" />
|
||||||
android:text="品名:" />
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<!-- 品名 -->
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.goods}"
|
android:layout_width="0dp"
|
||||||
tools:text="苹果" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<!-- 代理人 -->
|
<TextView
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1.2"
|
android:text="品名:" />
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
<TextView
|
||||||
<TextView
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text="@{bean.goods}"
|
||||||
completeSpace="@{4}"
|
tools:text="苹果" />
|
||||||
android:text="代理人:" />
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<!-- 代理人 -->
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text='@{bean.agentCode}'
|
android:layout_width="0dp"
|
||||||
tools:text="SF" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.2"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<!-- 特码 -->
|
<TextView
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1.2"
|
android:text="代理人:" />
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
<TextView
|
||||||
<TextView
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text='@{bean.agentCode}'
|
||||||
completeSpace="@{4}"
|
tools:text="SF" />
|
||||||
android:text="特码:" />
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<!-- 特码 -->
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.spCode}"
|
android:layout_width="0dp"
|
||||||
tools:text="PEK" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.2"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<!-- 重量 -->
|
<TextView
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
completeSpace="@{4}"
|
||||||
android:layout_weight="1"
|
android:text="特码:" />
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
<TextView
|
||||||
<TextView
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text="@{bean.spCode}"
|
||||||
completeSpace="@{4}"
|
tools:text="PEK" />
|
||||||
android:text="重量:" />
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<!-- 重量 -->
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:text="@{bean.weight}"
|
android:layout_width="0dp"
|
||||||
tools:text="200" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
</LinearLayout>
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{4}"
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
android:text="重量:" />
|
||||||
</layout>
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.weight}"
|
||||||
|
tools:text="200" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<!-- 侧滑菜单区域 -->
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 编辑按钮 -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btn_edit"
|
||||||
|
style="@style/tv_item_action"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="编辑" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user