feat: 交接单 static ui
This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
"Bash(git stash:*)",
|
||||
"Bash(jar tf:*)",
|
||||
"Bash(xargs -I {} sh -c 'echo \"\"\"\"=== {} ===\"\"\"\" && jar tf {} 2>/dev/null | grep -i \"\"\"\"gprinter\"\"\"\" | head -5')",
|
||||
"Bash(xmllint:*)"
|
||||
"Bash(xmllint:*)",
|
||||
"Bash(xargs cat:*)",
|
||||
"mcp__chrome-devtools__evaluate_script"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
||||
@@ -99,6 +99,16 @@
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.GjcInspectionDetailsActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.GjcHandoverActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".MineActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* 附件信息Bean
|
||||
* 对应后端 ComAttach 对象
|
||||
*/
|
||||
class ComAttach {
|
||||
var attachId: Long = 0 // attach主键
|
||||
var attachType: String = "" // 附件类型
|
||||
var key: String = "" // 附件关键字(运单号/公司名称)
|
||||
var name: String = "" // 附件名称
|
||||
var path: String = "" // 附件路径
|
||||
var relateTb: String = "" // 关联表名称
|
||||
}
|
||||
@@ -42,6 +42,8 @@ class GjcInspectionBean : ICheck {
|
||||
var origin: String = "" // 货源地
|
||||
var consignee: String = "" // 收货人
|
||||
var remark: String = "" // 备注
|
||||
var carNumber: String = "" // 车牌号
|
||||
var attachList: List<ComAttach>? = null // 附件列表
|
||||
|
||||
// 多选状态绑定
|
||||
val checked = ObservableBoolean(false)
|
||||
|
||||
@@ -347,5 +347,8 @@ interface Constant {
|
||||
|
||||
// 是否可修改
|
||||
const val MODIFY = "MODIFY"
|
||||
|
||||
// 运单主键ID
|
||||
const val MAWB_ID = "maWbId"
|
||||
}
|
||||
}
|
||||
@@ -373,6 +373,14 @@ interface Api {
|
||||
@POST("IntExpCheckInCheck/pageQuery")
|
||||
suspend fun getGjcInspectionList(@Body data: RequestBody): BaseListBean<GjcInspectionBean>
|
||||
|
||||
/**
|
||||
* 获取-国际出港-收运检查-详情
|
||||
* 接口路径: /IntExpCheckInCheck/queryWbById
|
||||
* @param maWbId 运单主键ID
|
||||
*/
|
||||
@POST("IntExpCheckInCheck/queryWbById")
|
||||
suspend fun getGjcInspectionDetails(@Query("maWbId") maWbId: Long): BaseResultBean<GjcInspectionBean>
|
||||
|
||||
/**
|
||||
* 批量审核-国际出港-收运检查(通过/退回)
|
||||
* TODO: 需要确认审核接口路径
|
||||
|
||||
@@ -126,6 +126,8 @@ object ARouterConstants {
|
||||
const val ACTIVITY_URL_GJC_BOX_ASSEMBLE = "/gjc/GjcBoxAssembleListActivity" //国际出港 板箱组装
|
||||
const val ACTIVITY_URL_GJC_GOODS_LIST = "/gjc/GjcGoodsListActivity" //国际出港 货物交接
|
||||
const val ACTIVITY_URL_GJC_INSPECTION = "/gjc/GjcInspectionActivity" //国际出港 收运检查
|
||||
const val ACTIVITY_URL_GJC_INSPECTION_DETAILS = "/gjc/GjcInspectionDetailsActivity" //国际出港 收运检查详情
|
||||
const val ACTIVITY_URL_GJC_HANDOVER = "/gjc/GjcHandoverActivity" //国际出港 货物交接单
|
||||
|
||||
///////////////// 国际进港模块
|
||||
/**
|
||||
|
||||
1295
module_gjc/res/layout/activity_gjc_handover.xml
Normal file
1295
module_gjc/res/layout/activity_gjc_handover.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,37 @@
|
||||
package com.lukouguoji.gjc.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ActivityGjcHandoverBinding
|
||||
import com.lukouguoji.gjc.viewModel.GjcHandoverViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际出港货物交接单页面
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_HANDOVER)
|
||||
class GjcHandoverActivity :
|
||||
BaseBindingActivity<ActivityGjcHandoverBinding, GjcHandoverViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_gjc_handover
|
||||
|
||||
override fun viewModelClass() = GjcHandoverViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("货物交接单")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val starter = Intent(context, GjcHandoverActivity::class.java)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.lukouguoji.gjc.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.widget.TextView
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ActivityGjcInspectionDetailsBinding
|
||||
import com.lukouguoji.gjc.viewModel.GjcInspectionDetailsViewModel
|
||||
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_GJC_INSPECTION_DETAILS)
|
||||
class GjcInspectionDetailsActivity :
|
||||
BaseBindingActivity<ActivityGjcInspectionDetailsBinding, GjcInspectionDetailsViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_gjc_inspection_details
|
||||
|
||||
override fun viewModelClass() = GjcInspectionDetailsViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
// 自定义Toolbar设置
|
||||
val toolbar: androidx.appcompat.widget.Toolbar = findViewById(R.id.toolbar)
|
||||
setSupportActionBar(toolbar)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(false)
|
||||
supportActionBar?.setDisplayShowTitleEnabled(false)
|
||||
|
||||
// 返回按钮点击事件
|
||||
findViewById<android.view.View>(R.id.tool_back).setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
|
||||
// 右侧文档按钮点击事件
|
||||
findViewById<android.widget.ImageView>(R.id.ivDocument).setOnClickListener {
|
||||
GjcHandoverActivity.start(this)
|
||||
}
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 初始化数据
|
||||
viewModel.initOnCreated(intent)
|
||||
|
||||
// 监听数据变化,动态创建附件列表
|
||||
viewModel.dataBean.observe(this) { bean ->
|
||||
binding.attachContainer.removeAllViews()
|
||||
|
||||
val attachList = bean.attachList
|
||||
if (attachList.isNullOrEmpty()) {
|
||||
// 无附件时显示提示文字
|
||||
val textView = TextView(this).apply {
|
||||
text = "无附件"
|
||||
textSize = 14f
|
||||
setTextColor(resources.getColor(R.color.text_gray_l, null))
|
||||
setPadding(0, 8.dp, 0, 8.dp)
|
||||
}
|
||||
binding.attachContainer.addView(textView)
|
||||
} else {
|
||||
// 有附件时动态创建TextView
|
||||
attachList.forEachIndexed { index, attach ->
|
||||
val textView = TextView(this).apply {
|
||||
text = attach.name
|
||||
textSize = 14f
|
||||
setTextColor(resources.getColor(R.color.text_blue, null))
|
||||
gravity = Gravity.CENTER_VERTICAL
|
||||
setPadding(0, 8.dp, 16.dp, 8.dp)
|
||||
setOnClickListener {
|
||||
viewModel.onAttachClick(attach)
|
||||
}
|
||||
}
|
||||
binding.attachContainer.addView(textView)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 扩展属性:dp转px
|
||||
private val Int.dp: Int
|
||||
get() = (this * (resources?.displayMetrics?.density ?: 3f)).toInt()
|
||||
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, maWbId: Long) {
|
||||
val starter = Intent(context, GjcInspectionDetailsActivity::class.java)
|
||||
.putExtra(Constant.Key.MAWB_ID, maWbId)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.lukouguoji.gjc.holder
|
||||
|
||||
import android.graphics.Color
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjc.activity.GjcInspectionDetailsActivity
|
||||
import com.lukouguoji.gjc.databinding.ItemGjcInspectionBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.GjcInspectionBean
|
||||
@@ -30,6 +31,11 @@ class GjcInspectionViewHolder(view: View) :
|
||||
}
|
||||
}
|
||||
|
||||
// 整行点击跳转到详情页
|
||||
binding.ll.setOnClickListener {
|
||||
GjcInspectionDetailsActivity.start(it.context, bean.maWbId)
|
||||
}
|
||||
|
||||
// 设置审核状态文本和颜色
|
||||
binding.tvStatus.text = bean.getReviewStatusName()
|
||||
binding.tvStatus.setTextColor(Color.parseColor(bean.getReviewStatusColor()))
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.lukouguoji.gjc.viewModel
|
||||
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
|
||||
/**
|
||||
* 国际出港货物交接单 ViewModel
|
||||
*/
|
||||
class GjcHandoverViewModel : BaseViewModel() {
|
||||
|
||||
// 暂时为静态页面,无业务逻辑
|
||||
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.lukouguoji.gjc.viewModel
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
import com.lukouguoji.module_base.bean.ComAttach
|
||||
import com.lukouguoji.module_base.bean.FileBean
|
||||
import com.lukouguoji.module_base.bean.GjcInspectionBean
|
||||
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.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.showConfirmDialog
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.ui.page.preview.PreviewActivity
|
||||
import com.lukouguoji.module_base.util.MediaUtil
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
/**
|
||||
* 国际出港收运检查详情 ViewModel
|
||||
*/
|
||||
class GjcInspectionDetailsViewModel : BaseViewModel() {
|
||||
|
||||
// 运单主键ID
|
||||
var maWbId: Long = 0
|
||||
|
||||
// 详情数据
|
||||
val dataBean = MutableLiveData<GjcInspectionBean>()
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
fun initOnCreated(intent: Intent) {
|
||||
maWbId = intent.getLongExtra(Constant.Key.MAWB_ID, 0)
|
||||
if (maWbId > 0) {
|
||||
getData()
|
||||
} else {
|
||||
showToast("参数错误")
|
||||
getTopActivity().finish()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情数据
|
||||
*/
|
||||
private fun getData() {
|
||||
launchLoadingCollect({
|
||||
NetApply.api.getGjcInspectionDetails(maWbId)
|
||||
}) {
|
||||
onSuccess = {
|
||||
dataBean.value = it.data ?: GjcInspectionBean()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过审核
|
||||
*/
|
||||
fun auditPass() {
|
||||
val bean = dataBean.value ?: return
|
||||
getTopActivity().showConfirmDialog("确定要通过该单证吗?") {
|
||||
performAudit(bean, true, "通过")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 退回
|
||||
*/
|
||||
fun auditReject() {
|
||||
val bean = dataBean.value ?: return
|
||||
getTopActivity().showConfirmDialog("确定要退回该单证吗?") {
|
||||
performAudit(bean, false, "退回")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行审核操作
|
||||
* @param bean 数据
|
||||
* @param isPass true:通过, false:退回
|
||||
* @param action 操作名称(用于提示)
|
||||
*/
|
||||
private fun performAudit(bean: GjcInspectionBean, isPass: Boolean, action: String) {
|
||||
// 构建请求参数:数组对象,包含 maWbId、wbNo、prefix、no、reviewStatus(必传)
|
||||
// 使用数据自身的 reviewStatus 值
|
||||
val requestData = listOf(
|
||||
mapOf(
|
||||
"maWbId" to bean.maWbId,
|
||||
"wbNo" to bean.wbNo,
|
||||
"prefix" to bean.prefix,
|
||||
"no" to bean.no,
|
||||
"reviewStatus" to bean.reviewStatus
|
||||
)
|
||||
).toRequestBody()
|
||||
|
||||
// 根据审核状态调用不同接口
|
||||
launchLoadingCollect({
|
||||
if (isPass) {
|
||||
NetApply.api.passGjcInspection(requestData)
|
||||
} else {
|
||||
NetApply.api.backGjcInspection(requestData)
|
||||
}
|
||||
}) {
|
||||
onSuccess = {
|
||||
showToast("${action}成功")
|
||||
// 发送刷新事件
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
}
|
||||
// 返回上一页
|
||||
getTopActivity().finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取附件名称列表(用于显示)
|
||||
*/
|
||||
fun getAttachNames(): String {
|
||||
val attachList = dataBean.value?.attachList
|
||||
return if (attachList.isNullOrEmpty()) {
|
||||
"无附件"
|
||||
} else {
|
||||
attachList.joinToString(" ") { it.name }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 附件点击处理
|
||||
* @param attach 附件对象
|
||||
*/
|
||||
fun onAttachClick(attach: ComAttach) {
|
||||
when {
|
||||
// 图片格式:使用PreviewActivity预览
|
||||
attach.name.endsWith(".jpg", true) ||
|
||||
attach.name.endsWith(".png", true) ||
|
||||
attach.name.endsWith(".jpeg", true) -> {
|
||||
val fileBean = FileBean(
|
||||
url = MediaUtil.fillUrl(attach.path),
|
||||
originalPic = attach.path
|
||||
)
|
||||
PreviewActivity.start(getTopActivity(), listOf(fileBean))
|
||||
}
|
||||
// PDF格式:提示暂不支持
|
||||
attach.name.endsWith(".pdf", true) -> {
|
||||
showToast("PDF文件预览功能开发中")
|
||||
}
|
||||
// 其他格式
|
||||
else -> {
|
||||
showToast("暂不支持该文件格式预览")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ class GjcInspectionViewModel : BasePageViewModel() {
|
||||
return
|
||||
}
|
||||
getTopActivity().showConfirmDialog("确定要通过选中的 ${filter.size} 条数据吗?") {
|
||||
performAudit(filter, "1", "通过")
|
||||
performAudit(filter, true, "通过")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,28 +172,32 @@ class GjcInspectionViewModel : BasePageViewModel() {
|
||||
return
|
||||
}
|
||||
getTopActivity().showConfirmDialog("确定要退回选中的 ${filter.size} 条数据吗?") {
|
||||
performAudit(filter, "2", "退回")
|
||||
performAudit(filter, false, "退回")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行审核操作
|
||||
* @param items 选中的数据列表
|
||||
* @param status 审核状态(1:通过, 2:退回)
|
||||
* @param isPass true:通过, false:退回
|
||||
* @param action 操作名称(用于提示)
|
||||
*/
|
||||
private fun performAudit(items: List<GjcInspectionBean>, status: String, action: String) {
|
||||
// 构建请求参数:数组对象,包含 maWbId 和 wbNo
|
||||
private fun performAudit(items: List<GjcInspectionBean>, isPass: Boolean, action: String) {
|
||||
// 构建请求参数:数组对象,包含 maWbId、wbNo、prefix、no、reviewStatus(必传)
|
||||
// 使用数据自身的 reviewStatus 值
|
||||
val requestData = items.map {
|
||||
mapOf(
|
||||
"maWbId" to it.maWbId,
|
||||
"wbNo" to it.wbNo
|
||||
"wbNo" to it.wbNo,
|
||||
"prefix" to it.prefix,
|
||||
"no" to it.no,
|
||||
"reviewStatus" to it.reviewStatus
|
||||
)
|
||||
}.toRequestBody()
|
||||
|
||||
// 根据审核状态调用不同接口
|
||||
launchLoadingCollect({
|
||||
if (status == "1") {
|
||||
if (isPass) {
|
||||
NetApply.api.passGjcInspection(requestData)
|
||||
} else {
|
||||
NetApply.api.backGjcInspection(requestData)
|
||||
|
||||
7
module_gjc/src/main/res/drawable/bg_table_cell.xml
Normal file
7
module_gjc/src/main/res/drawable/bg_table_cell.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@android:color/white" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#CCCCCC" />
|
||||
</shape>
|
||||
1300
module_gjc/src/main/res/layout/activity_gjc_handover.xml
Normal file
1300
module_gjc/src/main/res/layout/activity_gjc_handover.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,333 @@
|
||||
<?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" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjc.viewModel.GjcInspectionDetailsViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 自定义标题栏 -->
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tool_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/left_icon"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tool_tv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|left"
|
||||
android:text="返回"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="单证审核"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<!-- 右侧文档按钮 -->
|
||||
<ImageView
|
||||
android:id="@+id/ivDocument"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:padding="8dp"
|
||||
android:src="@mipmap/ic_document_fill"
|
||||
app:tint="@color/white" />
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<!-- 内容区域 -->
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:fillViewport="true"
|
||||
android:padding="10dp">
|
||||
|
||||
<!-- 白色圆角卡片 -->
|
||||
<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:layout_marginBottom="15dp"
|
||||
android:text="运单信息"
|
||||
android:textColor="@color/color_33"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 第一行:运单号、预配件数、预配重量、特码 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
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.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"预配件数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{String.valueOf(viewModel.dataBean.pc)}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"预配重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{String.valueOf(viewModel.dataBean.weight)}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"特码"}'
|
||||
titleLength="@{3}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.spCode}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第二行:航班日期、航班号、航程、预计起飞 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"航班日期"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.fdate}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
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.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"航程"}'
|
||||
titleLength="@{3}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.range}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"预计起飞"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.scheduledTackOff}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第三行:代理人、业务类型、车牌号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"代理人"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.agentName}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"业务类型:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.businessName}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"车牌号"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.carNumber}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 品名(英) -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
enable="@{false}"
|
||||
title='@{"品名(英)"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.goods}' />
|
||||
|
||||
<!-- 品名(中) -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
enable="@{false}"
|
||||
title='@{"品名(中)"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.goodsCn}' />
|
||||
|
||||
<!-- 附件 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="附件:"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="14sp"
|
||||
android:minWidth="60dp" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/attachContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 备注 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
enable="@{false}"
|
||||
inputHeight="@{80}"
|
||||
title='@{"备注"}'
|
||||
titleLength="@{3}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.remark}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/color_bottom_layout"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- 退回按钮 -->
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:onClick="@{()-> viewModel.auditReject()}"
|
||||
android:text="退回" />
|
||||
|
||||
<!-- 通过按钮 -->
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()-> viewModel.auditPass()}"
|
||||
android:text="通过" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
BIN
module_gjc/src/main/res/mipmap-mdpi/ic_document_fill.png
Normal file
BIN
module_gjc/src/main/res/mipmap-mdpi/ic_document_fill.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
Reference in New Issue
Block a user