init: init proj
1
module_gnj/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
76
module_gnj/build.gradle
Normal file
@@ -0,0 +1,76 @@
|
||||
if (isBuildModule.toBoolean()) {
|
||||
apply plugin: 'com.android.application'
|
||||
} else {
|
||||
apply plugin: 'com.android.library'
|
||||
}
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
|
||||
kapt {
|
||||
arguments {
|
||||
arg("AROUTER_MODULE_NAME", project.getName())
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk 31
|
||||
|
||||
sourceSets {
|
||||
main{
|
||||
// 应用
|
||||
if(isBuildModule.toBoolean()){
|
||||
manifest.srcFile 'src/main/debug/AndroidManifest.xml'
|
||||
}else{// 插件
|
||||
manifest.srcFile 'src/main/release/AndroidManifest.xml'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
if (isBuildModule.toBoolean()) {
|
||||
applicationId "com.lukouguoji.gnj"
|
||||
}
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 30
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
buildToolsVersion '30.0.3'
|
||||
|
||||
buildFeatures {
|
||||
dataBinding = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
api project(':module_base')
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'androidx.core:core-ktx:1.2.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.2.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
testImplementation 'junit:junit:4.+'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
||||
kapt 'com.alibaba:arouter-compiler:1.5.2'
|
||||
}
|
||||
21
module_gnj/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.lukouguoji.gnj
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("com.lukouguoji.gnj", appContext.packageName)
|
||||
}
|
||||
}
|
||||
25
module_gnj/src/main/debug/AndroidManifest.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.lukouguoji.gnj">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Aerologic">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
11
module_gnj/src/main/java/com/lukouguoji/gnj/MainActivity.kt
Normal file
@@ -0,0 +1,11 @@
|
||||
package com.lukouguoji.gnj
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,528 @@
|
||||
package com.lukouguoji.gnj.activity
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.EditText
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.facade.annotation.Autowired
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.adapt.GnjCangDanInfoAdapter
|
||||
import com.lukouguoji.gnj.common.GnjCommon
|
||||
import com.lukouguoji.gnj.model.GnjCangDanInfoItemModel
|
||||
import com.lukouguoji.gnj.viewModel.GnjCangDanInfoViewModel
|
||||
import com.lukouguoji.module_base.BaseActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.String.isValidInt
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_CANG_DAN_INFO)
|
||||
class GnjCangDanInfoActivity : BaseActivity(), View.OnClickListener {
|
||||
private lateinit var viewModel: GnjCangDanInfoViewModel
|
||||
private lateinit var adapter: GnjCangDanInfoAdapter
|
||||
private val collectList = ArrayList<GnjCangDanInfoItemModel>()
|
||||
|
||||
private lateinit var receive: EditText
|
||||
private lateinit var cardNo: EditText
|
||||
private lateinit var telPhone: EditText
|
||||
|
||||
private lateinit var cancel: TextView
|
||||
private lateinit var submit: TextView
|
||||
|
||||
|
||||
@JvmField
|
||||
@Autowired
|
||||
var id: String? = null
|
||||
|
||||
@JvmField
|
||||
@Autowired
|
||||
var ref: String? = null
|
||||
|
||||
@JvmField
|
||||
@Autowired
|
||||
var fid: Int = -9999
|
||||
|
||||
@JvmField
|
||||
@Autowired
|
||||
var prefix: String? = null
|
||||
|
||||
@JvmField
|
||||
@Autowired
|
||||
var fdep: String? = null
|
||||
@JvmField
|
||||
@Autowired
|
||||
var fdest: String? = null
|
||||
private fun initView() {
|
||||
viewModel = ViewModelProvider(this).get(GnjCangDanInfoViewModel::class.java)
|
||||
viewModel.waybillFormNetWork["prefix"] = prefix
|
||||
viewModel.waybillFormNetWork["origin"] = fdep
|
||||
viewModel.waybillFormNetWork["dest"] = fdest
|
||||
val layoutManager = GridLayoutManager(this, 2)
|
||||
adapter = GnjCangDanInfoAdapter(this, collectList)
|
||||
var recyclerView: RecyclerView = findViewById(R.id.collectList)
|
||||
recyclerView.layoutManager = layoutManager
|
||||
recyclerView.adapter = adapter
|
||||
|
||||
receive = findViewById(R.id.receive)
|
||||
cardNo = findViewById(R.id.cardNo)
|
||||
telPhone = findViewById(R.id.telPhone)
|
||||
cancel = findViewById(R.id.cancel)
|
||||
submit = findViewById(R.id.submit)
|
||||
|
||||
cancel.setOnClickListener(this)
|
||||
submit.setOnClickListener(this)
|
||||
|
||||
cardNo.onFocusChangeListener = View.OnFocusChangeListener { v, hasFocus ->
|
||||
if (!hasFocus) {
|
||||
//失去焦点
|
||||
var cardNoStr = cardNo.text.toString()
|
||||
if (cardNoStr != "" && !Common.isIDNumber(cardNoStr)) {
|
||||
Common.showToast(this, "请输入正确的身份证号!")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
telPhone.onFocusChangeListener = View.OnFocusChangeListener { v, hasFocus ->
|
||||
if (!hasFocus) {
|
||||
//失去焦点
|
||||
var telPhoneStr = telPhone.text.toString()
|
||||
if (telPhoneStr != "" && !Common.isPhoneNum(telPhoneStr)) {
|
||||
Common.showToast(this, "请输入正确的电话号码!")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_gnj_cang_dan_info)
|
||||
initView()
|
||||
|
||||
|
||||
//1.新增
|
||||
if (id == null) {
|
||||
// if (true) {
|
||||
setBackArrow("新增国内进港舱单")
|
||||
|
||||
selObserve()
|
||||
initData(GnjCommon.CangDan.Info.add)
|
||||
|
||||
viewModel.saveFestGnjCangDanObserver.observe(this) {
|
||||
loadingCancel()
|
||||
val status = it.getString("status")
|
||||
val msg = it.getString("msg")
|
||||
if (Constant.Result.succ == status) {
|
||||
val dataStatus = it.getString("data")
|
||||
if (Constant.Result.succ == dataStatus) {
|
||||
Common.showToast(this, "新增成功!")
|
||||
reset()
|
||||
} else if (Constant.Result.code2 == dataStatus) {
|
||||
Common.showToast(this, "没有选择航班,请选择航班!")
|
||||
} else {
|
||||
Common.showToast(this, "新增失败!")
|
||||
}
|
||||
} else {
|
||||
Common.showToast(this, "新增失败!")
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
//2.查看
|
||||
if (id != null && id != "" && ref != null && ref == GnjCommon.CangDan.Ref.read) {
|
||||
// if (true) {
|
||||
setBackArrow("国内进港舱单详情")
|
||||
|
||||
initNetWork(id, null, GnjCommon.CangDan.Info.read)
|
||||
receive.isEnabled = false
|
||||
receive.setBackgroundResource(R.drawable.gnj_cang_dan_info_edit_disable_shape)
|
||||
cardNo.isEnabled = false
|
||||
cardNo.setBackgroundResource(R.drawable.gnj_cang_dan_info_edit_disable_shape)
|
||||
telPhone.isEnabled = false
|
||||
telPhone.setBackgroundResource(R.drawable.gnj_cang_dan_info_edit_disable_shape)
|
||||
//隐藏取消和确认按钮
|
||||
cancel.visibility = View.GONE
|
||||
submit.visibility = View.GONE
|
||||
return
|
||||
}
|
||||
//3.编辑
|
||||
if (id != null && id != "" && ref != null && ref != GnjCommon.CangDan.Ref.read) {
|
||||
setBackArrow("国内进港舱单详情")
|
||||
|
||||
initNetWork(id, null, GnjCommon.CangDan.Info.update)
|
||||
|
||||
viewModel.updateFestGnjCangDanObserver.observe(this) {
|
||||
loadingCancel()
|
||||
val status = it.getString("status")
|
||||
val msg = it.getString("msg")
|
||||
if (Constant.Result.succ == status) {
|
||||
var dataStatus = it.getString("data")
|
||||
if (Constant.Result.succ == dataStatus) {
|
||||
Common.showToast(this, "修改成功!")
|
||||
} else if (Constant.Result.code2 == dataStatus) {
|
||||
Common.showToast(this, "没有选择航班,请选择航班!")
|
||||
} else {
|
||||
Common.showToast(this, "修改失败!")
|
||||
}
|
||||
} else {
|
||||
Common.showToast(this, "修改失败!")
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
when (it.id) {
|
||||
R.id.cancel -> {
|
||||
finish()
|
||||
}
|
||||
R.id.submit -> {
|
||||
submit()
|
||||
}
|
||||
else -> {
|
||||
Toast.makeText(this, "未找到对应操作", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听运单详情返回数据
|
||||
*
|
||||
* write = false 只读 true 可写
|
||||
*/
|
||||
private fun waybillObserve(status: String) {
|
||||
viewModel.waybillLiveData.observe(this) {
|
||||
val resStatus = it.getString("status")
|
||||
if (Constant.Result.succ == resStatus) {
|
||||
viewModel.waybillFormNetWork = it.getJSONObject("data")
|
||||
|
||||
val consignee = viewModel.waybillFormNetWork.getString("consignee") ?: ""//收货人
|
||||
val cneeId = viewModel.waybillFormNetWork.getString("cneeId") ?: ""//收货人身份证号
|
||||
val cneeTel = viewModel.waybillFormNetWork.getString("cneeTel") ?: ""//收货人电话
|
||||
|
||||
initData(status)
|
||||
|
||||
////收获 信息
|
||||
receive.setText(consignee)
|
||||
cardNo.setText(cneeId)
|
||||
telPhone.setText(cneeTel)
|
||||
|
||||
} else {
|
||||
//无数据
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉框赋值
|
||||
*/
|
||||
private fun selObserve() {
|
||||
/////////////// 下拉框 start
|
||||
viewModel.agentCode(System.currentTimeMillis().toString())
|
||||
viewModel.agentCodeObserver.observe(this) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择代理人"
|
||||
noneObj["code"] = ""
|
||||
viewModel.agentCodeList.add(noneObj)
|
||||
viewModel.agentCodeList.addAll(vd.getJSONArray("data"))
|
||||
|
||||
totalRequestNotifyAdapter()
|
||||
}
|
||||
|
||||
viewModel.business(Constant.businessType.CI)
|
||||
viewModel.businessObserver.observe(this) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择业务类型"
|
||||
noneObj["code"] = ""
|
||||
viewModel.businessList.add(noneObj)
|
||||
viewModel.businessList.addAll(vd.getJSONArray("data"))
|
||||
|
||||
totalRequestNotifyAdapter()
|
||||
}
|
||||
|
||||
viewModel.specialCode(System.currentTimeMillis().toString())
|
||||
viewModel.specialCodeObserver.observe(this) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择特码"
|
||||
noneObj["code"] = ""
|
||||
viewModel.specialCodeList.add(noneObj)
|
||||
viewModel.specialCodeList.addAll(vd.getJSONArray("data"))
|
||||
|
||||
totalRequestNotifyAdapter()
|
||||
}
|
||||
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择运单类型"
|
||||
noneObj["code"] = ""
|
||||
val noneObj2 = JSONObject()
|
||||
noneObj2["name"] = "国内进港"
|
||||
noneObj2["code"] = "CICI1"
|
||||
val noneObj3 = JSONObject()
|
||||
noneObj3["name"] = "转国内出港"
|
||||
noneObj3["code"] = "CICO1"
|
||||
val noneObj4 = JSONObject()
|
||||
noneObj4["name"] = "转国际进港"
|
||||
noneObj4["code"] = "CIII1"
|
||||
viewModel.awbList.add(noneObj)
|
||||
viewModel.awbList.add(noneObj2)
|
||||
viewModel.awbList.add(noneObj3)
|
||||
viewModel.awbList.add(noneObj4)
|
||||
/* viewModel.awb(System.currentTimeMillis().toString())
|
||||
viewModel.awbObserver.observe(this) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择运单类型"
|
||||
noneObj["code"] = ""
|
||||
viewModel.awbList.add(noneObj)
|
||||
viewModel.awbList.addAll(vd.getJSONArray("data"))
|
||||
|
||||
totalRequestNotifyAdapter()
|
||||
}*/
|
||||
/////////////// 下拉框 end
|
||||
}
|
||||
|
||||
/**
|
||||
* 所有请求结束,更细adpter 只适用于刚开始加载
|
||||
*/
|
||||
private fun totalRequestNotifyAdapter() {
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化网络请求
|
||||
*/
|
||||
private fun initNetWork(id: String?, wbNo: String?, status: String) {
|
||||
selObserve()
|
||||
viewModel.queryWaybillById(id!!.toInt(), wbNo)
|
||||
waybillObserve(status)
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
private fun submit() {
|
||||
for ((index, c) in collectList.withIndex()) {
|
||||
val titleName = c.titleName//标题
|
||||
val inputContent = c.inputContent//输入内容
|
||||
val selContentCode = c.selContentCode//选择内容
|
||||
val must = c.isMust//是否必填
|
||||
val sel = c.isSel//是否下拉框
|
||||
val titleCodePre = c.titleCodePre//前缀
|
||||
val inputContentPre = c.inputContentPre//前缀
|
||||
//下拉框
|
||||
if (sel) {
|
||||
if (must && selContentCode == "") {
|
||||
Common.showToast(this, "请选择$titleName")
|
||||
return
|
||||
}
|
||||
viewModel.waybillFormNetWork[c.titleCode] = selContentCode
|
||||
}
|
||||
//输入框
|
||||
else {
|
||||
if (must && inputContent == "") {
|
||||
Common.showToast(this, "请输入$titleName")
|
||||
return
|
||||
}
|
||||
viewModel.waybillFormNetWork[c.titleCode] = inputContent
|
||||
//前缀不为空时,赋值
|
||||
if (titleCodePre != null && titleCodePre != "" && inputContentPre != null && inputContentPre != "") {
|
||||
viewModel.waybillFormNetWork[titleCodePre] = inputContentPre
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//1.新增
|
||||
if (id == null) {
|
||||
//身份证、电话号码校验
|
||||
val cardNoStr = cardNo.text.toString()
|
||||
val telPhoneStr = telPhone.text.toString()
|
||||
if (cardNoStr != "" && !Common.isIDNumber(cardNoStr)) {
|
||||
Common.showToast(this, "请输入正确的身份证号!")
|
||||
return
|
||||
}
|
||||
if (telPhoneStr != "" && !Common.isPhoneNum(telPhoneStr)) {
|
||||
Common.showToast(this, "请输入正确的电话号码!")
|
||||
return
|
||||
}
|
||||
//输入运单号,需要校验规则,判断前7位除以7得到的余数是否等于第8位,是即符合规则,否则提示
|
||||
val prefixStr = viewModel.waybillFormNetWork.getString("prefix")
|
||||
if (prefixStr.length != 3 || !prefixStr.isValidInt()) {
|
||||
Common.showToast(this, "请输入正确的运单号前缀格式!")
|
||||
return
|
||||
}
|
||||
val checkWaybill = viewModel.waybillFormNetWork.getString("no")
|
||||
if (checkWaybill.length != 8 || !checkWaybill.isValidInt()) {
|
||||
Common.showToast(this, "请输入正确的运单号格式!")
|
||||
return
|
||||
}
|
||||
var subSequence = checkWaybill.subSequence(0, 7).toString().toInt()
|
||||
var subSequence2 = checkWaybill[7].toString().toInt()
|
||||
if (subSequence % 7 != subSequence2) {
|
||||
Common.showToast(this, "请输入正确的运单号格式!")
|
||||
return
|
||||
}
|
||||
|
||||
loading()
|
||||
viewModel.saveFestGnjCangDan(
|
||||
fid, viewModel.waybillFormNetWork.getString("prefix"), viewModel.waybillFormNetWork.getString("no"),
|
||||
viewModel.waybillFormNetWork.getString("agentCode"), viewModel.waybillFormNetWork.getString("spCode"),
|
||||
viewModel.waybillFormNetWork.getString("location"), viewModel.waybillFormNetWork.getIntValue("totalPc"),
|
||||
viewModel.waybillFormNetWork.getIntValue("pc"), viewModel.waybillFormNetWork.getDoubleValue("weight"),
|
||||
viewModel.waybillFormNetWork.getString("goods"), viewModel.waybillFormNetWork.getString("origin"),
|
||||
viewModel.waybillFormNetWork.getString("dest"), viewModel.waybillFormNetWork.getString("businessType"),
|
||||
viewModel.waybillFormNetWork.getString("remark"), viewModel.waybillFormNetWork.getString("awbType"),
|
||||
// viewModel.waybillFormNetWork.getDoubleValue("cashWeight"),
|
||||
receive.text.toString(), cardNoStr, telPhoneStr
|
||||
)
|
||||
return
|
||||
}
|
||||
//2.查看
|
||||
if (id != null && id != "" && ref != null && ref == GnjCommon.CangDan.Ref.read) {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
//3.编辑
|
||||
if (id != null && id != "" && ref != null && ref != GnjCommon.CangDan.Ref.read) {
|
||||
|
||||
//身份证、电话号码校验
|
||||
val cardNoStr = cardNo.text.toString()
|
||||
val telPhoneStr = telPhone.text.toString()
|
||||
if (cardNoStr != "" && !Common.isIDNumber(cardNoStr)) {
|
||||
Common.showToast(this, "请输入正确的身份证号!")
|
||||
}
|
||||
if (telPhoneStr != "" && !Common.isPhoneNum(telPhoneStr)) {
|
||||
Common.showToast(this, "请输入正确的电话号码!")
|
||||
}
|
||||
loading()
|
||||
viewModel.updateFestGnjCangDan(
|
||||
id!!.toInt(),
|
||||
fid, viewModel.waybillFormNetWork.getString("prefix"), viewModel.waybillFormNetWork.getString("no"),
|
||||
viewModel.waybillFormNetWork.getString("agentCode"), viewModel.waybillFormNetWork.getString("spCode"),
|
||||
viewModel.waybillFormNetWork.getString("location"), viewModel.waybillFormNetWork.getIntValue("totalPc"),
|
||||
viewModel.waybillFormNetWork.getIntValue("pc"), viewModel.waybillFormNetWork.getDoubleValue("weight"),
|
||||
viewModel.waybillFormNetWork.getString("goods"), viewModel.waybillFormNetWork.getString("origin"),
|
||||
viewModel.waybillFormNetWork.getString("dest"), viewModel.waybillFormNetWork.getString("businessType"),
|
||||
viewModel.waybillFormNetWork.getString("remark"), viewModel.waybillFormNetWork.getString("awbType"),
|
||||
// viewModel.waybillFormNetWork.getDoubleValue("cashWeight"),
|
||||
receive.text.toString(), cardNoStr, telPhoneStr
|
||||
)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化列表数据
|
||||
*/
|
||||
private fun initData(status: String) {
|
||||
var write = false
|
||||
var waybillOperator = false
|
||||
when (status) {
|
||||
GnjCommon.CangDan.Info.read -> {
|
||||
write = false
|
||||
waybillOperator = false
|
||||
}
|
||||
GnjCommon.CangDan.Info.add -> {
|
||||
write = true
|
||||
waybillOperator = true
|
||||
}
|
||||
GnjCommon.CangDan.Info.update -> {
|
||||
write = true
|
||||
waybillOperator = false
|
||||
}
|
||||
}
|
||||
|
||||
collectList.clear()
|
||||
collectList.add(
|
||||
GnjCangDanInfoItemModel(
|
||||
true, waybillOperator, "运单号", "no", viewModel.waybillFormNetWork.getString("no") ?: "",
|
||||
"prefix", viewModel.waybillFormNetWork.getString("prefix") ?: ""
|
||||
)
|
||||
)
|
||||
collectList.add(
|
||||
GnjCangDanInfoItemModel(
|
||||
true,
|
||||
write,
|
||||
"代理",
|
||||
"agentCode",
|
||||
viewModel.agentCodeList,
|
||||
viewModel.waybillFormNetWork.getString("agentCode") ?: ""
|
||||
)
|
||||
)
|
||||
collectList.add(
|
||||
GnjCangDanInfoItemModel(
|
||||
true,
|
||||
write,
|
||||
"业务类型",
|
||||
"businessType",
|
||||
viewModel.businessList,
|
||||
viewModel.waybillFormNetWork.getString("businessType") ?: "ANR"
|
||||
)
|
||||
)
|
||||
collectList.add(
|
||||
GnjCangDanInfoItemModel(
|
||||
true,
|
||||
write,
|
||||
"总件数",
|
||||
"totalPc",
|
||||
viewModel.waybillFormNetWork.getString("totalPc") ?: ""
|
||||
)
|
||||
)
|
||||
collectList.add(GnjCangDanInfoItemModel(true, write, "实到件数", "pc", viewModel.waybillFormNetWork.getString("pc") ?: ""))
|
||||
collectList.add(
|
||||
GnjCangDanInfoItemModel(
|
||||
true,
|
||||
write,
|
||||
"实到重量",
|
||||
"weight",
|
||||
viewModel.waybillFormNetWork.getString("weight") ?: ""
|
||||
)
|
||||
)
|
||||
collectList.add(GnjCangDanInfoItemModel(true, write, "品名", "goods", viewModel.waybillFormNetWork.getString("goods") ?: ""))
|
||||
|
||||
collectList.add(
|
||||
GnjCangDanInfoItemModel(
|
||||
false,
|
||||
write,
|
||||
"特码",
|
||||
"spCode",
|
||||
viewModel.specialCodeList,
|
||||
viewModel.waybillFormNetWork.getString("spCode") ?: ""
|
||||
)
|
||||
)
|
||||
collectList.add(GnjCangDanInfoItemModel(true, write, "始发港", "origin", viewModel.waybillFormNetWork.getString("origin") ?: ""))
|
||||
collectList.add(GnjCangDanInfoItemModel(true, write, "目的港", "dest", viewModel.waybillFormNetWork.getString("dest") ?: ""))
|
||||
collectList.add(
|
||||
GnjCangDanInfoItemModel(
|
||||
true,
|
||||
write,
|
||||
"运单类型",
|
||||
"awbType",
|
||||
viewModel.awbList,
|
||||
viewModel.waybillFormNetWork.getString("awbType") ?: "CICI1"
|
||||
)
|
||||
)
|
||||
collectList.add(GnjCangDanInfoItemModel(false, write, "库位", "location", viewModel.waybillFormNetWork.getString("location") ?: ""))
|
||||
collectList.add(GnjCangDanInfoItemModel(false, write, "备注", "remark", viewModel.waybillFormNetWork.getString("remark") ?: ""))
|
||||
|
||||
totalRequestNotifyAdapter()
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空数据
|
||||
*/
|
||||
private fun reset() {
|
||||
//1.清空数据
|
||||
viewModel.waybillFormNetWork.clear()
|
||||
receive.setText("")
|
||||
cardNo.setText("")
|
||||
telPhone.setText("")
|
||||
initData(GnjCommon.CangDan.Info.add)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,491 @@
|
||||
package com.lukouguoji.gnj.activity
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.adapt.GnjCangDanListAdapter
|
||||
import com.lukouguoji.gnj.model.GnjCangDanListModel
|
||||
import com.lukouguoji.gnj.viewModel.GnjCangDanListViewModel
|
||||
import com.lukouguoji.module_base.ActivityCollector
|
||||
import com.lukouguoji.module_base.BaseActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
import com.lukouguoji.module_base.util.SwipeDeleteRecyclerView
|
||||
import com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
import com.scwang.smart.refresh.header.ClassicsHeader
|
||||
import com.scwang.smart.refresh.layout.api.RefreshLayout
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_CANG_DAN_LIST)
|
||||
class GnjCangDanListActivity : BaseActivity(), View.OnClickListener {
|
||||
private lateinit var viewModel: GnjCangDanListViewModel
|
||||
private lateinit var adapter: GnjCangDanListAdapter
|
||||
private val collectList = ArrayList<GnjCangDanListModel>()
|
||||
private lateinit var refreshLayout: RefreshLayout
|
||||
private var currentPage = 1
|
||||
private var pageSize = 10
|
||||
private var totalPage = 0
|
||||
private var totalCount = 0 //总条数
|
||||
private val calendar = Calendar.getInstance()
|
||||
private val ymdSdf = SimpleDateFormat("yyyy-MM-dd")//年月日
|
||||
private val ymdHmsSdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")//年月日 时分秒
|
||||
|
||||
|
||||
//搜索
|
||||
private lateinit var fdate: TextView
|
||||
private lateinit var startDateIcon: ImageView
|
||||
private lateinit var fno: EditText
|
||||
private lateinit var start: TextView
|
||||
private var startCodeValue = ""
|
||||
private lateinit var dest: EditText
|
||||
private lateinit var endDate: TextView
|
||||
private lateinit var searchLayout: LinearLayout
|
||||
private lateinit var addIcon: ImageView
|
||||
private lateinit var checkIcon: ImageView
|
||||
private lateinit var quickSearch: EditText
|
||||
private var isAllCheck = true
|
||||
|
||||
//列表
|
||||
private lateinit var listLayout: LinearLayout
|
||||
private lateinit var totalLayout: LinearLayout
|
||||
|
||||
//底部
|
||||
private lateinit var totalPc: TextView
|
||||
private lateinit var selPc: TextView
|
||||
private lateinit var send: TextView
|
||||
|
||||
private fun initView() {
|
||||
viewModel = ViewModelProvider(this).get(GnjCangDanListViewModel::class.java)
|
||||
val layoutManager = LinearLayoutManager(this)
|
||||
adapter = GnjCangDanListAdapter(this, viewModel, collectList)
|
||||
var recyclerView: SwipeDeleteRecyclerView = findViewById(R.id.collectList)
|
||||
recyclerView.layoutManager = layoutManager
|
||||
recyclerView.adapter = adapter
|
||||
refreshLayout = findViewById(R.id.refreshLayout)
|
||||
|
||||
fdate = findViewById(R.id.fdate)
|
||||
startDateIcon = findViewById(R.id.startDateIcon)
|
||||
fno = findViewById(R.id.fno)
|
||||
start = findViewById(R.id.start)
|
||||
dest = findViewById(R.id.dest)
|
||||
endDate = findViewById(R.id.endDate)
|
||||
searchLayout = findViewById(R.id.searchLayout)
|
||||
addIcon = findViewById(R.id.addIcon)
|
||||
checkIcon = findViewById(R.id.checkIcon)
|
||||
quickSearch = findViewById(R.id.quickSearch)
|
||||
//列表
|
||||
listLayout = findViewById(R.id.listLayout)
|
||||
totalLayout = findViewById(R.id.totalLayout)
|
||||
//底部
|
||||
totalPc = findViewById(R.id.totalPc)
|
||||
selPc = findViewById(R.id.selPc)
|
||||
send = findViewById(R.id.send)
|
||||
|
||||
fdate.setOnClickListener(this)
|
||||
startDateIcon.setOnClickListener(this)
|
||||
endDate.setOnClickListener(this)
|
||||
searchLayout.setOnClickListener(this)
|
||||
addIcon.setOnClickListener(this)
|
||||
checkIcon.setOnClickListener(this)
|
||||
send.setOnClickListener(this)
|
||||
start.setOnClickListener(this)
|
||||
|
||||
quickSearch.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
if (s != null && s.toString() != "") {
|
||||
val filterCollectionList = collectList.filter { c -> c.wbNo.contains(s.toString()) }
|
||||
recyclerView.adapter = GnjCangDanListAdapter(
|
||||
ActivityCollector.getLastActivity()!!,
|
||||
viewModel,
|
||||
filterCollectionList as MutableList<GnjCangDanListModel>
|
||||
)
|
||||
} else {
|
||||
recyclerView.adapter = GnjCangDanListAdapter(
|
||||
ActivityCollector.getLastActivity()!!,
|
||||
viewModel,
|
||||
collectList
|
||||
)
|
||||
}
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
fno.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(editable: Editable?) {
|
||||
val originText = editable.toString()
|
||||
if (originText != null && originText != "") {
|
||||
val regularExpression = "(^([A-Z0-9]+)$)"
|
||||
val matches = originText.matches(regularExpression.toRegex())
|
||||
if(!matches){
|
||||
val regularExpression2 = "([^A-Za-z0-9]+)"
|
||||
val replaceStr = originText.replace(regularExpression2.toRegex(),"")
|
||||
val replaceStrToUpper = replaceStr.uppercase(Locale.ROOT)//小写转大写
|
||||
fno.setText(replaceStrToUpper)
|
||||
fno.setSelection(replaceStrToUpper.length)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
fdate.text = ymdSdf.format(Date())//tw2022年6月13日15:57:10 要求航班日期默认当天
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_gnj_cang_dan_list)
|
||||
setBackArrow("国内进港舱单")
|
||||
initView()
|
||||
|
||||
//查询返回结果
|
||||
viewModel.searchParamLive.observe(this) {
|
||||
loadingCancel()
|
||||
//1.获取数据
|
||||
var listArr: JSONArray = it["list"] as JSONArray
|
||||
totalCount = it.getIntValue("total")
|
||||
totalPage = it["pages"] as Int
|
||||
// var listArr :JSONArray =it["list"] as JSONArray
|
||||
if (listArr.size > 0) {
|
||||
listLayout.visibility = View.VISIBLE
|
||||
totalLayout.visibility = View.VISIBLE
|
||||
|
||||
//2.循环遍历塞入collectList
|
||||
listArr.forEach {
|
||||
val itemObj = it as JSONObject
|
||||
|
||||
val mfId = itemObj.getIntValue("mfId")
|
||||
val no = itemObj.getString("wbNo") ?: ""
|
||||
val goods = itemObj.getString("goods") ?: ""
|
||||
val awbType = itemObj.getString("awbType") ?: ""
|
||||
val startPort = itemObj.getString("origin") ?: ""
|
||||
val destPort = itemObj.getString("dest") ?: ""
|
||||
val agentCode = itemObj.getString("agentCode") ?: ""
|
||||
val spCode = itemObj.getString("spCode") ?: ""
|
||||
val totalPc = itemObj.getIntValue("totalPc")
|
||||
val pc = itemObj.getIntValue("pc")
|
||||
val acWeight = itemObj.getDoubleValue("weight")//实到重量
|
||||
val chWight = itemObj.getDoubleValue("cashWeight")//计费重量
|
||||
|
||||
val ref = itemObj.getString("ref") ?: ""// 1查看
|
||||
|
||||
//列表赋值
|
||||
collectList.add(
|
||||
GnjCangDanListModel(
|
||||
mfId.toString(),
|
||||
no,
|
||||
goods,
|
||||
awbType,
|
||||
startPort,
|
||||
destPort,
|
||||
agentCode,
|
||||
spCode,
|
||||
totalPc,
|
||||
pc,
|
||||
acWeight,
|
||||
false,
|
||||
ref
|
||||
)
|
||||
)
|
||||
}
|
||||
//3.调adpter展示
|
||||
if (currentPage == 1) {
|
||||
val layoutManager = LinearLayoutManager(this)
|
||||
adapter = GnjCangDanListAdapter(this, viewModel, collectList)
|
||||
var recyclerView: SwipeDeleteRecyclerView = findViewById(R.id.collectList)
|
||||
recyclerView.layoutManager = layoutManager
|
||||
recyclerView.adapter = adapter
|
||||
} else {
|
||||
adapter.notifyItemRangeInserted((currentPage - 1) * 10, collectList.size)
|
||||
}
|
||||
refreshLayout.finishRefresh()
|
||||
refreshLayout.finishLoadMore()
|
||||
|
||||
}
|
||||
|
||||
totalPc.text = totalCount.toString()
|
||||
selPc.text = viewModel.checkCount.value.toString()
|
||||
}
|
||||
|
||||
//航班返回结果
|
||||
viewModel.domFlightGnjCangDanObserver.observe(this) {
|
||||
loadingCancel()
|
||||
val status = it.getString("status")
|
||||
if (Constant.Result.succ == status) {
|
||||
var jsonObject = it.getJSONObject("data")
|
||||
viewModel.fid = jsonObject.getInteger("fid")
|
||||
viewModel.prefix = jsonObject.getString("prefix")
|
||||
viewModel.fdep=jsonObject.getString("fdep")
|
||||
viewModel.fdest=jsonObject.getString("fdest")
|
||||
val actualArrival = jsonObject.getString("actualArrival")
|
||||
val fdest = jsonObject.getString("fdest")
|
||||
|
||||
dest.setText(fdest)
|
||||
endDate.text = actualArrival
|
||||
|
||||
if (viewModel.fid != null) {
|
||||
listLayout.visibility = View.VISIBLE
|
||||
totalLayout.visibility = View.VISIBLE
|
||||
resetSearch()
|
||||
}
|
||||
|
||||
} else {
|
||||
//无数据
|
||||
}
|
||||
}
|
||||
|
||||
//删除行 返回结果
|
||||
viewModel.deleteFestGnjCangDanObserver.observe(this) {
|
||||
loadingCancel()
|
||||
val positionDel = it.getInteger("positionDel")
|
||||
val status = it.getString("status")
|
||||
val msg = it.getString("msg")
|
||||
if (Constant.Result.succ == status) {
|
||||
collectList.removeAt(positionDel)
|
||||
adapter.notifyItemRemoved(positionDel)
|
||||
val dataStatus = it.getString("data")
|
||||
if (Constant.Result.succ == dataStatus) {
|
||||
Common.showToast(this, "删除成功!")
|
||||
|
||||
} else if (Constant.Result.code2 == dataStatus) {
|
||||
Common.showToast(this, "货物已发放,不允许删除!")
|
||||
} else {
|
||||
Common.showToast(this, "删除失败!")
|
||||
}
|
||||
} else {
|
||||
Common.showToast(this, "删除失败!")
|
||||
}
|
||||
}
|
||||
|
||||
//货物发放 返回结果
|
||||
viewModel.provideGnjCangDanObserver.observe(this) {
|
||||
loadingCancel()
|
||||
val status = it.getString("status")
|
||||
val msg = it.getString("msg")
|
||||
if (Constant.Result.succ == status) {
|
||||
val data = it.getString("data")
|
||||
if (Constant.Result.succ == data) {
|
||||
if (msg != null && msg != "") {
|
||||
Common.showToast(this, msg)
|
||||
} else {
|
||||
Common.showToast(this, "货物发放成功!")
|
||||
}
|
||||
resetSearch()
|
||||
} else {
|
||||
if (msg != null && msg != "") {
|
||||
Common.showToast(this, msg)
|
||||
} else {
|
||||
Common.showToast(this, "货物发放失败!")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (msg != null && msg != "") {
|
||||
Common.showToast(this, msg)
|
||||
} else {
|
||||
Common.showToast(this, "货物发放失败!")
|
||||
}
|
||||
}
|
||||
//重新搜索
|
||||
resetSearch()
|
||||
}
|
||||
|
||||
/////////////// 下拉框 start
|
||||
viewModel.start(System.currentTimeMillis().toString())
|
||||
viewModel.startObserver.observe(this) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择始发站"
|
||||
noneObj["code"] = ""
|
||||
viewModel.startList.add(noneObj)
|
||||
viewModel.startList.addAll(vd.getJSONArray("data"))
|
||||
}
|
||||
/////////////// 下拉框 end
|
||||
|
||||
//监听 复选框选中
|
||||
viewModel.checkCount.observe(this) {
|
||||
selPc.text = it.toString()
|
||||
}
|
||||
|
||||
/////////////////////////////// 加载刷新的布局
|
||||
refreshLayout.setRefreshHeader(ClassicsHeader(this))
|
||||
refreshLayout.setRefreshFooter(ClassicsFooter(this))
|
||||
/////////////////////////////// 下拉刷新
|
||||
refreshLayout.setOnRefreshListener {
|
||||
resetSearch()
|
||||
}
|
||||
/////////////////////////////// 上拉加载
|
||||
refreshLayout.setOnLoadMoreListener {
|
||||
if (currentPage < totalPage) {
|
||||
currentPage++
|
||||
//初始化查询
|
||||
searchFun()
|
||||
} else {
|
||||
refreshLayout.finishLoadMoreWithNoMoreData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
when (it.id) {
|
||||
R.id.fdate -> {
|
||||
Common.onYearMonthDay(this, fdate.text.toString()) { year, month, day ->
|
||||
calendar.set(year, month - 1, day)
|
||||
fdate.text = ymdSdf.format(calendar.time)
|
||||
}
|
||||
}
|
||||
R.id.startDateIcon -> {
|
||||
fdate.text = ""
|
||||
}
|
||||
R.id.endDate -> {
|
||||
Common.onYearMonthDay(this, endDate.text.toString()) { year, month, day ->
|
||||
calendar.set(year, month - 1, day)
|
||||
endDate.text = ymdSdf.format(calendar.time)
|
||||
}
|
||||
}
|
||||
R.id.searchLayout -> {
|
||||
endDate.text = ""
|
||||
dest.setText("")
|
||||
doFlight()
|
||||
}
|
||||
R.id.addIcon -> {
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GNJ_CANG_DAN_INFO).withString("id", null).withString("ref", null)
|
||||
.withInt("fid", viewModel.fid ?: -9999).withString("prefix", viewModel.prefix).withString("fdep",viewModel.fdep).withString("fdest",viewModel.fdest)
|
||||
.navigation(this, Constant.RequestCode.gnj_cang_dan_list)
|
||||
}
|
||||
R.id.checkIcon -> {
|
||||
var selCount = 0
|
||||
collectList.forEach { c ->
|
||||
//不是出库 并且 选中,可以选
|
||||
if (c.ref != "1" && isAllCheck) {
|
||||
c.isCheck = isAllCheck
|
||||
++selCount
|
||||
} else {
|
||||
c.isCheck = false
|
||||
}
|
||||
}
|
||||
if (isAllCheck) {
|
||||
viewModel.setCheckCount(selCount)
|
||||
} else {
|
||||
viewModel.setCheckCount(0)
|
||||
}
|
||||
//重置 isAllCheck
|
||||
isAllCheck = !isAllCheck
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
R.id.send -> {
|
||||
val ids = collectList.filter { c -> c.isCheck }.map { c -> c.id.toInt() }
|
||||
viewModel.provideGnjCangDan(viewModel.fid!!, ids)
|
||||
}
|
||||
R.id.start -> {
|
||||
Common.singleSelect(this, "请选择始发站", viewModel.startList, startCodeValue) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
start.text = name
|
||||
startCodeValue = code
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
Toast.makeText(this, "未找到对应操作", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* onActivityResult 回调
|
||||
*/
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == Constant.RequestCode.gnj_cang_dan_list && resultCode == RESULT_OK) {
|
||||
resetSearch()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
private fun searchFun() {
|
||||
/*if (fdate.text.toString() == "" || fno.text.toString() == "") {
|
||||
Common.showToast(this, "航班日期和航班号不可为空!")
|
||||
return
|
||||
}*/
|
||||
loading()
|
||||
viewModel.search(
|
||||
pageSize,
|
||||
currentPage,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
fdate.text.toString(),
|
||||
fno.text.toString(),
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置数据,搜索
|
||||
*/
|
||||
private fun resetSearch() {
|
||||
//recyclerView 清除所有数据数据
|
||||
viewModel.setCheckCount(0)
|
||||
refreshLayout.setNoMoreData(false)
|
||||
adapter.notifyItemRangeRemoved(0, collectList.size)
|
||||
collectList.clear()
|
||||
currentPage = 1
|
||||
searchFun()
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询航班是否存在
|
||||
*/
|
||||
private fun doFlight() {
|
||||
if (fdate.text.toString() == "" || fno.text.toString() == "") {
|
||||
Common.showToast(this, "航班日期和航班号不可为空!")
|
||||
return
|
||||
}
|
||||
loading()
|
||||
listLayout.visibility = View.GONE
|
||||
totalLayout.visibility = View.GONE
|
||||
viewModel.domFlightGnjCangDan(fdate.text.toString(), fno.text.toString())
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,576 @@
|
||||
package com.lukouguoji.gnj.activity
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.adapt.GnjChuKuListAdapter
|
||||
import com.lukouguoji.gnj.model.GnjChuKuListModel
|
||||
import com.lukouguoji.gnj.viewModel.GnjChuKuListViewModel
|
||||
import com.lukouguoji.module_base.ActivityCollector
|
||||
import com.lukouguoji.module_base.BaseActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
import com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
import com.scwang.smart.refresh.header.ClassicsHeader
|
||||
import com.scwang.smart.refresh.layout.api.RefreshLayout
|
||||
import kotlinx.coroutines.launch
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_CHU_KU_LIST)
|
||||
class GnjChuKuListActivity : BaseActivity(), View.OnClickListener {
|
||||
private val currentTitleName = "国内进港出库"
|
||||
|
||||
private lateinit var viewModel: GnjChuKuListViewModel
|
||||
private lateinit var adapter: GnjChuKuListAdapter
|
||||
private val collectList = ArrayList<GnjChuKuListModel>()
|
||||
private lateinit var refreshLayout: RefreshLayout
|
||||
private var currentPage = 1
|
||||
private var pageSize = 10
|
||||
private var totalPage = 0
|
||||
private var totalCount = 0 //总条数
|
||||
private var totalWeightValue = 0.0 //总重量
|
||||
private val calendar = Calendar.getInstance()
|
||||
private val ymdSdf = SimpleDateFormat("yyyy-MM-dd")//年月日
|
||||
// private val ymdHmsSdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")//年月日 时分秒
|
||||
|
||||
//标题
|
||||
private lateinit var toolBack: LinearLayout
|
||||
private lateinit var titleName: TextView
|
||||
|
||||
|
||||
//搜索
|
||||
private lateinit var beginDate: TextView
|
||||
private lateinit var beginDateIcon: ImageView
|
||||
private lateinit var endDate: TextView
|
||||
private lateinit var endDateIcon: ImageView
|
||||
private lateinit var wbNo: EditText
|
||||
private lateinit var pickNo: EditText
|
||||
private lateinit var scanIcon: ImageView
|
||||
private lateinit var wbScanIcon: ImageView
|
||||
private lateinit var searchLayout: LinearLayout
|
||||
private lateinit var checkIcon: ImageView
|
||||
private lateinit var quickSearch: EditText
|
||||
private var isAllCheck = true
|
||||
|
||||
//筛选页
|
||||
private lateinit var searchListFragment: LinearLayout
|
||||
private lateinit var filtrateLayout: LinearLayout
|
||||
private lateinit var filtrateFragment: LinearLayout
|
||||
private lateinit var agentCode: TextView
|
||||
private var agentCodeValue = ""
|
||||
private lateinit var submit: TextView
|
||||
private lateinit var reset: TextView
|
||||
|
||||
//列表
|
||||
private lateinit var listLayout: LinearLayout
|
||||
private lateinit var totalLayout: LinearLayout
|
||||
|
||||
//底部
|
||||
private lateinit var totalPc: TextView
|
||||
private lateinit var totalWeight: TextView
|
||||
private lateinit var selPc: TextView
|
||||
private lateinit var send: TextView
|
||||
|
||||
private fun initView() {
|
||||
viewModel = ViewModelProvider(this).get(GnjChuKuListViewModel::class.java)
|
||||
val layoutManager = LinearLayoutManager(this)
|
||||
adapter = GnjChuKuListAdapter(this, viewModel, collectList)
|
||||
var recyclerView: RecyclerView = findViewById(R.id.collectList)
|
||||
recyclerView.layoutManager = layoutManager
|
||||
recyclerView.adapter = adapter
|
||||
refreshLayout = findViewById(R.id.refreshLayout)
|
||||
|
||||
//标题
|
||||
toolBack = findViewById(R.id.tool_back)
|
||||
titleName = findViewById(R.id.title_name)
|
||||
|
||||
beginDate = findViewById(R.id.beginDate)
|
||||
beginDateIcon = findViewById(R.id.beginDateIcon)
|
||||
endDate = findViewById(R.id.endDate)
|
||||
endDateIcon = findViewById(R.id.endDateIcon)
|
||||
wbNo = findViewById(R.id.wbNo)
|
||||
pickNo = findViewById(R.id.pickNo)
|
||||
scanIcon = findViewById(R.id.scanIcon)
|
||||
wbScanIcon = findViewById(R.id.wbScanIcon)
|
||||
|
||||
searchLayout = findViewById(R.id.searchLayout)
|
||||
filtrateLayout = findViewById(R.id.filtrateLayout)
|
||||
checkIcon = findViewById(R.id.checkIcon)
|
||||
quickSearch = findViewById(R.id.quickSearch)
|
||||
|
||||
//筛选页
|
||||
searchListFragment = findViewById(R.id.searchListFragment)
|
||||
filtrateFragment = findViewById(R.id.filtrateFragment)
|
||||
agentCode = findViewById(R.id.agentCode)
|
||||
submit = findViewById(R.id.submit)
|
||||
reset = findViewById(R.id.reset)
|
||||
|
||||
//列表
|
||||
listLayout = findViewById(R.id.listLayout)
|
||||
totalLayout = findViewById(R.id.totalLayout)
|
||||
//底部
|
||||
totalPc = findViewById(R.id.totalPc)
|
||||
totalWeight = findViewById(R.id.totalWeight)
|
||||
selPc = findViewById(R.id.selPc)
|
||||
send = findViewById(R.id.send)
|
||||
|
||||
toolBack.setOnClickListener(this)
|
||||
|
||||
beginDate.setOnClickListener(this)
|
||||
beginDateIcon.setOnClickListener(this)
|
||||
endDate.setOnClickListener(this)
|
||||
endDateIcon.setOnClickListener(this)
|
||||
scanIcon.setOnClickListener(this)
|
||||
wbScanIcon.setOnClickListener(this)
|
||||
|
||||
searchLayout.setOnClickListener(this)
|
||||
checkIcon.setOnClickListener(this)
|
||||
send.setOnClickListener(this)
|
||||
|
||||
filtrateLayout.setOnClickListener(this)
|
||||
agentCode.setOnClickListener(this)
|
||||
submit.setOnClickListener(this)
|
||||
reset.setOnClickListener(this)
|
||||
|
||||
wbNo.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
if (s != null && s.toString() != "" && s.length == 4) {
|
||||
viewModel.queryWbNoGnjChuKu(s.toString())
|
||||
}
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
quickSearch.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
if (s != null && s.toString() != "") {
|
||||
val filterCollectionList = collectList.filter { c -> c.wbNo.contains(s.toString()) }
|
||||
recyclerView.adapter = GnjChuKuListAdapter(
|
||||
ActivityCollector.getLastActivity()!!,
|
||||
viewModel,
|
||||
filterCollectionList as MutableList<GnjChuKuListModel>
|
||||
)
|
||||
} else {
|
||||
recyclerView.adapter = GnjChuKuListAdapter(
|
||||
ActivityCollector.getLastActivity()!!,
|
||||
viewModel,
|
||||
collectList
|
||||
)
|
||||
}
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
beginDate.text = ymdSdf.format(Date())//tw2024年4月13日15:57:10 要求航班日期默认当天
|
||||
endDate.text = ymdSdf.format(Date())//tw2024年4月13日15:57:10 要求航班日期默认当天
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_gnj_chu_ku_list)
|
||||
setBackArrow("国内进港出库")
|
||||
initView()
|
||||
//查询返回结果
|
||||
viewModel.searchParamLive.observe(this) {
|
||||
loadingCancel()
|
||||
//1.获取数据
|
||||
var listArr: JSONArray = it["list"] as JSONArray
|
||||
totalCount = it.getIntValue("total")
|
||||
totalWeightValue = it.getDoubleValue("totalWeight")
|
||||
totalPage = it["pages"] as Int
|
||||
// var listArr :JSONArray =it["list"] as JSONArray
|
||||
if (listArr.size > 0) {
|
||||
listLayout.visibility = View.VISIBLE
|
||||
totalLayout.visibility = View.VISIBLE
|
||||
//2.循环遍历塞入collectList
|
||||
listArr.forEach {
|
||||
val itemObj = it as JSONObject
|
||||
|
||||
val id = itemObj.getIntValue("id")
|
||||
val pkId = itemObj.getString("pkId") ?: ""
|
||||
val no = itemObj.getString("wbNo") ?: ""
|
||||
val fno = itemObj.getString("fno") ?: ""
|
||||
val pc = itemObj.getIntValue("pc")
|
||||
val weight = itemObj.getDoubleValue("weight")//实到重量
|
||||
|
||||
val goods = itemObj.getString("goods") ?: ""
|
||||
val agentCode = itemObj.getString("agentCode") ?: ""
|
||||
val spCode = itemObj.getString("spCode") ?: ""
|
||||
val pickDate = itemObj.getString("chargeTime") ?: ""
|
||||
|
||||
//列表赋值
|
||||
collectList.add(
|
||||
GnjChuKuListModel(
|
||||
id,
|
||||
no,
|
||||
pkId,
|
||||
fno,
|
||||
pc,
|
||||
weight,
|
||||
"9999-99-99",
|
||||
goods,
|
||||
agentCode,
|
||||
spCode,
|
||||
pickDate, false
|
||||
)
|
||||
)
|
||||
}
|
||||
//3.调adpter展示
|
||||
if (currentPage == 1) {
|
||||
adapter.notifyDataSetChanged()
|
||||
} else {
|
||||
adapter.notifyItemRangeInserted((currentPage - 1) * 10, collectList.size)
|
||||
}
|
||||
refreshLayout.finishRefresh()
|
||||
refreshLayout.finishLoadMore()
|
||||
|
||||
}
|
||||
|
||||
totalPc.text = totalCount.toString()
|
||||
totalWeight.text = totalWeightValue.toString()
|
||||
selPc.text = viewModel.checkCount.value.toString()
|
||||
}
|
||||
|
||||
//查询运单号四位返回结果
|
||||
viewModel.viewModelScope.launch {
|
||||
viewModel.queryWbNoGnjChuKuParamLive.collect {
|
||||
//1.获取数据
|
||||
if (it["status"] == Constant.Result.succ && it.getJSONArray("data").size > 0) {
|
||||
val tempArr = JSONArray()
|
||||
it.getJSONArray("data").forEach { wayNo ->
|
||||
val tempObj = JSONObject()
|
||||
tempObj["name"] = wayNo.toString()
|
||||
tempObj["code"] = wayNo.toString()
|
||||
tempArr.add(tempObj)
|
||||
}
|
||||
|
||||
Common.singleSelect(ActivityCollector.getLastActivity()!!, "请选择运单号", tempArr, "") { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
wbNo.setText(code)
|
||||
resetSearch()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//根据id返回结果
|
||||
viewModel.queryPickByIdGnjChuKuObserver.observe(this) {
|
||||
loadingCancel()
|
||||
//1.获取数据
|
||||
var status = it.getString("status")
|
||||
if (status == Constant.Result.succ) {
|
||||
var itemObj = it.getJSONObject("data")
|
||||
val id = itemObj.getIntValue("id")
|
||||
val pkId = itemObj.getString("pkId") ?: ""
|
||||
val no = itemObj.getString("wbNo") ?: ""
|
||||
val fno = itemObj.getString("fno") ?: ""
|
||||
val pc = itemObj.getIntValue("pc")
|
||||
val weight = itemObj.getDoubleValue("weight")//实到重量
|
||||
|
||||
val goods = itemObj.getString("goods") ?: ""
|
||||
val agentCode = itemObj.getString("agentCode") ?: ""
|
||||
val spCode = itemObj.getString("spCode") ?: ""
|
||||
val pickDate = itemObj.getString("chargeTime") ?: ""
|
||||
|
||||
//列表赋值
|
||||
collectList.add(
|
||||
GnjChuKuListModel(
|
||||
id,
|
||||
no,
|
||||
pkId,
|
||||
fno,
|
||||
pc,
|
||||
weight,
|
||||
"9999-99-99",
|
||||
goods,
|
||||
agentCode,
|
||||
spCode,
|
||||
pickDate, false
|
||||
)
|
||||
)
|
||||
|
||||
//3.调adpter展示
|
||||
adapter.notifyDataSetChanged()
|
||||
refreshLayout.finishRefresh()
|
||||
refreshLayout.finishLoadMore()
|
||||
|
||||
totalCount = 1
|
||||
viewModel.setCheckCount(0, 0.0)
|
||||
totalPc.text = totalCount.toString()
|
||||
totalWeight.text = totalWeightValue.toString()
|
||||
selPc.text = viewModel.checkCount.value.toString()
|
||||
}
|
||||
}
|
||||
|
||||
//货物发放 返回结果
|
||||
viewModel.completedGnjChuKuObserver.observe(this) {
|
||||
loadingCancel()
|
||||
val status = it.getString("status")
|
||||
val msg = it.getString("msg")
|
||||
if (Constant.Result.succ == status) {
|
||||
var dataStatus = it.getString("data")
|
||||
if (Constant.Result.succ == dataStatus) {
|
||||
if (msg != null && msg != "") {
|
||||
Common.showToast(this, msg)
|
||||
} else {
|
||||
Common.showToast(this, "出库成功!")
|
||||
}
|
||||
} else {
|
||||
if (msg != null && msg != "") {
|
||||
Common.showToast(this, msg)
|
||||
} else {
|
||||
Common.showToast(this, "出库失败!")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (msg != null && msg != "") {
|
||||
Common.showToast(this, msg)
|
||||
} else {
|
||||
Common.showToast(this, "出库失败!")
|
||||
}
|
||||
}
|
||||
//重新刷新列表
|
||||
resetSearch()
|
||||
}
|
||||
|
||||
//监听 复选框选中
|
||||
viewModel.checkCount.observe(this) {
|
||||
selPc.text = it.toString()
|
||||
}
|
||||
//监听 复选框选中
|
||||
viewModel.checkCountWeight.observe(this) {
|
||||
// totalWeight.text = it.toString()
|
||||
}
|
||||
|
||||
//搜索
|
||||
resetSearch()
|
||||
|
||||
/////////////////////////////// 加载刷新的布局
|
||||
refreshLayout.setRefreshHeader(ClassicsHeader(this))
|
||||
refreshLayout.setRefreshFooter(ClassicsFooter(this))
|
||||
/////////////////////////////// 下拉刷新
|
||||
refreshLayout.setOnRefreshListener {
|
||||
resetSearch()
|
||||
}
|
||||
/////////////////////////////// 上拉加载
|
||||
refreshLayout.setOnLoadMoreListener {
|
||||
if (currentPage < totalPage) {
|
||||
currentPage++
|
||||
//初始化查询
|
||||
searchFun()
|
||||
} else {
|
||||
refreshLayout.finishLoadMoreWithNoMoreData()
|
||||
}
|
||||
}
|
||||
|
||||
/////////////// 下拉框 start
|
||||
viewModel.agentCode(System.currentTimeMillis().toString())
|
||||
viewModel.agentCodeObserver.observe(this) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择代理人"
|
||||
noneObj["code"] = ""
|
||||
viewModel.agentCodeList.add(noneObj)
|
||||
viewModel.agentCodeList.addAll(vd.getJSONArray("data"))
|
||||
}
|
||||
/////////////// 下拉框 end
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
when (it.id) {
|
||||
R.id.tool_back -> {
|
||||
if (searchListFragment.visibility == View.GONE && filtrateFragment.visibility == View.VISIBLE) {
|
||||
searchListFragment.visibility = View.VISIBLE
|
||||
filtrateFragment.visibility = View.GONE
|
||||
titleName.text = currentTitleName
|
||||
} else {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
R.id.beginDate -> {
|
||||
Common.onYearMonthDay(this, beginDate.text.toString()) { year, month, day ->
|
||||
calendar.set(year, month - 1, day)
|
||||
beginDate.text = ymdSdf.format(calendar.time)
|
||||
}
|
||||
}
|
||||
R.id.beginDateIcon -> {
|
||||
beginDate.text = ""
|
||||
}
|
||||
R.id.endDate -> {
|
||||
Common.onYearMonthDay(this, endDate.text.toString()) { year, month, day ->
|
||||
calendar.set(year, month - 1, day)
|
||||
endDate.text = ymdSdf.format(calendar.time)
|
||||
}
|
||||
}
|
||||
R.id.endDateIcon -> {
|
||||
endDate.text = ""
|
||||
}
|
||||
R.id.scanIcon -> {
|
||||
scanCode(Constant.RequestCode.gnj_chu_ku_list)
|
||||
}
|
||||
R.id.wbScanIcon -> {
|
||||
scanCode(Constant.RequestCode.gnj_chu_ku_waybill)
|
||||
}
|
||||
R.id.searchLayout -> {
|
||||
// viewModel.queryPickByIdGnjChuKu("M000995643")
|
||||
resetSearch()
|
||||
}
|
||||
R.id.filtrateLayout -> {
|
||||
if (searchListFragment.visibility == View.VISIBLE && filtrateFragment.visibility == View.GONE) {
|
||||
searchListFragment.visibility = View.GONE
|
||||
filtrateFragment.visibility = View.VISIBLE
|
||||
titleName.text = "搜索"
|
||||
} else {
|
||||
searchListFragment.visibility = View.VISIBLE
|
||||
filtrateFragment.visibility = View.GONE
|
||||
titleName.text = currentTitleName
|
||||
}
|
||||
}
|
||||
R.id.checkIcon -> {
|
||||
collectList.forEach { c ->
|
||||
c.isCheck = isAllCheck
|
||||
}
|
||||
if (isAllCheck) {
|
||||
viewModel.setCheckCount(totalCount, totalWeightValue)
|
||||
} else {
|
||||
viewModel.setCheckCount(0, 0.0)
|
||||
}
|
||||
//重置 isAllCheck
|
||||
isAllCheck = !isAllCheck
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
R.id.send -> {
|
||||
val ids = collectList.filter { c -> c.isCheck }.map { c -> c.id }
|
||||
viewModel.completedGnjChuKu(ids)
|
||||
}
|
||||
R.id.agentCode -> {
|
||||
Common.singleSelect(this, "代理", viewModel.agentCodeList, agentCodeValue) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
agentCode.text = name
|
||||
agentCodeValue = code
|
||||
}
|
||||
}
|
||||
R.id.submit -> {
|
||||
//筛选页隐藏
|
||||
searchListFragment.visibility = View.VISIBLE
|
||||
filtrateFragment.visibility = View.GONE
|
||||
titleName.text = currentTitleName
|
||||
//搜索
|
||||
resetSearch()
|
||||
}
|
||||
R.id.reset -> {
|
||||
resetFun()
|
||||
}
|
||||
else -> {
|
||||
Toast.makeText(this, "未找到对应操作", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码返回的结果
|
||||
*/
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
// 扫描二维码/条码回传
|
||||
if (resultCode == RESULT_OK && data != null) {
|
||||
val content = data.getStringExtra(com.yzq.zxinglibrary.common.Constant.CODED_CONTENT)
|
||||
if (content == null) {
|
||||
Common.showToast(this, "条码错误!")
|
||||
return
|
||||
}
|
||||
when (requestCode) {
|
||||
Constant.RequestCode.gnj_chu_ku_list -> {
|
||||
collectList.clear()
|
||||
pickNo.setText("$content")
|
||||
viewModel.queryPickByIdGnjChuKu(content)
|
||||
}
|
||||
Constant.RequestCode.gnj_chu_ku_waybill -> {
|
||||
wbNo.setText("$content")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
private fun searchFun() {
|
||||
loading()
|
||||
listLayout.visibility = View.GONE
|
||||
totalLayout.visibility = View.GONE
|
||||
viewModel.search(
|
||||
pageSize,
|
||||
currentPage,
|
||||
wbNo.text.toString(),
|
||||
agentCode.text.toString(),
|
||||
pickNo.text.toString(),
|
||||
// startDate.text.toString(),
|
||||
// endDate.text.toString()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置数据,搜索
|
||||
*/
|
||||
private fun resetSearch() {
|
||||
//recyclerView 清除所有数据数据
|
||||
viewModel.setCheckCount(0, 0.0)
|
||||
refreshLayout.setNoMoreData(false)
|
||||
adapter.notifyItemRangeRemoved(0, collectList.size)
|
||||
collectList.clear()
|
||||
currentPage = 1
|
||||
searchFun()
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置筛选条件
|
||||
*/
|
||||
private fun resetFun() {
|
||||
currentPage = 1
|
||||
// startDate.text = "${ymdSdf.format(Date())} 00:00:00"
|
||||
// endDate.text = "${ymdSdf.format(Date())} 23:59:59"
|
||||
wbNo.setText("")
|
||||
pickNo.setText("")
|
||||
|
||||
agentCode.text = ""
|
||||
agentCodeValue = ""
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
package com.lukouguoji.gnj.activity
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.core.widget.NestedScrollView
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.facade.annotation.Autowired
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.adapt.GnjQueryInfoListAdapter
|
||||
import com.lukouguoji.gnj.adapt.GnjQueryInfoWhListAdapter
|
||||
import com.lukouguoji.gnj.model.GnjQueryInfo
|
||||
import com.lukouguoji.gnj.model.GnjQueryInfoWh
|
||||
import com.lukouguoji.gnj.viewModel.GnjQueryInfoViewModel
|
||||
import com.lukouguoji.module_base.BaseActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_QUERY_INFO)
|
||||
class GnjQueryInfoActivity : BaseActivity(), View.OnClickListener {
|
||||
|
||||
private lateinit var viewModel: GnjQueryInfoViewModel
|
||||
|
||||
private lateinit var scrollView: NestedScrollView
|
||||
private lateinit var gncQueryInfoList: RecyclerView
|
||||
private lateinit var adapter: GnjQueryInfoListAdapter
|
||||
private val gncQueryInfoAdapterList = arrayListOf<GnjQueryInfo>()
|
||||
|
||||
private lateinit var submit: TextView
|
||||
|
||||
private lateinit var refWareHouseInfo: LinearLayout
|
||||
private lateinit var wareHouseInfoLayout: LinearLayout
|
||||
private lateinit var gncQueryWareHouseInfoList: RecyclerView
|
||||
private lateinit var wareHouseInfoAdapter: GnjQueryInfoWhListAdapter
|
||||
private val gncQueryWareHouseInfoAdapterList = arrayListOf<GnjQueryInfoWh>()
|
||||
|
||||
@JvmField
|
||||
@Autowired
|
||||
var id: Int = -9999
|
||||
|
||||
@JvmField
|
||||
@Autowired
|
||||
var wbNoParam: String? = null
|
||||
|
||||
private fun initView() {
|
||||
viewModel = ViewModelProvider(this).get(GnjQueryInfoViewModel::class.java)
|
||||
|
||||
scrollView = findViewById(R.id.scrollView)
|
||||
refWareHouseInfo = findViewById(R.id.refWareHouseInfo)
|
||||
wareHouseInfoLayout = findViewById(R.id.wareHouseInfoLayout)
|
||||
submit = findViewById(R.id.submit)
|
||||
|
||||
val layoutManager = GridLayoutManager(this, 2)
|
||||
adapter = GnjQueryInfoListAdapter(this, gncQueryInfoAdapterList)
|
||||
gncQueryInfoList = findViewById(R.id.gncQueryInfoList)
|
||||
gncQueryInfoList.adapter = adapter
|
||||
gncQueryInfoList.layoutManager = layoutManager
|
||||
|
||||
val wareHouseLayoutManager = LinearLayoutManager(this)
|
||||
wareHouseInfoAdapter = GnjQueryInfoWhListAdapter(this, gncQueryWareHouseInfoAdapterList)
|
||||
gncQueryWareHouseInfoList = findViewById(R.id.gncQueryWareHouseInfoList)
|
||||
gncQueryWareHouseInfoList.adapter = wareHouseInfoAdapter
|
||||
gncQueryWareHouseInfoList.layoutManager = wareHouseLayoutManager
|
||||
|
||||
refWareHouseInfo.setOnClickListener(this)
|
||||
submit.setOnClickListener(this)
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_gnj_query_info)
|
||||
setBackArrow("国内进港查询详情")
|
||||
initView()
|
||||
|
||||
viewModel.queryWaybillById(id, wbNoParam)
|
||||
viewModel.waybillLiveData.observe(this) {
|
||||
val status = it.getString("status")
|
||||
if (Constant.Result.succ == status) {
|
||||
viewModel.wayBillInfo = it.getJSONObject("data")
|
||||
//主运单详情
|
||||
val maWbObj = viewModel.wayBillInfo.getJSONObject("maWb")
|
||||
adapter.append(GnjQueryInfo(1, "运单号", maWbObj.getString("wbNo") ?: ""))
|
||||
viewModel.wbNo = maWbObj.getString("wbNo")
|
||||
adapter.append(GnjQueryInfo(1, "件数", maWbObj.getIntValue("pc").toString()))
|
||||
adapter.append(
|
||||
GnjQueryInfo(
|
||||
1,
|
||||
"重量",
|
||||
"${maWbObj.getDoubleValue("weight")} KG"
|
||||
)
|
||||
)
|
||||
adapter.append(GnjQueryInfo(1, "承运人", maWbObj.getString("by1") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "目的港", maWbObj.getString("dest") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "品名", maWbObj.getString("goods") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "特码", maWbObj.getString("spCode") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "代理", maWbObj.getString("agentCode") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "运单类型", maWbObj.getString("awbType") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "业务类型", maWbObj.getString("businessType") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "包装类型", maWbObj.getString("packageType") ?: ""))
|
||||
/*adapter.append(GnjQueryInfo(1, "卸货港", maWbObj.getString("dest1") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "危险品描述", maWbObj.getString("dgrDetail") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "危险品库位", maWbObj.getString("dgrLocation") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "航班", maWbObj.getString("flight") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "入库时间", maWbObj.getString("opDate") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "出库时间", maWbObj.getString("mclose") ?: ""))
|
||||
adapter.append(GnjQueryInfo(1, "收运人", maWbObj.getString("opId") ?: ""))*/
|
||||
|
||||
//关联仓库详情
|
||||
val whListArr = viewModel.wayBillInfo.getJSONArray("whList")
|
||||
whListArr.forEach { waybill ->
|
||||
val waybillObj = waybill as JSONObject
|
||||
wareHouseInfoAdapter.append(
|
||||
GnjQueryInfoWh(
|
||||
1,
|
||||
waybillObj.getString("wbNo") ?: "",
|
||||
waybillObj.getString("location") ?: "",
|
||||
waybillObj.getIntValue("pc"),
|
||||
waybillObj.getDoubleValue("weight"),
|
||||
waybillObj.getString("flight") ?: "",
|
||||
waybillObj.getString("opDate") ?: "",
|
||||
waybillObj.getString("chargeTime") ?: "",
|
||||
waybillObj.getString("opId") ?: ""
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
} else {
|
||||
//无数据
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
when (it.id) {
|
||||
R.id.refWareHouseInfo -> {
|
||||
//开关关联列表
|
||||
if (wareHouseInfoLayout.visibility == View.GONE) {
|
||||
wareHouseInfoLayout.visibility = View.VISIBLE
|
||||
} else {
|
||||
wareHouseInfoLayout.visibility = View.GONE
|
||||
}
|
||||
scrollView.post { scrollView.scrollTo(0, scrollView.bottom) }
|
||||
}
|
||||
R.id.submit -> {
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_CARGO_TRACKING)
|
||||
.withString("countryTypeParam", Constant.CargoTracking.gnStatus)
|
||||
.withString("ieFlagParam", Constant.CargoTracking.importStatus)
|
||||
.withString("wbNoParam", viewModel.wbNo)
|
||||
.navigation()
|
||||
}
|
||||
else -> {
|
||||
Toast.makeText(this, "未找到对应操作", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,524 @@
|
||||
package com.lukouguoji.gnj.activity
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.adapt.GnjQueryListAdapter
|
||||
import com.lukouguoji.gnj.model.GnjQueryList
|
||||
import com.lukouguoji.gnj.viewModel.GnjQueryListViewModel
|
||||
import com.lukouguoji.module_base.BaseActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
import com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
import com.scwang.smart.refresh.header.ClassicsHeader
|
||||
import com.scwang.smart.refresh.layout.api.RefreshLayout
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_QUERY_LIST)
|
||||
class GnjQueryListActivity : BaseActivity(), View.OnClickListener {
|
||||
private lateinit var viewModel: GnjQueryListViewModel
|
||||
|
||||
private lateinit var adapter: GnjQueryListAdapter
|
||||
private val collectList = ArrayList<GnjQueryList>()
|
||||
|
||||
private var currentPage = 1
|
||||
private var pageSize = 10
|
||||
private var totalPage = 0
|
||||
private lateinit var refreshLayout: RefreshLayout
|
||||
|
||||
//标题
|
||||
private lateinit var toolBack: LinearLayout
|
||||
private lateinit var titleName: TextView
|
||||
|
||||
//搜索条件
|
||||
private lateinit var beginDate: TextView
|
||||
private lateinit var beginDateIcon: ImageView
|
||||
private lateinit var endDate: TextView
|
||||
private lateinit var endDateIcon: ImageView
|
||||
private lateinit var searchListFragment: LinearLayout
|
||||
private lateinit var filtrateLayout: LinearLayout
|
||||
private lateinit var wbNo: EditText
|
||||
private lateinit var fno: EditText
|
||||
private lateinit var mudiGang: EditText
|
||||
private lateinit var searchLayout: LinearLayout
|
||||
|
||||
//筛选页
|
||||
private lateinit var filtrateFragment: LinearLayout
|
||||
|
||||
/* private lateinit var startDateParam: TextView
|
||||
private lateinit var endDateParam: TextView
|
||||
private lateinit var hangCheng: EditText
|
||||
private lateinit var carrier: EditText
|
||||
private lateinit var kuWei: EditText*/
|
||||
private lateinit var spCode: TextView
|
||||
private var spCodeValue = ""
|
||||
private lateinit var agentCode: TextView
|
||||
private var agentCodeValue = ""
|
||||
private lateinit var goods: EditText
|
||||
private lateinit var awbType: TextView
|
||||
private var awbTypeValue = ""
|
||||
private lateinit var businessType: TextView
|
||||
private var businessTypeValue = ""
|
||||
|
||||
/*private lateinit var isCangDan: TextView
|
||||
private var isCangDanStatus = ""
|
||||
private val isCangDanArr = JSONArray()*/
|
||||
private lateinit var submit: TextView
|
||||
private lateinit var reset: TextView
|
||||
|
||||
// 、、特码、代理人、品名、运单类型、业务类型查询
|
||||
|
||||
|
||||
private val ymdSdf = SimpleDateFormat("yyyy-MM-dd")//年月日
|
||||
private val ymdHmsSdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")//年月日 时分秒
|
||||
private val calendar = Calendar.getInstance()
|
||||
|
||||
private fun initView() {
|
||||
viewModel = ViewModelProvider(this).get(GnjQueryListViewModel::class.java)
|
||||
val layoutManager = LinearLayoutManager(this)
|
||||
adapter = GnjQueryListAdapter(this, collectList)
|
||||
var recyclerView: RecyclerView = findViewById(R.id.recyclerList)
|
||||
recyclerView.layoutManager = layoutManager
|
||||
recyclerView.adapter = adapter
|
||||
|
||||
//标题
|
||||
toolBack = findViewById(R.id.tool_back)
|
||||
titleName = findViewById(R.id.title_name)
|
||||
//搜索列表页
|
||||
searchListFragment = findViewById(R.id.searchListFragment)
|
||||
wbNo = findViewById(R.id.wbNo)
|
||||
fno = findViewById(R.id.fno)
|
||||
beginDate = findViewById(R.id.beginDate)
|
||||
beginDateIcon = findViewById(R.id.beginDateIcon)
|
||||
endDate = findViewById(R.id.endDate)
|
||||
endDateIcon = findViewById(R.id.endDateIcon)
|
||||
mudiGang = findViewById(R.id.mudiGang)
|
||||
searchLayout = findViewById(R.id.searchLayout)
|
||||
filtrateLayout = findViewById(R.id.filtrateLayout)
|
||||
//筛选页
|
||||
filtrateFragment = findViewById(R.id.filtrateFragment)
|
||||
/*startDateParam = findViewById(R.id.startDateParam)
|
||||
endDateParam = findViewById(R.id.endDateParam)
|
||||
isCangDan = findViewById(R.id.isCangDan)
|
||||
hangCheng = findViewById(R.id.hangCheng)
|
||||
carrier = findViewById(R.id.carrier)
|
||||
kuWei = findViewById(R.id.kuWei)*/
|
||||
goods = findViewById(R.id.goods)
|
||||
spCode = findViewById(R.id.spCode)
|
||||
agentCode = findViewById(R.id.agentCode)
|
||||
businessType = findViewById(R.id.businessType)
|
||||
awbType = findViewById(R.id.awbType)
|
||||
submit = findViewById(R.id.submit)
|
||||
reset = findViewById(R.id.reset)
|
||||
|
||||
toolBack.setOnClickListener(this)
|
||||
searchLayout.setOnClickListener(this)
|
||||
beginDate.setOnClickListener(this)
|
||||
beginDateIcon.setOnClickListener(this)
|
||||
endDate.setOnClickListener(this)
|
||||
endDateIcon.setOnClickListener(this)
|
||||
/*startDateParam.setOnClickListener(this)
|
||||
endDateParam.setOnClickListener(this)*/
|
||||
spCode.setOnClickListener(this)
|
||||
agentCode.setOnClickListener(this)
|
||||
businessType.setOnClickListener(this)
|
||||
awbType.setOnClickListener(this)
|
||||
// isCangDan.setOnClickListener(this)
|
||||
filtrateLayout.setOnClickListener(this)
|
||||
submit.setOnClickListener(this)
|
||||
reset.setOnClickListener(this)
|
||||
|
||||
fno.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(editable: Editable?) {
|
||||
val originText = editable.toString()
|
||||
if (originText != null && originText != "") {
|
||||
val regularExpression = "(^([A-Z0-9]+)$)"
|
||||
val matches = originText.matches(regularExpression.toRegex())
|
||||
if(!matches){
|
||||
val regularExpression2 = "([^A-Za-z0-9]+)"
|
||||
val replaceStr = originText.replace(regularExpression2.toRegex(),"")
|
||||
val replaceStrToUpper = replaceStr.uppercase(Locale.ROOT)//小写转大写
|
||||
fno.setText(replaceStrToUpper)
|
||||
fno.setSelection(replaceStrToUpper.length)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
mudiGang.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(editable: Editable?) {
|
||||
val originText = editable.toString()
|
||||
if (originText != null && originText != "") {
|
||||
val regularExpression = "(^([A-Z]+)$)"
|
||||
val matches = originText.matches(regularExpression.toRegex())
|
||||
if(!matches){
|
||||
val regularExpression2 = "([^A-Za-z]+)"
|
||||
val replaceStr = originText.replace(regularExpression2.toRegex(),"")
|
||||
val replaceStrToUpper = replaceStr.uppercase(Locale.ROOT)//小写转大写
|
||||
mudiGang.setText(replaceStrToUpper)
|
||||
mudiGang.setSelection(replaceStrToUpper.length)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
//是否上舱单
|
||||
/*val noneCangDan = JSONObject()
|
||||
noneCangDan["name"] = "请选择"
|
||||
noneCangDan["code"] = ""
|
||||
val yesCangDan = JSONObject()
|
||||
yesCangDan["name"] = "是"
|
||||
yesCangDan["code"] = "1"
|
||||
val noCangDan = JSONObject()
|
||||
noCangDan["name"] = "否"
|
||||
noCangDan["code"] = "0"
|
||||
isCangDanArr.add(noneCangDan)
|
||||
isCangDanArr.add(yesCangDan)
|
||||
isCangDanArr.add(noCangDan)*/
|
||||
|
||||
beginDate.text = ymdSdf.format(Date())//tw2022年6月13日15:57:10 要求航班日期默认当天
|
||||
endDate.text = ymdSdf.format(Date())//tw2022年6月13日15:57:10 要求航班日期默认当天
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_gnj_query_list)
|
||||
initView()
|
||||
|
||||
//初始化查询
|
||||
searchFun()
|
||||
loading()
|
||||
viewModel.searchParamLive.observe(this) {
|
||||
loadingCancel()
|
||||
//1.获取数据
|
||||
var listArr: JSONArray = it["list"] as JSONArray
|
||||
totalPage = it["pages"] as Int
|
||||
// var listArr :JSONArray =it["list"] as JSONArray
|
||||
if (listArr.size > 0) {
|
||||
//2.循环遍历塞入collectList
|
||||
listArr.forEach {
|
||||
val itemObj = it as JSONObject
|
||||
val id = itemObj.getIntValue("mawbId")
|
||||
val wbNo = itemObj.getString("wbNo") ?: ""
|
||||
val agentCode = itemObj.getString("agentCode") ?: ""
|
||||
val spCode = itemObj.getString("spCode") ?: ""
|
||||
val goods = itemObj.getString("goods") ?: ""
|
||||
val flight = itemObj.getString("flight") ?: ""
|
||||
val range = itemObj.getString("range") ?: ""
|
||||
|
||||
collectList.add(GnjQueryList(id, wbNo, agentCode, spCode, goods, flight, range))
|
||||
}
|
||||
//3.调adpter展示
|
||||
if (currentPage == 1) {
|
||||
adapter.notifyDataSetChanged()
|
||||
} else {
|
||||
adapter.notifyItemRangeInserted((currentPage - 1) * 10, collectList.size)
|
||||
}
|
||||
refreshLayout.finishRefresh()
|
||||
refreshLayout.finishLoadMore()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/////////////// 下拉框 start
|
||||
viewModel.agentCode(System.currentTimeMillis().toString())
|
||||
viewModel.agentCodeObserver.observe(this) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择代理人"
|
||||
noneObj["code"] = ""
|
||||
viewModel.agentCodeList.add(noneObj)
|
||||
viewModel.agentCodeList.addAll(vd.getJSONArray("data"))
|
||||
}
|
||||
|
||||
viewModel.business(Constant.businessType.CI)
|
||||
viewModel.businessObserver.observe(this) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择业务类型"
|
||||
noneObj["code"] = ""
|
||||
viewModel.businessList.add(noneObj)
|
||||
viewModel.businessList.addAll(vd.getJSONArray("data"))
|
||||
}
|
||||
|
||||
viewModel.specialCode(System.currentTimeMillis().toString())
|
||||
viewModel.specialCodeObserver.observe(this) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择特码"
|
||||
noneObj["code"] = ""
|
||||
viewModel.specialCodeList.add(noneObj)
|
||||
viewModel.specialCodeList.addAll(vd.getJSONArray("data"))
|
||||
}
|
||||
|
||||
viewModel.awb(System.currentTimeMillis().toString())
|
||||
viewModel.awbObserver.observe(this) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择运单类型"
|
||||
noneObj["code"] = ""
|
||||
viewModel.awbList.add(noneObj)
|
||||
viewModel.awbList.addAll(vd.getJSONArray("data"))
|
||||
}
|
||||
/////////////// 下拉框 end
|
||||
|
||||
/////////////////////////////// 加载刷新的布局
|
||||
refreshLayout = findViewById<View>(R.id.refreshLayout) as RefreshLayout
|
||||
refreshLayout.setRefreshHeader(ClassicsHeader(this))
|
||||
refreshLayout.setRefreshFooter(ClassicsFooter(this))
|
||||
/////////////////////////////// 下拉刷新
|
||||
refreshLayout.setOnRefreshListener {
|
||||
resetSearch()
|
||||
}
|
||||
/////////////////////////////// 上拉加载
|
||||
refreshLayout.setOnLoadMoreListener {
|
||||
if (currentPage < totalPage) {
|
||||
currentPage++
|
||||
//初始化查询
|
||||
searchFun()
|
||||
} else {
|
||||
refreshLayout.finishLoadMoreWithNoMoreData()
|
||||
}
|
||||
}
|
||||
|
||||
//点击扫码
|
||||
/*scanCodeImg.setOnClickListener {
|
||||
scanCode(Constant.RequestCode.gnc_query_list)
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
* onActivityResult 回调
|
||||
*/
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
|
||||
// 扫描二维码/条码回传
|
||||
/*if (requestCode == Constant.RequestCode.gnc_query_list && resultCode == RESULT_OK) {
|
||||
if (data != null) {
|
||||
val content = data.getStringExtra(com.yzq.zxinglibrary.common.Constant.CODED_CONTENT)
|
||||
searchContent.setText("$content")
|
||||
|
||||
//调用接口查询进入详情页
|
||||
if (content != null && content != "") {
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GNC_QUERY_INFO).withString("wbNoParam", content)
|
||||
.navigation(this)
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
when (it.id) {
|
||||
R.id.tool_back -> {
|
||||
if (searchListFragment.visibility == View.GONE && filtrateFragment.visibility == View.VISIBLE) {
|
||||
searchListFragment.visibility = View.VISIBLE
|
||||
filtrateFragment.visibility = View.GONE
|
||||
titleName.text = "国内进港查询"
|
||||
} else {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
R.id.searchLayout -> {
|
||||
resetSearch()
|
||||
}
|
||||
R.id.filtrateLayout -> {
|
||||
if (searchListFragment.visibility == View.VISIBLE && filtrateFragment.visibility == View.GONE) {
|
||||
searchListFragment.visibility = View.GONE
|
||||
filtrateFragment.visibility = View.VISIBLE
|
||||
titleName.text = "搜索"
|
||||
} else {
|
||||
searchListFragment.visibility = View.VISIBLE
|
||||
filtrateFragment.visibility = View.GONE
|
||||
titleName.text = "国内进港查询"
|
||||
}
|
||||
// Common.showToast(this,"筛选")
|
||||
}
|
||||
R.id.beginDate -> {
|
||||
Common.onYearMonthDay(this, beginDate.text.toString()) { year, month, day ->
|
||||
calendar.set(year, month - 1, day)
|
||||
beginDate.text = ymdSdf.format(calendar.time)
|
||||
}
|
||||
}
|
||||
R.id.beginDateIcon -> {
|
||||
beginDate.text = ""
|
||||
}
|
||||
R.id.endDate -> {
|
||||
Common.onYearMonthDay(this, endDate.text.toString()) { year, month, day ->
|
||||
calendar.set(year, month - 1, day)
|
||||
endDate.text = ymdSdf.format(calendar.time)
|
||||
}
|
||||
}
|
||||
R.id.endDateIcon -> {
|
||||
endDate.text = ""
|
||||
}
|
||||
/* R.id.startDateParam -> {
|
||||
Common.onYearMonthDayTime(this, startDateParam.text.toString()) { year, month, day, hour, minute, second ->
|
||||
calendar.set(year, month - 1, day, hour, minute, second)
|
||||
startDateParam.text = ymdHmsSdf.format(calendar.time)
|
||||
}
|
||||
}
|
||||
R.id.endDateParam -> {
|
||||
Common.onYearMonthDayTime(this, endDateParam.text.toString()) { year, month, day, hour, minute, second ->
|
||||
calendar.set(year, month - 1, day, hour, minute, second)
|
||||
endDateParam.text = ymdHmsSdf.format(calendar.time)
|
||||
}
|
||||
}*/
|
||||
R.id.agentCode -> {
|
||||
Common.singleSelect(this, "代理", viewModel.agentCodeList, agentCodeValue) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
agentCode.text = name
|
||||
agentCodeValue = code
|
||||
}
|
||||
}
|
||||
R.id.businessType -> {
|
||||
Common.singleSelect(this, "业务类型", viewModel.businessList, businessTypeValue) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
businessType.text = name
|
||||
businessTypeValue = code
|
||||
}
|
||||
}
|
||||
R.id.spCode -> {
|
||||
Common.singleSelect(this, "特码", viewModel.specialCodeList, spCodeValue) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
spCode.text = name
|
||||
spCodeValue = code
|
||||
}
|
||||
}
|
||||
R.id.awbType -> {
|
||||
Common.singleSelect(this, "运单类型", viewModel.awbList, awbTypeValue) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
awbType.text = name
|
||||
awbTypeValue = code
|
||||
}
|
||||
}
|
||||
/*R.id.isCangDan -> {
|
||||
Common.singleSelect(this, "是否上舱单", isCangDanArr, isCangDanStatus) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
isCangDan.text = name
|
||||
isCangDanStatus = code
|
||||
}
|
||||
// Common.showToast(this,"筛选")
|
||||
}*/
|
||||
R.id.submit -> {
|
||||
//筛选页隐藏
|
||||
searchListFragment.visibility = View.VISIBLE
|
||||
filtrateFragment.visibility = View.GONE
|
||||
titleName.text = "国内进港查询"
|
||||
//搜索
|
||||
resetSearch()
|
||||
}
|
||||
R.id.reset -> {
|
||||
resetFun()
|
||||
}
|
||||
else -> {
|
||||
Toast.makeText(this, "未找到对应操作", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
private fun searchFun() {
|
||||
viewModel.search(
|
||||
pageSize,
|
||||
currentPage,
|
||||
"", // carrier.text.toString(),
|
||||
agentCodeValue,
|
||||
awbTypeValue,
|
||||
beginDate.text.toString(),// startDateParam.text.toString(),
|
||||
endDate.text.toString(),// endDateParam.text.toString(),
|
||||
"",
|
||||
fno.text.toString(),
|
||||
mudiGang.text.toString(),
|
||||
"",// kuWei.text.toString(),
|
||||
"",// hangCheng.text.toString(),
|
||||
businessTypeValue,
|
||||
"",// isCangDanStatus,
|
||||
wbNo.text.toString(),
|
||||
spCodeValue,
|
||||
goods.text.toString()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置数据,搜索
|
||||
*/
|
||||
private fun resetSearch() {
|
||||
//recyclerView 清除所有数据数据
|
||||
refreshLayout.setNoMoreData(false)
|
||||
adapter.notifyItemRangeRemoved(0, collectList.size)
|
||||
collectList.clear()
|
||||
currentPage = 1
|
||||
searchFun()
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置筛选条件
|
||||
*/
|
||||
private fun resetFun() {
|
||||
currentPage = 1
|
||||
|
||||
wbNo.setText("")
|
||||
mudiGang.setText("")
|
||||
/* carrier.setText("")
|
||||
startDateParam.text = ""
|
||||
endDateParam.text = ""
|
||||
kuWei.setText("")
|
||||
hangCheng.setText("")*/
|
||||
beginDate.text = ""
|
||||
endDate.text = ""
|
||||
fno.setText("")
|
||||
|
||||
spCode.text = ""
|
||||
spCodeValue = ""
|
||||
agentCode.text = ""
|
||||
agentCodeValue = ""
|
||||
goods.setText("")
|
||||
businessType.text = ""
|
||||
businessTypeValue = ""
|
||||
awbType.text = ""
|
||||
awbTypeValue = ""
|
||||
|
||||
/*isCangDan.text = ""
|
||||
isCangDanStatus = ""*/
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,391 @@
|
||||
package com.lukouguoji.gnj.activity
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.AlertDialog
|
||||
import android.content.DialogInterface
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.adapt.GnjRuKuRefListAdapter
|
||||
import com.lukouguoji.gnj.model.GnjRuKuRef
|
||||
import com.lukouguoji.gnj.viewModel.GnjRuKuViewModel
|
||||
import com.lukouguoji.module_base.BaseActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
import com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
import com.scwang.smart.refresh.header.ClassicsHeader
|
||||
import com.scwang.smart.refresh.layout.api.RefreshLayout
|
||||
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_RU_KU)
|
||||
class GnjRuKuActivity : BaseActivity(), View.OnClickListener {
|
||||
private lateinit var viewModel: GnjRuKuViewModel
|
||||
private lateinit var refreshLayout: RefreshLayout
|
||||
private var currentPage = 1
|
||||
private var pageSize = 10
|
||||
private var totalPage = 0
|
||||
|
||||
private lateinit var carNoScan: ImageView
|
||||
private lateinit var search: TextView
|
||||
private lateinit var searchContent: EditText
|
||||
private lateinit var addIcon: ImageView
|
||||
private lateinit var checkIcon: ImageView
|
||||
private var isAllCheck = false
|
||||
|
||||
private var dialogWaybillNo: EditText? = null
|
||||
|
||||
//关联运单号
|
||||
private lateinit var adapter: GnjRuKuRefListAdapter
|
||||
private lateinit var recyclerView: RecyclerView
|
||||
private lateinit var recyclerViewLayout: LinearLayout
|
||||
|
||||
|
||||
//确认
|
||||
private lateinit var operatorLayout: LinearLayout
|
||||
private lateinit var submit: TextView
|
||||
private lateinit var unloading: TextView
|
||||
|
||||
private fun initView() {
|
||||
// carNo = findViewById(R.id.carNo)
|
||||
carNoScan = findViewById(R.id.carNoScan)
|
||||
searchContent = findViewById(R.id.search_content)
|
||||
search = findViewById(R.id.search)
|
||||
addIcon = findViewById(R.id.addIcon)
|
||||
checkIcon = findViewById(R.id.checkIcon)
|
||||
operatorLayout = findViewById(R.id.operatorLayout)
|
||||
submit = findViewById(R.id.submit)
|
||||
unloading = findViewById(R.id.unloading)
|
||||
//加载列表
|
||||
recyclerViewLayout = findViewById(R.id.gnc_transfer_list_layout)
|
||||
val layoutManager = LinearLayoutManager(this)
|
||||
adapter = GnjRuKuRefListAdapter(this, viewModel.gncTransferRefList)
|
||||
recyclerView = findViewById(R.id.gnc_transfer_waybill_list)
|
||||
recyclerView.layoutManager = layoutManager
|
||||
recyclerView.adapter = adapter
|
||||
refreshLayout = findViewById(R.id.refreshLayout)
|
||||
|
||||
carNoScan.setOnClickListener(this)
|
||||
search.setOnClickListener(this)
|
||||
addIcon.setOnClickListener(this)
|
||||
checkIcon.setOnClickListener(this)
|
||||
submit.setOnClickListener(this)
|
||||
unloading.setOnClickListener(this)
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_gnj_ru_ku)
|
||||
setBackArrow("国内进港转运确认")
|
||||
viewModel = ViewModelProvider(this).get(GnjRuKuViewModel::class.java)
|
||||
initView()
|
||||
|
||||
viewModel.searchGnjRuKuObserver.observe(this) {
|
||||
loadingCancel()
|
||||
refreshLayout.finishRefresh()
|
||||
refreshLayout.finishLoadMore()
|
||||
|
||||
var listArr = JSONArray()
|
||||
try {
|
||||
listArr = it["list"] as JSONArray
|
||||
} catch (e: Exception) {
|
||||
return@observe
|
||||
}
|
||||
|
||||
totalPage = it["pages"] as Int
|
||||
if (listArr.size > 0) {
|
||||
operatorLayout.visibility = View.VISIBLE
|
||||
viewModel.wbListArrFromNet = listArr
|
||||
|
||||
//板车号
|
||||
// carNo.text = searchContent.text.toString()
|
||||
|
||||
//加载关联运单列表
|
||||
viewModel.wbListArrFromNet.forEach { waybill ->
|
||||
val waybillObj = waybill as JSONObject
|
||||
viewModel.idsArray.add(waybillObj.getString("wbNo"))
|
||||
val gncTransferRef = GnjRuKuRef(
|
||||
waybillObj.getIntValue("mfId"), waybillObj.getString("wbNo") ?: "",
|
||||
waybillObj.getIntValue("totalPc"), waybillObj.getIntValue("pc"),
|
||||
waybillObj.getDoubleValue("weight"), waybillObj.getDoubleValue("cashWeight"),
|
||||
waybillObj.getString("origin") ?: "", waybillObj.getString("dest") ?: "",
|
||||
waybillObj.getString("agentCode") ?: "", waybillObj.getString("spCode") ?: "",
|
||||
waybillObj.getString("goods") ?: "", waybillObj.getString("confirmDate") ?: "",
|
||||
waybillObj.getString("confirmId") ?: "", false
|
||||
)
|
||||
viewModel.gncTransferRefList.add(gncTransferRef)
|
||||
}
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
resetSelCount(false)
|
||||
}
|
||||
|
||||
viewModel.loadCarGnjRuKuObserver.observe(this) {
|
||||
loadingCancel()
|
||||
val status = it.getString("status")
|
||||
val data = it.getString("data")
|
||||
if (Constant.Result.succ == status) {
|
||||
if (Constant.Result.succ == data) {
|
||||
Common.alertDialog(this, "装车成功!") { dialog ->
|
||||
dialog.dismiss()
|
||||
resetSearch()
|
||||
}
|
||||
} else {
|
||||
Common.alertDialog(this, "装车失败!") { dialog ->
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Common.alertDialog(this, "装车失败!") { dialog ->
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.unloadCarGnjRuKuObserver.observe(this) {
|
||||
loadingCancel()
|
||||
val status = it.getString("status")
|
||||
val data = it.getString("data")
|
||||
if (Constant.Result.succ == status) {
|
||||
if (Constant.Result.succ == data) {
|
||||
Common.alertDialog(this, "卸车成功!") { dialog ->
|
||||
dialog.dismiss()
|
||||
resetSearch()
|
||||
}
|
||||
} else {
|
||||
Common.alertDialog(this, "卸车失败!") { dialog ->
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Common.alertDialog(this, "卸车失败!") { dialog ->
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////// 加载刷新的布局
|
||||
refreshLayout.setRefreshHeader(ClassicsHeader(this))
|
||||
refreshLayout.setRefreshFooter(ClassicsFooter(this))
|
||||
/////////////////////////////// 下拉刷新
|
||||
refreshLayout.setOnRefreshListener {
|
||||
resetSearch()
|
||||
}
|
||||
/////////////////////////////// 上拉加载
|
||||
refreshLayout.setOnLoadMoreListener {
|
||||
if (currentPage < totalPage) {
|
||||
currentPage++
|
||||
//初始化查询
|
||||
searchFun()
|
||||
} else {
|
||||
refreshLayout.finishLoadMoreWithNoMoreData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
when (it.id) {
|
||||
R.id.search -> {
|
||||
resetSearch()
|
||||
}
|
||||
R.id.carNoScan -> {
|
||||
scanCode(Constant.RequestCode.gnj_ru_ku_car_no)
|
||||
}
|
||||
// R.id.fade -> {
|
||||
// onYearMonthDayTime()
|
||||
// }
|
||||
R.id.addIcon -> {
|
||||
if (searchContent.text.toString() == "") {
|
||||
Common.showToast(this, "请先填写板车号!")
|
||||
return
|
||||
}
|
||||
|
||||
val builder: AlertDialog.Builder = AlertDialog.Builder(this)
|
||||
builder.setTitle("请输入运单号")
|
||||
// 通过LayoutInflater来加载一个xml的布局文件作为一个View对象
|
||||
val view: View = LayoutInflater.from(this).inflate(
|
||||
R.layout.gnj_ru_ku_waybill_dialog, null
|
||||
)
|
||||
// 设置我们自己定义的布局文件作为弹出框的Content
|
||||
builder.setView(view)
|
||||
|
||||
dialogWaybillNo = view.findViewById(R.id.waybillNo)
|
||||
dialogWaybillNo?.requestFocus()
|
||||
val dialogCarNoScan: ImageView = view.findViewById(R.id.carNoScan)
|
||||
|
||||
dialogCarNoScan.setOnClickListener {
|
||||
scanCode(Constant.RequestCode.gnj_ru_ku_waybill_no)
|
||||
}
|
||||
|
||||
builder.setPositiveButton("确定",
|
||||
DialogInterface.OnClickListener { dialog, which ->
|
||||
//确定操作的内容
|
||||
var inputWaybillNo = dialogWaybillNo?.text.toString()
|
||||
if (inputWaybillNo == "") {
|
||||
Common.showToast(this, "请输入运单号!")
|
||||
return@OnClickListener
|
||||
}
|
||||
val tempRuKuRefList = arrayListOf<GnjRuKuRef>()
|
||||
tempRuKuRefList.add(
|
||||
GnjRuKuRef(
|
||||
-999, inputWaybillNo, 0, 0, 0.0, 0.0,
|
||||
"", "", "", "", "", "", "", true
|
||||
)
|
||||
)
|
||||
//添加进idsArray里
|
||||
if (viewModel.idsArray.contains(inputWaybillNo)) {
|
||||
Common.showToast(this, "运单号重复,请重新输入!")
|
||||
return@OnClickListener
|
||||
}
|
||||
viewModel.idsArray.add(inputWaybillNo)
|
||||
//添加一条数据置顶端
|
||||
tempRuKuRefList.addAll(viewModel.gncTransferRefList)
|
||||
viewModel.gncTransferRefList.clear()
|
||||
viewModel.gncTransferRefList.addAll(tempRuKuRefList)
|
||||
adapter.notifyDataSetChanged()
|
||||
operatorLayout.visibility = View.VISIBLE
|
||||
})
|
||||
|
||||
builder.setNegativeButton("取消",
|
||||
DialogInterface.OnClickListener { dialog, which ->
|
||||
|
||||
})
|
||||
builder.show()
|
||||
}
|
||||
R.id.checkIcon -> {
|
||||
//重置 isAllCheck
|
||||
isAllCheck = !isAllCheck
|
||||
resetSelCount(isAllCheck)
|
||||
}
|
||||
R.id.submit -> {
|
||||
val ids = arrayListOf<String>()
|
||||
viewModel.gncTransferRefList.forEach { tf ->
|
||||
if(tf.isCheck){
|
||||
ids.add(tf.wbNo)
|
||||
if(tf.confirmDate != ""){
|
||||
Common.showToast(this, "装车确认下有确认时间的运单不可选择!")
|
||||
return@let
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ids.isEmpty()) {
|
||||
Common.showToast(this, "请至少选择一单!")
|
||||
return
|
||||
}
|
||||
viewModel.idsArray.clear()
|
||||
viewModel.idsArray.addAll(ids)
|
||||
loading()
|
||||
viewModel.loadCarGnjRuKu(searchContent.text.toString(), viewModel.idsArray)
|
||||
}
|
||||
R.id.unloading -> {
|
||||
val ids = arrayListOf<String>()
|
||||
viewModel.gncTransferRefList.forEach { tf ->
|
||||
if(tf.isCheck){
|
||||
ids.add(tf.wbNo)
|
||||
if(tf.confirmDate == ""){
|
||||
Common.showToast(this, "卸车确认下没有确认时间的运单不可选择!")
|
||||
return@let
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ids.isEmpty()) {
|
||||
Common.showToast(this, "请至少选择一单!")
|
||||
return
|
||||
}
|
||||
viewModel.idsArray.clear()
|
||||
viewModel.idsArray.addAll(ids)
|
||||
loading()
|
||||
viewModel.unloadCarGnjRuKu(searchContent.text.toString(), viewModel.idsArray)
|
||||
}
|
||||
else -> {
|
||||
Toast.makeText(this, "未找到对应操作", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码返回的结果
|
||||
*/
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
// 扫描二维码/条码回传
|
||||
if (resultCode == RESULT_OK && data != null) {
|
||||
val content = data.getStringExtra(com.yzq.zxinglibrary.common.Constant.CODED_CONTENT)
|
||||
if (content == null) {
|
||||
Common.showToast(this, "条码错误!")
|
||||
return
|
||||
}
|
||||
when (requestCode) {
|
||||
Constant.RequestCode.gnj_ru_ku_car_no -> {
|
||||
searchContent.setText(content)
|
||||
resetSearch()
|
||||
}
|
||||
Constant.RequestCode.gnj_ru_ku_waybill_no -> {
|
||||
dialogWaybillNo?.setText(content)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
private fun searchFun() {
|
||||
if (searchContent.text.toString() == "") {
|
||||
Common.showToast(this, "平板车号不能为空!")
|
||||
refreshLayout.finishRefresh()
|
||||
refreshLayout.finishLoadMore()
|
||||
return
|
||||
}
|
||||
loading()
|
||||
operatorLayout.visibility = View.GONE
|
||||
viewModel.searchGnjRuKu(pageSize, currentPage, searchContent.text.toString())
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置数据,搜索
|
||||
*/
|
||||
private fun resetSearch() {
|
||||
//recyclerView 清除所有数据数据
|
||||
refreshLayout.setNoMoreData(false)
|
||||
adapter.notifyItemRangeRemoved(0, viewModel.gncTransferRefList.size)
|
||||
viewModel.idsArray.clear()
|
||||
viewModel.gncTransferRefList.clear()
|
||||
currentPage = 1
|
||||
searchFun()
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新计算选中数量
|
||||
* isAllCheckParam true:全选 false:全部全效选择
|
||||
*/
|
||||
private fun resetSelCount(isAllCheckParam: Boolean) {
|
||||
var selCount = 0
|
||||
viewModel.gncTransferRefList.forEach { c ->
|
||||
if (isAllCheckParam) {
|
||||
c.isCheck = isAllCheckParam
|
||||
++selCount
|
||||
} else {
|
||||
c.isCheck = false
|
||||
}
|
||||
}
|
||||
if (isAllCheckParam) {
|
||||
viewModel.setCheckCount(selCount)
|
||||
} else {
|
||||
viewModel.setCheckCount(0)
|
||||
}
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,401 @@
|
||||
package com.lukouguoji.gnj.activity
|
||||
|
||||
import android.os.Bundle
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.View
|
||||
import android.widget.EditText
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.adapt.GnjWareHouseListAdapter
|
||||
import com.lukouguoji.gnj.model.GnjWareHouseList
|
||||
import com.lukouguoji.gnj.viewModel.GnjWareHouseListViewModel
|
||||
import com.lukouguoji.module_base.ActivityCollector
|
||||
import com.lukouguoji.module_base.BaseActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
import com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
import com.scwang.smart.refresh.header.ClassicsHeader
|
||||
import com.scwang.smart.refresh.layout.api.RefreshLayout
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_WARE_HOUSE)
|
||||
class GnjWareHouseActivity : BaseActivity(), View.OnClickListener {
|
||||
private lateinit var viewModel: GnjWareHouseListViewModel
|
||||
private val currentTitleName = "国内进港仓库管理"
|
||||
|
||||
private lateinit var adapter: GnjWareHouseListAdapter
|
||||
private val collectList = ArrayList<GnjWareHouseList>()
|
||||
|
||||
private lateinit var refreshLayout: RefreshLayout
|
||||
private var currentPage = 1
|
||||
private var pageSize = 10
|
||||
private var totalPage = 0
|
||||
|
||||
//是否刷新
|
||||
private var refresh = false
|
||||
|
||||
//标题
|
||||
private lateinit var toolBack: LinearLayout
|
||||
private lateinit var titleName: TextView
|
||||
|
||||
//搜索条件
|
||||
private lateinit var searchListFragment: LinearLayout
|
||||
private lateinit var wayNo: EditText
|
||||
private lateinit var carrier: EditText
|
||||
private lateinit var agentCode: TextView
|
||||
private var agentCodeValue = ""
|
||||
private lateinit var isGroup: TextView
|
||||
private var isGroupStatus = ""
|
||||
private val isGroupArr = JSONArray()
|
||||
private lateinit var searchLayout: LinearLayout
|
||||
private lateinit var summaryText: TextView
|
||||
|
||||
//筛选页
|
||||
|
||||
private val ymdSdf = SimpleDateFormat("yyyy-MM-dd")//年月日
|
||||
private val ymdHmsSdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")//年月日 时分秒
|
||||
private val calendar = Calendar.getInstance()
|
||||
|
||||
private fun initView() {
|
||||
viewModel = ViewModelProvider(this).get(GnjWareHouseListViewModel::class.java)
|
||||
|
||||
val layoutManager = LinearLayoutManager(this)
|
||||
adapter = GnjWareHouseListAdapter(this, collectList)
|
||||
var recyclerView: RecyclerView = findViewById(R.id.guo_nei_collect_list)
|
||||
recyclerView.layoutManager = layoutManager
|
||||
recyclerView.adapter = adapter
|
||||
|
||||
refreshLayout = findViewById(R.id.refreshLayout)
|
||||
|
||||
//标题
|
||||
toolBack = findViewById(R.id.tool_back)
|
||||
titleName = findViewById(R.id.title_name)
|
||||
|
||||
//搜索列表页
|
||||
searchListFragment = findViewById(R.id.searchListFragment)
|
||||
wayNo = findViewById(R.id.waybillNo)
|
||||
carrier = findViewById(R.id.carrier)
|
||||
isGroup = findViewById(R.id.isGroup)
|
||||
agentCode = findViewById(R.id.agentCode)
|
||||
|
||||
searchLayout = findViewById(R.id.searchLayout)
|
||||
summaryText = findViewById(R.id.summaryText)
|
||||
|
||||
toolBack.setOnClickListener(this)
|
||||
searchLayout.setOnClickListener(this)
|
||||
isGroup.setOnClickListener(this)
|
||||
agentCode.setOnClickListener(this)
|
||||
|
||||
wayNo.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
if (s != null && s.toString().length > 11) {
|
||||
Common.alertDialog(ActivityCollector.getLastActivity()!!, "运单号不能超过11位!") { dialog ->
|
||||
wayNo.setText(s.toString().substring(0, 11))
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
carrier.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(editable: Editable?) {
|
||||
val originText = editable.toString()
|
||||
if (originText != null && originText != "") {
|
||||
val regularExpression = "(^([A-Z]+)$)"
|
||||
val matches = originText.matches(regularExpression.toRegex())
|
||||
if(!matches){
|
||||
val regularExpression2 = "([^A-Za-z]+)"
|
||||
val replaceStr = originText.replace(regularExpression2.toRegex(),"")
|
||||
val replaceStrToUpper = replaceStr.uppercase(Locale.ROOT)//小写转大写
|
||||
carrier.setText(replaceStrToUpper)
|
||||
carrier.setSelection(replaceStrToUpper.length)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
//赋值
|
||||
//是否上舱单
|
||||
val noneGroup = JSONObject()
|
||||
noneGroup["name"] = "请选择分组类型"
|
||||
noneGroup["code"] = ""
|
||||
val yesGroup = JSONObject()
|
||||
yesGroup["name"] = "航程"
|
||||
yesGroup["code"] = "dest"
|
||||
val noGroup = JSONObject()
|
||||
noGroup["name"] = "库位"
|
||||
noGroup["code"] = "location"
|
||||
val dateGroup = JSONObject()
|
||||
dateGroup["name"] = "入库时间"
|
||||
dateGroup["code"] = "date"
|
||||
isGroupArr.add(noneGroup)
|
||||
isGroupArr.add(yesGroup)
|
||||
isGroupArr.add(noGroup)
|
||||
isGroupArr.add(dateGroup)
|
||||
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_gnj_ware_house)
|
||||
initView()
|
||||
|
||||
//查询返回结果
|
||||
viewModel.searchParamLive.observe(this) {
|
||||
loadingCancel()
|
||||
//1.获取数据
|
||||
var listArr = JSONArray()
|
||||
try {
|
||||
listArr = it["list"] as JSONArray
|
||||
} catch (e: Exception) {
|
||||
return@observe
|
||||
}
|
||||
totalPage = it["pages"] as Int
|
||||
// var listArr :JSONArray =it["list"] as JSONArray
|
||||
if (listArr.size > 0) {
|
||||
//2.循环遍历塞入collectList
|
||||
listArr.forEach {
|
||||
val itemObj = it as JSONObject
|
||||
val whId = itemObj.getIntValue("whId")
|
||||
val no = itemObj.getString("wbNo") ?: ""
|
||||
val weight = itemObj.getDouble("weight")
|
||||
val pc = itemObj.getIntValue("pc")
|
||||
val fno = itemObj.getString("fno") ?: ""
|
||||
val flight = itemObj.getString("flight") ?: ""
|
||||
val opDate = itemObj.getString("opDate") ?: ""
|
||||
val locStatus = itemObj.getString("locStatus") ?: ""
|
||||
val dest = itemObj.getString("dest") ?: ""
|
||||
val gdate = itemObj.getString("gdate") ?: ""
|
||||
val location = itemObj.getString("location") ?: ""
|
||||
val goods = itemObj.getString("goods") ?: ""
|
||||
val spCode = itemObj.getString("spCode") ?: ""
|
||||
val agentCode = itemObj.getString("agentCode") ?: ""
|
||||
val by1 = itemObj.getString("by1") ?: ""
|
||||
val origin = itemObj.getString("origin") ?: ""
|
||||
val awbType = itemObj.getString("awbType") ?: ""
|
||||
val businessType = itemObj.getString("businessType") ?: ""
|
||||
val status = itemObj.getString("status") ?: ""
|
||||
val days = itemObj.getIntValue("days")
|
||||
|
||||
|
||||
var groupTitle = ""
|
||||
var groupName = ""
|
||||
var daysString: String? = null
|
||||
when (isGroupStatus) {
|
||||
"dest" -> {
|
||||
groupTitle = "目的港:"
|
||||
groupName = dest
|
||||
}
|
||||
"location" -> {
|
||||
groupTitle = "库位:"
|
||||
groupName = location
|
||||
}
|
||||
"date" -> {
|
||||
groupTitle = "入库时间:"
|
||||
groupName = "$gdate,入库天数:"
|
||||
daysString = days.toString()
|
||||
}
|
||||
else -> {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
collectList.add(
|
||||
GnjWareHouseList(
|
||||
whId,
|
||||
no,
|
||||
pc,
|
||||
weight,
|
||||
fno,
|
||||
flight,
|
||||
opDate,
|
||||
locStatus,
|
||||
groupTitle,
|
||||
groupName,
|
||||
daysString,
|
||||
goods,
|
||||
spCode,
|
||||
agentCode,
|
||||
by1,
|
||||
origin,
|
||||
location,
|
||||
awbType,
|
||||
businessType,
|
||||
status,
|
||||
)
|
||||
)
|
||||
}
|
||||
//3.调adpter展示
|
||||
if (currentPage == 1) {
|
||||
adapter.notifyDataSetChanged()
|
||||
} else {
|
||||
adapter.notifyItemRangeInserted((currentPage - 1) * 10, collectList.size)
|
||||
}
|
||||
refreshLayout.finishRefresh()
|
||||
refreshLayout.finishLoadMore()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//汇总返回结果
|
||||
viewModel.summaryObserver.observe(this) {
|
||||
loadingCancel()
|
||||
val status = it.getString("status")
|
||||
if (Constant.Result.succ == status) {
|
||||
var jsonObject = it.getJSONObject("data")
|
||||
val totalTemp = jsonObject.getIntValue("total")
|
||||
val totalPcTemp = jsonObject.getIntValue("pc")
|
||||
val totalWeightTemp = jsonObject.getDoubleValue("weight")
|
||||
summaryText.text = "总票数:$totalTemp,总件数:$totalPcTemp,总重量:$totalWeightTemp"
|
||||
} else {
|
||||
//无数据
|
||||
}
|
||||
}
|
||||
|
||||
//初始化查询
|
||||
searchFun()
|
||||
loading()
|
||||
|
||||
/////////////// 下拉框 start
|
||||
viewModel.agentCode(System.currentTimeMillis().toString())
|
||||
viewModel.agentCodeObserver.observe(this) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择代理人"
|
||||
noneObj["code"] = ""
|
||||
viewModel.agentCodeList.add(noneObj)
|
||||
viewModel.agentCodeList.addAll(vd.getJSONArray("data"))
|
||||
}
|
||||
/////////////// 下拉框 end
|
||||
|
||||
/////////////////////////////// 加载刷新的布局
|
||||
refreshLayout.setRefreshHeader(ClassicsHeader(this))
|
||||
refreshLayout.setRefreshFooter(ClassicsFooter(this))
|
||||
/////////////////////////////// 下拉刷新
|
||||
refreshLayout.setOnRefreshListener {
|
||||
refresh = true
|
||||
resetSearch()
|
||||
}
|
||||
/////////////////////////////// 上拉加载
|
||||
refreshLayout.setOnLoadMoreListener {
|
||||
refresh = false
|
||||
if (currentPage < totalPage) {
|
||||
currentPage++
|
||||
//初始化查询
|
||||
searchFun()
|
||||
} else {
|
||||
refreshLayout.finishLoadMoreWithNoMoreData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
when (it.id) {
|
||||
R.id.tool_back -> {
|
||||
finish()
|
||||
}
|
||||
R.id.searchLayout -> {
|
||||
resetSearch()
|
||||
}
|
||||
R.id.isGroup -> {
|
||||
Common.singleSelect(this, "分组类型", isGroupArr, isGroupStatus) { position, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
isGroup.text = name
|
||||
isGroupStatus = code
|
||||
}
|
||||
}
|
||||
R.id.agentCode -> {
|
||||
Common.singleSelect(this, "代理", viewModel.agentCodeList, agentCodeValue) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
agentCode.text = name
|
||||
agentCodeValue = code
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
Toast.makeText(this, "未找到对应操作", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
private fun searchFun() {
|
||||
viewModel.search(
|
||||
pageSize,
|
||||
currentPage,
|
||||
carrier.text.toString(),
|
||||
"",//startDate.text.toString(),
|
||||
"",//endDate.text.toString(),
|
||||
"",//flightDate.text.toString(),
|
||||
"",//flightNo.text.toString(),
|
||||
"",//mudiGang.text.toString(),
|
||||
"",//kuWei.text.toString(),
|
||||
"",
|
||||
"",//isCangDanStatus
|
||||
wayNo.text.toString(),
|
||||
isGroupStatus,
|
||||
agentCodeValue
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置数据,搜索
|
||||
*/
|
||||
private fun resetSearch() {
|
||||
//recyclerView 清除所有数据数据
|
||||
refreshLayout.setNoMoreData(false)
|
||||
adapter.notifyItemRangeRemoved(0, collectList.size)
|
||||
collectList.clear()
|
||||
currentPage = 1
|
||||
searchFun()
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置筛选条件
|
||||
*/
|
||||
private fun resetFun() {
|
||||
currentPage = 1
|
||||
wayNo.setText("")
|
||||
carrier.setText("")
|
||||
isGroup.text = ""
|
||||
isGroupStatus = ""
|
||||
agentCode.text = ""
|
||||
agentCodeValue = ""
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.lukouguoji.gnj.activity
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.core.widget.NestedScrollView
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.facade.annotation.Autowired
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.adapt.GnjWareHouseInfoListAdapter
|
||||
import com.lukouguoji.gnj.model.GnjWareHouseInfo
|
||||
import com.lukouguoji.gnj.viewModel.GnjWareHouseInfoViewModel
|
||||
import com.lukouguoji.module_base.BaseActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_WARE_HOUSE_INFO)
|
||||
class GnjWareHouseInfoActivity : BaseActivity(), View.OnClickListener {
|
||||
private lateinit var viewModel: GnjWareHouseInfoViewModel
|
||||
|
||||
private lateinit var scrollView: NestedScrollView
|
||||
private lateinit var gncQueryInfoList: RecyclerView
|
||||
private lateinit var adapter: GnjWareHouseInfoListAdapter
|
||||
private val queryInfoAdapterList = arrayListOf<GnjWareHouseInfo>()
|
||||
|
||||
@JvmField
|
||||
@Autowired
|
||||
var id: Int = -9999
|
||||
|
||||
private fun initView() {
|
||||
viewModel = ViewModelProvider(this).get(GnjWareHouseInfoViewModel::class.java)
|
||||
|
||||
scrollView = findViewById(R.id.scrollView)
|
||||
|
||||
val layoutManager = GridLayoutManager(this, 2)
|
||||
adapter = GnjWareHouseInfoListAdapter(this, queryInfoAdapterList)
|
||||
gncQueryInfoList = findViewById(R.id.gncQueryInfoList)
|
||||
gncQueryInfoList.adapter = adapter
|
||||
gncQueryInfoList.layoutManager = layoutManager
|
||||
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_gnj_ware_house_info)
|
||||
setBackArrow("仓库管理详情")
|
||||
initView()
|
||||
|
||||
viewModel.queryInfoByIdGnjWareHouse(id)
|
||||
viewModel.queryInfoByIdGnjWareHouseObserver.observe(this) {
|
||||
val status = it.getString("status")
|
||||
if (Constant.Result.succ == status) {
|
||||
viewModel.wayBillInfo = it.getJSONObject("data")
|
||||
//运单号、
|
||||
adapter.append(GnjWareHouseInfo(1, "运单号", viewModel.wayBillInfo.getString("wbNo") ?: ""))
|
||||
// 件数、
|
||||
adapter.append(GnjWareHouseInfo(1, "件数", viewModel.wayBillInfo.getString("pc") ?: ""))
|
||||
// 重量、
|
||||
adapter.append(GnjWareHouseInfo(1, "重量", "${viewModel.wayBillInfo.getDoubleValue("weight")} KG"))
|
||||
// 品名、
|
||||
adapter.append(GnjWareHouseInfo(1, "品名", viewModel.wayBillInfo.getString("goods") ?: ""))
|
||||
// 特码、
|
||||
adapter.append(GnjWareHouseInfo(1, "特码", viewModel.wayBillInfo.getString("spCode") ?: ""))
|
||||
// 代理人、
|
||||
adapter.append(GnjWareHouseInfo(1, "代理人", viewModel.wayBillInfo.getString("agentCode") ?: ""))
|
||||
// 承运人、
|
||||
adapter.append(GnjWareHouseInfo(1, "承运人", viewModel.wayBillInfo.getString("by1") ?: ""))
|
||||
//始发港、
|
||||
adapter.append(GnjWareHouseInfo(1, "始发港", viewModel.wayBillInfo.getString("origin") ?: ""))
|
||||
// 航班、
|
||||
adapter.append(GnjWareHouseInfo(1, "航班", viewModel.wayBillInfo.getString("flight") ?: ""))
|
||||
// 库位
|
||||
adapter.append(GnjWareHouseInfo(1, "库位", viewModel.wayBillInfo.getString("location") ?: ""))
|
||||
// 运单类型、
|
||||
adapter.append(GnjWareHouseInfo(1, "运单类型", viewModel.wayBillInfo.getString("awbType") ?: ""))
|
||||
// 业务类型、
|
||||
adapter.append(GnjWareHouseInfo(1, "业务类型", viewModel.wayBillInfo.getString("businessType") ?: ""))
|
||||
// 状态、
|
||||
adapter.append(GnjWareHouseInfo(1, "状态", viewModel.wayBillInfo.getString("ref") ?: ""))
|
||||
// 入库时间
|
||||
adapter.append(GnjWareHouseInfo(1, "入库时间", viewModel.wayBillInfo.getString("opDate") ?: ""))
|
||||
|
||||
} else {
|
||||
//无数据
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
when (it.id) {
|
||||
else -> {
|
||||
Toast.makeText(this, "未找到对应操作", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.lukouguoji.gnj.activity
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.adapt.GnjYiKuListSwitchAdapter
|
||||
import com.lukouguoji.gnj.fragment.GnjYiKu2Fragment
|
||||
import com.lukouguoji.gnj.fragment.GnjYiKuFragment
|
||||
import com.lukouguoji.module_base.BaseActivity
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_YI_KU)
|
||||
class GnjYiKuListActivity : BaseActivity(), View.OnClickListener {
|
||||
|
||||
private fun initView() {
|
||||
val listFragment = arrayListOf<Fragment>()
|
||||
listFragment.add(GnjYiKu2Fragment())
|
||||
listFragment.add(GnjYiKuFragment())
|
||||
val viewPager2 = findViewById<ViewPager2>(R.id.viewpager2)
|
||||
val viewPagerAdapter = GnjYiKuListSwitchAdapter(listFragment, supportFragmentManager, lifecycle)
|
||||
viewPager2.adapter = viewPagerAdapter
|
||||
viewPager2.setCurrentItem(1, false)
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_gnj_yi_ku_list)
|
||||
initView()
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
when (it.id) {
|
||||
else -> {
|
||||
Toast.makeText(this, "未找到对应操作", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
package com.lukouguoji.gnj.adapt
|
||||
|
||||
import android.app.Activity
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.EditText
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.model.GnjCangDanInfoItemModel
|
||||
import com.lukouguoji.module_base.common.String.isValidInt
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
|
||||
class GnjCangDanInfoAdapter(val activity: Activity, private val collectList: MutableList<GnjCangDanInfoItemModel>) :
|
||||
RecyclerView.Adapter<GnjCangDanInfoAdapter.ViewHolder>() {
|
||||
|
||||
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val titleName: TextView = view.findViewById(R.id.titleName)
|
||||
val isMust: TextView = view.findViewById(R.id.isMust)
|
||||
val inputLayout: LinearLayout = view.findViewById(R.id.inputLayout)
|
||||
val inputContent: EditText = view.findViewById(R.id.inputContent)
|
||||
val inputContentPreView: View = view.findViewById(R.id.inputContentPreView)
|
||||
val inputContentPre: EditText = view.findViewById(R.id.inputContentPre)
|
||||
val selContent: TextView = view.findViewById(R.id.selContent)
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.gnj_cang_dan_info_item, parent, false)
|
||||
val viewHolder = ViewHolder(view)
|
||||
viewHolder.setIsRecyclable(false)
|
||||
|
||||
/* viewHolder.itemView.setOnClickListener {
|
||||
|
||||
var adapterPosition = viewHolder.adapterPosition
|
||||
var gncFuBang = collectList[adapterPosition]
|
||||
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GOUT_FU_BANG_ACTIVITY).withString("userIdParam", gncFuBang.useId.toString())
|
||||
.navigation(activity, Constant.RequestCode.gnc_shouyun_list_refresh)
|
||||
|
||||
}
|
||||
*/
|
||||
return viewHolder
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val collect = collectList[position]
|
||||
val must = collect.isMust
|
||||
val enable = collect.isEnable
|
||||
val titleName = collect.titleName
|
||||
val isSel = collect.isSel
|
||||
val inputContent = collect.inputContent
|
||||
val inputContentPre = collect.inputContentPre
|
||||
val selList = collect.selList
|
||||
val selContentCode = collect.selContentCode
|
||||
|
||||
//是否必填
|
||||
if (must) {
|
||||
holder.isMust.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.isMust.visibility = View.GONE
|
||||
}
|
||||
holder.titleName.text = titleName
|
||||
//下拉框
|
||||
if (isSel) {
|
||||
holder.selContent.visibility = View.VISIBLE
|
||||
holder.inputLayout.visibility = View.GONE
|
||||
|
||||
selList?.forEach { sel ->
|
||||
var selObj = sel as JSONObject
|
||||
var name = selObj.getString("name")
|
||||
var code = selObj.getString("code")
|
||||
if (selContentCode == code) {
|
||||
holder.selContent.text = name
|
||||
}
|
||||
}
|
||||
//是否允许
|
||||
holder.selContent.isEnabled = enable
|
||||
if (enable) {
|
||||
holder.selContent.setBackgroundResource(R.drawable.gnj_cang_dan_info_edit_shape)
|
||||
} else {
|
||||
holder.selContent.setBackgroundResource(R.drawable.gnj_cang_dan_info_edit_disable_shape)
|
||||
}
|
||||
//下拉框监听
|
||||
holder.selContent.setOnClickListener {
|
||||
Common.singleSelect(activity, titleName, selList!!, selContentCode) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val code = jsonObject.getString("code")
|
||||
collect.selContentCode = code
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
}
|
||||
//输入框
|
||||
else {
|
||||
//输入框1
|
||||
holder.selContent.visibility = View.GONE
|
||||
holder.inputContentPreView.visibility = View.GONE
|
||||
holder.inputContentPre.visibility = View.GONE
|
||||
holder.inputLayout.visibility = View.VISIBLE
|
||||
holder.inputContent.visibility = View.VISIBLE
|
||||
|
||||
//是否允许
|
||||
holder.inputContent.isEnabled = enable
|
||||
if (enable) {
|
||||
holder.inputContent.setBackgroundResource(R.drawable.gnj_cang_dan_info_edit_shape)
|
||||
} else {
|
||||
holder.inputContent.setBackgroundResource(R.drawable.gnj_cang_dan_info_edit_disable_shape)
|
||||
}
|
||||
holder.inputContent.setText(inputContent)
|
||||
holder.inputContent.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
collect.inputContent = s.toString()
|
||||
}
|
||||
})
|
||||
//如果是订单,监听输入事件
|
||||
if(collect.titleCode == "no"){
|
||||
//失去焦点
|
||||
holder.inputContent.onFocusChangeListener = View.OnFocusChangeListener { v, hasFocus ->
|
||||
if (hasFocus) {
|
||||
|
||||
} else {
|
||||
val editText = v as EditText
|
||||
//失去焦点
|
||||
if (editText.text.toString().length != 8 || !editText.text.toString().isValidInt()) {
|
||||
Common.showToast(activity, "请输入正确的运单号格式!")
|
||||
return@OnFocusChangeListener
|
||||
}
|
||||
val subSequence = editText.text.toString().subSequence(0, 7).toString().toInt()
|
||||
val subSequence2 = editText.text.toString()[7].toString().toInt()
|
||||
if (subSequence % 7 != subSequence2) {
|
||||
Common.showToast(activity, "请输入正确的运单号格式!")
|
||||
return@OnFocusChangeListener
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//输入框2
|
||||
if (collect.titleCodePre != null && collect.inputContentPre != null) {
|
||||
holder.inputContentPreView.visibility = View.VISIBLE
|
||||
holder.inputContentPre.visibility = View.VISIBLE
|
||||
|
||||
//是否允许
|
||||
holder.inputContentPre.isEnabled = enable
|
||||
if (enable) {
|
||||
holder.inputContentPre.setBackgroundResource(R.drawable.gnj_cang_dan_info_edit_shape)
|
||||
} else {
|
||||
holder.inputContentPre.setBackgroundResource(R.drawable.gnj_cang_dan_info_edit_disable_shape)
|
||||
}
|
||||
holder.inputContentPre.setText(inputContentPre)
|
||||
holder.inputContentPre.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
collect.inputContentPre = s.toString()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun getItemCount() = collectList.size
|
||||
|
||||
fun append(gnjCangDanInfoItemModel: GnjCangDanInfoItemModel) {
|
||||
collectList.add(gnjCangDanInfoItemModel)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.lukouguoji.gnj.adapt
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.model.GnjCangDanListModel
|
||||
import com.lukouguoji.gnj.viewModel.GnjCangDanListViewModel
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
|
||||
class GnjCangDanListAdapter(
|
||||
val activity: Activity,
|
||||
private val viewModel: GnjCangDanListViewModel,
|
||||
private val collectList: MutableList<GnjCangDanListModel>
|
||||
) :
|
||||
RecyclerView.Adapter<GnjCangDanListAdapter.ViewHolder>() {
|
||||
|
||||
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val leftIcon: ImageView = view.findViewById(R.id.leftIcon)
|
||||
val wbNo: TextView = view.findViewById(R.id.wbNo)
|
||||
val goods: TextView = view.findViewById(R.id.goods)
|
||||
val awbType: TextView = view.findViewById(R.id.awbType)
|
||||
val startPort: TextView = view.findViewById(R.id.startPort)
|
||||
val destPort: TextView = view.findViewById(R.id.destPort)
|
||||
|
||||
val agentCode: TextView = view.findViewById(R.id.agentCode)
|
||||
val spCode: TextView = view.findViewById(R.id.spCode)
|
||||
val totalPc: TextView = view.findViewById(R.id.totalPc)
|
||||
val pc: TextView = view.findViewById(R.id.pc)
|
||||
val acWeight: TextView = view.findViewById(R.id.acWeight)
|
||||
|
||||
val delete: TextView = view.findViewById(R.id.delete)
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.gnj_cang_dan_list_item, parent, false)
|
||||
val viewHolder = ViewHolder(view)
|
||||
|
||||
viewHolder.itemView.setOnClickListener {
|
||||
|
||||
var adapterPosition = viewHolder.adapterPosition
|
||||
if (adapterPosition < 0 || collectList.isEmpty()) {
|
||||
return@setOnClickListener
|
||||
}
|
||||
var item = collectList[adapterPosition]
|
||||
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GNJ_CANG_DAN_INFO).withString("id", item.id).withString("ref", item.ref)
|
||||
.withInt("fid", viewModel.fid ?: -9999).withString("prefix", viewModel.prefix)
|
||||
.navigation(activity, Constant.RequestCode.gnj_cang_dan_list)
|
||||
|
||||
}
|
||||
return viewHolder
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val collect = collectList[position]
|
||||
|
||||
val ref = collect.ref
|
||||
if (ref == "1") {
|
||||
collect.isCheck = false
|
||||
}
|
||||
val leftIcon = holder.leftIcon
|
||||
//选中
|
||||
if (collect.isCheck) {
|
||||
leftIcon.setImageResource(R.mipmap.gnj_cang_dan_left_icon_check)
|
||||
} else {
|
||||
leftIcon.setImageResource(R.mipmap.gnc_ware_house_left_icon)
|
||||
}
|
||||
|
||||
holder.wbNo.text = collect.wbNo
|
||||
holder.goods.text = collect.goods
|
||||
holder.awbType.text = collect.awbType
|
||||
holder.startPort.text = collect.startPort
|
||||
holder.destPort.text = collect.destPort
|
||||
holder.agentCode.text = collect.agentCode
|
||||
holder.spCode.text = collect.spCode
|
||||
holder.totalPc.text = "${collect.totalPc}"
|
||||
holder.pc.text = "${collect.pc}"
|
||||
holder.acWeight.text = "${collect.acWeight} KG"
|
||||
|
||||
//红色图标 不允许操作
|
||||
if (ref == "1") {
|
||||
leftIcon.setImageResource(R.mipmap.gnj_cang_dan_list_item_no_ku)
|
||||
} else {
|
||||
leftIcon.setOnClickListener {
|
||||
collect.isCheck = !collect.isCheck
|
||||
if (collect.isCheck) {
|
||||
viewModel.plusOne()
|
||||
} else {
|
||||
viewModel.subOne()
|
||||
}
|
||||
notifyDataSetChanged() // 更新数据
|
||||
}
|
||||
}
|
||||
|
||||
holder.delete.setOnClickListener {
|
||||
if (ref == "1") {
|
||||
Common.showToast(activity, "货物已发放,无法删除!")
|
||||
} else {
|
||||
Common.secondConfirmDialog(activity, "确认删除?") { dialog ->
|
||||
dialog.dismiss()
|
||||
val position = holder.adapterPosition
|
||||
viewModel.deleteFestGnjCangDan(collect.id.toInt(), position)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getItemCount() = collectList.size
|
||||
|
||||
fun append(gnjCangDanListModel: GnjCangDanListModel) {
|
||||
collectList.add(gnjCangDanListModel)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.lukouguoji.gnj.adapt
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.model.GnjCangDanListModel
|
||||
import com.lukouguoji.gnj.model.GnjChuKuListModel
|
||||
import com.lukouguoji.gnj.viewModel.GnjChuKuListViewModel
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
class GnjChuKuListAdapter(
|
||||
val activity: Activity,
|
||||
private val viewModel: GnjChuKuListViewModel,
|
||||
private val collectList: MutableList<GnjChuKuListModel>
|
||||
) :
|
||||
RecyclerView.Adapter<GnjChuKuListAdapter.ViewHolder>() {
|
||||
|
||||
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val leftIcon: ImageView = view.findViewById(R.id.leftIcon)
|
||||
val wbNo: TextView = view.findViewById(R.id.wbNo)
|
||||
val pickNo: TextView = view.findViewById(R.id.pickNo)
|
||||
val fno: TextView = view.findViewById(R.id.fno)
|
||||
val pc: TextView = view.findViewById(R.id.pc)
|
||||
val weight: TextView = view.findViewById(R.id.weight)
|
||||
|
||||
val fdate: TextView = view.findViewById(R.id.fdate)
|
||||
val goods: TextView = view.findViewById(R.id.goods)
|
||||
val agentCode: TextView = view.findViewById(R.id.agentCode)
|
||||
val spCode: TextView = view.findViewById(R.id.spCode)
|
||||
val pickDate: TextView = view.findViewById(R.id.pickDate)
|
||||
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.gnj_chu_ku_list_item, parent, false)
|
||||
val viewHolder = ViewHolder(view)
|
||||
|
||||
return viewHolder
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val collect = collectList[position]
|
||||
|
||||
val leftIcon = holder.leftIcon
|
||||
//选中
|
||||
if (collect.isCheck) {
|
||||
leftIcon.setImageResource(R.mipmap.gnj_cang_dan_left_icon_check)
|
||||
} else {
|
||||
leftIcon.setImageResource(R.mipmap.gnc_ware_house_left_icon)
|
||||
}
|
||||
|
||||
holder.wbNo.text = collect.wbNo
|
||||
holder.pickNo.text = collect.pickNo.toString()
|
||||
holder.fno.text = collect.fno
|
||||
holder.pc.text = "${collect.pc}"
|
||||
holder.weight.text = "${collect.weight} KG"
|
||||
|
||||
holder.fdate.text = collect.fdate
|
||||
holder.goods.text = collect.goods
|
||||
holder.agentCode.text = collect.agentCode
|
||||
holder.spCode.text = collect.spCode
|
||||
holder.pickDate.text = collect.pickDate
|
||||
|
||||
leftIcon.setOnClickListener {
|
||||
collect.isCheck = !collect.isCheck
|
||||
if (collect.isCheck) {
|
||||
// viewModel.plusOne()
|
||||
} else {
|
||||
// viewModel.subOne()
|
||||
}
|
||||
notifyDataSetChanged() // 更新数据
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun getItemCount() = collectList.size
|
||||
|
||||
fun append(gnjChuKuListModel: GnjChuKuListModel) {
|
||||
collectList.add(gnjChuKuListModel)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.lukouguoji.gnj.adapt
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.EditText
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.model.GnjQueryInfo
|
||||
|
||||
/**
|
||||
* 出港查询详情
|
||||
*/
|
||||
class GnjQueryInfoListAdapter(val activity: Activity, val collectList: MutableList<GnjQueryInfo>) :
|
||||
RecyclerView.Adapter<GnjQueryInfoListAdapter.ViewHolder>() {
|
||||
|
||||
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val title: TextView = view.findViewById(R.id.title)
|
||||
val content: EditText = view.findViewById(R.id.content)
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.gnj_query_info_item, parent, false)
|
||||
val viewHolder = ViewHolder(view)
|
||||
|
||||
/* viewHolder.itemView.setOnClickListener {
|
||||
|
||||
var adapterPosition = viewHolder.adapterPosition
|
||||
var gncFuBang = collectList[adapterPosition]
|
||||
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GOUT_FU_BANG_ACTIVITY).withString("userIdParam", gncFuBang.useId.toString())
|
||||
.navigation(activity, Constant.RequestCode.gnc_shouyun_list_refresh)
|
||||
|
||||
}
|
||||
*/
|
||||
return viewHolder
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val collect = collectList[position]
|
||||
holder.title.text = collect.title
|
||||
holder.content.setText(collect.content)
|
||||
}
|
||||
|
||||
override fun getItemCount() = collectList.size
|
||||
|
||||
fun append(gnjQueryInfo: GnjQueryInfo) {
|
||||
collectList.add(gnjQueryInfo)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.lukouguoji.gnj.adapt
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.model.GnjQueryInfoWh
|
||||
|
||||
class GnjQueryInfoWhListAdapter(val activity: Activity, val collectList: MutableList<GnjQueryInfoWh>) :
|
||||
RecyclerView.Adapter<GnjQueryInfoWhListAdapter.ViewHolder>() {
|
||||
|
||||
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val location: TextView = view.findViewById(R.id.location)
|
||||
val pc: TextView = view.findViewById(R.id.pc)
|
||||
val weight: TextView = view.findViewById(R.id.weight)
|
||||
val flight: TextView = view.findViewById(R.id.flight)
|
||||
val opDate: TextView = view.findViewById(R.id.opDate)
|
||||
val pickupTime: TextView = view.findViewById(R.id.pickupTime)
|
||||
val opId: TextView = view.findViewById(R.id.opId)
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.gnj_query_info_wh_list_item, parent, false)
|
||||
val viewHolder = ViewHolder(view)
|
||||
|
||||
/* viewHolder.itemView.setOnClickListener {
|
||||
|
||||
var adapterPosition = viewHolder.adapterPosition
|
||||
var gncFuBang = collectList[adapterPosition]
|
||||
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GOUT_FU_BANG_ACTIVITY).withString("userIdParam", gncFuBang.useId.toString())
|
||||
.navigation(activity, Constant.RequestCode.gnc_shouyun_list_refresh)
|
||||
|
||||
}
|
||||
*/
|
||||
return viewHolder
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val collect = collectList[position]
|
||||
holder.location.text = collect.location
|
||||
holder.pc.text = collect.pc.toString()
|
||||
holder.weight.text = "${collect.weight} KG"
|
||||
holder.flight.text = collect.flight
|
||||
holder.opDate.text = collect.opDate
|
||||
holder.pickupTime.text = collect.mclose
|
||||
holder.opId.text = collect.opId
|
||||
}
|
||||
|
||||
override fun getItemCount() = collectList.size
|
||||
|
||||
fun append(gnjQueryInfoWh: GnjQueryInfoWh) {
|
||||
collectList.add(gnjQueryInfoWh)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.lukouguoji.gnj.adapt
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.model.GnjQueryList
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国内出港查询列表
|
||||
*/
|
||||
class GnjQueryListAdapter(val activity: Activity, private val collectList: List<GnjQueryList>) :
|
||||
RecyclerView.Adapter<GnjQueryListAdapter.ViewHolder>() {
|
||||
|
||||
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val no: TextView = view.findViewById(R.id.no)
|
||||
val agentCode: TextView = view.findViewById(R.id.agentCode)
|
||||
val goods: TextView = view.findViewById(R.id.goods)
|
||||
val flight: TextView = view.findViewById(R.id.flight)
|
||||
val range: TextView = view.findViewById(R.id.range)
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.gnj_query_list_item, parent, false)
|
||||
val viewHolder = ViewHolder(view)
|
||||
|
||||
viewHolder.itemView.setOnClickListener {
|
||||
|
||||
var adapterPosition = viewHolder.adapterPosition
|
||||
if (adapterPosition < 0 || collectList.isEmpty()) {
|
||||
return@setOnClickListener
|
||||
}
|
||||
var gncQueryList = collectList[adapterPosition]
|
||||
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GNJ_QUERY_INFO).withInt("id", gncQueryList.mawbId)
|
||||
.navigation()
|
||||
|
||||
}
|
||||
|
||||
return viewHolder
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val collect = collectList[position]
|
||||
holder.no.text = collect.wbNo
|
||||
holder.agentCode.text = collect.agentCode
|
||||
holder.goods.text = collect.goods
|
||||
holder.flight.text = collect.flight
|
||||
holder.range.text = collect.range
|
||||
|
||||
}
|
||||
|
||||
override fun getItemCount() = collectList.size
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.lukouguoji.gnj.adapt
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.model.GnjRuKuRef
|
||||
|
||||
/**
|
||||
* 复磅列表
|
||||
*/
|
||||
class GnjRuKuRefListAdapter(val activity: Activity, private val collectList: List<GnjRuKuRef>) :
|
||||
RecyclerView.Adapter<GnjRuKuRefListAdapter.ViewHolder>() {
|
||||
|
||||
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val leftIcon: ImageView = view.findViewById(R.id.leftIcon)
|
||||
|
||||
val no: TextView = view.findViewById(R.id.no)
|
||||
val confirmId: TextView = view.findViewById(R.id.confirmId)
|
||||
val confirmDate: TextView = view.findViewById(R.id.confirmDate)
|
||||
/*val totalPc: TextView = view.findViewById(R.id.totalPc)
|
||||
val pc: TextView = view.findViewById(R.id.pc)
|
||||
val weight: TextView = view.findViewById(R.id.weight)
|
||||
val cashWeight: TextView = view.findViewById(R.id.cashWeight)
|
||||
val origin: TextView = view.findViewById(R.id.origin)
|
||||
val dest: TextView = view.findViewById(R.id.dest)
|
||||
val agentCode: TextView = view.findViewById(R.id.agentCode)
|
||||
val spCode: TextView = view.findViewById(R.id.spCode)
|
||||
val goods: TextView = view.findViewById(R.id.goods)*/
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.gnj_ru_ku_ref_list_item, parent, false)
|
||||
val viewHolder = ViewHolder(view)
|
||||
|
||||
/*viewHolder.itemView.setOnClickListener {
|
||||
|
||||
var adapterPosition = viewHolder.adapterPosition
|
||||
var guoNeiOutCollect = collectList[adapterPosition]
|
||||
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GOUT_START_COT_ACTIVITY).withInt("wbId", guoNeiOutCollect.mawbId)
|
||||
.navigation(activity, Constant.RequestCode.gnc_shouyun_refresh)
|
||||
|
||||
}*/
|
||||
|
||||
return viewHolder
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val collect = collectList[position]
|
||||
|
||||
holder.no.text = collect.wbNo
|
||||
holder.confirmId.text = collect.confirmId
|
||||
holder.confirmDate.text = collect.confirmDate
|
||||
//有确认时间的,不可被选中
|
||||
/* if (collect.confirmDate != "") {
|
||||
collect.isCheck = false
|
||||
}*/
|
||||
|
||||
val leftIcon = holder.leftIcon
|
||||
//选中
|
||||
if (collect.isCheck) {
|
||||
leftIcon.setImageResource(R.mipmap.gnj_cang_dan_left_icon_check)
|
||||
} else {
|
||||
leftIcon.setImageResource(R.mipmap.list_item_left_icon)
|
||||
}
|
||||
//击触发选中事件
|
||||
leftIcon.setOnClickListener {
|
||||
collect.isCheck = !collect.isCheck
|
||||
notifyDataSetChanged() // 更新数据
|
||||
}
|
||||
|
||||
|
||||
/*holder.totalPc.text = collect.totalPc.toString()
|
||||
holder.pc.text = collect.pc.toString()
|
||||
holder.weight.text = "${collect.weight} KG"
|
||||
holder.cashWeight.text = "${collect.cashWeight} KG"
|
||||
|
||||
holder.origin.text = collect.origin
|
||||
holder.dest.text = collect.dest
|
||||
holder.agentCode.text = collect.agentCode
|
||||
holder.spCode.text = collect.spCode
|
||||
holder.goods.text = collect.goods*/
|
||||
|
||||
}
|
||||
|
||||
override fun getItemCount() = collectList.size
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.lukouguoji.gnj.adapt
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.EditText
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.model.GnjWareHouseInfo
|
||||
|
||||
/**
|
||||
* 出港查询详情
|
||||
*/
|
||||
class GnjWareHouseInfoListAdapter(val activity: Activity, val collectList: MutableList<GnjWareHouseInfo>) :
|
||||
RecyclerView.Adapter<GnjWareHouseInfoListAdapter.ViewHolder>() {
|
||||
|
||||
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val title: TextView = view.findViewById(R.id.title)
|
||||
val content: EditText = view.findViewById(R.id.content)
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.gnj_ware_house_info_item, parent, false)
|
||||
val viewHolder = ViewHolder(view)
|
||||
|
||||
/* viewHolder.itemView.setOnClickListener {
|
||||
|
||||
var adapterPosition = viewHolder.adapterPosition
|
||||
var gncFuBang = collectList[adapterPosition]
|
||||
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GOUT_FU_BANG_ACTIVITY).withString("userIdParam", gncFuBang.useId.toString())
|
||||
.navigation(activity, Constant.RequestCode.gnc_shouyun_list_refresh)
|
||||
|
||||
}
|
||||
*/
|
||||
return viewHolder
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val collect = collectList[position]
|
||||
holder.title.text = collect.title
|
||||
holder.content.setText(collect.content)
|
||||
}
|
||||
|
||||
override fun getItemCount() = collectList.size
|
||||
|
||||
fun append(gnjWareHouseInfo: GnjWareHouseInfo) {
|
||||
collectList.add(gnjWareHouseInfo)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.lukouguoji.gnj.adapt
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.model.GnjWareHouseList
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 仓库管理列表
|
||||
*/
|
||||
class GnjWareHouseListAdapter(val activity: Activity, private val collectList: List<GnjWareHouseList>) :
|
||||
RecyclerView.Adapter<GnjWareHouseListAdapter.ViewHolder>() {
|
||||
|
||||
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val groupNameLayout: LinearLayout = view.findViewById(R.id.groupNameLayout)
|
||||
val groupTitle: TextView = view.findViewById(R.id.groupTitle)
|
||||
val groupContent: TextView = view.findViewById(R.id.groupContent)
|
||||
val days: TextView = view.findViewById(R.id.days)
|
||||
|
||||
val no: TextView = view.findViewById(R.id.no)
|
||||
val pc: TextView = view.findViewById(R.id.pc)
|
||||
val weight: TextView = view.findViewById(R.id.weight)
|
||||
/*val goods: TextView = view.findViewById(R.id.goods)
|
||||
val spCode: TextView = view.findViewById(R.id.spCode)
|
||||
val agentCode: TextView = view.findViewById(R.id.agentCode)
|
||||
val by1: TextView = view.findViewById(R.id.by1)
|
||||
val origin: TextView = view.findViewById(R.id.origin)*/
|
||||
|
||||
val flight: TextView = view.findViewById(R.id.flight)
|
||||
|
||||
/* val location: TextView = view.findViewById(R.id.location)
|
||||
val awbType: TextView = view.findViewById(R.id.awbType)
|
||||
val businessType: TextView = view.findViewById(R.id.businessType)
|
||||
val status: TextView = view.findViewById(R.id.status)*/
|
||||
val date: TextView = view.findViewById(R.id.date)
|
||||
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.gnj_ware_house_list_item, parent, false)
|
||||
val viewHolder = ViewHolder(view)
|
||||
|
||||
viewHolder.itemView.setOnClickListener {
|
||||
|
||||
var adapterPosition = viewHolder.adapterPosition
|
||||
if (adapterPosition < 0 || collectList.isEmpty()) {
|
||||
return@setOnClickListener
|
||||
}
|
||||
var gncFuBang = collectList[adapterPosition]
|
||||
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GNJ_WARE_HOUSE_INFO).withInt("id", gncFuBang.id)
|
||||
.navigation()
|
||||
|
||||
}
|
||||
return viewHolder
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val collect = collectList[position]
|
||||
val groupTitle = collect.groupTitle
|
||||
val groupName = collect.groupName
|
||||
val days = collect.days
|
||||
//第一条
|
||||
if (position == 0 && groupName != "") {
|
||||
holder.groupNameLayout.visibility = View.VISIBLE
|
||||
holder.groupTitle.text = groupTitle
|
||||
holder.groupContent.text = groupName
|
||||
//出库时间分组时,days数据不为null,展示
|
||||
if (days != null) {
|
||||
holder.days.text = days
|
||||
holder.days.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.days.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
//不是第一条
|
||||
else if (groupName != "") {
|
||||
//当前分组名和上一次分组名不一样,展示新的分组
|
||||
val preCollect = collectList[position - 1]
|
||||
val preGroupName = preCollect.groupName
|
||||
if (groupName != preGroupName) {
|
||||
holder.groupNameLayout.visibility = View.VISIBLE
|
||||
holder.groupTitle.text = groupTitle
|
||||
holder.groupContent.text = groupName
|
||||
//出库时间分组时,days数据不为null,展示
|
||||
if (days != null) {
|
||||
holder.days.text = days
|
||||
holder.days.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.days.visibility = View.GONE
|
||||
}
|
||||
} else {
|
||||
holder.groupNameLayout.visibility = View.GONE
|
||||
}
|
||||
} else {
|
||||
holder.groupNameLayout.visibility = View.GONE
|
||||
}
|
||||
|
||||
holder.no.text = collect.waybillNo
|
||||
holder.pc.text = collect.pc.toString()
|
||||
holder.weight.text = "${collect.weight} KG"
|
||||
/*holder.goods.text = collect.goods
|
||||
holder.spCode.text = collect.spCode
|
||||
holder.agentCode.text = collect.agentCode
|
||||
holder.by1.text = collect.by1
|
||||
holder.origin.text = collect.origin*/
|
||||
|
||||
holder.flight.text = collect.flight
|
||||
/*holder.location.text = collect.location
|
||||
holder.awbType.text = collect.awbType
|
||||
holder.businessType.text = collect.businessType
|
||||
holder.status.text = collect.status*/
|
||||
holder.date.text = collect.date
|
||||
}
|
||||
|
||||
override fun getItemCount() = collectList.size
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.lukouguoji.gnj.adapt
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.model.GnjYiKu2ListModel
|
||||
|
||||
|
||||
class GnjYiKu2ListAdapter(
|
||||
val activity: Activity,
|
||||
private val collectList: MutableList<GnjYiKu2ListModel>
|
||||
) :
|
||||
RecyclerView.Adapter<GnjYiKu2ListAdapter.ViewHolder>() {
|
||||
|
||||
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val leftIcon: ImageView = view.findViewById(R.id.leftIcon)
|
||||
val id: TextView = view.findViewById(R.id.id)
|
||||
val wbNo: TextView = view.findViewById(R.id.wbNo)
|
||||
|
||||
val pc: TextView = view.findViewById(R.id.pc)
|
||||
val weight: TextView = view.findViewById(R.id.weight)
|
||||
val goods: TextView = view.findViewById(R.id.goods)
|
||||
val agentCode: TextView = view.findViewById(R.id.agentCode)
|
||||
val spCode: TextView = view.findViewById(R.id.spCode)
|
||||
|
||||
val origin: TextView = view.findViewById(R.id.origin)//始发港
|
||||
val dest: TextView = view.findViewById(R.id.dest)//目的港
|
||||
val flight: TextView = view.findViewById(R.id.flight)//航班
|
||||
val awbType: TextView = view.findViewById(R.id.awbType)//运单类型
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.gnj_yi_ku2_list_item, parent, false)
|
||||
val viewHolder = ViewHolder(view)
|
||||
|
||||
return viewHolder
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val collect = collectList[position]
|
||||
|
||||
val leftIcon = holder.leftIcon
|
||||
//选中
|
||||
if (collect.isCheck) {
|
||||
leftIcon.setImageResource(R.mipmap.gnj_cang_dan_left_icon_check)
|
||||
} else {
|
||||
leftIcon.setImageResource(R.mipmap.gnc_ware_house_left_icon)
|
||||
}
|
||||
|
||||
holder.wbNo.text = collect.wbNo
|
||||
holder.id.text = collect.id
|
||||
holder.pc.text = "${collect.pc}"
|
||||
holder.weight.text = "${collect.weight} KG"
|
||||
holder.goods.text = collect.goods
|
||||
holder.spCode.text = collect.spCode
|
||||
holder.agentCode.text = collect.agentCode
|
||||
|
||||
holder.origin.text = collect.origin
|
||||
holder.dest.text = collect.dest
|
||||
holder.flight.text = collect.flight
|
||||
holder.awbType.text = collect.awbType
|
||||
|
||||
}
|
||||
|
||||
override fun getItemCount() = collectList.size
|
||||
|
||||
fun append(gnjYiKu2ListModel: GnjYiKu2ListModel) {
|
||||
collectList.add(gnjYiKu2ListModel)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.lukouguoji.gnj.adapt
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.model.GnjYiKuListModel
|
||||
import com.lukouguoji.gnj.viewModel.GnjYiKuListViewModel
|
||||
|
||||
class GnjYiKuListAdapter(
|
||||
val activity: Activity,
|
||||
private val viewModel: GnjYiKuListViewModel,
|
||||
private val collectList: MutableList<GnjYiKuListModel>
|
||||
) :
|
||||
RecyclerView.Adapter<GnjYiKuListAdapter.ViewHolder>() {
|
||||
|
||||
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val leftIcon: ImageView = view.findViewById(R.id.leftIcon)
|
||||
val wbNo: TextView = view.findViewById(R.id.wbNo)
|
||||
|
||||
val pc: TextView = view.findViewById(R.id.pc)
|
||||
val weight: TextView = view.findViewById(R.id.weight)
|
||||
val goods: TextView = view.findViewById(R.id.goods)
|
||||
val agentCode: TextView = view.findViewById(R.id.agentCode)
|
||||
val spCode: TextView = view.findViewById(R.id.spCode)
|
||||
|
||||
val origin: TextView = view.findViewById(R.id.origin)
|
||||
val dest: TextView = view.findViewById(R.id.dest)
|
||||
val fno: TextView = view.findViewById(R.id.fno)
|
||||
val awbType: TextView = view.findViewById(R.id.awbType)
|
||||
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.gnj_yi_ku_list_item, parent, false)
|
||||
val viewHolder = ViewHolder(view)
|
||||
|
||||
return viewHolder
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val collect = collectList[position]
|
||||
|
||||
val leftIcon = holder.leftIcon
|
||||
//选中
|
||||
if (collect.isCheck) {
|
||||
leftIcon.setImageResource(R.mipmap.gnj_cang_dan_left_icon_check)
|
||||
} else {
|
||||
leftIcon.setImageResource(R.mipmap.gnc_ware_house_left_icon)
|
||||
}
|
||||
|
||||
holder.wbNo.text = collect.wbNo
|
||||
|
||||
holder.pc.text = "${collect.pc}"
|
||||
holder.weight.text = "${collect.weight} KG"
|
||||
holder.goods.text = collect.goods
|
||||
holder.agentCode.text = collect.agentCode
|
||||
holder.spCode.text = collect.spCode
|
||||
|
||||
holder.origin.text = collect.origin
|
||||
holder.dest.text = collect.dest
|
||||
holder.fno.text = collect.fno
|
||||
holder.awbType.text = collect.awbType
|
||||
|
||||
leftIcon.setOnClickListener {
|
||||
collect.isCheck = !collect.isCheck
|
||||
if (collect.isCheck) {
|
||||
viewModel.plusOne()
|
||||
} else {
|
||||
viewModel.subOne()
|
||||
}
|
||||
notifyDataSetChanged() // 更新数据
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun getItemCount() = collectList.size
|
||||
|
||||
fun append(gnjYiKuListModel: GnjYiKuListModel) {
|
||||
collectList.add(gnjYiKuListModel)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.lukouguoji.gnj.adapt
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||
|
||||
|
||||
class GnjYiKuListSwitchAdapter(
|
||||
private val fragments: List<Fragment>, fragmentManager: FragmentManager, lifecycle: Lifecycle
|
||||
) :
|
||||
FragmentStateAdapter(fragmentManager, lifecycle) {
|
||||
|
||||
|
||||
override fun getItemCount() = 2
|
||||
|
||||
override fun createFragment(position: Int) = fragments[position];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.lukouguoji.gnj.common
|
||||
|
||||
interface GnjCommon {
|
||||
/**
|
||||
* 舱单
|
||||
*/
|
||||
interface CangDan {
|
||||
interface Ref {
|
||||
companion object {
|
||||
const val read = "1"//查看
|
||||
}
|
||||
}
|
||||
interface Info {
|
||||
companion object {
|
||||
const val read = "1"//查看
|
||||
const val add = "2"//新增
|
||||
const val update = "3"//修改
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,409 @@
|
||||
package com.lukouguoji.gnj.fragment
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.*
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.activity.GnjYiKuListActivity
|
||||
import com.lukouguoji.gnj.adapt.GnjYiKu2ListAdapter
|
||||
import com.lukouguoji.gnj.model.GnjYiKu2ListModel
|
||||
import com.lukouguoji.gnj.viewModel.GnjYiKu2ListViewModel
|
||||
import com.lukouguoji.module_base.ActivityCollector
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
import com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
import com.scwang.smart.refresh.header.ClassicsHeader
|
||||
import com.scwang.smart.refresh.layout.api.RefreshLayout
|
||||
import com.yanzhenjie.permission.AndPermission
|
||||
import com.yanzhenjie.permission.runtime.Permission
|
||||
import com.yzq.zxinglibrary.android.CaptureActivity
|
||||
import com.yzq.zxinglibrary.bean.ZxingConfig
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
class GnjYiKu2Fragment : Fragment(), View.OnClickListener {
|
||||
private lateinit var yiKuActivity: GnjYiKuListActivity
|
||||
private val currentTitleName = "国际出港查询完成移库"
|
||||
private lateinit var viewModel: GnjYiKu2ListViewModel
|
||||
|
||||
private lateinit var adapter: GnjYiKu2ListAdapter
|
||||
private val collectList = ArrayList<GnjYiKu2ListModel>()
|
||||
|
||||
private var currentPage = 1
|
||||
private var pageSize = 10
|
||||
private var totalPage = 0
|
||||
private lateinit var refreshLayout: RefreshLayout
|
||||
|
||||
//标题
|
||||
private lateinit var toolBack: LinearLayout
|
||||
private lateinit var titleName: TextView
|
||||
|
||||
//搜索条件
|
||||
private lateinit var searchListFragment: LinearLayout
|
||||
private lateinit var filtrateLayout: LinearLayout
|
||||
private lateinit var startDate: TextView
|
||||
private lateinit var endDate: TextView
|
||||
private lateinit var awbType: TextView
|
||||
private var awbTypeValue = ""
|
||||
private lateinit var id: EditText
|
||||
private lateinit var idScanIcon: ImageView
|
||||
private lateinit var searchLayout: LinearLayout
|
||||
|
||||
//筛选页
|
||||
private lateinit var filtrateFragment: LinearLayout
|
||||
private lateinit var wbNo: EditText
|
||||
private lateinit var wbNoScanIcon: ImageView
|
||||
|
||||
|
||||
private lateinit var submit: TextView
|
||||
private lateinit var reset: TextView
|
||||
|
||||
// 、、特码、代理人、品名、运单类型、业务类型查询
|
||||
|
||||
|
||||
private val ymdSdf = SimpleDateFormat("yyyy-MM-dd")//年月日
|
||||
private val ymdHmsSdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")//年月日 时分秒
|
||||
private val calendar = Calendar.getInstance()
|
||||
|
||||
private fun initView() {
|
||||
yiKuActivity = activity!! as GnjYiKuListActivity
|
||||
|
||||
viewModel = ViewModelProvider(this).get(GnjYiKu2ListViewModel::class.java)
|
||||
val layoutManager = LinearLayoutManager(yiKuActivity)
|
||||
adapter = GnjYiKu2ListAdapter(yiKuActivity, collectList)
|
||||
var recyclerView: RecyclerView = yiKuActivity.findViewById(R.id.recyclerList)
|
||||
recyclerView.layoutManager = layoutManager
|
||||
recyclerView.adapter = adapter
|
||||
|
||||
//标题
|
||||
toolBack = yiKuActivity.findViewById(R.id.tool_back)
|
||||
titleName = yiKuActivity.findViewById(R.id.title_name)
|
||||
//搜索列表页
|
||||
searchListFragment = yiKuActivity.findViewById(R.id.searchListFragment)
|
||||
startDate = yiKuActivity.findViewById(R.id.startDate)
|
||||
endDate = yiKuActivity.findViewById(R.id.endDate)
|
||||
awbType = yiKuActivity.findViewById(R.id.awbType)
|
||||
id = yiKuActivity.findViewById(R.id.id)
|
||||
idScanIcon = yiKuActivity.findViewById(R.id.idScanIcon)
|
||||
searchLayout = yiKuActivity.findViewById(R.id.searchLayout)
|
||||
filtrateLayout = yiKuActivity.findViewById(R.id.filtrateLayout)
|
||||
//筛选页
|
||||
filtrateFragment = yiKuActivity.findViewById(R.id.filtrateFragment)
|
||||
|
||||
wbNo = yiKuActivity.findViewById(R.id.wbNo)
|
||||
wbNoScanIcon = yiKuActivity.findViewById(R.id.wbNoScanIcon)
|
||||
submit = yiKuActivity.findViewById(R.id.submit)
|
||||
reset = yiKuActivity.findViewById(R.id.reset)
|
||||
|
||||
toolBack.setOnClickListener(this)
|
||||
searchLayout.setOnClickListener(this)
|
||||
startDate.setOnClickListener(this)
|
||||
endDate.setOnClickListener(this)
|
||||
awbType.setOnClickListener(this)
|
||||
idScanIcon.setOnClickListener(this)
|
||||
wbNoScanIcon.setOnClickListener(this)
|
||||
filtrateLayout.setOnClickListener(this)
|
||||
submit.setOnClickListener(this)
|
||||
reset.setOnClickListener(this)
|
||||
|
||||
wbNo.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
if (s != null && s.toString().length > 11) {
|
||||
Common.alertDialog(ActivityCollector.getLastActivity()!!, "运单号不能超过11位!") { dialog ->
|
||||
wbNo.setText(s.toString().substring(0, 11))
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
val format = ymdSdf.format(Date())
|
||||
startDate.text = "$format 00:00:00"
|
||||
endDate.text = "$format 23:59:59"
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_gnj_yi_ku2, container, false)
|
||||
}
|
||||
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
super.onActivityCreated(savedInstanceState)
|
||||
|
||||
initView()
|
||||
|
||||
//初始化查询
|
||||
searchFun()
|
||||
yiKuActivity.loading()
|
||||
//查询返回结果
|
||||
viewModel.searchParamLive.observe(yiKuActivity) {
|
||||
yiKuActivity.loadingCancel()
|
||||
//1.获取数据
|
||||
var listArr: JSONArray = it["list"] as JSONArray
|
||||
totalPage = it["pages"] as Int
|
||||
// var listArr :JSONArray =it["list"] as JSONArray
|
||||
if (listArr.size > 0) {
|
||||
collectList.clear()
|
||||
|
||||
//2.循环遍历塞入collectList
|
||||
listArr.forEach {
|
||||
val itemObj = it as JSONObject
|
||||
|
||||
val id = itemObj.getString("moveId")
|
||||
val no = itemObj.getString("wbNo") ?: ""
|
||||
val fno = itemObj.getString("fno") ?: ""
|
||||
val pc = itemObj.getIntValue("pc")
|
||||
val weight = itemObj.getDoubleValue("weight")//实到重量
|
||||
|
||||
val goods = itemObj.getString("goods") ?: ""
|
||||
val agentCode = itemObj.getString("agentCode") ?: ""
|
||||
val spCode = itemObj.getString("spCode") ?: ""
|
||||
val pickDate = itemObj.getString("chargeTime") ?: ""
|
||||
|
||||
val origin = itemObj.getString("origin") ?: ""
|
||||
val dest = itemObj.getString("dest") ?: ""
|
||||
val flight = itemObj.getString("flight") ?: ""
|
||||
val awbType = itemObj.getString("awbType") ?: ""
|
||||
|
||||
//列表赋值
|
||||
collectList.add(
|
||||
GnjYiKu2ListModel(
|
||||
id,
|
||||
no,
|
||||
fno,
|
||||
pc,
|
||||
weight,
|
||||
goods,
|
||||
agentCode,
|
||||
spCode,
|
||||
pickDate, origin, dest, flight, awbType, false
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
//3.调adpter展示
|
||||
if (currentPage == 1) {
|
||||
adapter.notifyDataSetChanged()
|
||||
} else {
|
||||
adapter.notifyItemRangeInserted((currentPage - 1) * 10, collectList.size)
|
||||
}
|
||||
refreshLayout.finishRefresh()
|
||||
refreshLayout.finishLoadMore()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/////////////// 下拉框 start
|
||||
viewModel.awb(Constant.businessType.CI)
|
||||
viewModel.awbObserver.observe(yiKuActivity) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择运单类型"
|
||||
noneObj["code"] = ""
|
||||
viewModel.awbList.add(noneObj)
|
||||
viewModel.awbList.addAll(vd.getJSONArray("data"))
|
||||
}
|
||||
/////////////// 下拉框 end
|
||||
|
||||
/////////////////////////////// 加载刷新的布局
|
||||
refreshLayout = yiKuActivity.findViewById<View>(R.id.refreshLayout) as RefreshLayout
|
||||
refreshLayout.setRefreshHeader(ClassicsHeader(yiKuActivity))
|
||||
refreshLayout.setRefreshFooter(ClassicsFooter(yiKuActivity))
|
||||
/////////////////////////////// 下拉刷新
|
||||
refreshLayout.setOnRefreshListener {
|
||||
resetSearch()
|
||||
}
|
||||
/////////////////////////////// 上拉加载
|
||||
refreshLayout.setOnLoadMoreListener {
|
||||
if (currentPage < totalPage) {
|
||||
currentPage++
|
||||
//初始化查询
|
||||
searchFun()
|
||||
} else {
|
||||
refreshLayout.finishLoadMoreWithNoMoreData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (data != null) {
|
||||
val content = data.getStringExtra(com.yzq.zxinglibrary.common.Constant.CODED_CONTENT)
|
||||
// 扫描二维码/条码回传
|
||||
when (requestCode) {
|
||||
Constant.RequestCode.gnj_yiku2_id_scan -> {
|
||||
id.setText(content)
|
||||
resetSearch()
|
||||
}
|
||||
Constant.RequestCode.gnj_yiku2_wb_no_scan -> {
|
||||
wbNo.setText(content)
|
||||
resetSearch()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
when (it.id) {
|
||||
R.id.tool_back -> {
|
||||
if (searchListFragment.visibility == View.GONE && filtrateFragment.visibility == View.VISIBLE) {
|
||||
searchListFragment.visibility = View.VISIBLE
|
||||
filtrateFragment.visibility = View.GONE
|
||||
titleName.text = currentTitleName
|
||||
} else {
|
||||
yiKuActivity.finish()
|
||||
}
|
||||
}
|
||||
R.id.searchLayout -> {
|
||||
resetSearch()
|
||||
}
|
||||
R.id.filtrateLayout -> {
|
||||
if (searchListFragment.visibility == View.VISIBLE && filtrateFragment.visibility == View.GONE) {
|
||||
searchListFragment.visibility = View.GONE
|
||||
filtrateFragment.visibility = View.VISIBLE
|
||||
titleName.text = "搜索"
|
||||
} else {
|
||||
searchListFragment.visibility = View.VISIBLE
|
||||
filtrateFragment.visibility = View.GONE
|
||||
titleName.text = currentTitleName
|
||||
}
|
||||
// Common.showToast(this,"筛选")
|
||||
}
|
||||
R.id.startDate -> {
|
||||
Common.onYearMonthDayTime(yiKuActivity, startDate.text.toString()) { year, month, day, hour, min, second ->
|
||||
calendar.set(year, month - 1, day, hour, min, second)
|
||||
startDate.text = ymdHmsSdf.format(calendar.time)
|
||||
}
|
||||
}
|
||||
R.id.endDate -> {
|
||||
Common.onYearMonthDayTime(yiKuActivity, endDate.text.toString()) { year, month, day, hour, min, second ->
|
||||
calendar.set(year, month - 1, day, hour, min, second)
|
||||
endDate.text = ymdHmsSdf.format(calendar.time)
|
||||
}
|
||||
}
|
||||
R.id.awbType -> {
|
||||
Common.singleSelect(yiKuActivity, "运单类型", viewModel.awbList, awbTypeValue) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
awbType.text = name
|
||||
awbTypeValue = code
|
||||
}
|
||||
}
|
||||
R.id.idScanIcon -> {
|
||||
scanCode(Constant.RequestCode.gnj_yiku2_id_scan)
|
||||
}
|
||||
R.id.wbNoScanIcon -> {
|
||||
scanCode(Constant.RequestCode.gnj_yiku2_wb_no_scan)
|
||||
}
|
||||
R.id.submit -> {
|
||||
titleName.text = currentTitleName
|
||||
//搜索
|
||||
resetSearch()
|
||||
}
|
||||
R.id.reset -> {
|
||||
resetFun()
|
||||
}
|
||||
else -> {
|
||||
Toast.makeText(yiKuActivity, "未找到对应操作", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
private fun searchFun() {
|
||||
//筛选页隐藏
|
||||
searchListFragment.visibility = View.VISIBLE
|
||||
filtrateFragment.visibility = View.GONE
|
||||
yiKuActivity.loading()
|
||||
viewModel.search(
|
||||
pageSize,
|
||||
currentPage,
|
||||
startDate.text.toString(),
|
||||
endDate.text.toString(),
|
||||
awbTypeValue,
|
||||
id.text.toString(),
|
||||
wbNo.text.toString()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置数据,搜索
|
||||
*/
|
||||
private fun resetSearch() {
|
||||
//recyclerView 清除所有数据数据
|
||||
refreshLayout.setNoMoreData(false)
|
||||
adapter.notifyItemRangeRemoved(0, collectList.size)
|
||||
collectList.clear()
|
||||
currentPage = 1
|
||||
searchFun()
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置筛选条件
|
||||
*/
|
||||
private fun resetFun() {
|
||||
currentPage = 1
|
||||
val format = ymdSdf.format(Date())
|
||||
startDate.text = "$format 00:00:00"
|
||||
endDate.text = "$format 23:59:59"
|
||||
wbNo.setText("")
|
||||
id.setText("")
|
||||
awbType.text = ""
|
||||
awbTypeValue = ""
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码功能
|
||||
*/
|
||||
fun scanCode(requestCode: Int) {
|
||||
AndPermission.with(this)
|
||||
.runtime()
|
||||
.permission(Permission.CAMERA, Permission.READ_EXTERNAL_STORAGE)
|
||||
.onGranted { data: List<String?>? ->
|
||||
val intent = Intent(yiKuActivity, CaptureActivity::class.java)
|
||||
val config = ZxingConfig()
|
||||
config.isFullScreenScan = false //是否全屏扫描 默认为true 设为false则只会在扫描框中扫描
|
||||
intent.putExtra(com.yzq.zxinglibrary.common.Constant.INTENT_ZXING_CONFIG, config)
|
||||
startActivityForResult(intent, requestCode)
|
||||
}
|
||||
.onDenied { data: List<String?>? ->
|
||||
val packageURI = Uri.parse("package:${yiKuActivity.packageName}")
|
||||
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, packageURI)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
startActivity(intent)
|
||||
Toast.makeText(yiKuActivity, "没有权限无法扫描呦", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
.start()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,398 @@
|
||||
package com.lukouguoji.gnj.fragment
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.*
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.activity.GnjYiKuListActivity
|
||||
import com.lukouguoji.gnj.adapt.GnjYiKuListAdapter
|
||||
import com.lukouguoji.gnj.model.GnjYiKuListModel
|
||||
import com.lukouguoji.gnj.viewModel.GnjYiKuListViewModel
|
||||
import com.lukouguoji.module_base.ActivityCollector
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
import com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
import com.scwang.smart.refresh.header.ClassicsHeader
|
||||
import com.scwang.smart.refresh.layout.api.RefreshLayout
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
|
||||
class GnjYiKuFragment : Fragment(), View.OnClickListener {
|
||||
private lateinit var yiKuActivity: GnjYiKuListActivity
|
||||
private lateinit var viewModel: GnjYiKuListViewModel
|
||||
private lateinit var adapter: GnjYiKuListAdapter
|
||||
private val collectList = ArrayList<GnjYiKuListModel>()
|
||||
private lateinit var refreshLayout: RefreshLayout
|
||||
private var currentPage = 1
|
||||
private var pageSize = 10
|
||||
private var totalPage = 0
|
||||
private var totalCount = 0 //总条数
|
||||
|
||||
//搜索
|
||||
private lateinit var awbType: TextView
|
||||
private var awbTypeValue = ""
|
||||
private lateinit var wbNo: EditText
|
||||
private lateinit var carrier: EditText
|
||||
|
||||
private lateinit var searchLayout: LinearLayout
|
||||
private lateinit var checkIcon: ImageView
|
||||
private lateinit var quickSearch: EditText
|
||||
private var isAllCheck = false
|
||||
|
||||
//列表
|
||||
private lateinit var listLayout: LinearLayout
|
||||
private lateinit var totalLayout: LinearLayout
|
||||
|
||||
//底部
|
||||
private lateinit var totalPc: TextView
|
||||
private lateinit var selPc: TextView
|
||||
private lateinit var send: TextView
|
||||
|
||||
private fun initView() {
|
||||
yiKuActivity = activity!! as GnjYiKuListActivity
|
||||
|
||||
viewModel = ViewModelProvider(this).get(GnjYiKuListViewModel::class.java)
|
||||
val layoutManager = LinearLayoutManager(yiKuActivity)
|
||||
adapter = GnjYiKuListAdapter(yiKuActivity, viewModel, collectList)
|
||||
var recyclerView: RecyclerView = yiKuActivity.findViewById(R.id.collectList)
|
||||
recyclerView.layoutManager = layoutManager
|
||||
recyclerView.adapter = adapter
|
||||
refreshLayout = yiKuActivity.findViewById(R.id.refreshLayout)
|
||||
|
||||
awbType = yiKuActivity.findViewById(R.id.awbType)
|
||||
wbNo = yiKuActivity.findViewById(R.id.wbNo)
|
||||
carrier = yiKuActivity.findViewById(R.id.carrier)
|
||||
|
||||
searchLayout = yiKuActivity.findViewById(R.id.searchLayout)
|
||||
checkIcon = yiKuActivity.findViewById(R.id.checkIcon)
|
||||
quickSearch = yiKuActivity.findViewById(R.id.quickSearch)
|
||||
//列表
|
||||
listLayout = yiKuActivity.findViewById(R.id.listLayout)
|
||||
totalLayout = yiKuActivity.findViewById(R.id.totalLayout)
|
||||
//底部
|
||||
totalPc = yiKuActivity.findViewById(R.id.totalPc)
|
||||
selPc = yiKuActivity.findViewById(R.id.selPc)
|
||||
send = yiKuActivity.findViewById(R.id.send)
|
||||
|
||||
awbType.setOnClickListener(this)
|
||||
searchLayout.setOnClickListener(this)
|
||||
checkIcon.setOnClickListener(this)
|
||||
send.setOnClickListener(this)
|
||||
|
||||
quickSearch.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
if (s != null && s.toString() != "") {
|
||||
val filterCollectionList = collectList.filter { c -> c.wbNo.contains(s.toString()) }
|
||||
recyclerView.adapter = GnjYiKuListAdapter(
|
||||
ActivityCollector.getLastActivity()!!,
|
||||
viewModel,
|
||||
filterCollectionList as MutableList<GnjYiKuListModel>
|
||||
)
|
||||
} else {
|
||||
recyclerView.adapter = GnjYiKuListAdapter(
|
||||
ActivityCollector.getLastActivity()!!,
|
||||
viewModel,
|
||||
collectList
|
||||
)
|
||||
}
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
wbNo.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
if (s != null && s.toString().length > 11) {
|
||||
Common.alertDialog(ActivityCollector.getLastActivity()!!, "运单号不能超过11位!") { dialog ->
|
||||
wbNo.setText(s.toString().substring(0, 11))
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
carrier.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(editable: Editable?) {
|
||||
val originText = editable.toString()
|
||||
if (originText != null && originText != "") {
|
||||
val regularExpression = "(^([A-Z]+)$)"
|
||||
val matches = originText.matches(regularExpression.toRegex())
|
||||
if(!matches){
|
||||
val regularExpression2 = "([^A-Za-z]+)"
|
||||
val replaceStr = originText.replace(regularExpression2.toRegex(),"")
|
||||
val replaceStrToUpper = replaceStr.uppercase(Locale.ROOT)//小写转大写
|
||||
carrier.setText(replaceStrToUpper)
|
||||
carrier.setSelection(replaceStrToUpper.length)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_gnj_yi_ku, container, false)
|
||||
}
|
||||
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
super.onActivityCreated(savedInstanceState)
|
||||
initView()
|
||||
yiKuActivity.setBackArrow("国内进港移库")
|
||||
//查询返回结果
|
||||
viewModel.searchParamLive.observe(yiKuActivity) {
|
||||
yiKuActivity.loadingCancel()
|
||||
//1.获取数据
|
||||
var listArr: JSONArray = it["list"] as JSONArray
|
||||
totalCount = it.getIntValue("total")
|
||||
totalPage = it["pages"] as Int
|
||||
// var listArr :JSONArray =it["list"] as JSONArray
|
||||
if (listArr.size > 0) {
|
||||
listLayout.visibility = View.VISIBLE
|
||||
totalLayout.visibility = View.VISIBLE
|
||||
//2.循环遍历塞入collectList
|
||||
listArr.forEach {
|
||||
val itemObj = it as JSONObject
|
||||
|
||||
val id = itemObj.getIntValue("mawbId")
|
||||
val pkId = itemObj.getString("pkId") ?: ""
|
||||
val no = itemObj.getString("wbNo") ?: ""
|
||||
val fno = itemObj.getString("fno") ?: ""
|
||||
val pc = itemObj.getIntValue("pc")
|
||||
val weight = itemObj.getDoubleValue("weight")//实到重量
|
||||
|
||||
val goods = itemObj.getString("goods") ?: ""
|
||||
val agentCode = itemObj.getString("agentCode") ?: ""
|
||||
val spCode = itemObj.getString("spCode") ?: ""
|
||||
val pickDate = itemObj.getString("chargeTime") ?: ""
|
||||
val origin = itemObj.getString("origin") ?: ""
|
||||
val dest = itemObj.getString("dest") ?: ""
|
||||
val awbType = itemObj.getString("awbType") ?: ""
|
||||
|
||||
//列表赋值
|
||||
collectList.add(
|
||||
GnjYiKuListModel(
|
||||
id,
|
||||
no,
|
||||
pkId,
|
||||
fno,
|
||||
pc,
|
||||
weight,
|
||||
goods,
|
||||
agentCode,
|
||||
spCode,
|
||||
pickDate, origin, dest, awbType, false
|
||||
)
|
||||
)
|
||||
}
|
||||
//3.调adpter展示
|
||||
if (currentPage == 1) {
|
||||
adapter.notifyDataSetChanged()
|
||||
} else {
|
||||
adapter.notifyItemRangeInserted((currentPage - 1) * 10, collectList.size)
|
||||
}
|
||||
refreshLayout.finishRefresh()
|
||||
refreshLayout.finishLoadMore()
|
||||
|
||||
}
|
||||
|
||||
totalPc.text = totalCount.toString()
|
||||
selPc.text = viewModel.checkCount.value.toString()
|
||||
}
|
||||
|
||||
//确认移库 返回结果
|
||||
viewModel.moveGnjYiKuObserver.observe(yiKuActivity) {
|
||||
yiKuActivity.loadingCancel()
|
||||
val status = it.getString("status")
|
||||
val msg = it.getString("msg")
|
||||
if (Constant.Result.succ == status) {
|
||||
var dataStatus = it.getString("data")
|
||||
if (Constant.Result.succ == dataStatus) {
|
||||
if (msg != null && msg != "") {
|
||||
Common.showToast(yiKuActivity, msg)
|
||||
} else {
|
||||
Common.showToast(yiKuActivity, "移库成功!")
|
||||
}
|
||||
} else {
|
||||
if (msg != null && msg != "") {
|
||||
Common.showToast(yiKuActivity, msg)
|
||||
} else {
|
||||
Common.showToast(yiKuActivity, "移库失败!")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (msg != null && msg != "") {
|
||||
Common.showToast(yiKuActivity, msg)
|
||||
} else {
|
||||
Common.showToast(yiKuActivity, "移库失败!")
|
||||
}
|
||||
}
|
||||
//重新搜索
|
||||
resetSearch()
|
||||
}
|
||||
|
||||
//监听 复选框选中
|
||||
viewModel.checkCount.observe(yiKuActivity) {
|
||||
selPc.text = it.toString()
|
||||
}
|
||||
|
||||
//搜索
|
||||
resetSearch()
|
||||
|
||||
/////////////////////////////// 加载刷新的布局
|
||||
refreshLayout.setRefreshHeader(ClassicsHeader(yiKuActivity))
|
||||
refreshLayout.setRefreshFooter(ClassicsFooter(yiKuActivity))
|
||||
/////////////////////////////// 下拉刷新
|
||||
refreshLayout.setOnRefreshListener {
|
||||
resetSearch()
|
||||
}
|
||||
/////////////////////////////// 上拉加载
|
||||
refreshLayout.setOnLoadMoreListener {
|
||||
if (currentPage < totalPage) {
|
||||
currentPage++
|
||||
//初始化查询
|
||||
searchFun()
|
||||
} else {
|
||||
refreshLayout.finishLoadMoreWithNoMoreData()
|
||||
}
|
||||
}
|
||||
|
||||
/////////////// 下拉框 start
|
||||
viewModel.awb(System.currentTimeMillis().toString())
|
||||
viewModel.awbObserver.observe(yiKuActivity) { vd ->
|
||||
val noneObj = JSONObject()
|
||||
noneObj["name"] = "请选择运单类型"
|
||||
noneObj["code"] = ""
|
||||
viewModel.awbList.add(noneObj)
|
||||
viewModel.awbList.addAll(vd.getJSONArray("data"))
|
||||
}
|
||||
/////////////// 下拉框 end
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
when (it.id) {
|
||||
R.id.awbType -> {
|
||||
Common.singleSelect(yiKuActivity, "运单类型", viewModel.awbList, awbTypeValue) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
awbType.text = name
|
||||
awbTypeValue = code
|
||||
}
|
||||
}
|
||||
R.id.searchLayout -> {
|
||||
// viewModel.queryPickByIdGnjChuKu("M000995643")
|
||||
resetSearch()
|
||||
}
|
||||
R.id.checkIcon -> {
|
||||
//重置 isAllCheck
|
||||
isAllCheck = !isAllCheck
|
||||
|
||||
collectList.forEach { c ->
|
||||
c.isCheck = isAllCheck
|
||||
}
|
||||
if (isAllCheck) {
|
||||
viewModel.setCheckCount(totalCount)
|
||||
} else {
|
||||
viewModel.setCheckCount(0)
|
||||
}
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
R.id.send -> {
|
||||
val ids = collectList.filter { c -> c.isCheck }.map { c -> c.id }
|
||||
viewModel.moveGnjYiKu(ids)
|
||||
}
|
||||
else -> {
|
||||
Toast.makeText(yiKuActivity, "未找到对应操作", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码返回的结果
|
||||
*/
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
// 扫描二维码/条码回传
|
||||
if (resultCode == AppCompatActivity.RESULT_OK && data != null) {
|
||||
val content = data.getStringExtra(com.yzq.zxinglibrary.common.Constant.CODED_CONTENT)
|
||||
if (content == null) {
|
||||
Common.showToast(yiKuActivity, "条码错误!")
|
||||
return
|
||||
}
|
||||
when (requestCode) {
|
||||
Constant.RequestCode.gnj_chu_ku_list -> {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
private fun searchFun() {
|
||||
yiKuActivity.loading()
|
||||
listLayout.visibility = View.GONE
|
||||
totalLayout.visibility = View.GONE
|
||||
viewModel.search(
|
||||
pageSize,
|
||||
currentPage,
|
||||
wbNo.text.toString(),
|
||||
awbTypeValue,
|
||||
carrier.text.toString()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置数据,搜索
|
||||
*/
|
||||
private fun resetSearch() {
|
||||
//recyclerView 清除所有数据数据
|
||||
viewModel.setCheckCount(0)
|
||||
refreshLayout.setNoMoreData(false)
|
||||
adapter.notifyItemRangeRemoved(0, collectList.size)
|
||||
collectList.clear()
|
||||
currentPage = 1
|
||||
searchFun()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.lukouguoji.gnj.model
|
||||
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
|
||||
class GnjCangDanInfoItemModel(
|
||||
val isMust: Boolean,//是否必选
|
||||
val isEnable: Boolean,//是否允许操作
|
||||
val titleName: String,//输入框名字
|
||||
val titleCode: String,
|
||||
val isSel: Boolean,//是否下拉框
|
||||
|
||||
var inputContent: String,//输入框内容
|
||||
|
||||
val selList: JSONArray?,//下拉框数据集合
|
||||
var selContentCode: String,//下拉框code
|
||||
|
||||
val titleCodePre: String?,
|
||||
var inputContentPre: String?,//输入框内容前缀
|
||||
) {
|
||||
|
||||
/**
|
||||
* 输入框构造
|
||||
*/
|
||||
constructor(isMust: Boolean, isEnable: Boolean, titleName: String, titleCode: String, inputContent: String) : this(
|
||||
isMust,
|
||||
isEnable,
|
||||
titleName,
|
||||
titleCode,
|
||||
false,
|
||||
inputContent,
|
||||
null,
|
||||
"",
|
||||
null,
|
||||
null
|
||||
)
|
||||
|
||||
/**
|
||||
* 2个输入框构造 运单
|
||||
*/
|
||||
constructor(
|
||||
isMust: Boolean,
|
||||
isEnable: Boolean,
|
||||
titleName: String,
|
||||
titleCode: String,
|
||||
inputContent: String,
|
||||
titleCodePre: String,
|
||||
inputContentPre: String
|
||||
) : this(
|
||||
isMust,
|
||||
isEnable,
|
||||
titleName,
|
||||
titleCode,
|
||||
false,
|
||||
inputContent,
|
||||
null,
|
||||
"",
|
||||
titleCodePre,
|
||||
inputContentPre
|
||||
)
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框构造
|
||||
*/
|
||||
constructor(
|
||||
isMust: Boolean, isEnable: Boolean, titleName: String, titleCode: String,
|
||||
selList: JSONArray,
|
||||
selContentCode: String
|
||||
) : this(
|
||||
isMust,
|
||||
isEnable,
|
||||
titleName,
|
||||
titleCode,
|
||||
true,
|
||||
"",
|
||||
selList,
|
||||
selContentCode,
|
||||
null,
|
||||
null
|
||||
)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.lukouguoji.gnj.model
|
||||
|
||||
class GnjCangDanListModel(
|
||||
val id: String,
|
||||
val wbNo: String,
|
||||
val goods: String, //品名
|
||||
val awbType: String, //运单类型
|
||||
val startPort: String, //始发港
|
||||
val destPort: String, //目的港
|
||||
val agentCode: String, //代理
|
||||
val spCode: String, //特码
|
||||
val totalPc: Int, //总件数
|
||||
val pc: Int, //件数
|
||||
val acWeight: Double, //实到重量
|
||||
|
||||
var isCheck: Boolean, //复选框 选中
|
||||
var ref: String //== '1' 只能查看 不能修改
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.lukouguoji.gnj.model
|
||||
|
||||
class GnjChuKuListModel(
|
||||
val id: Int,
|
||||
val wbNo: String,
|
||||
val pickNo: String,
|
||||
val fno: String,
|
||||
val pc: Int, //件数
|
||||
val weight: Double, //重量
|
||||
|
||||
val fdate: String, //航班日期
|
||||
val goods: String, //品名
|
||||
val agentCode: String, //代理
|
||||
val spCode: String, //特码
|
||||
val pickDate: String, //提取日期
|
||||
|
||||
var isCheck: Boolean, //复选框 选中
|
||||
)
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.lukouguoji.gnj.model
|
||||
|
||||
class GnjQueryInfo(
|
||||
val id: Int,
|
||||
val title: String,
|
||||
val content: String
|
||||
)
|
||||
|
||||
/**
|
||||
* 关联运单
|
||||
*/
|
||||
class GnjQueryInfoWh(
|
||||
val id: Int,
|
||||
val wbNo: String,
|
||||
val location: String,//库位
|
||||
val pc: Int,//件数
|
||||
val weight: Double,//重量
|
||||
val flight: String,//航班
|
||||
val opDate: String,//入库时间
|
||||
val mclose: String,//出库时间
|
||||
val opId: String //收运人
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.lukouguoji.gnj.model
|
||||
|
||||
class GnjQueryList(
|
||||
val mawbId: Int,
|
||||
val wbNo: String,
|
||||
val agentCode: String,
|
||||
val spCode: String,
|
||||
val goods: String,
|
||||
val flight: String,
|
||||
val range: String
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.lukouguoji.gnj.model
|
||||
|
||||
class GnjRuKuRef(
|
||||
val mfId: Int,
|
||||
val wbNo: String,
|
||||
val totalPc: Int,
|
||||
val pc: Int,
|
||||
val weight: Double,
|
||||
val cashWeight: Double,
|
||||
val origin: String,
|
||||
val dest: String,
|
||||
val agentCode: String,
|
||||
val spCode: String,
|
||||
val goods: String,
|
||||
val confirmDate: String,
|
||||
val confirmId: String,
|
||||
var isCheck: Boolean //复选框 选中
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.lukouguoji.gnj.model
|
||||
|
||||
class GnjWareHouseInfo(
|
||||
val id: Int,
|
||||
val title: String,
|
||||
val content: String
|
||||
)
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.lukouguoji.gnj.model
|
||||
|
||||
class GnjWareHouseList(
|
||||
val id: Int,
|
||||
val waybillNo: String,
|
||||
val pc: Int,
|
||||
val weight: Double,
|
||||
val fno: String,//航班号
|
||||
val flight: String,//航班
|
||||
val date: String,//入库时间
|
||||
val isCangDan: String,
|
||||
val groupTitle: String,
|
||||
val groupName: String,
|
||||
val days: String?,//入库天数
|
||||
|
||||
val goods: String,//品名
|
||||
val spCode: String,//特码
|
||||
val agentCode: String,//代理人
|
||||
val by1: String,//承运人
|
||||
val origin: String,//始发港
|
||||
val location: String,//库位
|
||||
val awbType: String,//运单类型
|
||||
val businessType: String,//业务类型
|
||||
val status: String,//状态
|
||||
)
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.lukouguoji.gnj.model
|
||||
|
||||
class GnjYiKu2ListModel(
|
||||
val id: String,
|
||||
val wbNo: String,
|
||||
val fno: String,
|
||||
val pc: Int, //件数
|
||||
val weight: Double, //重量
|
||||
|
||||
val goods: String, //品名
|
||||
val agentCode: String, //代理
|
||||
val spCode: String, //特码
|
||||
val pickDate: String, //提取日期
|
||||
|
||||
val origin: String, //始发港
|
||||
val dest: String, //目的港
|
||||
val flight: String, //航班
|
||||
val awbType: String, //运单类型
|
||||
|
||||
var isCheck: Boolean, //复选框 选中
|
||||
)
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.lukouguoji.gnj.model
|
||||
|
||||
class GnjYiKuListModel(
|
||||
val id: Int,
|
||||
val wbNo: String,
|
||||
val pickNo: String,
|
||||
val fno: String,
|
||||
val pc: Int, //件数
|
||||
val weight: Double, //重量
|
||||
|
||||
val goods: String, //品名
|
||||
val agentCode: String, //代理
|
||||
val spCode: String, //特码
|
||||
val pickDate: String, //提取日期
|
||||
val origin: String, //始发港
|
||||
val dest: String, //目的港
|
||||
val awbType: String, //运单类型
|
||||
|
||||
var isCheck: Boolean, //复选框 选中
|
||||
)
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.lukouguoji.gnj.page.cangdan.add
|
||||
|
||||
import android.os.Bundle
|
||||
import com.lukouguoji.gnj.R
|
||||
import com.lukouguoji.gnj.databinding.ActivityGnjCangDanAddBinding
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
|
||||
class GnjCangDanAddActivity:
|
||||
BaseBindingActivity<ActivityGnjCangDanAddBinding, GnjCangDanAddViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_gnj_cang_dan_add
|
||||
|
||||
override fun viewModelClass(): Class<GnjCangDanAddViewModel> {
|
||||
return GnjCangDanAddViewModel::class.java
|
||||
}
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国内出港组装")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
package com.lukouguoji.gnj.page.cangdan.add
|
||||
|
||||
import android.view.View
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.ktx.getActivity
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
|
||||
class GnjCangDanAddViewModel : BasePageViewModel() {
|
||||
|
||||
|
||||
// 运单号
|
||||
val waybillCode = MutableLiveData<String>()
|
||||
|
||||
//代理人
|
||||
var agentCodeList = JSONArray()
|
||||
var agentCode = MutableLiveData<String>()
|
||||
val agent = MutableLiveData<String>()
|
||||
|
||||
//特码
|
||||
var spCodeList = JSONArray()
|
||||
var spCodeValue = MutableLiveData<String>()
|
||||
val spCode = MutableLiveData<String>()
|
||||
|
||||
//运单件数
|
||||
val waybillCount = MutableLiveData("")
|
||||
|
||||
//实到件数
|
||||
val actualCount = MutableLiveData("")
|
||||
|
||||
//实到重量
|
||||
val actualWeight = MutableLiveData("")
|
||||
|
||||
//计费重量
|
||||
val chargingWeight = MutableLiveData("")
|
||||
|
||||
//始发港
|
||||
val origin = MutableLiveData("")
|
||||
|
||||
//目的港
|
||||
val dest = MutableLiveData("")
|
||||
|
||||
//运单类型
|
||||
val waybillTypeList = JSONArray()
|
||||
val waybillTypeCode = MutableLiveData<String>()
|
||||
val waybillType = MutableLiveData<String>()
|
||||
|
||||
//业务类型
|
||||
val businessTypeList = JSONArray()
|
||||
val businessTypeCode = MutableLiveData<String>()
|
||||
val businessType = MutableLiveData<String>()
|
||||
|
||||
//危险品库位
|
||||
val dgrLocationList = JSONArray()
|
||||
val dgrLocationCode = MutableLiveData<String>()
|
||||
val dgrLocation = MutableLiveData<String>()
|
||||
|
||||
//危险品描述
|
||||
val dgrDetailList = JSONArray()
|
||||
val dgrDetailCode = MutableLiveData<String>()
|
||||
val dgrDetail = MutableLiveData<String>()
|
||||
|
||||
//品名
|
||||
val goods = MutableLiveData<String>()
|
||||
|
||||
//备注
|
||||
val remark = MutableLiveData<String>()
|
||||
|
||||
//un编号
|
||||
val unCode = MutableLiveData<String>()
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 方法区
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
fun onSave(focused: Boolean = false) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
fun onCancel() {
|
||||
|
||||
}
|
||||
|
||||
override fun getData() {
|
||||
pageModel.handleDataList((0..3).toList())
|
||||
}
|
||||
|
||||
fun onAgentCode(view: View) {
|
||||
Common.singleSelect(view.context.getActivity(), "代理", agentCodeList, agentCode.value) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
agent.value = name
|
||||
agentCode.value = code
|
||||
}
|
||||
}
|
||||
|
||||
fun onSpcode(view: View) {
|
||||
Common.singleSelect(view.context.getActivity(), "特码", spCodeList, spCodeValue.value) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
spCode.value = name
|
||||
spCodeValue.value = code
|
||||
}
|
||||
}
|
||||
|
||||
fun onWaybillType(view: View) {
|
||||
Common.singleSelect(view.context.getActivity(), "运单类型", waybillTypeList, waybillTypeCode.value) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
waybillType.value = name
|
||||
waybillTypeCode.value = code
|
||||
}
|
||||
}
|
||||
|
||||
fun onBusinessType(view: View) {
|
||||
Common.singleSelect(view.context.getActivity(), "运单类型", businessTypeList, businessTypeCode.value) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
businessType.value = name
|
||||
businessTypeCode.value = code
|
||||
}
|
||||
}
|
||||
|
||||
fun onDgrLocation(view: View) {
|
||||
Common.singleSelect(view.context.getActivity(), "运单类型", dgrLocationList, dgrLocationCode.value) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
dgrLocation.value = name
|
||||
dgrLocationCode.value = code
|
||||
}
|
||||
}
|
||||
|
||||
fun onDgrDetail(view: View) {
|
||||
Common.singleSelect(view.context.getActivity(), "运单类型", dgrDetailList, dgrDetailCode.value) { _, item ->
|
||||
val jsonObject = item as JSONObject
|
||||
val name = jsonObject.getString("name")
|
||||
val code = jsonObject.getString("code")
|
||||
dgrDetail.value = name
|
||||
dgrDetailCode.value = code
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,257 @@
|
||||
package com.lukouguoji.gnj.viewModel
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.liveData
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.module_base.common.String.emptyToNull
|
||||
import com.lukouguoji.module_base.http.user.UserNetwork
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
||||
|
||||
class GnjCangDanInfoViewModel : ViewModel() {
|
||||
private val logName = "GnjCangDanInfoViewModel"
|
||||
|
||||
var waybillFormNetWork = JSONObject()
|
||||
|
||||
/**
|
||||
* 进港 舱单详情
|
||||
*/
|
||||
inner class WaybillParam(val wbId: Int, val wbNo: String?)
|
||||
|
||||
private val wbIdData = MutableLiveData<WaybillParam>()
|
||||
val waybillLiveData = Transformations.switchMap(wbIdData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = JSONObject()
|
||||
if (param.wbId != -9999) {
|
||||
response = UserNetwork.queryFestByIdGnjCangDan(param.wbId)
|
||||
} else if (param.wbNo != null) {
|
||||
response = UserNetwork.queryFestByWbNoGnjCangDan(param.wbNo)
|
||||
} else {
|
||||
}
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e(logName, e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun queryWaybillById(wbId: Int, wbNo: String?) {
|
||||
wbIdData.value = WaybillParam(wbId, wbNo)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 代理人
|
||||
*/
|
||||
var agentCodeList = JSONArray()
|
||||
private val agentCodeLiveData = MutableLiveData<String>()
|
||||
fun agentCode(time: String) {
|
||||
agentCodeLiveData.value = time
|
||||
}
|
||||
|
||||
val agentCodeObserver = Transformations.switchMap(agentCodeLiveData) { _ ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.agentCodeGnj()
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutStartViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
var businessList = JSONArray()
|
||||
private val businessLiveData = MutableLiveData<String>()
|
||||
fun business(type: String) {
|
||||
businessLiveData.value = type
|
||||
}
|
||||
|
||||
val businessObserver = Transformations.switchMap(businessLiveData) { type ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.business(type)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutStartViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 特码
|
||||
*/
|
||||
var specialCodeList = JSONArray()
|
||||
private val specialCodeLiveData = MutableLiveData<String>()
|
||||
fun specialCode(time: String) {
|
||||
specialCodeLiveData.value = time
|
||||
}
|
||||
|
||||
val specialCodeObserver = Transformations.switchMap(specialCodeLiveData) { _ ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.specialCode()
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutStartViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 运单类型
|
||||
*/
|
||||
var awbList = JSONArray()
|
||||
private val awbLiveData = MutableLiveData<String>()
|
||||
fun awb(type: String) {
|
||||
awbLiveData.value = type
|
||||
}
|
||||
|
||||
val awbObserver = Transformations.switchMap(awbLiveData) { type ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.awb(type)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutStartViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 进港 新增舱单
|
||||
*/
|
||||
private val saveFestGnjCangDanLiveData = MutableLiveData<JSONObject>()
|
||||
val saveFestGnjCangDanObserver = Transformations.switchMap(saveFestGnjCangDanLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.saveFestGnjCangDan(param)
|
||||
emit(response)
|
||||
|
||||
} catch (e: Exception) {
|
||||
Log.e(logName, e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun saveFestGnjCangDan(
|
||||
fid: Int,
|
||||
prefix: String?,
|
||||
no: String?,
|
||||
agentCode: String?,
|
||||
spCode: String,
|
||||
location: String,
|
||||
totalPc: Int,
|
||||
pc: Int,
|
||||
weight: Double,
|
||||
goods: String?,
|
||||
origin: String?,
|
||||
dest: String?,
|
||||
businessType: String?,
|
||||
remark: String?,
|
||||
awbType: String?,
|
||||
consignee: String?,
|
||||
cneeId: String?,
|
||||
cneeTel: String?
|
||||
) {
|
||||
val temObj = JSONObject()
|
||||
temObj["fid"] = fid
|
||||
temObj["prefix"] = prefix.emptyToNull()
|
||||
temObj["no"] = no.emptyToNull()
|
||||
temObj["agentCode"] = agentCode.emptyToNull()
|
||||
temObj["spCode"] = spCode.emptyToNull()
|
||||
temObj["location"] = location.emptyToNull()
|
||||
temObj["totalPc"] = totalPc
|
||||
temObj["pc"] = pc
|
||||
temObj["weight"] = weight
|
||||
temObj["goods"] = goods.emptyToNull()
|
||||
temObj["origin"] = origin.emptyToNull()
|
||||
temObj["dest"] = dest.emptyToNull()
|
||||
temObj["businessType"] = businessType.emptyToNull()
|
||||
temObj["remark"] = remark.emptyToNull()
|
||||
temObj["awbType"] = awbType.emptyToNull()
|
||||
temObj["consignee"] = consignee.emptyToNull()
|
||||
temObj["cneeId"] = cneeId.emptyToNull()
|
||||
temObj["cneeTel"] = cneeTel.emptyToNull()
|
||||
|
||||
saveFestGnjCangDanLiveData.value = temObj
|
||||
}
|
||||
|
||||
/**
|
||||
* 进港 修改舱单
|
||||
*/
|
||||
private val updateFestGnjCangDanLiveData = MutableLiveData<JSONObject>()
|
||||
val updateFestGnjCangDanObserver = Transformations.switchMap(updateFestGnjCangDanLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.updateFestGnjCangDan(param)
|
||||
emit(response)
|
||||
|
||||
} catch (e: Exception) {
|
||||
Log.e(logName, e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun updateFestGnjCangDan(
|
||||
mfId: Int,
|
||||
fid: Int,
|
||||
prefix: String,
|
||||
no: String,
|
||||
agentCode: String,
|
||||
spCode: String,
|
||||
location: String,
|
||||
totalPc: Int,
|
||||
pc: Int,
|
||||
weight: Double,
|
||||
goods: String,
|
||||
origin: String,
|
||||
dest: String,
|
||||
businessType: String,
|
||||
remark: String,
|
||||
awbType: String,
|
||||
consignee: String,
|
||||
cneeId: String,
|
||||
cneeTel: String
|
||||
) {
|
||||
|
||||
val temObj = JSONObject()
|
||||
temObj["mfId"] = mfId
|
||||
temObj["fid"] = fid
|
||||
temObj["prefix"] = prefix.emptyToNull()
|
||||
temObj["no"] = no.emptyToNull()
|
||||
temObj["agentCode"] = agentCode.emptyToNull()
|
||||
temObj["spCode"] = spCode.emptyToNull()
|
||||
temObj["location"] = location.emptyToNull()
|
||||
temObj["totalPc"] = totalPc
|
||||
temObj["pc"] = pc
|
||||
temObj["weight"] = weight
|
||||
temObj["goods"] = goods.emptyToNull()
|
||||
temObj["origin"] = origin.emptyToNull()
|
||||
temObj["dest"] = dest.emptyToNull()
|
||||
temObj["businessType"] = businessType.emptyToNull()
|
||||
temObj["remark"] = remark.emptyToNull()
|
||||
temObj["awbType"] = awbType.emptyToNull()
|
||||
temObj["consignee"] = consignee.emptyToNull()
|
||||
temObj["cneeId"] = cneeId.emptyToNull()
|
||||
temObj["cneeTel"] = cneeTel.emptyToNull()
|
||||
|
||||
updateFestGnjCangDanLiveData.value = temObj
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
package com.lukouguoji.gnj.viewModel
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.*
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.module_base.common.String.emptyToNull
|
||||
import com.lukouguoji.module_base.http.user.UserNetwork
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
||||
class GnjCangDanListViewModel : ViewModel() {
|
||||
/**
|
||||
* 航班号
|
||||
*/
|
||||
var fid: Int? = null
|
||||
var prefix: String? = null
|
||||
var fdest:String? = null
|
||||
var fdep :String? = null
|
||||
|
||||
|
||||
/**
|
||||
* 选中
|
||||
*/
|
||||
val checkCount: LiveData<Int>
|
||||
get() = _checkCount
|
||||
|
||||
private val _checkCount = MutableLiveData<Int>()
|
||||
|
||||
init {
|
||||
_checkCount.value = 0
|
||||
}
|
||||
|
||||
fun plusOne() {
|
||||
val count = _checkCount.value ?: 0
|
||||
_checkCount.value = count + 1
|
||||
}
|
||||
|
||||
fun subOne() {
|
||||
val count = _checkCount.value ?: 0
|
||||
_checkCount.value = count - 1
|
||||
}
|
||||
|
||||
fun setCheckCount(count: Int) {
|
||||
_checkCount.value = count
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页搜索
|
||||
*/
|
||||
private val searchParam = MutableLiveData<JSONObject>()
|
||||
val searchParamLive = Transformations.switchMap(searchParam) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.searchGnjCangDanList(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GnjCangDanListViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun search(
|
||||
limit: Int,
|
||||
page: Int,
|
||||
carrier: String,
|
||||
beginDate: String,
|
||||
endDate: String,
|
||||
fdate: String,//航班日期
|
||||
fno: String,//航班编码
|
||||
dest: String,//目的港
|
||||
location: String,//舱位
|
||||
range: String,
|
||||
status: String,
|
||||
wbNo: String,
|
||||
groupName: String,
|
||||
agentCode: String,
|
||||
awbType: String,
|
||||
businessType: String,
|
||||
goods: String,
|
||||
spCode: String
|
||||
) {
|
||||
|
||||
val param = JSONObject()
|
||||
param["limit"] = limit
|
||||
param["page"] = page
|
||||
param["carrier"] = carrier.emptyToNull()
|
||||
param["beginDate"] = beginDate.emptyToNull()
|
||||
param["endDate"] = endDate.emptyToNull()
|
||||
param["fdate"] = fdate.emptyToNull()
|
||||
param["dest"] = dest.emptyToNull()
|
||||
param["fno"] = fno.emptyToNull()
|
||||
param["location"] = location.emptyToNull()
|
||||
param["range"] = range.emptyToNull()
|
||||
param["locStatus"] = status.emptyToNull()
|
||||
param["wbNo"] = wbNo.emptyToNull()
|
||||
param["groupName"] = groupName.emptyToNull()
|
||||
param["agentCode"] = agentCode.emptyToNull()
|
||||
param["awbType"] = awbType.emptyToNull()
|
||||
param["businessType"] = businessType.emptyToNull()
|
||||
param["goods"] = goods.emptyToNull()
|
||||
param["spCode"] = spCode.emptyToNull()
|
||||
|
||||
searchParam.value = param
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询航班
|
||||
*/
|
||||
private val domFlightGnjCangDanLiveData = MutableLiveData<JSONObject>()
|
||||
val domFlightGnjCangDanObserver = Transformations.switchMap(domFlightGnjCangDanLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.domFlightGnjCangDan(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GnjCangDanListViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun domFlightGnjCangDan(fdate: String, fno: String) {
|
||||
val temObj = JSONObject()
|
||||
temObj["countryType"] = null
|
||||
temObj["fclose"] = null
|
||||
temObj["fdate"] = fdate.emptyToNull()
|
||||
temObj["fdep"] = null
|
||||
temObj["fdest"] = null
|
||||
temObj["fid"] = null
|
||||
temObj["fno"] = fno.emptyToNull()
|
||||
temObj["mclose"] = null
|
||||
|
||||
|
||||
domFlightGnjCangDanLiveData.value = temObj
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除行
|
||||
*/
|
||||
inner class CangDanDel(val id: Int, val position: Int)
|
||||
|
||||
private val deleteFestGnjCangDanLiveData = MutableLiveData<CangDanDel>()
|
||||
val deleteFestGnjCangDanObserver = Transformations.switchMap(deleteFestGnjCangDanLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.deleteFestGnjCangDan(param.id)
|
||||
response["positionDel"] = param.position
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GnjCangDanListViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun deleteFestGnjCangDan(id: Int, position: Int) {
|
||||
deleteFestGnjCangDanLiveData.value = CangDanDel(id, position)
|
||||
}
|
||||
|
||||
/**
|
||||
* 货物发放
|
||||
*/
|
||||
private val provideGnjCangDanLiveData = MutableLiveData<JSONObject>()
|
||||
val provideGnjCangDanObserver = Transformations.switchMap(provideGnjCangDanLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.provideGnjCangDan(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GnjCangDanListViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun provideGnjCangDan(fid: Int, ids: List<Int>) {
|
||||
val temObj = JSONObject()
|
||||
temObj["fid"] = fid
|
||||
temObj["ids"] = ids
|
||||
|
||||
provideGnjCangDanLiveData.value = temObj
|
||||
}
|
||||
|
||||
/**
|
||||
* 始发港
|
||||
*/
|
||||
var startList = JSONArray()
|
||||
private val startLiveData = MutableLiveData<String>()
|
||||
fun start(time: String) {
|
||||
startLiveData.value = time
|
||||
}
|
||||
|
||||
val startObserver = Transformations.switchMap(startLiveData) { _ ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.startGnj()
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GnjCangDanListViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.lukouguoji.gnj.viewModel
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.*
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.gnj.model.GnjChuKuListModel
|
||||
import com.lukouguoji.module_base.common.String.emptyToNull
|
||||
import com.lukouguoji.module_base.http.user.UserNetwork
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.flow.*
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
class GnjChuKuListViewModel : ViewModel() {
|
||||
/**
|
||||
* 航班号
|
||||
*/
|
||||
var fid: Int? = null
|
||||
|
||||
/**
|
||||
* 选中
|
||||
*/
|
||||
val checkCount: LiveData<Int>
|
||||
get() = _checkCount
|
||||
|
||||
/**
|
||||
* 选中重量
|
||||
*/
|
||||
val checkCountWeight: LiveData<Double>
|
||||
get() = _checkCountWeight
|
||||
|
||||
private val _checkCount = MutableLiveData<Int>()
|
||||
private val _checkCountWeight = MutableLiveData<Double>()
|
||||
|
||||
init {
|
||||
_checkCount.value = 0
|
||||
}
|
||||
|
||||
fun plusOne(model: GnjChuKuListModel) {
|
||||
val count = _checkCount.value ?: 0
|
||||
_checkCount.value = count + 1
|
||||
_checkCountWeight.value = _checkCountWeight.value?.plus(model.weight)
|
||||
}
|
||||
|
||||
fun subOne(model: GnjChuKuListModel) {
|
||||
val count = _checkCount.value ?: 0
|
||||
_checkCount.value = count - 1
|
||||
_checkCountWeight.value = _checkCountWeight.value?.minus(model.weight)
|
||||
}
|
||||
|
||||
fun setCheckCount(count: Int, weight: Double) {
|
||||
_checkCount.value = count
|
||||
_checkCountWeight.value = weight
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页搜索
|
||||
*/
|
||||
private val searchParam = MutableLiveData<JSONObject>()
|
||||
val searchParamLive = Transformations.switchMap(searchParam) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.searchGnjChuKu(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutCollectionViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun search(
|
||||
limit: Int,
|
||||
page: Int,
|
||||
wbNo: String,
|
||||
agentCode: String,
|
||||
id: String
|
||||
) {
|
||||
|
||||
val param = JSONObject()
|
||||
param["limit"] = limit
|
||||
param["page"] = page
|
||||
param["wbNo"] = wbNo.emptyToNull()
|
||||
param["agentCode"] = agentCode.emptyToNull()
|
||||
param["id"] = id.emptyToNull()
|
||||
|
||||
searchParam.value = param
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据运单号后4位查询运单号
|
||||
*/
|
||||
val queryWbNoGnjChuKuParamLive = MutableSharedFlow<JSONObject>(replay = 1)
|
||||
fun queryWbNoGnjChuKu(wbNo: String) {
|
||||
viewModelScope.launch {
|
||||
flow {
|
||||
val response = UserNetwork.queryWbNoGnjChuKu(wbNo)
|
||||
//返回结果
|
||||
emit(response)
|
||||
}.flowOn(Dispatchers.Default)
|
||||
.catch { e ->
|
||||
Log.e("GnjChuKuListViewModel", e.stackTraceToString())
|
||||
}
|
||||
.collect { response ->
|
||||
queryWbNoGnjChuKuParamLive.emit(response)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 确认出库
|
||||
*/
|
||||
private val completedGnjChuKuLiveData = MutableLiveData<JSONObject>()
|
||||
val completedGnjChuKuObserver = Transformations.switchMap(completedGnjChuKuLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.completedGnjChuKu(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutCollectionViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun completedGnjChuKu(ids: List<Int>) {
|
||||
val temObj = JSONObject()
|
||||
temObj["fid"] = 0 //随意填,不起作用
|
||||
temObj["ids"] = ids
|
||||
|
||||
completedGnjChuKuLiveData.value = temObj
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据提货单号查询
|
||||
*/
|
||||
private val queryPickByIdGnjChuKuLiveData = MutableLiveData<String>()
|
||||
val queryPickByIdGnjChuKuObserver = Transformations.switchMap(queryPickByIdGnjChuKuLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.queryPickByIdGnjChuKu(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutCollectionViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun queryPickByIdGnjChuKu(pkId: String) {
|
||||
queryPickByIdGnjChuKuLiveData.value = pkId
|
||||
}
|
||||
|
||||
/**
|
||||
* 代理人
|
||||
*/
|
||||
var agentCodeList = JSONArray()
|
||||
private val agentCodeLiveData = MutableLiveData<String>()
|
||||
fun agentCode(time: String) {
|
||||
agentCodeLiveData.value = time
|
||||
}
|
||||
|
||||
val agentCodeObserver = Transformations.switchMap(agentCodeLiveData) { _ ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.agentCodeGnj()
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutStartViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.lukouguoji.gnj.viewModel
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.liveData
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.module_base.http.user.UserNetwork
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
||||
class GnjQueryInfoViewModel : ViewModel() {
|
||||
|
||||
private val logName = "GncQueryInfoViewModel"
|
||||
|
||||
var wayBillInfo = JSONObject()
|
||||
var wbNo: String? = null
|
||||
|
||||
/**
|
||||
* 出港查询详情
|
||||
*/
|
||||
inner class WaybillParam(val wbId: Int, val wbNo: String?)
|
||||
|
||||
private val wbIdData = MutableLiveData<WaybillParam>()
|
||||
val waybillLiveData = Transformations.switchMap(wbIdData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = JSONObject()
|
||||
if (param.wbId != -9999) {
|
||||
response = UserNetwork.searchByIdGnjQuery(param.wbId)
|
||||
} else if (param.wbNo != null) {
|
||||
response = UserNetwork.searchByWbNoGnjQuery(param.wbNo)
|
||||
} else {
|
||||
}
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e(logName, e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun queryWaybillById(wbId: Int, wbNo: String?) {
|
||||
wbIdData.value = WaybillParam(wbId, wbNo)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.lukouguoji.gnj.viewModel
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.liveData
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.module_base.common.String.emptyToNull
|
||||
import com.lukouguoji.module_base.http.user.UserNetwork
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
||||
class GnjQueryListViewModel : ViewModel() {
|
||||
|
||||
private val searchParam = MutableLiveData<JSONObject>()
|
||||
|
||||
val searchParamLive = Transformations.switchMap(searchParam) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.searchGnjQuery(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutCollectionViewModel", e.stackTraceToString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun search(
|
||||
limit: Int,
|
||||
page: Int,
|
||||
carrier: String,//承运人
|
||||
agentCode: String,//代理人
|
||||
awbType: String,//运单类型
|
||||
beginDate: String,
|
||||
endDate: String,
|
||||
fdate: String,//航班日期
|
||||
fno: String,//航班编码
|
||||
dest: String,//目的港
|
||||
location: String,//舱位
|
||||
range: String,
|
||||
businessType: String,//业务类型
|
||||
locStatus: String,//是否仓舱单
|
||||
wbNo: String,
|
||||
spCode: String, //特码
|
||||
goods: String //商品名
|
||||
) {
|
||||
|
||||
val param = JSONObject()
|
||||
param["limit"] = limit
|
||||
param["page"] = page
|
||||
param["carrier"] = carrier.emptyToNull()
|
||||
param["agentCode"] = agentCode.emptyToNull()
|
||||
param["awbType"] = awbType.emptyToNull()
|
||||
param["beginDate"] = beginDate.emptyToNull()
|
||||
param["endDate"] = endDate.emptyToNull()
|
||||
param["fdate"] = fdate.emptyToNull()
|
||||
param["dest"] = dest.emptyToNull()
|
||||
param["fno"] = fno.emptyToNull()
|
||||
param["location"] = location.emptyToNull()
|
||||
param["range"] = range.emptyToNull()
|
||||
param["businessType"] = businessType.emptyToNull()
|
||||
param["locStatus"] = locStatus.emptyToNull()
|
||||
param["wbNo"] = wbNo.emptyToNull()
|
||||
param["spCode"] = spCode.emptyToNull()
|
||||
param["goods"] = goods.emptyToNull()
|
||||
|
||||
searchParam.value = param
|
||||
}
|
||||
|
||||
/**
|
||||
* 代理人
|
||||
*/
|
||||
var agentCodeList = JSONArray()
|
||||
private val agentCodeLiveData = MutableLiveData<String>()
|
||||
fun agentCode(time: String) {
|
||||
agentCodeLiveData.value = time
|
||||
}
|
||||
|
||||
val agentCodeObserver = Transformations.switchMap(agentCodeLiveData) { _ ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.agentCodeGnj()
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutStartViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
var businessList = JSONArray()
|
||||
private val businessLiveData = MutableLiveData<String>()
|
||||
fun business(type: String) {
|
||||
businessLiveData.value = type
|
||||
}
|
||||
|
||||
val businessObserver = Transformations.switchMap(businessLiveData) { type ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.business(type)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutStartViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 特码
|
||||
*/
|
||||
var specialCodeList = JSONArray()
|
||||
private val specialCodeLiveData = MutableLiveData<String>()
|
||||
fun specialCode(time: String) {
|
||||
specialCodeLiveData.value = time
|
||||
}
|
||||
|
||||
val specialCodeObserver = Transformations.switchMap(specialCodeLiveData) { _ ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.specialCode()
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutStartViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 运单类型
|
||||
*/
|
||||
var awbList = JSONArray()
|
||||
private val awbLiveData = MutableLiveData<String>()
|
||||
fun awb(time: String) {
|
||||
awbLiveData.value = time
|
||||
}
|
||||
|
||||
val awbObserver = Transformations.switchMap(awbLiveData) { _ ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.awbTypeByWbNoGnjQuery()
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutStartViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.lukouguoji.gnj.viewModel
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.*
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.gnj.model.GnjRuKuRef
|
||||
import com.lukouguoji.module_base.common.String.emptyToNull
|
||||
import com.lukouguoji.module_base.http.user.UserNetwork
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
||||
|
||||
class GnjRuKuViewModel : ViewModel() {
|
||||
|
||||
/**
|
||||
* 选中
|
||||
*/
|
||||
val checkCount: LiveData<Int>
|
||||
get() = _checkCount
|
||||
|
||||
private val _checkCount = MutableLiveData<Int>()
|
||||
|
||||
init {
|
||||
_checkCount.value = 0
|
||||
}
|
||||
|
||||
fun plusOne() {
|
||||
val count = _checkCount.value ?: 0
|
||||
_checkCount.value = count + 1
|
||||
}
|
||||
|
||||
fun subOne() {
|
||||
val count = _checkCount.value ?: 0
|
||||
_checkCount.value = count - 1
|
||||
}
|
||||
|
||||
fun setCheckCount(count: Int) {
|
||||
_checkCount.value = count
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库查询 返回数据
|
||||
*/
|
||||
var wbListArrFromNet = JSONArray()
|
||||
var idsArray = JSONArray()
|
||||
val gncTransferRefList = arrayListOf<GnjRuKuRef>()
|
||||
|
||||
/**
|
||||
* 入库查询
|
||||
*/
|
||||
private val searchGnjRuKuLiveData = MutableLiveData<JSONObject>()
|
||||
val searchGnjRuKuObserver = Transformations.switchMap(searchGnjRuKuLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.searchGnjRuKu(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GnjRuKuViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun searchGnjRuKu(
|
||||
limit: Int,
|
||||
page: Int,
|
||||
carNo: String
|
||||
) {
|
||||
val param = JSONObject()
|
||||
param["limit"] = limit
|
||||
param["page"] = page
|
||||
param["text"] = carNo.emptyToNull()
|
||||
|
||||
searchGnjRuKuLiveData.value = param
|
||||
}
|
||||
|
||||
/**
|
||||
* 装车确认
|
||||
*/
|
||||
private val loadCarGnjRuKuLiveData = MutableLiveData<JSONObject>()
|
||||
val loadCarGnjRuKuObserver = Transformations.switchMap(loadCarGnjRuKuLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.loadCarGnjRuKu(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GnjRuKuViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun loadCarGnjRuKu(carNo: String, paramArr: JSONArray) {
|
||||
val tempObj = JSONObject()
|
||||
tempObj["carNo"] = carNo
|
||||
tempObj["wbNo"] = paramArr
|
||||
loadCarGnjRuKuLiveData.value = tempObj
|
||||
}
|
||||
|
||||
/**
|
||||
* 卸车确认
|
||||
*/
|
||||
private val unloadCarGnjRuKuLiveData = MutableLiveData<JSONObject>()
|
||||
val unloadCarGnjRuKuObserver = Transformations.switchMap(unloadCarGnjRuKuLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.unloadCarGnjRuKu(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GnjRuKuViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun unloadCarGnjRuKu(carNo: String, paramArr: JSONArray) {
|
||||
val tempObj = JSONObject()
|
||||
tempObj["carNo"] = carNo
|
||||
tempObj["wbNo"] = paramArr
|
||||
unloadCarGnjRuKuLiveData.value = tempObj
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.lukouguoji.gnj.viewModel
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.liveData
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.module_base.http.user.UserNetwork
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
||||
class GnjWareHouseInfoViewModel : ViewModel() {
|
||||
|
||||
private val logName = "GncQueryInfoViewModel"
|
||||
|
||||
var wayBillInfo = JSONObject()
|
||||
|
||||
/**
|
||||
* 出港查询详情
|
||||
*/
|
||||
private val queryInfoByIdGnjWareHouseLiveData = MutableLiveData<Int>()
|
||||
val queryInfoByIdGnjWareHouseObserver = Transformations.switchMap(queryInfoByIdGnjWareHouseLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = JSONObject()
|
||||
if (param != -9999) {
|
||||
response = UserNetwork.queryInfoByIdGnjWareHouse(param.toString())
|
||||
}
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e(logName, e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun queryInfoByIdGnjWareHouse(wbId: Int) {
|
||||
queryInfoByIdGnjWareHouseLiveData.value = wbId
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.lukouguoji.gnj.viewModel
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.liveData
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.module_base.common.String.emptyToNull
|
||||
import com.lukouguoji.module_base.http.user.UserNetwork
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
||||
class GnjWareHouseListViewModel : ViewModel() {
|
||||
|
||||
/**
|
||||
* 分页搜索
|
||||
*/
|
||||
private val searchParam = MutableLiveData<JSONObject>()
|
||||
val searchParamLive = Transformations.switchMap(searchParam) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.searchGnjWareHouse(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutCollectionViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun search(
|
||||
limit: Int,
|
||||
page: Int,
|
||||
carrier: String,
|
||||
beginDate: String,
|
||||
endDate: String,
|
||||
fdate: String,//航班日期
|
||||
fno: String,//航班编码
|
||||
dest: String,//目的港
|
||||
location: String,//舱位
|
||||
range: String,
|
||||
status: String,
|
||||
wbNo: String,
|
||||
groupName: String,
|
||||
agentCode: String,
|
||||
) {
|
||||
val param = JSONObject()
|
||||
param["limit"] = limit
|
||||
param["page"] = page
|
||||
param["carrier"] = carrier.emptyToNull()
|
||||
param["beginDate"] = beginDate.emptyToNull()
|
||||
param["endDate"] = endDate.emptyToNull()
|
||||
param["fdate"] = fdate.emptyToNull()
|
||||
param["dest"] = dest.emptyToNull()
|
||||
param["fno"] = fno.emptyToNull()
|
||||
param["location"] = location.emptyToNull()
|
||||
param["range"] = range.emptyToNull()
|
||||
param["locStatus"] = status.emptyToNull()
|
||||
param["wbNo"] = wbNo.emptyToNull()
|
||||
param["groupName"] = groupName.emptyToNull()
|
||||
param["agentCode"] = agentCode.emptyToNull()
|
||||
|
||||
searchParam.value = param
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据汇总
|
||||
*/
|
||||
val summaryObserver = Transformations.switchMap(searchParam) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.totalGnjWareHouse(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutCollectionViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 代理人
|
||||
*/
|
||||
var agentCodeList = JSONArray()
|
||||
private val agentCodeLiveData = MutableLiveData<String>()
|
||||
fun agentCode(time: String) {
|
||||
agentCodeLiveData.value = time
|
||||
}
|
||||
|
||||
val agentCodeObserver = Transformations.switchMap(agentCodeLiveData) { _ ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.agentCodeGnj()
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutStartViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.lukouguoji.gnj.viewModel
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.liveData
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.module_base.common.String.emptyToNull
|
||||
import com.lukouguoji.module_base.http.user.UserNetwork
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlin.collections.set
|
||||
|
||||
class GnjYiKu2ListViewModel : ViewModel() {
|
||||
|
||||
/**
|
||||
* 分页搜索
|
||||
*/
|
||||
private val searchParam = MutableLiveData<JSONObject>()
|
||||
val searchParamLive = Transformations.switchMap(searchParam) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.searchMovedGnjYiKu(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutCollectionViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun search(
|
||||
limit: Int,
|
||||
page: Int,
|
||||
beginDate: String,
|
||||
endDate: String,
|
||||
awbType: String,
|
||||
id: String,
|
||||
wbNo: String
|
||||
) {
|
||||
|
||||
val param = JSONObject()
|
||||
param["limit"] = limit
|
||||
param["page"] = page
|
||||
param["beginDate"] = beginDate.emptyToNull()
|
||||
param["endDate"] = endDate.emptyToNull()
|
||||
param["awbType"] = awbType.emptyToNull()
|
||||
param["id"] = id.emptyToNull()
|
||||
param["wbNo"] = wbNo.emptyToNull()
|
||||
|
||||
searchParam.value = param
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 运单类型
|
||||
*/
|
||||
var awbList = JSONArray()
|
||||
private val awbLiveData = MutableLiveData<String>()
|
||||
fun awb(type: String) {
|
||||
awbLiveData.value = type
|
||||
}
|
||||
|
||||
val awbObserver = Transformations.switchMap(awbLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.awb(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutStartViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.lukouguoji.gnj.viewModel
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.*
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.lukouguoji.module_base.common.String.emptyToNull
|
||||
import com.lukouguoji.module_base.http.user.UserNetwork
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
||||
class GnjYiKuListViewModel : ViewModel() {
|
||||
/**
|
||||
* 航班号
|
||||
*/
|
||||
var fid: Int? = null
|
||||
|
||||
/**
|
||||
* 选中
|
||||
*/
|
||||
val checkCount: LiveData<Int>
|
||||
get() = _checkCount
|
||||
|
||||
private val _checkCount = MutableLiveData<Int>()
|
||||
|
||||
init {
|
||||
_checkCount.value = 0
|
||||
}
|
||||
|
||||
fun plusOne() {
|
||||
val count = _checkCount.value ?: 0
|
||||
_checkCount.value = count + 1
|
||||
}
|
||||
|
||||
fun subOne() {
|
||||
val count = _checkCount.value ?: 0
|
||||
_checkCount.value = count - 1
|
||||
}
|
||||
|
||||
fun setCheckCount(count: Int) {
|
||||
_checkCount.value = count
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页搜索
|
||||
*/
|
||||
private val searchParam = MutableLiveData<JSONObject>()
|
||||
val searchParamLive = Transformations.switchMap(searchParam) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.searchGnjYiKu(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutCollectionViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun search(
|
||||
limit: Int,
|
||||
page: Int,
|
||||
wbNo: String,
|
||||
awbType: String,
|
||||
carrier: String
|
||||
) {
|
||||
|
||||
val param = JSONObject()
|
||||
param["limit"] = limit
|
||||
param["page"] = page
|
||||
param["wbNo"] = wbNo.emptyToNull()
|
||||
param["awbType"] = awbType.emptyToNull()
|
||||
param["carrier"] = carrier.emptyToNull()
|
||||
|
||||
searchParam.value = param
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 确认移库
|
||||
*/
|
||||
private val moveGnjYiKuLiveData = MutableLiveData<JSONObject>()
|
||||
val moveGnjYiKuObserver = Transformations.switchMap(moveGnjYiKuLiveData) { param ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
val response = UserNetwork.moveGnjYiKu(param)
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutCollectionViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun moveGnjYiKu( ids: List<Int>) {
|
||||
val temObj = JSONObject()
|
||||
temObj["fid"] = 0 //随意填,不起作用
|
||||
temObj["ids"] = ids
|
||||
|
||||
moveGnjYiKuLiveData.value = temObj
|
||||
}
|
||||
|
||||
/**
|
||||
* 运单类型
|
||||
*/
|
||||
var awbList = JSONArray()
|
||||
private val awbLiveData = MutableLiveData<String>()
|
||||
fun awb(time: String) {
|
||||
awbLiveData.value = time
|
||||
}
|
||||
|
||||
val awbObserver = Transformations.switchMap(awbLiveData) { _ ->
|
||||
liveData(Dispatchers.IO) {
|
||||
try {
|
||||
var response = UserNetwork.awbTypeGnjYiKu()
|
||||
emit(response)
|
||||
} catch (e: Exception) {
|
||||
Log.e("GoutStartViewModel", e.stackTraceToString())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
67
module_gnj/src/main/release/AndroidManifest.xml
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.lukouguoji.gnj">
|
||||
|
||||
<application>
|
||||
<activity android:name=".activity.GnjWareHouseInfoActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false"
|
||||
|
||||
/>
|
||||
<activity
|
||||
android:name=".activity.GnjYiKuListActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity
|
||||
android:name=".activity.GnjRuKuActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity
|
||||
android:name=".activity.GnjQueryInfoActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity
|
||||
android:name=".activity.GnjQueryListActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity
|
||||
android:name=".activity.GnjWareHouseActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity
|
||||
android:name=".activity.GnjChuKuListActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity
|
||||
android:name=".activity.GnjCangDanInfoActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity
|
||||
android:name=".activity.GnjCangDanListActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="true" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/list_bg" />
|
||||
<corners android:radius="7dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- 圆角-->
|
||||
<corners android:radius="5dp" />
|
||||
<solid android:color="@color/disable_grey" />
|
||||
<!--描边-->
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@android:color/darker_gray" />
|
||||
</shape>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- 圆角-->
|
||||
<corners android:radius="5dp" />
|
||||
<solid android:color="@color/white" />
|
||||
<!--描边-->
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@android:color/darker_gray" />
|
||||
</shape>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- 圆角-->
|
||||
<corners android:radius="1dp" />
|
||||
<!--描边-->
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@android:color/darker_gray" />
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#EA0553" />
|
||||
<corners android:radius="5dp"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/two_grey" />
|
||||
<corners android:radius="5dp"/>
|
||||
</shape>
|
||||
170
module_gnj/src/main/res/drawable/ic_launcher_background.xml
Normal file
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
916
module_gnj/src/main/res/layout/activity_gnj_cang_dan_add.xml
Normal file
@@ -0,0 +1,916 @@
|
||||
<?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>
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gnj.page.cangdan.add.GnjCangDanAddViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp"
|
||||
android:background="@drawable/collect_item_shape">
|
||||
|
||||
<!--主内容区-->
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 主内容区-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<!--第一列-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单号" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:enabled="false"
|
||||
android:imeOptions="actionDone"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@{viewModel.waybillCode}"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单件数" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@={viewModel.waybillCount}"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="计费重量" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@={viewModel.chargingWeight}"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:text="KG"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单类型" />
|
||||
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:onClick="@{viewModel::onWaybillType}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@{viewModel.waybillType}"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--第二列-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="代理人" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:onClick="@{viewModel::onAgentCode}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:enabled="false"
|
||||
android:imeOptions="actionDone"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@{viewModel.agent}"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="实到件数" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:cursorVisible="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@={viewModel.actualCount}"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="始发港" />
|
||||
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:enabled="false"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@={viewModel.origin}"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="业务类型" />
|
||||
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:onClick="@{viewModel::onBusinessType}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="start"
|
||||
android:text="@{viewModel.businessType}"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--第三列-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="特码" />
|
||||
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:onClick="@{viewModel::onSpcode}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:enabled="false"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@{viewModel.spCode}"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="实到重量" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:enabled="false"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@={viewModel.actualWeight}"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:text="KG"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="目的港" />
|
||||
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@={viewModel.dest}"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="危险品库位" />
|
||||
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:onClick="@{viewModel::onDgrLocation}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@{viewModel.dgrLocation}"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 品名-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="品名" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@={viewModel.goods}"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="危险品描述" />
|
||||
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:onClick="@{viewModel::onDgrDetail}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@{viewModel.dgrDetail}"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 备注-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="start"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="备注" />
|
||||
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@={viewModel.remark}"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="UN编号" />
|
||||
|
||||
</LinearLayout>
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@={viewModel.unCode}"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#5c6890"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()->viewModel.onCancel()}"
|
||||
android:text="取消" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()->viewModel.onSave(false)}"
|
||||
android:text="保存" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
258
module_gnj/src/main/res/layout/activity_gnj_cang_dan_info.xml
Normal file
@@ -0,0 +1,258 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.GnjCangDanInfoActivity">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!--运单信息 中间-->
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_weight="5"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 详细信息 分割线-->
|
||||
<!--<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/waybillInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="详细信息"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@drawable/dash_line"
|
||||
android:layerType="software" />
|
||||
|
||||
</LinearLayout>-->
|
||||
|
||||
<!--详细信息 内容区-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/collectList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--收货人 内容区-->
|
||||
<LinearLayout
|
||||
android:id="@+id/wareHouseInfoLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/gnj_cang_dan_info_content_shape"
|
||||
android:padding="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="收货人信息(个人短信必须填此信息)"
|
||||
android:textColor="@color/gnj_cang_dan_green"
|
||||
/>
|
||||
|
||||
<!-- 收货人填写区-->
|
||||
|
||||
|
||||
<!-- 收货人-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="收货人"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/receive"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:background="@drawable/gnj_cang_dan_info_edit_shape"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 空格-->
|
||||
|
||||
<!-- 身份证-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="身份证"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/cardNo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:background="@drawable/gnj_cang_dan_info_edit_shape"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 空格-->
|
||||
<!-- 电话-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="电话"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/telPhone"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:background="@drawable/gnj_cang_dan_info_edit_shape"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
<!-- 底部-->
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/submit_shape"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/submit_shape"
|
||||
android:gravity="center"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
391
module_gnj/src/main/res/layout/activity_gnj_cang_dan_list.xml
Normal file
@@ -0,0 +1,391 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.GnjCangDanListActivity"
|
||||
tools:ignore="ResourceName">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<!-- 搜索、列表页-->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchListFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<!-- 搜索 框 列表区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/list_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
<!-- 搜索框 区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:orientation="horizontal">
|
||||
<!--日期-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fdate"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:hint="请输入航班日期"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/startDateIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/calendar_icon"
|
||||
app:tint="@color/weak_grey" />
|
||||
|
||||
</LinearLayout>
|
||||
<!-- 空格-->
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 航班号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_search_row">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/fno"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="请输入航班号"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
<!-- 始发港-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_search_row">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/start"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="始发港"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp"
|
||||
android:enabled="false"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 横线-->
|
||||
<View
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@color/black" />
|
||||
|
||||
<!-- 目的港-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_search_row">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/dest"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="目的港"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp"
|
||||
android:enabled="false"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!--到港日期 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/endDate"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:hint="到港日期"
|
||||
android:textSize="15dp"
|
||||
android:enabled="false"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/endDateIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/calendar_icon"
|
||||
app:tint="@color/weak_grey"
|
||||
android:enabled="false"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="20dp"
|
||||
android:visibility="gone"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 搜索图标-->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchLayout"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/search_shape_gnc_ware_house2"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/search"
|
||||
app:tint="@color/colorPrimary" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--列表-->
|
||||
<LinearLayout
|
||||
android:id="@+id/listLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center|start"
|
||||
android:text="新增"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/addIcon"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:src="@mipmap/gnj_add" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:gravity="center|start"
|
||||
android:text="全选"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:src="@mipmap/gnj_check_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:gravity="center|right"
|
||||
android:text="快速检索"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/quickSearch"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="20dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:background="@drawable/gnj_cang_dan_list_input_edit_text"
|
||||
android:gravity="start"
|
||||
android:layout_gravity="center"
|
||||
android:hint=""
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.scwang.smart.refresh.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<com.lukouguoji.module_base.util.SwipeDeleteRecyclerView
|
||||
android:id="@+id/collectList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- 汇总数据 区域-->
|
||||
<LinearLayout
|
||||
android:id="@+id/totalLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/dark_grey"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="总票数:"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalPc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="票,已选中:"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/selPc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="票"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/send"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="20dp"
|
||||
android:background="@drawable/gnj_cang_dan_list_send_shape"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="货物发放"
|
||||
android:textColor="@color/dark_grey"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
543
module_gnj/src/main/res/layout/activity_gnj_chu_ku_list.xml
Normal file
@@ -0,0 +1,543 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.GnjChuKuListActivity">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<!-- 搜索、列表页-->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchListFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<!-- 搜索 框 列表区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/list_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
<!-- 搜索框 区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!--日期-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1.5"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/beginDate"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:hint="请输入提货日期"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/beginDateIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/calendar_icon"
|
||||
app:tint="@color/weak_grey" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 横线-->
|
||||
<View
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@color/black" />
|
||||
|
||||
<!--日期-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1.5"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/endDate"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:hint="请输入提货日期"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/endDateIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/calendar_icon"
|
||||
app:tint="@color/weak_grey" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 代理-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_search_row">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agentCode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:hint="请选择代理人"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp"
|
||||
android:text=""
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 运单号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_search_row">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/wbNo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="请输入运单号"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/wbScanIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/scan_code"
|
||||
app:tint="@color/weak_grey" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
<!--提货单号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/pickNo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="请输入提货单号"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scanIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/scan_code"
|
||||
app:tint="@color/weak_grey" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 搜索图标-->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchLayout"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/search_shape_gnc_ware_house2"
|
||||
android:padding="10dp">
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/search"
|
||||
app:tint="@color/colorPrimary" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent" />
|
||||
<!--
|
||||
筛选图标-->
|
||||
<LinearLayout
|
||||
android:id="@+id/filtrateLayout"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/search_shape_gnc_ware_house2"
|
||||
android:padding="10dp">
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/filtrate"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!--列表-->
|
||||
<LinearLayout
|
||||
android:id="@+id/listLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center|start"
|
||||
android:text="全选" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/gnj_check_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:gravity="center|right"
|
||||
android:text="快速检索" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/quickSearch"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/gnj_cang_dan_list_input_edit_text"
|
||||
android:gravity="start"
|
||||
android:hint=""
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="5dp"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.scwang.smart.refresh.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/collectList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- 汇总数据 区域-->
|
||||
<LinearLayout
|
||||
android:id="@+id/totalLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/dark_grey"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
<!-- 选中合计-->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="合计:"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
<TextView
|
||||
android:id="@+id/selPc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="票"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<!-- 总件数-->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="总件数:"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
<TextView
|
||||
android:id="@+id/totalPc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="票"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<!-- 总重量-->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="总重量:"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
<TextView
|
||||
android:id="@+id/totalWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="KG"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/send"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="20dp"
|
||||
android:background="@drawable/gnj_cang_dan_list_send_shape"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="确认出库"
|
||||
android:textColor="@color/dark_grey"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 筛选 页-->
|
||||
<LinearLayout
|
||||
android:id="@+id/filtrateFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/list_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<!-- 筛选内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:layout_weight="5"
|
||||
android:background="@drawable/home_shape"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="50dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="50dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 底部-->
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reset"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/submit_shape"
|
||||
android:gravity="center"
|
||||
android:text="重置"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/submit_shape"
|
||||
android:gravity="center"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
159
module_gnj/src/main/res/layout/activity_gnj_query_info.xml
Normal file
@@ -0,0 +1,159 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/list_bg"
|
||||
tools:context=".activity.GnjQueryInfoActivity">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!--运单信息 中间-->
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_weight="5"
|
||||
android:background="@drawable/collect_item_shape"
|
||||
android:overScrollMode="never"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--主运单详情 内容区-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/gncQueryInfoList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 关联仓库信息 分割线-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/dash_line"
|
||||
android:layerType="software" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/refWareHouseInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="关联仓库信息"
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@mipmap/open_show"
|
||||
app:tint="@color/colorPrimary" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/dash_line"
|
||||
android:layerType="software" />
|
||||
</LinearLayout>
|
||||
<!--关联仓库信息 内容区-->
|
||||
<LinearLayout
|
||||
android:id="@+id/wareHouseInfoLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@color/list_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/gncQueryWareHouseInfoList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
<!-- 底部-->
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginBottom="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/submit_shape"
|
||||
android:gravity="center"
|
||||
android:text="运单流程图"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
858
module_gnj/src/main/res/layout/activity_gnj_query_list.xml
Normal file
@@ -0,0 +1,858 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.GnjQueryListActivity">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
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: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" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<!-- 搜索、列表页-->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchListFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<!-- 搜索 框 列表区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/list_bg"
|
||||
android:orientation="vertical"
|
||||
|
||||
android:padding="5dp">
|
||||
|
||||
<!-- 搜索 区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 航班日期开始-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/beginDate"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:hint="请输入航班开始日期"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/beginDateIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/calendar_icon"
|
||||
app:tint="@color/weak_grey" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 航班日期结束-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/endDate"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:hint="请输入航班结束日期"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/endDateIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/calendar_icon"
|
||||
app:tint="@color/weak_grey" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 运单号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:background="@drawable/bg_search_row">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/wbNo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="请输入运单号"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 航班号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:background="@drawable/bg_search_row">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/fno"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="请输入航班号"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 搜索图标-->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchLayout"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/search_shape_gnc_ware_house2"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/search"
|
||||
app:tint="@color/colorPrimary" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
<!-- 筛选图标-->
|
||||
<LinearLayout
|
||||
android:id="@+id/filtrateLayout"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/search_shape_gnc_ware_house2"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/filtrate"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--列表区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.scwang.smart.refresh.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 筛选 页-->
|
||||
<LinearLayout
|
||||
android:id="@+id/filtrateFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/list_bg"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:padding="10dp">
|
||||
|
||||
<!-- 筛选内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_weight="5"
|
||||
android:background="@drawable/home_shape"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 入库时间-->
|
||||
<!--<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right"
|
||||
android:text="入库时间" />
|
||||
|
||||
<!–内容–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="3"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_shape">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/startDateParam"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:gravity="start|center"
|
||||
android:hint="开始时间"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_shape">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/endDateParam"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:gravity="start|center"
|
||||
android:hint="结束时间"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>-->
|
||||
|
||||
<!-- 航程-->
|
||||
<!--<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right"
|
||||
android:text="航程" />
|
||||
|
||||
<!–内容–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/hangCheng"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:hint="请输入航程"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>-->
|
||||
|
||||
<!-- 承运人-->
|
||||
<!--<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right"
|
||||
android:text="承运人" />
|
||||
|
||||
<!–内容–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/carrier"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:hint="请输入承运人"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>-->
|
||||
|
||||
<!-- 库位-->
|
||||
<!--<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right"
|
||||
android:text="库位" />
|
||||
|
||||
<!–内容–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/kuWei"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:hint="请输入库位"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>-->
|
||||
|
||||
<!-- 目的港-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right"
|
||||
android:text="目的港" />
|
||||
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/mudiGang"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:hint="请输入目的港"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 特码-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right"
|
||||
android:text="特码" />
|
||||
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/spCode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center|start"
|
||||
android:hint="请选择特码"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 代理人-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right"
|
||||
android:text="代理人" />
|
||||
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agentCode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center|start"
|
||||
android:hint="请选择代理人"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- 品名-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right"
|
||||
android:text="品名" />
|
||||
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/goods"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:hint="请输入品名"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 运单类型-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right"
|
||||
android:text="运单类型" />
|
||||
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/awbType"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center|start"
|
||||
android:hint="请选择运单类型"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- 业务类型-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right"
|
||||
android:text="业务类型" />
|
||||
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/businessType"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center|start"
|
||||
android:hint="请选择业务类型"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 是否上舱单-->
|
||||
<!--<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right"
|
||||
android:text="是否上舱单" />
|
||||
|
||||
<!–内容–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/isCangDan"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center|start"
|
||||
android:hint="请选择"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>-->
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 底部-->
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reset"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/submit_shape"
|
||||
android:gravity="center"
|
||||
android:text="重置"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/submit_shape"
|
||||
android:gravity="center"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
216
module_gnj/src/main/res/layout/activity_gnj_ru_ku.xml
Normal file
@@ -0,0 +1,216 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/list_bg"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.GnjRuKuActivity">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:background="@drawable/search_shape"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:hint="@color/white"
|
||||
android:src="@mipmap/search" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/search_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="请输入板车号"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="16dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/carNoScan"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:src="@mipmap/scan_code" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/search"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/addIcon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/gnj_add"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!--运单信息 中间-->
|
||||
<LinearLayout
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_weight="5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 关联运单列表-->
|
||||
<LinearLayout
|
||||
android:id="@+id/gnc_transfer_list_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@color/list_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center|start"
|
||||
android:text="全选"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:src="@mipmap/all_check_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.scwang.smart.refresh.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/gnc_transfer_waybill_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- 底部-->
|
||||
<LinearLayout
|
||||
android:id="@+id/operatorLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/submit_shape"
|
||||
android:gravity="center"
|
||||
android:text="装车确认"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/unloading"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/submit_shape"
|
||||
android:gravity="center"
|
||||
android:text="卸车确认"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
254
module_gnj/src/main/res/layout/activity_gnj_ware_house.xml
Normal file
@@ -0,0 +1,254 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.GnjWareHouseActivity">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
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: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" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<!-- 搜索、列表页-->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchListFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<!-- 搜索 框 列表区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/list_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
<!-- 搜索框 区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:orientation="horizontal">
|
||||
<!--运单号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/waybillNo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:hint="请输入运单号"
|
||||
android:imeOptions="actionDone"
|
||||
android:gravity="center"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 空格-->
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent">
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 代理人-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agentCode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:hint="请选择代理人"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 承运人-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/carrier"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:hint="请输入承运人"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
<!-- 分组类型-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/isGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="请选择分组类型"
|
||||
android:text=""
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent" />
|
||||
<!-- 搜索图标-->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchLayout"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/search_shape_gnc_ware_house2"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/search"
|
||||
app:tint="@color/colorPrimary" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--列表-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.scwang.smart.refresh.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/guo_nei_collect_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- 汇总数据 区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:background="@color/dark_grey"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/summaryText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="总票数:0,总件数:0,总重量:0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/list_bg"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.GnjWareHouseInfoActivity">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!--运单信息 中间-->
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_weight="5"
|
||||
android:background="@drawable/collect_item_shape"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--主运单详情 内容区-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/gncQueryInfoList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
17
module_gnj/src/main/res/layout/activity_gnj_yi_ku_list.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.GnjYiKuListActivity">
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewpager2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</androidx.viewpager2.widget.ViewPager2>
|
||||
|
||||
</LinearLayout>
|
||||
18
module_gnj/src/main/res/layout/activity_main.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello World!"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
302
module_gnj/src/main/res/layout/fragment_gnj_yi_ku.xml
Normal file
@@ -0,0 +1,302 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".fragment.GnjYiKuFragment"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<!-- 搜索、列表页-->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchListFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<!-- 搜索 框 列表区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/list_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
<!-- 搜索框 区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dp"
|
||||
android:gravity="center">
|
||||
|
||||
<!-- 业务类型-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_search_row">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/awbType"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="请选择业务类型"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 运单号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_search_row">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/wbNo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="请输入运单号"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 承运人 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/carrier"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="请输入承运人"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
<!-- 搜索图标-->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchLayout"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/search_shape_gnc_ware_house2"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/search"
|
||||
app:tint="@color/colorPrimary" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
|
||||
<!--列表-->
|
||||
<LinearLayout
|
||||
android:id="@+id/listLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center|start"
|
||||
android:text="全选" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/gnj_check_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:gravity="center|right"
|
||||
android:text="快速检索" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/quickSearch"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/gnj_cang_dan_list_input_edit_text"
|
||||
android:gravity="start"
|
||||
android:hint=""
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="5dp"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.scwang.smart.refresh.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/collectList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- 汇总数据 区域-->
|
||||
<LinearLayout
|
||||
android:id="@+id/totalLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/dark_grey"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="总票数:"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalPc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="票,已选中:"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/selPc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="票"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/send"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@drawable/gnj_cang_dan_list_send_shape"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="确认移库"
|
||||
android:textColor="@color/dark_grey"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
438
module_gnj/src/main/res/layout/fragment_gnj_yi_ku2.xml
Normal file
@@ -0,0 +1,438 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".fragment.GnjYiKu2Fragment">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
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: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" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<!-- 搜索、列表页-->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchListFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<!-- 搜索 框 列表区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/list_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<!-- 搜索 区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 开始日期-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/startDate"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:hint="请输入开始时间"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/startDateIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/calendar_icon"
|
||||
app:tint="@color/weak_grey" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 空格-->
|
||||
<LinearLayout
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="@color/weak_grey"
|
||||
android:textSize="25dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 结束日期-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/endDate"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:hint="请输入结束时间"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/endDateIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/calendar_icon"
|
||||
app:tint="@color/weak_grey" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 航班号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/bg_search_row">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/awbType"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="运单类型"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textSize="15dp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 移库单编号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/bg_search_row"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/id"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:gravity="center"
|
||||
android:hint="移库单编号"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/idScanIcon"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@mipmap/scan_code" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent" />
|
||||
<!-- 搜索图标-->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchLayout"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/search_shape_gnc_ware_house2"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/search"
|
||||
app:tint="@color/colorPrimary" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent" />
|
||||
<!-- 筛选图标-->
|
||||
<LinearLayout
|
||||
android:id="@+id/filtrateLayout"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/search_shape_gnc_ware_house2"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/filtrate"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--列表区域-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.scwang.smart.refresh.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 筛选 页-->
|
||||
<LinearLayout
|
||||
android:id="@+id/filtrateFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/list_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<!-- 筛选内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:layout_weight="5"
|
||||
android:background="@drawable/home_shape"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="50dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="50dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 运单号-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right"
|
||||
android:text="运单号" />
|
||||
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/wbNo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:hint="请输入运单号"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/wbNoScanIcon"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@mipmap/scan_code" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 底部-->
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reset"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/submit_shape"
|
||||
android:gravity="center"
|
||||
android:text="重置"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/submit_shape"
|
||||
android:gravity="center"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
109
module_gnj/src/main/res/layout/gnj_cang_dan_info_item.xml
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="2dp">
|
||||
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 文字-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start|center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单号" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/isMust"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="1dp"
|
||||
android:text="*"
|
||||
android:textColor="@color/red" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 输入框-->
|
||||
<LinearLayout
|
||||
android:id="@+id/inputLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible">
|
||||
<!-- 前缀-->
|
||||
<EditText
|
||||
android:id="@+id/inputContentPre"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/gnj_cang_dan_info_edit_shape"
|
||||
android:gravity="center|start"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- 横线-->
|
||||
<View
|
||||
android:id="@+id/inputContentPreView"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="1dp"
|
||||
android:layout_marginRight="1dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/black"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<!-- 输入框-->
|
||||
<EditText
|
||||
android:id="@+id/inputContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/gnj_cang_dan_info_edit_shape"
|
||||
android:gravity="center|start"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
<!-- 下拉框-->
|
||||
<TextView
|
||||
android:id="@+id/selContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/gnj_cang_dan_info_edit_shape"
|
||||
android:gravity="center|start"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="请选择"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
336
module_gnj/src/main/res/layout/gnj_cang_dan_list_item.xml
Normal file
@@ -0,0 +1,336 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="90dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/collect_item_shape"
|
||||
android:orientation="horizontal"
|
||||
android:padding="3dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/leftIcon"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/gnc_ware_house_left_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
<!-- 运单号行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 运单号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="运单号:"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/wbNo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:text="A123456789"
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- 始发港-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="始发港:"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/startPort"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 目的港-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="目的港:"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/destPort"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 代理人-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="代理人:"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agentCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/weak_grey2" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 运单件数-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="运单件数:"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalPc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!-- 分割线-->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@drawable/dash_line"
|
||||
android:layerType="software" />
|
||||
<!-- 第二行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 实到件数-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="实到件数:"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 实到重量-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="实到重量:"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/acWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 特码-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="特码:"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/spCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 运单类型-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="运单类型:"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/awbType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/weak_grey2" />
|
||||
</LinearLayout>
|
||||
<!-- 品名-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="品名:"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/goods"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="105dp">
|
||||
<TextView
|
||||
android:id="@+id/delete"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/gnj_cang_dan_list_item_del_shape"
|
||||
android:text="删除"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/white"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
311
module_gnj/src/main/res/layout/gnj_chu_ku_list_item.xml
Normal file
@@ -0,0 +1,311 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="105dp"
|
||||
android:background="@drawable/collect_item_shape"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/leftIcon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/gnc_ware_house_left_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
<!-- 提货单号行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 提货单号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="提货单号"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pickNo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- 运单号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/weak_grey"
|
||||
android:text="运单号"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/wbNo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="A123456789"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 特码-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="特码"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/spCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 件数-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="件数"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 重量-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="重量"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/weight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 提货单号行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 提取时间-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="航班日期"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fdate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 航班号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="航班号"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fno"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 代理-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="代理"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agentCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 品名-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="品名"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/goods"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 提取时间-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="提取时间"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pickDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
47
module_gnj/src/main/res/layout/gnj_query_info_item.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="start|center"
|
||||
android:text="过磅重量" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:paddingRight="5dp"
|
||||
android:layout_weight="3"
|
||||
android:gravity="center|start"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:cursorVisible="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:text="0.0"
|
||||
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
226
module_gnj/src/main/res/layout/gnj_query_info_wh_list_item.xml
Normal file
@@ -0,0 +1,226 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/collect_item_shape"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/fubang_list_left_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<!-- 库位 行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="库位"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/location"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="2"
|
||||
android:text=""
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="航班"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/flight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第二行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="件数"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="/"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/weight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="收运人"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/opId"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第三行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="入库时间"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/opDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="出库时间"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pickupTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
170
module_gnj/src/main/res/layout/gnj_query_list_item.xml
Normal file
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:background="@drawable/collect_item_shape"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/gnc_ware_house_left_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:orientation="vertical">
|
||||
<!-- 运单号行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/weak_grey"
|
||||
android:text="运单号"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="123"
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/weak_grey"
|
||||
android:text="航班"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/flight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text=""/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第二行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/weak_grey"
|
||||
android:text="航程"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/range"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text=""/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/weak_grey"
|
||||
android:text="代理"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agentCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text=""/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2.5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/weak_grey"
|
||||
android:text="品名"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/goods"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:singleLine="true"
|
||||
android:maxLines="1"
|
||||
android:text=""/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
315
module_gnj/src/main/res/layout/gnj_ru_ku_ref_list_item.xml
Normal file
@@ -0,0 +1,315 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/collect_item_shape"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/leftIcon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/list_item_left_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<!-- 运单号行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="运单号"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="A123456789"
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- <!– 总件数–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="总件数"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalPc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text=""
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!– 件数–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="件数"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text=""
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!– 重量–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="重量"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/weight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text=""
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!– 计费重量–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="计费重量"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cashWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text=""
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
</LinearLayout>-->
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第二行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 确认人-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="确认人"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/confirmId"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 确认时间-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="确认时间"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/confirmDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!--<!– 始发港–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="始发港"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/origin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!– 目的港–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="目的港"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dest"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="代理人"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agentCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="2">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="特码"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/spCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="2">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="品名"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/goods"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>-->
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
40
module_gnj/src/main/res/layout/gnj_ru_ku_waybill_dialog.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:background="@drawable/search_shape"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/waybillNo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:paddingRight="5dp"
|
||||
android:layout_weight="3"
|
||||
android:gravity="center|start"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:text=""
|
||||
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/carNoScan"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:src="@mipmap/scan_code" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
47
module_gnj/src/main/res/layout/gnj_ware_house_info_item.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<!--内容-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/input_shape"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start|center"
|
||||
android:text="过磅重量" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:paddingRight="5dp"
|
||||
android:layout_weight="3"
|
||||
android:gravity="center|start"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:cursorVisible="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:background="@drawable/input_edit_text"
|
||||
android:text="0.0"
|
||||
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
518
module_gnj/src/main/res/layout/gnj_ware_house_list_item.xml
Normal file
@@ -0,0 +1,518 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/groupNameLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/groupTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="目的港:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/groupContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="北京,入库天数:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/days"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="32"
|
||||
android:textColor="@color/red"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:background="@drawable/collect_item_shape"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/gnc_ware_house_left_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
<!-- 运单号行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:text="运单号"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="A123456789"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="18sp" />
|
||||
<!-- 入库时间-->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="入库"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 分割线-->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@drawable/dash_line"
|
||||
android:layerType="software" />
|
||||
<!-- 第二行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
<!-- 航班号-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:text="航班"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/flight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="件数"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="/"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/weight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--<!– 品名–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="品名"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/goods"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!– 特码–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="特码"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/spCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!– 代理人–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="代理人"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agentCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!– 承运人–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="承运人"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/by1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!– 始发港–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="始发港"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/origin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>-->
|
||||
|
||||
</LinearLayout>
|
||||
<!--<!– 分割线–>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@drawable/dash_line"
|
||||
android:layerType="software" />
|
||||
<!– 第三行–>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!– 航班号–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="航班号"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fno"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!– 库位–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="库位"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/location"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!– 运单类型–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="运单类型"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/awbType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!– 业务类型–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="业务类型"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/businessType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!– 状态–>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="状态"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="入库时间"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>-->
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
345
module_gnj/src/main/res/layout/gnj_yi_ku2_list_item.xml
Normal file
@@ -0,0 +1,345 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="105dp"
|
||||
android:background="@drawable/collect_item_shape"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/leftIcon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/gnc_ware_house_left_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
<!-- 运单号行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="运单号"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/wbNo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text=""
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="移库单编号"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text=""
|
||||
android:textColor="@color/colorPrimary"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 提货单号行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
<!-- 件数-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="件数"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/weak_grey2" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 重量-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="重量"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/weight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/weak_grey2" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 品名-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="品名"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/goods"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/weak_grey2" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 特码-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="特码"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/spCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/weak_grey2" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 代理-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="代理"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agentCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/weak_grey2" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!-- 分割线-->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@drawable/dash_line"
|
||||
android:layerType="software" />
|
||||
<!-- 第二行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 始发港-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="始发港"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/origin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/weak_grey2" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 目的港-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="目的港"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dest"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/weak_grey2" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 航班-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="航班"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/flight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/weak_grey2" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- 运单类型-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="运单类型"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/awbType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/weak_grey2" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
285
module_gnj/src/main/res/layout/gnj_yi_ku_list_item.xml
Normal file
@@ -0,0 +1,285 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:background="@drawable/collect_item_shape"
|
||||
android:orientation="horizontal"
|
||||
android:padding="2dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/leftIcon"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/gnc_ware_house_left_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
<!-- 运单号行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/weak_grey"
|
||||
android:text="运单号"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/wbNo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="A123456789"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/fno"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
<TextView
|
||||
android:id="@+id/origin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dest"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 提货单号行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 件数-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="件数"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 重量-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:text="重量"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/weight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<!-- 特码-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="特码"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/spCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 代理-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:text="代理"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agentCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<!-- 分割线-->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@drawable/dash_line"
|
||||
android:layerType="software" />
|
||||
<!-- 第二行-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 品名-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="品名"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/goods"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 运单类型-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="运单类型"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/weak_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/awbType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/weak_grey2"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
module_gnj/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
module_gnj/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
module_gnj/src/main/res/mipmap-mdpi/gnj_add.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
module_gnj/src/main/res/mipmap-mdpi/gnj_cang_dan_icon.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
BIN
module_gnj/src/main/res/mipmap-mdpi/gnj_cang_ku_icon.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
module_gnj/src/main/res/mipmap-mdpi/gnj_check_icon.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
module_gnj/src/main/res/mipmap-mdpi/gnj_chu_ku_icon.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
module_gnj/src/main/res/mipmap-mdpi/gnj_query_icon.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
module_gnj/src/main/res/mipmap-mdpi/gnj_ru_ku_icon.png
Normal file
|
After Width: | Height: | Size: 26 KiB |