feat: 进港舱单 新增/编辑
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
import androidx.databinding.ObservableBoolean
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* 国际进港舱单Bean
|
||||
@@ -54,8 +55,9 @@ data class GjjManifest(
|
||||
var subCode: String = "", // 子代码
|
||||
var unNumber: String = "", // 危险品编号
|
||||
var activeId: Long = 0 // 活动ID
|
||||
) {
|
||||
// 选中状态(用于多选功能)
|
||||
) : Serializable {
|
||||
// 选中状态(用于多选功能)- 不参与序列化
|
||||
@Transient
|
||||
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||
|
||||
// 兼容现有API的isSelected属性
|
||||
|
||||
@@ -370,6 +370,9 @@ interface Constant {
|
||||
// 运单主键ID
|
||||
const val MAWB_ID = "maWbId"
|
||||
|
||||
// 舱单ID
|
||||
const val MF_ID = "MF_ID"
|
||||
|
||||
// 运单前缀
|
||||
const val PREFIX = "prefix"
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.lukouguoji.gjj.databinding.ActivityGjjManifestAddBinding
|
||||
import com.lukouguoji.gjj.viewModel.GjjManifestAddViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.DetailsPageType
|
||||
import com.lukouguoji.module_base.ktx.noNull
|
||||
|
||||
class GjjManifestAddActivity :
|
||||
@@ -19,21 +20,40 @@ class GjjManifestAddActivity :
|
||||
override fun viewModelClass() = GjjManifestAddViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际进港舱单新增")
|
||||
viewModel.fid = intent.getStringExtra(Constant.Key.ID).noNull()
|
||||
viewModel.departure.value = intent.getStringExtra(Constant.Key.DEPARTURE).noNull()
|
||||
viewModel.destination.value = intent.getStringExtra(Constant.Key.DESTINATION).noNull()
|
||||
// 动态设置标题
|
||||
val title = when {
|
||||
viewModel.pageType.value == DetailsPageType.Modify -> "国际进港舱单编辑"
|
||||
else -> "国际进港舱单新增"
|
||||
}
|
||||
setBackArrow(title)
|
||||
|
||||
binding.viewModel = viewModel
|
||||
viewModel.initOnCreated(intent)
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* 新增舱单
|
||||
*/
|
||||
@JvmStatic
|
||||
fun start(context: Context, fid: String = "", dep: String, dest: String) {
|
||||
val starter = Intent(context, GjjManifestAddActivity::class.java)
|
||||
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name)
|
||||
.putExtra(Constant.Key.ID, fid)
|
||||
.putExtra(Constant.Key.DEPARTURE, dep)
|
||||
.putExtra(Constant.Key.DESTINATION, dest)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑舱单(通过Bean对象)
|
||||
*/
|
||||
@JvmStatic
|
||||
fun startForEdit(context: Context, bean: com.lukouguoji.module_base.bean.GjjManifest) {
|
||||
val starter = Intent(context, GjjManifestAddActivity::class.java)
|
||||
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
|
||||
.putExtra(Constant.Key.BEAN, bean)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,10 +17,20 @@ class IntImpManifestViewHolder(view: View) :
|
||||
binding.position = position
|
||||
binding.executePendingBindings()
|
||||
|
||||
// 添加图标点击事件 - 切换选择状态
|
||||
// 选中图标点击 - 切换选择状态
|
||||
binding.ivIcon.setOnClickListener {
|
||||
bean.checked.set(!bean.checked.get())
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
|
||||
// 编辑按钮点击
|
||||
binding.btnEdit.setOnClickListener {
|
||||
clickListener?.onItemClick(position, 101) // 101=编辑
|
||||
}
|
||||
|
||||
// 删除按钮点击
|
||||
binding.btnDelete.setOnClickListener {
|
||||
clickListener?.onItemClick(position, 102) // 102=删除
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,52 @@
|
||||
package com.lukouguoji.gjj.viewModel
|
||||
|
||||
import android.content.Intent
|
||||
import android.view.View
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
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.ktx.finish
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.noNull
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
|
||||
import com.lukouguoji.module_base.util.DictUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
class GjjManifestAddViewModel : BaseViewModel() {
|
||||
|
||||
// 页面类型(必须用LiveData)
|
||||
val pageType = MutableLiveData(DetailsPageType.Add)
|
||||
|
||||
// 舱单ID(编辑时使用)
|
||||
var mfId: Long = 0
|
||||
|
||||
// 航班ID
|
||||
var fid: String = ""
|
||||
|
||||
// 航班日期
|
||||
val flightDate = MutableLiveData("")
|
||||
|
||||
// 航班号
|
||||
val flightNo = MutableLiveData("")
|
||||
|
||||
// 航程
|
||||
val range = MutableLiveData("")
|
||||
|
||||
// 运单号
|
||||
val waybillNo = MutableLiveData("")
|
||||
|
||||
// UN编号
|
||||
val unNumber = MutableLiveData("")
|
||||
|
||||
// 运单件数
|
||||
val waybillNum = MutableLiveData("")
|
||||
|
||||
@@ -51,27 +77,27 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
||||
|
||||
// 业务类型 列表
|
||||
val businessTypeList = MutableLiveData<List<KeyValue>>()
|
||||
private var businessType = ""
|
||||
val businessType = MutableLiveData("")
|
||||
|
||||
// 包装类型 列表
|
||||
val packageTypeList = MutableLiveData<List<KeyValue>>()
|
||||
private var packageType = ""
|
||||
val packageType = MutableLiveData("")
|
||||
|
||||
// 代理列表
|
||||
val agentList = MutableLiveData<List<KeyValue>>()
|
||||
private var agent = ""
|
||||
val agent = MutableLiveData("")
|
||||
|
||||
// 特码列表
|
||||
val specialCodeList = MutableLiveData<List<KeyValue>>()
|
||||
private var specialCode = ""
|
||||
val specialCode = MutableLiveData("")
|
||||
|
||||
// 货物类型
|
||||
val goodsTypeList = MutableLiveData<List<KeyValue>>()
|
||||
private var goodsType = ""
|
||||
val goodsType = MutableLiveData("")
|
||||
|
||||
// 运单类型
|
||||
val waybillTypeList = MutableLiveData<List<KeyValue>>()
|
||||
private var waybillType = ""
|
||||
val waybillType = MutableLiveData("")
|
||||
|
||||
init {
|
||||
DictUtils.getAgentList(addAll = false) {
|
||||
@@ -105,45 +131,56 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 代理点击
|
||||
* 初始化(从Intent获取参数)
|
||||
*/
|
||||
fun onAgentSelected(position: Int) {
|
||||
agent = agentList.value?.get(position)?.value.noNull()
|
||||
fun initOnCreated(intent: Intent) {
|
||||
// 获取页面类型
|
||||
pageType.value = DetailsPageType.valueOf(
|
||||
intent.getStringExtra(Constant.Key.PAGE_TYPE) ?: DetailsPageType.Add.name
|
||||
)
|
||||
|
||||
// 获取航班ID
|
||||
fid = intent.getStringExtra(Constant.Key.ID).noNull()
|
||||
departure.value = intent.getStringExtra(Constant.Key.DEPARTURE).noNull()
|
||||
destination.value = intent.getStringExtra(Constant.Key.DESTINATION).noNull()
|
||||
|
||||
// 编辑模式:从Bean对象加载数据
|
||||
if (pageType.value == DetailsPageType.Modify) {
|
||||
val bean = intent.getSerializableExtra(Constant.Key.BEAN) as? com.lukouguoji.module_base.bean.GjjManifest
|
||||
if (bean != null) {
|
||||
loadManifestFromBean(bean)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 特码点击
|
||||
* 从Bean对象加载数据(编辑模式)
|
||||
*/
|
||||
fun onSpecialCodeSelected(position: Int) {
|
||||
specialCode = specialCodeList.value?.get(position)?.value.noNull()
|
||||
}
|
||||
private fun loadManifestFromBean(manifest: com.lukouguoji.module_base.bean.GjjManifest) {
|
||||
// 保存舱单ID
|
||||
mfId = manifest.mfId
|
||||
fid = manifest.fid.toString()
|
||||
|
||||
/**
|
||||
* 包装类型点击
|
||||
*/
|
||||
fun onPackageTypeSelected(position: Int) {
|
||||
packageType = packageTypeList.value?.get(position)?.value.noNull()
|
||||
}
|
||||
// 填充表单字段
|
||||
waybillNo.value = manifest.wbNo
|
||||
waybillNum.value = manifest.totalPc.toString()
|
||||
actualNum.value = manifest.pc.toString()
|
||||
actualWeight.value = manifest.weight.toString()
|
||||
billingWeight.value = manifest.cashWeight.toString()
|
||||
departure.value = manifest.origin
|
||||
destination.value = manifest.dest
|
||||
goodsNameCn.value = manifest.goodsCn
|
||||
goodsNameEn.value = manifest.goods
|
||||
unNumber.value = manifest.unNumber
|
||||
remark.value = manifest.remark
|
||||
|
||||
/**
|
||||
* 业务类型点击
|
||||
*/
|
||||
fun onBusinessTypeSelected(position: Int) {
|
||||
businessType = businessTypeList.value?.get(position)?.value.noNull()
|
||||
}
|
||||
|
||||
/**
|
||||
* 货物类型点击
|
||||
*/
|
||||
fun onGoodsTypeSelected(position: Int) {
|
||||
goodsType = goodsTypeList.value?.get(position)?.value.noNull()
|
||||
}
|
||||
|
||||
/**
|
||||
* 运单类型点击
|
||||
*/
|
||||
fun onWaybillTypeSelected(position: Int) {
|
||||
waybillType = waybillTypeList.value?.get(position)?.value.noNull()
|
||||
// 设置下拉框选中值
|
||||
agent.value = manifest.agentCode
|
||||
specialCode.value = manifest.spCode
|
||||
packageType.value = manifest.packageType
|
||||
businessType.value = manifest.businessType
|
||||
goodsType.value = manifest.cargoType
|
||||
waybillType.value = manifest.awbType
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -151,53 +188,62 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
||||
*/
|
||||
fun onSaveClick(view: View) {
|
||||
if ((waybillNo.value.verifyNullOrEmpty("请输入运单号")
|
||||
|| agent.verifyNullOrEmpty("请选择代理")
|
||||
|| agent.value.verifyNullOrEmpty("请选择代理")
|
||||
|| waybillNum.value.verifyNullOrEmpty("请输入运单件数")
|
||||
|| actualNum.value.verifyNullOrEmpty("请输入实到数量")
|
||||
|| goodsNameEn.value.verifyNullOrEmpty("请输入品名(英)")
|
||||
|| actualWeight.value.verifyNullOrEmpty("请输入实到重量")
|
||||
|| packageType.verifyNullOrEmpty("请选择包装类型")
|
||||
|| packageType.value.verifyNullOrEmpty("请选择包装类型")
|
||||
)
|
||||
) {
|
||||
return
|
||||
}
|
||||
showLoading()
|
||||
launchCollect({
|
||||
NetApply.api.gjjManifestInsert(
|
||||
mapOf(
|
||||
"fid" to fid,
|
||||
"wbNo" to waybillNo.value,
|
||||
"agent" to agent,
|
||||
"spCode" to specialCode,
|
||||
"businessType" to businessType,
|
||||
"awbpc" to waybillNum.value,
|
||||
"pc" to actualNum.value,
|
||||
"weight" to actualWeight.value,
|
||||
"planweight" to billingWeight.value,
|
||||
"packagecode" to packageType,
|
||||
"dep" to departure.value,
|
||||
"origin" to departure.value,
|
||||
"dest" to destination.value,
|
||||
"goods" to goodsNameEn.value,
|
||||
"goodsCn" to goodsNameCn.value,
|
||||
"awbType" to waybillType,
|
||||
"cargoType" to goodsType,
|
||||
"remark" to remark.value,
|
||||
).toRequestBody()
|
||||
)
|
||||
|
||||
val params = mapOf(
|
||||
"mfId" to if (pageType.value == DetailsPageType.Modify) mfId else null,
|
||||
"fid" to fid,
|
||||
"wbNo" to waybillNo.value,
|
||||
"agent" to agent.value,
|
||||
"spCode" to specialCode.value,
|
||||
"businessType" to businessType.value,
|
||||
"awbpc" to waybillNum.value,
|
||||
"pc" to actualNum.value,
|
||||
"weight" to actualWeight.value,
|
||||
"planweight" to billingWeight.value,
|
||||
"packagecode" to packageType.value,
|
||||
"dep" to departure.value,
|
||||
"origin" to departure.value,
|
||||
"dest" to destination.value,
|
||||
"goods" to goodsNameEn.value,
|
||||
"goodsCn" to goodsNameCn.value,
|
||||
"awbType" to waybillType.value,
|
||||
"cargoType" to goodsType.value,
|
||||
"unNumber" to unNumber.value,
|
||||
"remark" to remark.value,
|
||||
).toRequestBody(removeEmptyOrNull = true)
|
||||
|
||||
launchLoadingCollect({
|
||||
if (pageType.value == DetailsPageType.Modify) {
|
||||
NetApply.api.gjjManifestUpdate(params)
|
||||
} else {
|
||||
NetApply.api.gjjManifestInsert(params)
|
||||
}
|
||||
}) {
|
||||
onSuccess = {
|
||||
if (it.verifySuccess()) {
|
||||
showToast("保存成功")
|
||||
val successMsg = if (pageType.value == DetailsPageType.Modify) "修改成功" else "保存成功"
|
||||
showToast(successMsg)
|
||||
|
||||
// 发送刷新事件
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
}
|
||||
|
||||
view.context.finish()
|
||||
} else {
|
||||
showToast(it.msg.noNull("保存失败"))
|
||||
}
|
||||
}
|
||||
|
||||
onComplete = {
|
||||
dismissLoading()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.lukouguoji.gjj.viewModel
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.activity.GjjManifestAddActivity
|
||||
import com.lukouguoji.gjj.holder.IntImpManifestViewHolder
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.bean.GjjManifest
|
||||
@@ -14,6 +16,7 @@ import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.noNull
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
@@ -83,11 +86,73 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
||||
* 新增按钮点击
|
||||
*/
|
||||
fun onAddClick() {
|
||||
showToast("新增功能开发中")
|
||||
// 获取当前航班信息
|
||||
val fid = getCurrentFlightId()
|
||||
|
||||
GjjManifestAddActivity.start(
|
||||
context = getTopActivity(),
|
||||
fid = fid,
|
||||
dep = fdep.value ?: "",
|
||||
dest = "" // 目的站暂时留空
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除按钮点击
|
||||
* 获取当前航班ID(从列表第一项获取)
|
||||
*/
|
||||
private fun getCurrentFlightId(): String {
|
||||
val firstItem = pageModel.rv?.commonAdapter()?.items?.firstOrNull() as? GjjManifest
|
||||
return firstItem?.fid?.toString() ?: ""
|
||||
}
|
||||
|
||||
/**
|
||||
* Item点击处理(侧滑按钮)
|
||||
*/
|
||||
override fun onItemClick(position: Int, type: Int) {
|
||||
val bean = pageModel.rv?.commonAdapter()?.getItem(position) as? GjjManifest ?: return
|
||||
|
||||
when (type) {
|
||||
101 -> {
|
||||
// 编辑(传递整个Bean对象)
|
||||
GjjManifestAddActivity.startForEdit(getTopActivity(), bean)
|
||||
}
|
||||
102 -> {
|
||||
// 删除
|
||||
deleteManifest(bean)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单个舱单
|
||||
*/
|
||||
private fun deleteManifest(bean: GjjManifest) {
|
||||
AlertDialog.Builder(getTopActivity())
|
||||
.setTitle("提示")
|
||||
.setMessage("确定要删除运单号 ${bean.getWaybillNo()} 的舱单吗?")
|
||||
.setPositiveButton("确定") { _, _ ->
|
||||
val params = mapOf("mfId" to bean.mfId).toRequestBody()
|
||||
|
||||
launchLoadingCollect({ NetApply.api.gjjManifestDelete(params) }) {
|
||||
onSuccess = {
|
||||
if (it.verifySuccess()) {
|
||||
showToast("删除成功")
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
}
|
||||
refresh()
|
||||
} else {
|
||||
showToast(it.msg.noNull("删除失败"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.setNegativeButton("取消", null)
|
||||
.show()
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除按钮点击
|
||||
*/
|
||||
fun onDeleteClick() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
|
||||
|
||||
@@ -1,532 +1,373 @@
|
||||
<?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" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjj.viewModel.GjjManifestAddViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.GjjManifestDetailsActivity">
|
||||
android:background="@color/color_f2">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginRight="15dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="运单号:" />
|
||||
|
||||
<EditText
|
||||
style="@style/tv_manifest_details_value"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:text="@={viewModel.waybillNo}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="代理:" />
|
||||
|
||||
<LinearLayout style="@style/tv_manifest_details_value">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
items="@{viewModel.agentList}"
|
||||
onSelected="@{viewModel::onAgentSelected}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="特码:" />
|
||||
|
||||
<LinearLayout style="@style/tv_manifest_details_value">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
items="@{viewModel.specialCodeList}"
|
||||
onSelected="@{viewModel::onSpecialCodeSelected}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginRight="15dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="业务类型:" />
|
||||
|
||||
<LinearLayout style="@style/tv_manifest_details_value">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
items="@{viewModel.businessTypeList}"
|
||||
onSelected="@{viewModel::onBusinessTypeSelected}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="货物类型:" />
|
||||
|
||||
<LinearLayout style="@style/tv_manifest_details_value">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
items="@{viewModel.goodsTypeList}"
|
||||
onSelected="@{viewModel::onGoodsTypeSelected}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="运单类型:" />
|
||||
|
||||
<LinearLayout style="@style/tv_manifest_details_value">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
items="@{viewModel.waybillTypeList}"
|
||||
onSelected="@{viewModel::onWaybillTypeSelected}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginRight="15dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="运单件数:" />
|
||||
|
||||
<EditText
|
||||
style="@style/tv_manifest_details_value"
|
||||
android:inputType="number"
|
||||
android:text="@={viewModel.waybillNum}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="实到件数:" />
|
||||
|
||||
<EditText
|
||||
style="@style/tv_manifest_details_value"
|
||||
android:inputType="number"
|
||||
android:text="@={viewModel.actualNum}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="实到重量:" />
|
||||
|
||||
<EditText
|
||||
style="@style/tv_manifest_details_value"
|
||||
android:inputType="numberDecimal"
|
||||
android:text="@={viewModel.actualWeight}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="计费重量:" />
|
||||
|
||||
<EditText
|
||||
style="@style/tv_manifest_details_value"
|
||||
android:inputType="numberDecimal"
|
||||
android:text="@{viewModel.billingWeight}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginRight="15dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="包装类型:" />
|
||||
|
||||
<LinearLayout style="@style/tv_manifest_details_value">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
items="@{viewModel.packageTypeList}"
|
||||
onSelected="@{viewModel::onPackageTypeSelected}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="始发港:" />
|
||||
|
||||
<EditText
|
||||
style="@style/tv_manifest_details_value"
|
||||
android:enabled="false"
|
||||
android:text="@={viewModel.departure}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="目的港:" />
|
||||
|
||||
<EditText
|
||||
style="@style/tv_manifest_details_value"
|
||||
android:enabled="false"
|
||||
android:text="@={viewModel.destination}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginRight="15dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="品名(英):" />
|
||||
|
||||
<EditText
|
||||
style="@style/tv_manifest_details_value"
|
||||
android:text="@={viewModel.goodsNameEn}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="invisible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="品名(中):" />
|
||||
|
||||
<EditText
|
||||
style="@style/tv_manifest_details_value"
|
||||
android:text="@={viewModel.goodsNameCn}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginRight="15dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="*"
|
||||
android:textColor="@color/red"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_manifest_details_label"
|
||||
android:text="备注:" />
|
||||
|
||||
<EditText
|
||||
style="@style/tv_manifest_details_value"
|
||||
android:text="@={viewModel.remark}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
<!-- 主内容区域 -->
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1">
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#5c6890"
|
||||
android:gravity="end"
|
||||
android:paddingHorizontal="15dp">
|
||||
<!-- 第1行:航班日期、航班号、航程(全部禁止编辑) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{viewModel::onCancelClick}"
|
||||
android:text="取消" />
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
enable="@{false}"
|
||||
hint='@{"请选择航班日期"}'
|
||||
required="@{false}"
|
||||
title='@{"航班日期"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.DATE}"
|
||||
value='@={viewModel.flightDate}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{viewModel::onSaveClick}"
|
||||
android:text="保存" />
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
enable="@{false}"
|
||||
hint='@{"请输入航班号"}'
|
||||
required="@{false}"
|
||||
title='@{"航 班 号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.flightNo}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
enable="@{false}"
|
||||
hint='@{"请输入航程"}'
|
||||
required="@{false}"
|
||||
title='@{"航 程"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.range}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第2行:运单号(禁止编辑)、代理、特码 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
enable="@{false}"
|
||||
hint='@{"请输入运单号"}'
|
||||
required="@{false}"
|
||||
title='@{"运 单 号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.waybillNo}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请选择代理"}'
|
||||
list="@{viewModel.agentList}"
|
||||
required="@{false}"
|
||||
title='@{"代 理"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.agent}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请选择特码"}'
|
||||
list="@{viewModel.specialCodeList}"
|
||||
required="@{false}"
|
||||
title='@{"特 码"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.specialCode}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第3行:始发站、目的站、运单类型 -->
|
||||
<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
|
||||
hint='@{"请输入始发站"}'
|
||||
required="@{false}"
|
||||
title='@{"始 发 站"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.departure}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入目的站"}'
|
||||
required="@{false}"
|
||||
title='@{"目 的 站"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.destination}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请选择运单类型"}'
|
||||
list="@{viewModel.waybillTypeList}"
|
||||
required="@{false}"
|
||||
title='@{"运单类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.waybillType}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第4行:总件数、实到件数、实到重量 -->
|
||||
<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
|
||||
hint='@{"请输入总件数"}'
|
||||
required="@{false}"
|
||||
title='@{"总 件 数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.waybillNum}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入实到件数"}'
|
||||
required="@{false}"
|
||||
title='@{"实到件数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.actualNum}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入实到重量"}'
|
||||
required="@{false}"
|
||||
title='@{"实到重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.actualWeight}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第5行:计费重量、品名(中)、品名(英) -->
|
||||
<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
|
||||
hint='@{"请输入计费重量"}'
|
||||
required="@{false}"
|
||||
title='@{"计费重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.billingWeight}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入品名(中)"}'
|
||||
required="@{false}"
|
||||
title='@{"品名(中)"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.goodsNameCn}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入品名(英)"}'
|
||||
required="@{false}"
|
||||
title='@{"品名(英)"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.goodsNameEn}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第6行:包装类型、业务类型、UN编号 -->
|
||||
<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
|
||||
hint='@{"请选择包装类型"}'
|
||||
list="@{viewModel.packageTypeList}"
|
||||
required="@{false}"
|
||||
title='@{"包装类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.packageType}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请选择业务类型"}'
|
||||
list="@{viewModel.businessTypeList}"
|
||||
required="@{false}"
|
||||
title='@{"业务类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.businessType}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入UN编号"}'
|
||||
required="@{false}"
|
||||
title='@{"UN 编 号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.unNumber}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第7行:备注(占满整行) -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入备注"}'
|
||||
inputHeight="@{80}"
|
||||
required="@{false}"
|
||||
title='@{"备 注"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.remark}'
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 底部操作栏 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:padding="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:background="@drawable/bg_primary_radius_4"
|
||||
android:gravity="center"
|
||||
android:onClick="@{viewModel::onCancelClick}"
|
||||
android:text="取消"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/bg_primary_radius_4"
|
||||
android:gravity="center"
|
||||
android:onClick="@{viewModel::onSaveClick}"
|
||||
android:text="保存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</layout>
|
||||
@@ -15,145 +15,41 @@
|
||||
type="Integer" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="horizontal"
|
||||
android:padding="15dp"
|
||||
android:gravity="center_vertical">
|
||||
android:layout_marginBottom="10dp">
|
||||
|
||||
<!-- 选中图标(飞机图标,根据选择状态切换图片) -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||
android:src="@drawable/img_plane" />
|
||||
|
||||
<!-- 舱单信息区域 -->
|
||||
<!-- 主内容区 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="horizontal"
|
||||
android:padding="15dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- 第一行:运单号 -->
|
||||
<!-- 选中图标(飞机图标,根据选择状态切换图片) -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||
android:src="@drawable/img_plane" />
|
||||
|
||||
<!-- 舱单信息区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="运单号:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.getWaybillNo()}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第二行:始发站、目的站、总件数、实到件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 始发站 -->
|
||||
<!-- 第一行:运单号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="始发站:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.origin}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 目的站 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="目的站:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.dest}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 总件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="总件数:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.totalPc)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 实到件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@@ -161,161 +57,272 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="实到件数:"
|
||||
android:text="运单号:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.pc)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
android:text="@{bean.getWaybillNo()}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第三行:实到重量、计费重量、代理、特码、分单数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 实到重量 -->
|
||||
<!-- 第二行:始发站、目的站、总件数、实到件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<!-- 始发站 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="实到重量:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="始发站:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.origin}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 目的站 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf((int)bean.weight)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="目的站:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.dest}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 总件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="总件数:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.totalPc)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 实到件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="实到件数:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.pc)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 计费重量 -->
|
||||
<!-- 第三行:实到重量、计费重量、代理、特码、分单数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<!-- 实到重量 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="计费重量:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="实到重量:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf((int)bean.weight)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 计费重量 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf((int)bean.cashWeight)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="计费重量:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf((int)bean.cashWeight)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 代理 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{3}"
|
||||
android:text="代理:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.agentCode}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 特码 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{3}"
|
||||
android:text="特码:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.spCode}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 代理 -->
|
||||
<!-- 第四行:分单数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<!-- 分单数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{3}"
|
||||
android:text="代理:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.agentCode}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="分单数:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.haWbNum)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<!-- 特码 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{3}"
|
||||
android:text="特码:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.spCode}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第四行:分单数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 分单数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="分单数:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.haWbNum)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -323,6 +330,28 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<!-- 侧滑菜单区 -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 编辑按钮 -->
|
||||
<TextView
|
||||
android:id="@+id/btnEdit"
|
||||
style="@style/tv_item_action"
|
||||
android:background="@color/colorPrimary"
|
||||
android:text="编辑" />
|
||||
|
||||
<!-- 删除按钮 -->
|
||||
<TextView
|
||||
android:id="@+id/btnDelete"
|
||||
style="@style/tv_item_action"
|
||||
android:background="@color/red"
|
||||
android:text="删除" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
|
||||
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user